Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Code Block Styling

  • #9746
    Avatar photo[anonymous]

    In publii back end the code blocks are styled with line numbers, dark background and whatever language the code block is in.

    When published, although the code blocks still have a class with “line-numbers language-php”  the item is not styled.

    Where is the css for “line-numbers language-php”? This appears to be the same in multiple themes.

    #9747
    Avatar photoBob

    To highlight the code syntax on the front end, you need to install PrismJs. This feature is exclusively available in our premium documentation themes.

    #9749
    Avatar photo[anonymous]

    So if I buy another premium theme this is already installed?

    #9750
    Avatar photoBob

    PrismJs is only supported by the Documentation, ProDocs, and Q-Answers templates.

    #9779
    Avatar photo[anonymous]

    Sometimes I write code stuff on my blog, which uses the Simple theme.  If there was a premium version of Simple that included PrismJS I would definitely pay for it.  I look through some of the live demos of the other blog-style premium themes but didn’t find one that suited me.  The documentation-style themes look really nice but I wouldn’t use them for my blog.