[Question] Icons #215
Replies: 1 comment 2 replies
-
I think the correct answer here is sort of. Statiq draws a pretty defined line between what the engine cares about and what a layout/theme/front-end should be doing. Normally I'd say something like this is entirely a front-end concern and while Statiq could certainly generate sites that use whatever icon font someone wants to use, doing so would mean adding the correct HTML in a layout or page, which Statiq doesn't really care about other than to output it. That said, the linked feature from Material for MkDocs is a little more involved and includes some coordination with the generator to add special Markdown processing. Statiq doesn't have this same Markdown support out of the box since it's non-standard (though Statiq does enable a small number of non-standard Markdown features that users have come to expect). You can also add additional Markdig extensions to the Statiq Markdown processor. Some of the available ones are listed here and you can also write your own - here's a great guide. Of course, generating HTML at the site of the icon doesn't do much good without the necessary CSS includes, which Material for MkDocs appears to include by default for it's own Markdown extension. You'll need to include that yourself in your theme or layout. In short, Statiq can certainly support something like this, but it's not out of the box (right now). I suspect this would be something a theme could integrate more generally (just like Material for MkDocs does as a theme for MkDocs), but at the moment you'd need to write a small Markdig extension to handle the special Markdown syntax and add some CSS and/or JavaScript to your layout to light it up. |
Beta Was this translation helpful? Give feedback.
-
Can you include icons for custom fonts like https://squidfunk.github.io/mkdocs-material/reference/icons-emojis/
And then add them in markdown like
:fontawesome-regular-face-laugh-wink:
Beta Was this translation helpful? Give feedback.
All reactions