Giter Site home page Giter Site logo

Comments (7)

faassen avatar faassen commented on August 27, 2024 1

Ah, yes, I did see the inline style tags! I'll give that a shot, thanks! I didn't realize inline styles could be considered unsafe.

from tabi.

faassen avatar faassen commented on August 27, 2024 1

What I did is go through the tabi config file and adopt various items into my own. The comments helped here. I think a mention of this above the csp in the comment and or above highlight would have saved me.

from tabi.

welpo avatar welpo commented on August 27, 2024

These issues make it seem like I'm complaining a lot. I am enjoying tabi; I'm just reporting issues I struggled with.

Not at all! I appreciate these; I take it as a sign of care—noticing imperfections.

I could see style tags being added to the generated code, but these don't show up for some reason.

You mean you could see the styling tags (e.g. <span style="color:#d08770;">)?

If so, chances are the styling is not loading due to tabi's default strict Content Security Policy. You could try disabling it or allowing inline styles with this line:

{ directive = "style-src", domains = ["'self'", "'unsafe-inline'"] },

Let me know whether this fixes the issue!

from tabi.

faassen avatar faassen commented on August 27, 2024

I would be good if the docs could mention this I think, by the way. Oh wait I still have to try whether this fixes things first.

from tabi.

faassen avatar faassen commented on August 27, 2024

I just tried it and it works.

I checked the generated HTML source and I think it's not loading the CSS for the CSS based syntax lighlighting anymore so that's good.

from tabi.

welpo avatar welpo commented on August 27, 2024

Great!

I would be good if the docs could mention this I think

Agreed. I think I'll add it to the CSP page, but perhaps it would be good to mention it in the Mastering tabi post.

Where would you expect to find this info?

from tabi.

welpo avatar welpo commented on August 27, 2024

Thanks for the suggestions. I've added comments on config.toml, theme.toml above the syntax theme and the CSP directives. I've also mentioned it in the CSP demo/docs page.

from tabi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.