diff --git a/README.md b/README.md index c7859d5..763bc08 100644 --- a/README.md +++ b/README.md @@ -61,3 +61,11 @@ To create a new general blog post, run a command like this: ```shell hugo new content --king article blog/your-article-title.md ``` + +### Icons + +You can use solid and brand icons from https://fontawesome.com/icons version 6 in your posts like this: +```md +{{< fa envelope >}} +{{< fa brands gitlab >}} +``` diff --git a/layouts/shortcodes/fa.html b/layouts/shortcodes/fa.html new file mode 100644 index 0000000..7030e7a --- /dev/null +++ b/layouts/shortcodes/fa.html @@ -0,0 +1,6 @@ + +{{- $faStylePrefix := "fa-solid" }} +{{- if in (slice "fa-solid" "fa-brands") (.Get 0) }} + {{- $faStylePrefix = (.Get 0) }} +{{- end }} + \ No newline at end of file