add: added a shortcode "icon"

This commit is contained in:
Junyi Hou 2024-04-23 19:31:41 +08:00
parent 9507d51bd2
commit 5fc27f5285
2 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,56 @@
+++
author = "Junyi"
title = "Icons"
date = "2024-04-23"
description = "Guide to using social icons supported by Anubis2."
tags = [
"icons",
"anubis2",
"hugo"
]
+++
To use an icon, simply copy its shortcode and paste it into your content where you want the icon to appear. The shortcode must be enclosed in `{{</* */>}}`.
Here is a list of available icons, their shortcodes, and what they look like when rendered:
| name | shortcode | icon |
| ---------- | ---------------------------------- | ---------------------------- |
| 4chan | `{{</* icon "4chan" */>}}` | {{< icon "4chan" >}} |
| leetcode | `{{</* icon "leetcode" */>}}` | {{< icon "leetcode" >}} |
| qq | `{{</* icon "qq" */>}}` | {{< icon "qq" >}} |
| spotify | `{{</* icon "spotify" */>}}` | {{< icon "spotify" >}} |
| tinder | `{{</* icon "tinder" */>}}` | {{< icon "tinder" >}} |
| youtube | `{{</* icon "youtube" */>}}` | {{< icon "youtube" >}} |
| docs | `{{</* icon "docs" */>}}` | {{< icon "docs" >}} |
| linkedin | `{{</* icon "linkedin" */>}}` | {{< icon "linkedin" >}} |
| reddit | `{{</* icon "reddit" */>}}` | {{< icon "reddit" >}} |
| steam | `{{</* icon "steam" */>}}` | {{< icon "steam" >}} |
| tumblr | `{{</* icon "tumblr" */>}}` | {{< icon "tumblr" >}} |
| zhihu | `{{</* icon "zhihu" */>}}` | {{< icon "zhihu" >}} |
| email | `{{</* icon "email" */>}}` | {{< icon "email" >}} |
| mastodon | `{{</* icon "mastodon" */>}}` | {{< icon "mastodon" >}} |
| rss | `{{</* icon "rss" */>}}` | {{< icon "rss" >}} |
| teams | `{{</* icon "teams" */>}}` | {{< icon "teams" >}} |
| twitch | `{{</* icon "twitch" */>}}` | {{< icon "twitch" >}} |
| facebook | `{{</* icon "facebook" */>}}` | {{< icon "facebook" >}} |
| medium | `{{</* icon "medium" */>}}` | {{< icon "medium" >}} |
| skype | `{{</* icon "skype" */>}}` | {{< icon "skype" >}} |
| telegram | `{{</* icon "telegram" */>}}` | {{< icon "telegram" >}} |
| twitter | `{{</* icon "twitter" */>}}` | {{< icon "twitter" >}} |
| github | `{{</* icon "github" */>}}` | {{< icon "github" >}} |
| netease | `{{</* icon "netease-music" */>}}` | {{< icon "netease-music" >}} |
| slack | `{{</* icon "slack" */>}}` | {{< icon "slack" >}} |
| theme | `{{</* icon "theme-dark" */>}}` | {{< icon "theme-dark" >}} |
| vk | `{{</* icon "vk" */>}}` | {{< icon "vk" >}} |
| gitlab | `{{</* icon "gitlab" */>}}` | {{< icon "gitlab" >}} |
| notion | `{{</* icon "notion" */>}}` | {{< icon "notion" >}} |
| snapchat | `{{</* icon "snapchat" */>}}` | {{< icon "snapchat" >}} |
| theme | `{{</* icon "theme-light" */>}}` | {{< icon "theme-light" >}} |
| weibo | `{{</* icon "weibo" */>}}` | {{< icon "weibo" >}} |
| instagram | `{{</* icon "instagram" */>}}` | {{< icon "instagram" >}} |
| patreon | `{{</* icon "patreon" */>}}` | {{< icon "patreon" >}} |
| soundcloud | `{{</* icon "soundcloud" */>}}` | {{< icon "soundcloud" >}} |
| tiktok | `{{</* icon "tiktok" */>}}` | {{< icon "tiktok" >}} |
| x | `{{</* icon "x" */>}}` | {{< icon "x" >}} |

View File

@ -0,0 +1 @@
{{ partial (print "tabler-icons/" (.Get 0) ".svg" ) . }}