probberechts / hexo-theme-cactus

:cactus: A responsive, clean and simple theme for Hexo.
https://probberechts.github.io/hexo-theme-cactus/
MIT License
3.2k stars 784 forks source link

Font Awesome icons in page text #298

Closed manestay closed 2 years ago

manestay commented 2 years ago

(sorry if this is the wrong place to ask this)

Is there a way to have the Font Awesome icons in the page text? I see that themes\cactus\layout\index.ejs has some code for displaying the links. However, I created a custom homepage by making file source/index.md, so I don't have the icons anymore. Ideally I would like the icons in the .md file.

probberechts commented 2 years ago

The Font Awesome font is included in the theme and you can include HTML in markdown files. Hence, you can add icons as instructed here: https://fontawesome.com/docs/web/add-icons/how-to

For example:

# Page title

Here is an icon: <i class="fa fa-tint" aria-hidden="true"></i>
manestay commented 2 years ago

It works! Thanks so much for the fast response. Total web design noob here :)