diff --git a/assets/css/_partial/_header.scss b/assets/css/_partial/_header.scss index 38424e014..1c6b2196b 100644 --- a/assets/css/_partial/_header.scss +++ b/assets/css/_partial/_header.scss @@ -175,11 +175,11 @@ header { } } -.theme-switch i { +.theme-switch svg { @include transform(rotate(225deg)); } -.theme-select i { +.theme-select svg { @include transform(rotate(225deg)); } diff --git a/assets/css/_partial/_icon.scss b/assets/css/_partial/_icon.scss index ca7b13a6c..49d23842f 100644 --- a/assets/css/_partial/_icon.scss +++ b/assets/css/_partial/_icon.scss @@ -17,20 +17,20 @@ img.emoji { display: inline-block !important; } -svg.fontawesome-icon { +svg.icon { display: inline-block; height: 1em; width: 1.25em; vertical-align: -0.125em; - color: $global-font-color; + color: $global-font-color default; [theme=dark] & { - color: $global-font-color-dark; + color: $global-font-color-dark default; } [theme=black] & { - color: $global-font-color-black; + color: $global-font-color-black default; } } -svg.fontawesome-icon > path { +svg.icon > path { fill: currentColor; } diff --git a/assets/css/color.css b/assets/css/color.css deleted file mode 100644 index c70425ccc..000000000 --- a/assets/css/color.css +++ /dev/null @@ -1,7 +0,0 @@ -:root { - --smoky-black: #0C0F0A; - --radical-red: #FF4365; - --cadet-blue: #39A2AE; - --pale-sliver: #39A2AE; - --white: #FFFFFF; -} diff --git a/assets/css/main.css b/assets/css/main.css index a7ba988b9..29e171493 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -605,6 +605,16 @@ ul { transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } +@keyframes tw-spin { + to { + transform: rotate(360deg); + } +} + +.tw-animate-spin { + animation: tw-spin 1s linear infinite; +} + .tw-rounded-full { border-radius: 9999px; } diff --git a/assets/data/cdn/jsdelivr.yml b/assets/data/cdn/jsdelivr.yml index aa38ef5b8..45653b4b1 100644 --- a/assets/data/cdn/jsdelivr.yml +++ b/assets/data/cdn/jsdelivr.yml @@ -20,8 +20,6 @@ libFiles: # echarts@5.2.2 https://github.com/apache/echarts echartsJS: echarts@5.2.2/dist/echarts.min.js echartsMacaronsJS: echarts@5.2.2/theme/macarons.min.js - # fontawesome-free@5.15.4 https://github.com/FortAwesome/Font-Awesome - fontawesomeFreeCSS: '@fortawesome/fontawesome-free@5.15.4/css/all.min.css' # fusejs@6.4.6 https://github.com/krisk/fuse fuseJS: fuse.js@6.4.6/dist/fuse.min.js # gitalk@1.7.2 https://github.com/gitalk/gitalk diff --git a/assets/data/social.yml b/assets/data/social.yml index b1a72196e..92ac9f789 100644 --- a/assets/data/social.yml +++ b/assets/data/social.yml @@ -12,7 +12,9 @@ linkedin: Prefix: https://linkedin.com/in/ Title: LinkedIn Icon: - Class: fab fa-linkedin fa-fw + Fontawesome: + Style: brands + Icon: linkedin # 003: Twitter twitter: @@ -20,7 +22,9 @@ twitter: Prefix: https://twitter.com/ Title: Twitter Icon: - Class: fab fa-twitter fa-fw + Fontawesome: + Style: brands + Icon: twitter # 004: Instagram instagram: @@ -28,7 +32,9 @@ instagram: Prefix: https://www.instagram.com/ Title: Instagram Icon: - Class: fab fa-instagram fa-fw + Fontawesome: + Style: brands + Icon: instagram # 005: facebook facebook: @@ -36,7 +42,9 @@ facebook: Prefix: https://facebook.com/ Title: facebook Icon: - Class: fab fa-facebook fa-fw + Fontawesome: + Style: brands + Icon: facebook # 006: Telegram telegram: @@ -44,7 +52,9 @@ telegram: Prefix: https://t.me/ Title: Telegram Icon: - Class: fab fa-telegram-plane fa-fw + Fontawesome: + Style: brands + Icon: telegram # 007: Medium medium: @@ -52,7 +62,9 @@ medium: Prefix: https://medium.com/ Title: Medium Icon: - Class: fab fa-medium fa-fw + Fontawesome: + Style: brands + Icon: medium # 008: GitLab gitlab: @@ -60,7 +72,9 @@ gitlab: Prefix: https://gitlab.com/ Title: GitLab Icon: - Class: fab fa-gitlab fa-fw + Fontawesome: + Style: brands + Icon: gitlab # 009: YouTube Legacy youtubelegacy: @@ -68,7 +82,9 @@ youtubelegacy: Prefix: https://www.youtube.com/user/ Title: YouTube Icon: - Class: fab fa-youtube fa-fw + Fontawesome: + Style: brands + Icon: youtube # 010: YouTube Custom youtubecustom: @@ -76,7 +92,9 @@ youtubecustom: Prefix: https://www.youtube.com/c/ Title: YouTube Icon: - Class: fab fa-youtube fa-fw + Fontawesome: + Style: brands + Icon: youtube # 011: YouTube Channel youtubechannel: @@ -84,7 +102,9 @@ youtubechannel: Prefix: https://www.youtube.com/channel/ Title: YouTube Icon: - Class: fab fa-youtube fa-fw + Fontawesome: + Style: brands + Icon: youtube # 012: Tumblr tumblr: @@ -92,7 +112,9 @@ tumblr: Template: https://%v.tumblr.com/ Title: Tumblr Icon: - Class: fab fa-tumblr fa-fw + Fontawesome: + Style: brands + Icon: tumblr # 013: Quora quora: @@ -100,7 +122,9 @@ quora: Prefix: https://www.quora.com/profile/ Title: Quora Icon: - Class: fab fa-quora fa-fw + Fontawesome: + Style: brands + Icon: quora # 014: Keybase keybase: @@ -108,7 +132,9 @@ keybase: Prefix: https://keybase.io/ Title: Keybase Icon: - Class: fab fa-keybase fa-fw + Fontawesome: + Style: brands + Icon: keybase # 015: Pinterest pinterest: @@ -116,7 +142,9 @@ pinterest: Prefix: https://www.pinterest.com/ Title: Pinterest Icon: - Class: fab fa-pinterest fa-fw + Fontawesome: + Style: brands + Icon: pinterest # 016: Reddit reddit: @@ -124,7 +152,9 @@ reddit: Prefix: https://www.reddit.com/user/ Title: Reddit Icon: - Class: fab fa-reddit fa-fw + Fontawesome: + Style: brands + Icon: reddit # 017: CodePen codepen: @@ -132,7 +162,9 @@ codepen: Prefix: https://codepen.io/ Title: CodePen Icon: - Class: fab fa-codepen fa-fw + Fontawesome: + Style: brands + Icon: codepen # 018: freeCodeCamp freecodecamp: @@ -140,7 +172,9 @@ freecodecamp: Prefix: https://freecodecamp.org/ Title: freeCodeCamp Icon: - Class: fab fa-free-code-camp fa-fw + Fontawesome: + Style: brands + Icon: free-code-camp # 019: Bitbucket bitbucket: @@ -148,7 +182,9 @@ bitbucket: Prefix: https://bitbucket.org/ Title: Bitbucket Icon: - Class: fab fa-bitbucket fa-fw + Fontawesome: + Style: brands + Icon: bitbucket # 020: Stack Overflow stackoverflow: @@ -156,7 +192,9 @@ stackoverflow: Prefix: https://stackoverflow.com/users/ Title: Stack Overflow Icon: - Simpleicons: stackoverflow + Fontawesome: + Style: brands + Icon: stack-overflow # 021: 微博 weibo: @@ -164,7 +202,9 @@ weibo: Prefix: https://weibo.com/ Title: 微博 Icon: - Class: fab fa-weibo fa-fw + Fontawesome: + Style: brands + Icon: weibo # 022: OK.RU odnoklassniki: @@ -172,7 +212,9 @@ odnoklassniki: Prefix: https://ok.ru/ Title: OK.RU Icon: - Class: fab fa-odnoklassniki fa-fw + Fontawesome: + Style: brands + Icon: odnoklassniki # 023: VK vk: @@ -180,7 +222,9 @@ vk: Prefix: https://vk.com/ Title: VK Icon: - Class: fab fa-vk fa-fw + Fontawesome: + Style: brands + Icon: vk # 024: Flickr flickr: @@ -188,7 +232,9 @@ flickr: Prefix: https://www.flickr.com/photos/ Title: Flickr Icon: - Class: fab fa-flickr fa-fw + Fontawesome: + Style: brands + Icon: flickr # 025: Xing xing: @@ -196,7 +242,9 @@ xing: Prefix: https://www.xing.com/profile/ Title: Xing Icon: - Class: fab fa-xing fa-fw + Fontawesome: + Style: brands + Icon: xing # 026: Snapchat snapchat: @@ -204,7 +252,9 @@ snapchat: Prefix: https://www.snapchat.com/add/ Title: Snapchat Icon: - Class: fab fa-snapchat fa-fw + Fontawesome: + Style: brands + Icon: snapchat # 027: SoundCloud soundcloud: @@ -212,7 +262,9 @@ soundcloud: Prefix: https://soundcloud.com/ Title: SoundCloud Icon: - Class: fab fa-soundcloud fa-fw + Fontawesome: + Style: brands + Icon: soundcloud # 028: Spotify spotify: @@ -220,7 +272,9 @@ spotify: Prefix: https://open.spotify.com/user/ Title: Spotify Icon: - Class: fab fa-spotify fa-fw + Fontawesome: + Style: brands + Icon: spotify # 029: Bandcamp bandcamp: @@ -228,7 +282,9 @@ bandcamp: Template: https://%v.bandcamp.com/ Title: Bandcamp Icon: - Class: fab fa-bandcamp fa-fw + Fontawesome: + Style: brands + Icon: bandcamp # 030: PayPal paypal: @@ -236,7 +292,9 @@ paypal: Prefix: https://paypal.me/ Title: PayPal Icon: - Class: fab fa-paypal fa-fw + Fontawesome: + Style: brands + Icon: paypal # 031: 500px fivehundredpx: @@ -244,7 +302,9 @@ fivehundredpx: Prefix: https://500px.com/ Title: 500px Icon: - Class: fab fa-500px fa-fw + Fontawesome: + Style: brands + Icon: 500px # 032: Mix mix: @@ -252,7 +312,9 @@ mix: Prefix: https://mix.com/ Title: Mix Icon: - Class: fab fa-mix fa-fw + Fontawesome: + Style: brands + Icon: mix # 033: Goodreads goodreads: @@ -260,7 +322,9 @@ goodreads: Prefix: https://www.goodreads.com/user/show/ Title: Goodreads Icon: - Class: fab fa-goodreads fa-fw + Fontawesome: + Style: brands + Icon: goodreads # 034: Last.fm lastfm: @@ -268,7 +332,9 @@ lastfm: Prefix: https://www.last.fm/user/ Title: Last.fm Icon: - Class: fab fa-lastfm fa-fw + Fontawesome: + Style: brands + Icon: lastfm # 035: Foursquare foursquare: @@ -276,7 +342,9 @@ foursquare: Prefix: https://foursquare.com/ Title: Foursquare Icon: - Class: fab fa-foursquare fa-fw + Fontawesome: + Style: brands + Icon: foursquare # 036: Hacker News hackernews: @@ -284,7 +352,9 @@ hackernews: Template: https://news.ycombinator.com/user?id=%v Title: Hacker News Icon: - Class: fab fa-hacker-news fa-fw + Fontawesome: + Style: brands + Icon: hacker-news # 037: Kickstarter kickstarter: @@ -292,7 +362,9 @@ kickstarter: Prefix: https://kickstarter.com/profile/ Title: Kickstarter Icon: - Class: fab fa-kickstarter fa-fw + Fontawesome: + Style: brands + Icon: kickstarter # 038: Patreon patreon: @@ -300,7 +372,9 @@ patreon: Prefix: https://patreon.com/ Title: Patreon Icon: - Class: fab fa-patreon fa-fw + Fontawesome: + Style: brands + Icon: patreon # 039: Steam steam: @@ -308,7 +382,9 @@ steam: Prefix: https://steamcommunity.com/id/ Title: Steam Icon: - Class: fab fa-steam fa-fw + Fontawesome: + Style: brands + Icon: steam # 040: Twitch twitch: @@ -316,7 +392,9 @@ twitch: Prefix: https://www.twitch.tv/ Title: Twitch Icon: - Class: fab fa-twitch fa-fw + Fontawesome: + Style: brands + Icon: twitch # 041: Strava strava: @@ -324,7 +402,9 @@ strava: Prefix: https://www.strava.com/athletes/ Title: Strava Icon: - Class: fab fa-strava fa-fw + Fontawesome: + Style: brands + Icon: strava # 042: Skype skype: @@ -332,7 +412,9 @@ skype: Template: "skype:" Title: Skype Icon: - Class: fab fa-skype fa-fw + Fontawesome: + Style: brands + Icon: skype # 043: WhatsApp whatsapp: @@ -340,7 +422,9 @@ whatsapp: Prefix: https://wa.me/ Title: WhatsApp Icon: - Class: fab fa-whatsapp fa-fw + Fontawesome: + Style: brands + Icon: whatsapp # 044: 知乎 zhihu: @@ -364,7 +448,9 @@ angellist: Prefix: https://angel.co/ Title: Angellist Icon: - Class: fab fa-angellist fa-fw + Fontawesome: + Style: brands + Icon: angellist # 047: SlideShare slideshare: @@ -372,7 +458,9 @@ slideshare: Prefix: https://slideshare.com/ Title: SlideShare Icon: - Class: fab fa-slideshare fa-fw + Fontawesome: + Style: brands + Icon: slideshare # 048: JSFiddle jsfiddle: @@ -380,7 +468,9 @@ jsfiddle: Prefix: https://jsfiddle.com/ Title: JSFiddle Icon: - Class: fab fa-jsfiddle fa-fw + Fontawesome: + Style: brands + Icon: jsfiddle # 049: DeviantArt deviantart: @@ -388,7 +478,9 @@ deviantart: Template: https://%v.deviantart.com/ Title: DeviantArt Icon: - Class: fab fa-deviantart fa-fw + Fontawesome: + Style: brands + Icon: deviantart # 050: Behance behance: @@ -396,7 +488,9 @@ behance: Prefix: https://behance.net/ Title: Behance Icon: - Class: fab fa-behance fa-fw + Fontawesome: + Style: brands + Icon: behance # 051: Dribbble dribbble: @@ -404,7 +498,9 @@ dribbble: Prefix: https://dribbble.com/ Title: Dribbble Icon: - Class: fab fa-dribbble fa-fw + Fontawesome: + Style: brands + Icon: dribbble # 052: WordPress wordpress: @@ -412,7 +508,9 @@ wordpress: Template: https://%v.wordpress.com/ Title: WordPress Icon: - Class: fab fa-wordpress fa-fw + Fontawesome: + Style: brands + Icon: wordpress # 053: Vine vine: @@ -420,7 +518,9 @@ vine: Prefix: https://vine.co/ Title: Vine Icon: - Class: fab fa-vine fa-fw + Fontawesome: + Style: brands + Icon: vine # 054: Google Scholar googlescholar: @@ -436,7 +536,9 @@ researchgate: Prefix: https://www.researchgate.net/profile/ Title: ResearchGate Icon: - Class: fab fa-researchgate fa-fw + Fontawesome: + Style: brands + Icon: researchgate # 056: Mastodon mastodon: @@ -444,7 +546,9 @@ mastodon: Prefix: https://mastodon.social/ Title: Mastodon Icon: - Class: fab fa-mastodon fa-fw + Fontawesome: + Style: brands + Icon: mastodon # 057: Thingiverse thingiverse: @@ -460,7 +564,9 @@ devto: Prefix: https://dev.to/ Title: Dev.To Icon: - Class: fab fa-dev fa-fw + Fontawesome: + Style: brands + Icon: dev # 059: Gitea gitea: @@ -499,7 +605,9 @@ orcid: Prefix: https://orcid.org/ Title: ORCID Icon: - Class: fab fa-orcid fa-fw + Fontawesome: + Style: brands + Icon: orcid # 064 Liberapay: liberapay: @@ -562,7 +670,9 @@ email: Template: mailto:%v Title: Email Icon: - Class: far fa-envelope fa-fw + Fontawesome: + Style: regular + Icon: envelope # 072: RSS rss: @@ -571,7 +681,9 @@ rss: Title: RSS Newtab: true Icon: - Class: fas fa-rss fa-fw + Fontawesome: + Style: solid + Icon: rss # 073: Discord discord: diff --git a/assets/images/avatar.webp b/assets/images/avatar.webp index 071a36122..ee685d156 100644 Binary files a/assets/images/avatar.webp and b/assets/images/avatar.webp differ diff --git a/assets/js/theme.js b/assets/js/theme.js index b3256c167..0cab9a961 100644 --- a/assets/js/theme.js +++ b/assets/js/theme.js @@ -42,25 +42,7 @@ function animateCSS (element, animation, reserved, callback) { } if (!reserved) element.addEventListener('animationend', handler) } -/** - * Fetch and initialize all SVG icons. - */ -function initSVGIcon () { - Array.from(document.querySelectorAll('[data-svg-src]')).forEach(icon => { - fetch(icon.getAttribute('data-svg-src')) - .then(response => response.text()) - .then(svg => { - const temp = document.createElement('div') - temp.insertAdjacentHTML('afterbegin', svg) - const dataSvg = temp.firstChild - dataSvg.setAttribute('data-svg-src', icon.getAttribute('data-svg-src')) - dataSvg.classList.add('icon') - const titleElements = dataSvg.getElementsByTagName('title') - if (titleElements.length) dataSvg.removeChild(titleElements[0]) - icon.parentElement.replaceChild(dataSvg, icon) - }) - }) -} + /** * Initialize the mobile menu bar. @@ -381,7 +363,7 @@ function initSearch () { const { searchType, icon, href } = searchConfig.type === 'algolia' ? { searchType: 'algolia', - icon: '', + icon: '', href: 'https://www.algolia.com/' } : { @@ -462,7 +444,7 @@ function initHighlight () { $header.className = 'code-header ' + $code.className.toLowerCase() const $title = document.createElement('span') $title.classList.add('code-title') - $title.insertAdjacentHTML('afterbegin', '') + $title.insertAdjacentHTML('afterbegin', ``) $title.addEventListener('click', () => { const content = $chroma.getElementsByClassName('table-wrapper')[0] if ($chroma.classList.contains('open')) { @@ -480,14 +462,16 @@ function initHighlight () { }); $header.appendChild($title) const $ellipses = document.createElement('span') - $ellipses.insertAdjacentHTML('afterbegin', '') + $ellipses.insertAdjacentHTML('afterbegin', '') $ellipses.classList.add('ellipses') $ellipses.addEventListener('click', () => { $chroma.classList.add('open') }, false) $header.appendChild($ellipses) const $copy = document.createElement('span') - $copy.insertAdjacentHTML('afterbegin', '') + const copyHTML = ``; + const checkHTML = ``; + $copy.insertAdjacentHTML('afterbegin', copyHTML) $copy.classList.add('copy') const code = $code.innerText if (window.config.code.maxShownLines < 0 || code.split('\n').length < window.config.code.maxShownLines + 2) $chroma.classList.add('open') @@ -497,9 +481,9 @@ function initHighlight () { const clipboard = new ClipboardJS($copy) clipboard.on('success', _e => { animateCSS($code, 'animate__flash') - $copy.firstElementChild.className = 'fas fa-check fa-fw' + $copy.firstElementChild.innerHTML = checkHTML setTimeout(() => { - $copy.firstElementChild.className = 'far fa-copy fa-fw' + $copy.firstElementChild.innerHTML = copyHTML }, 3000) }) $header.appendChild($copy) @@ -790,7 +774,6 @@ function init () { window.resizeEventSet = new Set() window.clickMaskEventSet = new Set() if (window.objectFitImages) objectFitImages() - initSVGIcon() initMenuMobile() initSwitchTheme() initSelectTheme() diff --git a/exampleSite/assets/images/PCloud.webp b/exampleSite/assets/images/PCloud.webp new file mode 100644 index 000000000..e5c968965 Binary files /dev/null and b/exampleSite/assets/images/PCloud.webp differ diff --git a/exampleSite/assets/images/avatar.webp b/exampleSite/assets/images/avatar.webp index 071a36122..ee685d156 100644 Binary files a/exampleSite/assets/images/avatar.webp and b/exampleSite/assets/images/avatar.webp differ diff --git a/exampleSite/config/_default/menu.en.toml b/exampleSite/config/_default/menu.en.toml index 7fef3b4da..442614a5e 100644 --- a/exampleSite/config/_default/menu.en.toml +++ b/exampleSite/config/_default/menu.en.toml @@ -73,7 +73,7 @@ weight = 8 [[main]] identifier = "github" - pre = "" + pre = "" post = "" name = "" url = "https://github.com/HEIGE-PCloud/DoIt" diff --git a/exampleSite/config/_default/menu.zh-cn.toml b/exampleSite/config/_default/menu.zh-cn.toml index 3081b5f8b..f007882db 100644 --- a/exampleSite/config/_default/menu.zh-cn.toml +++ b/exampleSite/config/_default/menu.zh-cn.toml @@ -72,7 +72,7 @@ weight = 8 [[main]] identifier = "github" - pre = "" + pre = "" post = "" name = "" url = "https://github.com/HEIGE-PCloud/DoIt" diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 924dda791..74e0efd54 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -61,7 +61,7 @@ srcsetLargeResizeMethod = "2000x webp Lanczos q75" name = "DoIt" # you can add extra information before the name (HTML format is supported), such as icons # 你可以在名称 (允许 HTML 格式) 之前添加其他信息, 例如图标 - # pre = "" + # pre = "" # you can add extra information after the name (HTML format is supported), such as icons # 你可以在名称 (允许 HTML 格式) 之后添加其他信息, 例如图标 post = "" @@ -153,9 +153,7 @@ srcsetLargeResizeMethod = "2000x webp Lanczos q75" # whether to enable the fraction extended syntax # 是否使用 fraction 扩展语法 fraction = true - # whether to enable the fontawesome extended syntax - # 是否使用 fontawesome 扩展语法 - fontawesome = true + # whether to show link to Raw Markdown content of the content # 是否显示原始 Markdown 文档内容的链接 linkToMarkdown = true diff --git a/exampleSite/content/about/index.en.md b/exampleSite/content/about/index.en.md index 99f7bb57c..4b60ae304 100644 --- a/exampleSite/content/about/index.en.md +++ b/exampleSite/content/about/index.en.md @@ -9,7 +9,7 @@ math: enable: true --- -> [:(far fa-edit fa-fw): DoIt](https://github.com/HEIGE-PCloud/DoIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/) developed by [HEIGE-PCloud](https://github.com/HEIGE-PCloud). +> [{{< fa-icon regular edit >}} DoIt](https://github.com/HEIGE-PCloud/DoIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/) developed by [HEIGE-PCloud](https://github.com/HEIGE-PCloud). > > It is based on the [LoveIt Theme](https://github.com/dillonzq/LoveIt), [LeaveIt Theme](https://github.com/liuzc/LeaveIt) and [KeepIt Theme](https://github.com/Fastbyte01/KeepIt). @@ -17,67 +17,67 @@ math: ### Performance and SEO -* :(fas fa-rocket fa-fw): Optimized for **performance**: [99]/[100] on mobile and [100]/[100] on desktop in [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights) -* :(fab fa-searchengin fa-fw): Optimized SEO performance with a correct **SEO SCHEMA** based on JSON-LD -* :(fab fa-google fa-fw): **[Google Analytics](https://analytics.google.com/analytics)** supported -* :(far fa-chart-bar fa-fw): **[Fathom Analytics](https://usefathom.com/)** supported -* :(far fa-chart-bar fa-fw): **[Baidu Analytics](https://tongji.baidu.com/)** supported -* :(far fa-chart-bar fa-fw): **[Umami Analytics](https://umami.is/)** supported -* :(far fa-chart-bar fa-fw): **[Plausible Analytics](https://plausible.io/)** supported -* :(fas fa-search fa-fw): Search engine **verification** supported (Google, Bind, Yandex and Baidu) -* :(fas fa-tachometer-alt fa-fw): **CDN** for third-party libraries supported +* {{< fa-icon solid rocket >}} Optimized for **performance**: [99]/[100] on mobile and [100]/[100] on desktop in [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights) +* {{< fa-icon brands searchengin >}} Optimized SEO performance with a correct **SEO SCHEMA** based on JSON-LD +* {{< fa-icon brands google >}} **[Google Analytics](https://analytics.google.com/analytics)** supported +* {{< fa-icon regular chart-bar >}} **[Fathom Analytics](https://usefathom.com/)** supported +* {{< fa-icon regular chart-bar >}} **[Baidu Analytics](https://tongji.baidu.com/)** supported +* {{< fa-icon regular chart-bar >}} **[Umami Analytics](https://umami.is/)** supported +* {{< fa-icon regular chart-bar >}} **[Plausible Analytics](https://plausible.io/)** supported +* {{< fa-icon solid search >}} Search engine **verification** supported (Google, Bind, Yandex and Baidu) +* {{< fa-icon solid tachometer-alt >}} **CDN** for third-party libraries supported ### Appearance and Layout -* [:(fas fa-desktop):]/[:(fas fa-mobile):] **Responsive** layout -* [:(fas fa-sun):]/[:(fas fa-moon):] **[Light]/[Dark]** mode -* :(fas fa-layer-group fa-fw): Globally consistent **design language** -* :(fas fa-ellipsis-h fa-fw): **Pagination** supported -* :(far fa-list-alt fa-fw): Easy-to-use and self-expanding **table of contents** -* :(fas fa-language fa-fw): **Multilanguage** supported and i18n ready -* :(fab fa-css3-alt fa-fw): Beautiful **CSS animation** +* [{{< fa-icon solid desktop >}}]/[{{< fa-icon solid mobile >}}] **Responsive** layout +* [{{< fa-icon solid sun >}}]/[{{< fa-icon solid moon >}}] **[Light]/[Dark]** mode +* {{< fa-icon solid layer-group >}} Globally consistent **design language** +* {{< fa-icon solid ellipsis-h >}} **Pagination** supported +* {{< fa-icon regular list-alt >}} Easy-to-use and self-expanding **table of contents** +* {{< fa-icon solid language >}} **Multilanguage** supported and i18n ready +* {{< fa-icon brands css3-alt >}} Beautiful **CSS animation** ### Social and Comment Systems -* :(far fa-user fa-fw): **Gravatar** supported by [Gravatar](https://gravatar.com) -* :(fas fa-user-circle fa-fw): Local **Avatar** supported -* :(far fa-id-card fa-fw): Up to **64** social links supported -* :(fas fa-share-square fa-fw): Up to **28** share sites supported -* :(far fa-comment fa-fw): **Disqus** comment system supported by [Disqus](https://disqus.com) -* :(far fa-comment-dots fa-fw): **Gitalk** comment system supported by [Gitalk](https://github.com/gitalk/gitalk) -* :(far fa-comment-alt fa-fw): **Valine** comment system supported by [Valine](https://valine.js.org/) -* :(far fa-comment-alt fa-fw): **Waline** comment system supported by [Waline](https://waline.js.org/) -* :(far fa-comments fa-fw): **Facebook comments** system supported by [Facebook](https://developers.facebook.com/docs/plugins/comments/) -* :(fas fa-comment fa-fw): **Telegram comments** system supported by [Comments](https://comments.app/) -* :(fas fa-comment-dots fa-fw): **Commento** comment system supported by [Commento](https://commento.io/) -* :(fas fa-comment-alt fa-fw): **Utterances** comment system supported by [Utterances](https://utteranc.es/) -* :(fas fa-comment-alt fa-fw): **Twikoo** comment system supported by [Twikoo](https://twikoo.js.org/) -* :(fas fa-comment-alt fa-fw): **Vssue** comment system supported by [Vssue](https://vssue.js.org/) -* :(fas fa-comment-alt fa-fw): **Remark42** comment system supported by [Remark42](https://remark42.com/) -* :(fas fa-gem fa-fw): **giscus** comment system supported by [giscus](https://giscus.app/) -* :(fas fa-comment-alt fa-fw): **Artalk** comment system supported by [Artalk](https://artalk.js.org/) +* {{< fa-icon regular user >}} **Gravatar** supported by [Gravatar](https://gravatar.com) +* {{< fa-icon solid user-circle >}} Local **Avatar** supported +* {{< fa-icon regular id-card >}} Up to **64** social links supported +* {{< fa-icon solid share-square >}} Up to **28** share sites supported +* {{< fa-icon regular comment >}} **Disqus** comment system supported by [Disqus](https://disqus.com) +* {{< fa-icon regular comment-dots >}} **Gitalk** comment system supported by [Gitalk](https://github.com/gitalk/gitalk) +* {{< fa-icon regular comment-alt >}} **Valine** comment system supported by [Valine](https://valine.js.org/) +* {{< fa-icon regular comment-alt >}} **Waline** comment system supported by [Waline](https://waline.js.org/) +* {{< fa-icon regular comments >}} **Facebook comments** system supported by [Facebook](https://developers.facebook.com/docs/plugins/comments/) +* {{< fa-icon regular comment >}} **Telegram comments** system supported by [Comments](https://comments.app/) +* {{< fa-icon regular comment-dots >}} **Commento** comment system supported by [Commento](https://commento.io/) +* {{< fa-icon regular comment-alt >}} **Utterances** comment system supported by [Utterances](https://utteranc.es/) +* {{< fa-icon regular comment-alt >}} **Twikoo** comment system supported by [Twikoo](https://twikoo.js.org/) +* {{< fa-icon regular comment-alt >}} **Vssue** comment system supported by [Vssue](https://vssue.js.org/) +* {{< fa-icon regular comment-alt >}} **Remark42** comment system supported by [Remark42](https://remark42.com/) +* {{< fa-icon regular gem >}} **giscus** comment system supported by [giscus](https://giscus.app/) +* {{< fa-icon regular comment-alt >}} **Artalk** comment system supported by [Artalk](https://artalk.js.org/) ### Extended Features -* :(fas fa-search fa-fw): **Search** supported by [algolia](https://www.algolia.com/) or [Fuse.js](https://fusejs.io/) -* :(far fa-grin-tongue-wink fa-fw): **Twemoji** supported -* :(fas fa-code fa-fw): Automatically **highlighting** code -* :(far fa-copy fa-fw): **Copy code** to clipboard with one click -* :(far fa-images fa-fw): **Images gallery** supported by [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) -* :(fab fa-font-awesome fa-fw): Extended Markdown syntax for **[Font Awesome](https://fontawesome.com/) icons** -* :(far fa-sticky-note fa-fw): Extended Markdown syntax for **ruby annotation** -* :(fas fa-percentage fa-fw): Extended Markdown syntax for **fraction** -* :(fas fa-square-root-alt fa-fw): **Mathematical formula** supported by [$ \KaTeX $](https://katex.org/) -* :(fas fa-project-diagram fa-fw): **Diagrams** shortcode supported by [mermaid](https://github.com/knsv/mermaid) -* :(fas fa-chart-pie fa-fw): **Interactive data visualization** shortcode supported by [ECharts](https://echarts.apache.org/) -* :(fas fa-map-marked-alt fa-fw): **Mapbox** shortcode supported by [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) -* :(fas fa-music fa-fw): **Music player** shortcode supported by [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS) -* :(fas fa-video fa-fw): **Bilibili player** shortcode -* :(far fa-bell fa-fw): Kinds of **admonitions** shortcode -* :(fas fa-align-left fa-fw): **Custom style** shortcode -* :(fab fa-js-square fa-fw): **Custom script** shortcode -* :(fas fa-i-cursor fa-fw): **Animated typing** supported by [TypeIt](https://typeitjs.com/) -* :(fas fa-cookie-bite fa-fw): **Cookie consent banner** supported by [cookieconsent](https://github.com/osano/cookieconsent) +* {{< fa-icon solid search >}} **Search** supported by [algolia](https://www.algolia.com/) or [Fuse.js](https://fusejs.io/) +* {{< fa-icon regular grin-tongue-wink >}} **Twemoji** supported +* {{< fa-icon solid code >}} Automatically **highlighting** code +* {{< fa-icon regular copy >}} **Copy code** to clipboard with one click +* {{< fa-icon regular images >}} **Images gallery** supported by [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) +* {{< fa-icon brands font-awesome >}} Extended Markdown syntax for **[Font Awesome](https://fontawesome.com/) icons** +* {{< fa-icon regular sticky-note >}} Extended Markdown syntax for **ruby annotation** +* {{< fa-icon solid percentage >}} Extended Markdown syntax for **fraction** +* {{< fa-icon solid square-root-alt >}} **Mathematical formula** supported by [$ \KaTeX $](https://katex.org/) +* {{< fa-icon solid project-diagram >}} **Diagrams** shortcode supported by [mermaid](https://github.com/knsv/mermaid) +* {{< fa-icon solid chart-pie >}} **Interactive data visualization** shortcode supported by [ECharts](https://echarts.apache.org/) +* {{< fa-icon solid map-marked-alt >}} **Mapbox** shortcode supported by [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) +* {{< fa-icon solid music >}} **Music player** shortcode supported by [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS) +* {{< fa-icon solid video >}} **Bilibili player** shortcode +* {{< fa-icon regular bell >}} Kinds of **admonitions** shortcode +* {{< fa-icon solid align-left >}} **Custom style** shortcode +* {{< fa-icon brands js-square >}} **Custom script** shortcode +* {{< fa-icon solid i-cursor >}} **Animated typing** supported by [TypeIt](https://typeitjs.com/) +* {{< fa-icon solid cookie-bite >}} **Cookie consent banner** supported by [cookieconsent](https://github.com/osano/cookieconsent) * ... ## License diff --git a/exampleSite/content/about/index.zh-cn.md b/exampleSite/content/about/index.zh-cn.md index b6a12c82f..996470f2b 100644 --- a/exampleSite/content/about/index.zh-cn.md +++ b/exampleSite/content/about/index.zh-cn.md @@ -9,7 +9,7 @@ math: enable: true --- -> [:(far fa-edit fa-fw): DoIt](https://github.com/HEIGE-PCloud/DoIt) 是一个由 [HEIGE-PCloud](https://github.com/HEIGE-PCloud) 开发的**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。 +> [{{< fa-icon regular edit >}} DoIt](https://github.com/HEIGE-PCloud/DoIt) 是一个由 [HEIGE-PCloud](https://github.com/HEIGE-PCloud) 开发的**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。 > > 它的原型基于 [LoveIt 主题](https://github.com/dillonzq/LoveIt), [LeaveIt 主题](https://github.com/liuzc/LeaveIt) 和 [KeepIt 主题](https://github.com/Fastbyte01/KeepIt)。 @@ -17,67 +17,67 @@ math: ### 性能和 SEO -* :(fas fa-rocket fa-fw): **性能**优化:在 [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights) 中, [99]/[100] 的移动设备得分和 [100]/[100] 的桌面设备得分 -* :(fab fa-searchengin fa-fw): 使用基于 JSON-LD 格式 的 **SEO SCHEMA** 文件进行 SEO 优化 -* :(fab fa-google fa-fw): 支持 **[Google Analytics](https://analytics.google.com/analytics)** -* :(far fa-chart-bar fa-fw): 支持 **[Fathom Analytics](https://usefathom.com/)** -* :(far fa-chart-bar fa-fw): 支持 **[百度统计](https://tongji.baidu.com/)** -* :(far fa-chart-bar fa-fw): 支持 **[Umami Analytics](https://umami.is/)** -* :(far fa-chart-bar fa-fw): 支持 **[Plausible Analytics](https://plausible.io/)** -* :(fas fa-search fa-fw): 支持搜索引擎的**网站验证** (Google, Bind, Yandex and Baidu) -* :(fas fa-tachometer-alt fa-fw): 支持所有第三方库的 **CDN** +* {{< fa-icon solid rocket >}} **性能**优化:在 [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights) 中, [99]/[100] 的移动设备得分和 [100]/[100] 的桌面设备得分 +* {{< fa-icon brands searchengin >}} 使用基于 JSON-LD 格式 的 **SEO SCHEMA** 文件进行 SEO 优化 +* {{< fa-icon brands google >}} 支持 **[Google Analytics](https://analytics.google.com/analytics)** +* {{< fa-icon regular chart-bar >}} 支持 **[Fathom Analytics](https://usefathom.com/)** +* {{< fa-icon regular chart-bar >}} 支持 **[百度统计](https://tongji.baidu.com/)** +* {{< fa-icon regular chart-bar >}} 支持 **[Umami Analytics](https://umami.is/)** +* {{< fa-icon regular chart-bar >}} 支持 **[Plausible Analytics](https://plausible.io/)** +* {{< fa-icon solid search >}} 支持搜索引擎的**网站验证** (Google, Bind, Yandex and Baidu) +* {{< fa-icon solid tachometer-alt >}} 支持所有第三方库的 **CDN** ### 外观和布局 -* [:(fas fa-desktop):]/[:(fas fa-mobile):] **响应式**布局 -* [:(fas fa-sun):]/[:(fas fa-moon):] **[浅色]/[深色]** 主题模式 -* :(fas fa-layer-group fa-fw): 全局一致的**设计语言** -* :(fas fa-ellipsis-h fa-fw): 支持**分页** -* :(far fa-list-alt fa-fw): 易用和自动展开的**文章目录** -* :(fas fa-language fa-fw): 支持**多语言**和国际化 -* :(fab fa-css3-alt fa-fw): 美观的 **CSS 动画** +* [{{< fa-icon solid desktop >}}]/[{{< fa-icon solid mobile >}}] **响应式**布局 +* [{{< fa-icon solid sun >}}]/[{{< fa-icon solid moon >}}] **[浅色]/[深色]** 主题模式 +* {{< fa-icon solid layer-group >}} 全局一致的**设计语言** +* {{< fa-icon solid ellipsis-h >}} 支持**分页** +* {{< fa-icon regular list-alt >}} 易用和自动展开的**文章目录** +* {{< fa-icon solid language >}} 支持**多语言**和国际化 +* {{< fa-icon brands css3-alt >}} 美观的 **CSS 动画** ### 社交和评论系统 -* :(far fa-user fa-fw): 支持 **[Gravatar](https://gravatar.com)** 头像 -* :(fas fa-user-circle fa-fw): 支持本地**头像** -* :(far fa-id-card fa-fw): 支持多达 **64** 种社交链接 -* :(fas fa-share-square fa-fw): 支持多达 **28** 种网站分享 -* :(far fa-comment fa-fw): 支持 **[Disqus](https://disqus.com)** 评论系统 -* :(far fa-comment-dots fa-fw): 支持 **[Gitalk](https://github.com/gitalk/gitalk)** 评论系统 -* :(far fa-comment-alt fa-fw): 支持 **[Valine](https://valine.js.org/)** 评论系统 -* :(far fa-comment-alt fa-fw): 支持 **[Waline](https://waline.js.org/)** 评论系统 -* :(far fa-comments fa-fw): 支持 **[Facebook](https://developers.facebook.com/docs/plugins/comments/) 评论**系统 -* :(fas fa-comment fa-fw): 支持 **[Telegram comments](https://comments.app/) 评论**系统 -* :(fas fa-comment-dots fa-fw): 支持 **[Commento](https://commento.io/)** 评论系统 -* :(far fa-comment-alt fa-fw): 支持 **[Utterances](https://utteranc.es/)** 评论系统 -* :(far fa-comment-alt fa-fw): 支持 **[Twikoo](https://twikoo.js.org/)** 评论系统 -* :(far fa-comment-alt fa-fw): 支持 **[Vssue](https://vssue.js.org/)** 评论系统 -* :(far fa-comment-alt fa-fw): 支持 **[Remark42](https://remark42.com/)** 评论系统 -* :(far fa-comment-alt fa-fw): 支持 **[giscus](https://giscus.app/)** 评论系统 -* :(far fa-comment-alt fa-fw): 支持 **[Artalk](https://artalk.js.org/)** 评论系统 +* {{< fa-icon regular user >}} 支持 **[Gravatar](https://gravatar.com)** 头像 +* {{< fa-icon solid user-circle >}} 支持本地**头像** +* {{< fa-icon regular id-card >}} 支持多达 **64** 种社交链接 +* {{< fa-icon solid share-square >}} 支持多达 **28** 种网站分享 +* {{< fa-icon regular comment >}} 支持 **[Disqus](https://disqus.com)** 评论系统 +* {{< fa-icon regular comment-dots >}} 支持 **[Gitalk](https://github.com/gitalk/gitalk)** 评论系统 +* {{< fa-icon regular comment-alt >}} 支持 **[Valine](https://valine.js.org/)** 评论系统 +* {{< fa-icon regular comment-alt >}} 支持 **[Waline](https://waline.js.org/)** 评论系统 +* {{< fa-icon regular comments >}} 支持 **[Facebook](https://developers.facebook.com/docs/plugins/comments/) 评论**系统 +* {{< fa-icon regular comment >}} 支持 **[Telegram comments](https://comments.app/) 评论**系统 +* {{< fa-icon regular comment-dots >}} 支持 **[Commento](https://commento.io/)** 评论系统 +* {{< fa-icon regular comment-alt >}} 支持 **[Utterances](https://utteranc.es/)** 评论系统 +* {{< fa-icon regular comment-alt >}} 支持 **[Twikoo](https://twikoo.js.org/)** 评论系统 +* {{< fa-icon regular comment-alt >}} 支持 **[Vssue](https://vssue.js.org/)** 评论系统 +* {{< fa-icon regular comment-alt >}} 支持 **[Remark42](https://remark42.com/)** 评论系统 +* {{< fa-icon regular comment-alt >}} 支持 **[giscus](https://giscus.app/)** 评论系统 +* {{< fa-icon regular comment-alt >}} 支持 **[Artalk](https://artalk.js.org/)** 评论系统 ### 扩展功能 -* :(fas fa-search fa-fw): 支持基于 [algolia](https://www.algolia.com/) 或 [Fuse.js](https://fusejs.io/) 的**搜索** -* :(far fa-grin-tongue-wink fa-fw): 支持 **Twemoji** -* :(fas fa-code fa-fw): 支持**代码高亮** -* :(far fa-copy fa-fw): 一键**复制代码**到剪贴板 -* :(far fa-images fa-fw): 支持基于 [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) 的**图片画廊** -* :(fab fa-font-awesome fa-fw): 支持 **[Font Awesome](https://fontawesome.com/) 图标**的扩展 Markdown 语法 -* :(far fa-sticky-note fa-fw): 支持**上标注释**的扩展 Markdown 语法 -* :(fas fa-percentage fa-fw): 支持**分数**的扩展 Markdown 语法 -* :(fas fa-square-root-alt fa-fw): 支持基于 [$ \KaTeX $](https://katex.org/) 的**数学公式** -* :(fas fa-project-diagram fa-fw): 支持基于 [mermaid](https://github.com/knsv/mermaid) 的**图表** shortcode -* :(fas fa-chart-pie fa-fw): 支持基于 [ECharts](https://echarts.apache.org/) 的**交互式数据可视化** shortcode -* :(fas fa-map-marked-alt fa-fw): 支持基于 [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) 的 **Mapbox** shortcode -* :(fas fa-music fa-fw): 支持基于 [APlayer](https://github.com/MoePlayer/APlayer) 和 [MetingJS](https://github.com/metowolf/MetingJS) 的**音乐播放器** shortcode -* :(fas fa-video fa-fw): 支持 **Bilibili 视频** shortcode -* :(far fa-bell fa-fw): 支持多种**注释**的 shortcode -* :(fas fa-align-left fa-fw): 支持**自定义样式**的 shortcode -* :(fab fa-js-square fa-fw): 支持**自定义脚本**的 shortcode -* :(fas fa-i-cursor fa-fw): 支持基于 [TypeIt](https://typeitjs.com/) 的**打字动画** shortcode -* :(fas fa-cookie-bite fa-fw): 支持基于 [cookieconsent](https://github.com/osano/cookieconsent) 的 **Cookie 许可横幅** +* {{< fa-icon solid search >}} 支持基于 [algolia](https://www.algolia.com/) 或 [Fuse.js](https://fusejs.io/) 的**搜索** +* {{< fa-icon regular grin-tongue-wink >}} 支持 **Twemoji** +* {{< fa-icon solid code >}} 支持**代码高亮** +* {{< fa-icon regular copy >}} 一键**复制代码**到剪贴板 +* {{< fa-icon regular images >}} 支持基于 [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js) 的**图片画廊** +* {{< fa-icon brands font-awesome >}} 支持 **[Font Awesome](https://fontawesome.com/) 图标**的扩展 Markdown 语法 +* {{< fa-icon regular sticky-note >}} 支持**上标注释**的扩展 Markdown 语法 +* {{< fa-icon solid percentage >}} 支持**分数**的扩展 Markdown 语法 +* {{< fa-icon solid square-root-alt >}} 支持基于 [$ \KaTeX $](https://katex.org/) 的**数学公式** +* {{< fa-icon solid project-diagram >}} 支持基于 [mermaid](https://github.com/knsv/mermaid) 的**图表** shortcode +* {{< fa-icon solid chart-pie >}} 支持基于 [ECharts](https://echarts.apache.org/) 的**交互式数据可视化** shortcode +* {{< fa-icon solid map-marked-alt >}} 支持基于 [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) 的 **Mapbox** shortcode +* {{< fa-icon solid music >}} 支持基于 [APlayer](https://github.com/MoePlayer/APlayer) 和 [MetingJS](https://github.com/metowolf/MetingJS) 的**音乐播放器** shortcode +* {{< fa-icon solid video >}} 支持 **Bilibili 视频** shortcode +* {{< fa-icon regular bell >}} 支持多种**注释**的 shortcode +* {{< fa-icon solid align-left >}} 支持**自定义样式**的 shortcode +* {{< fa-icon brands js-square >}} 支持**自定义脚本**的 shortcode +* {{< fa-icon solid i-cursor >}} 支持基于 [TypeIt](https://typeitjs.com/) 的**打字动画** shortcode +* {{< fa-icon solid cookie-bite >}} 支持基于 [cookieconsent](https://github.com/osano/cookieconsent) 的 **Cookie 许可横幅** * ... ## 许可协议 diff --git a/exampleSite/content/posts/basic-markdown-syntax/index.en.md b/exampleSite/content/posts/basic-markdown-syntax/index.en.md index bf0ebf59e..f69346a96 100644 --- a/exampleSite/content/posts/basic-markdown-syntax/index.en.md +++ b/exampleSite/content/posts/basic-markdown-syntax/index.en.md @@ -50,7 +50,7 @@ John Gruber, the author of Markdown, puts it like this: Without further delay, let us go over the main elements of Markdown and what the resulting HTML looks like! {{< admonition tip >}} -:(far fa-bookmark fa-fw): Bookmark this page for easy future reference! +{{< fa-icon regular bookmark >}} Bookmark this page for easy future reference! {{< /admonition >}} ## Headings diff --git a/exampleSite/content/posts/basic-markdown-syntax/index.zh-cn.md b/exampleSite/content/posts/basic-markdown-syntax/index.zh-cn.md index 451309db2..cf947700e 100644 --- a/exampleSite/content/posts/basic-markdown-syntax/index.zh-cn.md +++ b/exampleSite/content/posts/basic-markdown-syntax/index.zh-cn.md @@ -50,7 +50,7 @@ John Gruber, Markdown 的作者如是说: 话不多说, 我们来回顾一下 Markdown 的主要语法以及生成的 HTML 样式! {{< admonition tip >}} -:(far fa-bookmark fa-fw): 将此页保存为书签, 以备将来参考! +{{< fa-icon regular bookmark >}} 将此页保存为书签, 以备将来参考! {{< /admonition >}} ## 标题 diff --git a/exampleSite/content/posts/theme-documentation-basics/index.en.md b/exampleSite/content/posts/theme-documentation-basics/index.en.md index 697ebeb22..00f5aca1f 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.en.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.en.md @@ -26,14 +26,14 @@ Discover what the Hugo - **DoIt** theme is all about and the core-concepts behin Thanks to the simplicity of Hugo, [Hugo](https://gohugo.io/) is the only dependency of this theme. -Just install latest version of [:(far fa-file-archive fa-fw): Hugo (> 0.83.0)](https://gohugo.io/getting-started/installing/) for your OS (**Windows**, **Linux**, **macOS**). +Just install latest version of [{{< fa-icon regular file-archive >}} Hugo (> 0.83.0)](https://gohugo.io/getting-started/installing/) for your OS (**Windows**, **Linux**, **macOS**). {{< admonition note "Why not support earlier versions of Hugo?" >}} Since [WebP Image Processing](https://gohugo.io/content-management/image-processing/#jpeg-and-webp-quality) was introduced in the [Hugo 0.83.0](https://gohugo.io/news/0.83.0-relnotes/), this theme only supports Hugo versions above **0.83.0**. {{< /admonition >}} {{< admonition tip "Hugo extended version is recommended" >}} -Since some features of this theme need to processes :(fab fa-sass fa-fw): SCSS to :(fab fa-css3 fa-fw): CSS, it is recommended to use Hugo **extended** version for better experience. +Since some features of this theme need to processes {{< fa-icon brands sass >}} SCSS to {{< fa-icon brands css3 >}} CSS, it is recommended to use Hugo **extended** version for better experience. {{< /admonition >}} ## Installation @@ -53,7 +53,7 @@ cd my_website The **DoIt** theme’s repository is: [https://github.com/HEIGE-PCloud/DoIt](https://github.com/HEIGE-PCloud/DoIt). -You can download the [latest release :(far fa-file-archive fa-fw): .zip file](https://github.com/HEIGE-PCloud/DoIt/releases) of the theme and extract it in the `themes` directory. +You can download the [latest release {{< fa-icon regular file-archive >}} .zip file](https://github.com/HEIGE-PCloud/DoIt/releases) of the theme and extract it in the `themes` directory. Alternatively, clone this repository to the `themes` directory: @@ -189,7 +189,7 @@ Alternatively, you can use [AWS Amplify](https://gohugo.io/hosting-and-deploymen In addition to [Hugo global configuration](https://gohugo.io/overview/configuration/) and [menu configuration](#basic-configuration), **DoIt** lets you define the following parameters in your site configuration (here is a `config.toml`, whose values are default). -Please open the code block below to view the complete sample configuration :(far fa-hand-point-down fa-fw):: +Please open the code block below to view the complete sample configuration {{< fa-icon regular hand-point-down >}}: ```toml [params] @@ -458,8 +458,6 @@ Please open the code block below to view the complete sample configuration :(far ruby = true # {{< version 0.2.0 >}} whether to enable the fraction extended syntax fraction = true - # {{< version 0.2.0 >}} whether to enable the fontawesome extended syntax - fontawesome = true # whether to show link to Raw Markdown content of the content linkToMarkdown = true # {{< version 0.2.14 >}} configure the link to the source file of the post @@ -1053,28 +1051,28 @@ In `assets/css/_custom.scss`, you can add some css style code to customize the s | Language | Hugo Code | HTML `lang` Attribute | Theme Docs | |:---------------------|:---------:|:---------------------:|:-----------------------------:| -| English | `en` | `en` | :(far fa-check-square fa-fw): | -| Simplified Chinese | `zh-cn` | `zh-CN` | :(far fa-check-square fa-fw): | -| French | `fr` | `fr` | :(far fa-square fa-fw): | -| Polish | `pl` | `pl` | :(far fa-square fa-fw): | -| Brazilian Portuguese | `pt-br` | `pt-BR` | :(far fa-square fa-fw): | -| Italian | `it` | `it` | :(far fa-square fa-fw): | -| Spanish | `es` | `es` | :(far fa-square fa-fw): | -| German | `de` | `de` | :(far fa-square fa-fw): | -| German | `de` | `de` | :(far fa-square fa-fw): | -| Serbian | `sr` | `sr` | :(far fa-square fa-fw): | -| Russian | `ru` | `ru` | :(far fa-square fa-fw): | -| Romanian | `ro` | `ro` | :(far fa-square fa-fw): | -| Vietnamese | `vi` | `vi` | :(far fa-square fa-fw): | -| Arabic | `ar` | `ar` | :(far fa-square fa-fw): | -| Catalan | `ca` | `ca` | :(far fa-square fa-fw): | -| Hindi | `hi` | `hi` | :(far fa-square fa-fw): | -| Indonesian | `id` | `id` | :(far fa-square fa-fw): | -| Telugu | `te` | `te` | :(far fa-square fa-fw): | -| Thai | `th` | `th` | :(far fa-square fa-fw): | -| Turkish | `tr` | `tr` | :(far fa-square fa-fw): | -| Ukrainian | `uk` | `uk` | :(far fa-square fa-fw): | -| Traditional Chinese | `zh-tw` | `zh-tw` | :(far fa-square fa-fw): | +| English | `en` | `en` | {{< fa-icon regular check-square >}} | +| Simplified Chinese | `zh-cn` | `zh-CN` | {{< fa-icon regular check-square >}} | +| French | `fr` | `fr` | {{< fa-icon regular square >}} | +| Polish | `pl` | `pl` | {{< fa-icon regular square >}} | +| Brazilian Portuguese | `pt-br` | `pt-BR` | {{< fa-icon regular square >}} | +| Italian | `it` | `it` | {{< fa-icon regular square >}} | +| Spanish | `es` | `es` | {{< fa-icon regular square >}} | +| German | `de` | `de` | {{< fa-icon regular square >}} | +| German | `de` | `de` | {{< fa-icon regular square >}} | +| Serbian | `sr` | `sr` | {{< fa-icon regular square >}} | +| Russian | `ru` | `ru` | {{< fa-icon regular square >}} | +| Romanian | `ro` | `ro` | {{< fa-icon regular square >}} | +| Vietnamese | `vi` | `vi` | {{< fa-icon regular square >}} | +| Arabic | `ar` | `ar` | {{< fa-icon regular square >}} | +| Catalan | `ca` | `ca` | {{< fa-icon regular square >}} | +| Hindi | `hi` | `hi` | {{< fa-icon regular square >}} | +| Indonesian | `id` | `id` | {{< fa-icon regular square >}} | +| Telugu | `te` | `te` | {{< fa-icon regular square >}} | +| Thai | `th` | `th` | {{< fa-icon regular square >}} | +| Turkish | `tr` | `tr` | {{< fa-icon regular square >}} | +| Ukrainian | `uk` | `uk` | {{< fa-icon regular square >}} | +| Traditional Chinese | `zh-tw` | `zh-tw` | {{< fa-icon regular square >}} | ### Basic Configuration @@ -1172,7 +1170,7 @@ Translations strings are used for common default values used in the theme. Trans To override these values, create a new file in your local i18n folder `i18n/.toml` and inspire yourself from `themes/DoIt/i18n/en.toml`. -By the way, as these translations could be used by other people, please take the time to propose a translation by [:(fas fa-code-branch fa-fw): making a PR](https://github.com/HEIGE-PCloud/DoIt/pulls) to the theme! +By the way, as these translations could be used by other people, please take the time to propose a translation by [{{< fa-icon solid code-branch >}} making a PR](https://github.com/HEIGE-PCloud/DoIt/pulls) to the theme! ## Search diff --git a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md index ea46cd508..abfe8c91a 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md @@ -26,14 +26,14 @@ toc: 由于 Hugo 提供的便利性, [Hugo](https://gohugo.io/) 本身是这个主题唯一的依赖. -直接安装满足你操作系统 (**Windows**, **Linux**, **macOS**) 的最新版本 [:(far fa-file-archive fa-fw): Hugo (> 0.83.0)](https://gohugo.io/getting-started/installing/). +直接安装满足你操作系统 (**Windows**, **Linux**, **macOS**) 的最新版本 [{{< fa-icon regular file-archive >}} Hugo (> 0.83.0)](https://gohugo.io/getting-started/installing/). {{< admonition note "为什么不支持早期版本的 Hugo?" >}} 由于 [WebP 图像处理](https://gohugo.io/content-management/image-processing/#jpeg-and-webp-quality) 在 [Hugo 0.83.0版本](https://gohugo.io/news/0.83.0-relnotes/) 中被引入, 本主题只支持高于 **0.83.0** 的 Hugo 版本. {{< /admonition >}} {{< admonition tip "推荐使用 Hugo extended 版本" >}} -由于这个主题的一些特性需要将 :(fab fa-sass fa-fw): SCSS 转换为 :(fab fa-css3 fa-fw): CSS, 推荐使用 Hugo **extended** 版本来获得更好的使用体验. +由于这个主题的一些特性需要将 {{< fa-icon brands sass >}} SCSS 转换为 {{< fa-icon brands css3 >}} CSS, 推荐使用 Hugo **extended** 版本来获得更好的使用体验. {{< /admonition >}} ## 安装 @@ -53,7 +53,7 @@ cd my_website **DoIt** 主题的仓库是: [https://github.com/HEIGE-PCloud/DoIt](https://github.com/HEIGE-PCloud/DoIt). -你可以下载主题的 [最新版本 :(far fa-file-archive fa-fw): .zip 文件](https://github.com/HEIGE-PCloud/DoIt/releases) 并且解压放到 `themes` 目录. +你可以下载主题的 [最新版本 {{< fa-icon regular file-archive >}} .zip 文件](https://github.com/HEIGE-PCloud/DoIt/releases) 并且解压放到 `themes` 目录. 另外, 也可以直接把这个主题克隆到 `themes` 目录: @@ -192,7 +192,7 @@ hugo 除了 [Hugo 全局配置](https://gohugo.io/overview/configuration/) 和 [菜单配置](#basic-configuration) 之外, **DoIt** 主题还允许您在网站配置中定义以下参数 (这是一个示例 `config.toml`, 其内容为默认值). -请打开下面的代码块查看完整的示例配置 :(far fa-hand-point-down fa-fw):: +请打开下面的代码块查看完整的示例配置 {{< fa-icon regular hand-point-down >}}: ```toml [params] @@ -462,8 +462,6 @@ optimizeImages = true ruby = true # {{< version 0.2.0 >}} 是否使用 fraction 扩展语法 fraction = true - # {{< version 0.2.0 >}} 是否使用 fontawesome 扩展语法 - fontawesome = true # 是否在文章页面显示原始 Markdown 文档链接 linkToMarkdown = true # {{< version 0.2.14 >}} 配置文章原始文件的链接 @@ -1056,27 +1054,27 @@ $code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospac | 语言 | Hugo 代码 | HTML `lang` 属性 | 主题文档 | | :----------- | :-------: | :--------------: | :---------------------------: | -| 英语 | `en` | `en` | :(far fa-check-square fa-fw): | -| 简体中文 | `zh-cn` | `zh-CN` | :(far fa-check-square fa-fw): | -| 法语 | `fr` | `fr` | :(far fa-square fa-fw): | -| 波兰语 | `pl` | `pl` | :(far fa-square fa-fw): | -| 巴西葡萄牙语 | `pt-br` | `pt-BR` | :(far fa-square fa-fw): | -| 意大利语 | `it` | `it` | :(far fa-square fa-fw): | -| 西班牙语 | `es` | `es` | :(far fa-square fa-fw): | -| 德语 | `de` | `de` | :(far fa-square fa-fw): | -| 塞尔维亚语 | `pl` | `pl` | :(far fa-square fa-fw): | -| 俄语 | `ru` | `ru` | :(far fa-square fa-fw): | -| 罗马尼亚语 | `ro` | `ro` | :(far fa-square fa-fw): | -| 越南语 | `vi` | `vi` | :(far fa-square fa-fw): | -| Arabic | `ar` | `ar` | :(far fa-square fa-fw): | -| Catalan | `ca` | `ca` | :(far fa-square fa-fw): | -| Hindi | `hi` | `hi` | :(far fa-square fa-fw): | -| Indonesian | `id` | `id` | :(far fa-square fa-fw): | -| Telugu | `te` | `te` | :(far fa-square fa-fw): | -| Thai | `th` | `th` | :(far fa-square fa-fw): | -| Turkish | `tr` | `tr` | :(far fa-square fa-fw): | -| Ukrainian | `uk` | `uk` | :(far fa-square fa-fw): | -| Traditional Chinese | `zh-tw` | `zh-tw` | :(far fa-square fa-fw): | +| 英语 | `en` | `en` | {{< fa-icon regular check-square >}} | +| 简体中文 | `zh-cn` | `zh-CN` | {{< fa-icon regular check-square >}} | +| 法语 | `fr` | `fr` | {{< fa-icon regular square >}} | +| 波兰语 | `pl` | `pl` | {{< fa-icon regular square >}} | +| 巴西葡萄牙语 | `pt-br` | `pt-BR` | {{< fa-icon regular square >}} | +| 意大利语 | `it` | `it` | {{< fa-icon regular square >}} | +| 西班牙语 | `es` | `es` | {{< fa-icon regular square >}} | +| 德语 | `de` | `de` | {{< fa-icon regular square >}} | +| 塞尔维亚语 | `pl` | `pl` | {{< fa-icon regular square >}} | +| 俄语 | `ru` | `ru` | {{< fa-icon regular square >}} | +| 罗马尼亚语 | `ro` | `ro` | {{< fa-icon regular square >}} | +| 越南语 | `vi` | `vi` | {{< fa-icon regular square >}} | +| Arabic | `ar` | `ar` | {{< fa-icon regular square >}} | +| Catalan | `ca` | `ca` | {{< fa-icon regular square >}} | +| Hindi | `hi` | `hi` | {{< fa-icon regular square >}} | +| Indonesian | `id` | `id` | {{< fa-icon regular square >}} | +| Telugu | `te` | `te` | {{< fa-icon regular square >}} | +| Thai | `th` | `th` | {{< fa-icon regular square >}} | +| Turkish | `tr` | `tr` | {{< fa-icon regular square >}} | +| Ukrainian | `uk` | `uk` | {{< fa-icon regular square >}} | +| Traditional Chinese | `zh-tw` | `zh-tw` | {{< fa-icon regular square >}} | ### 基本配置 @@ -1175,7 +1173,7 @@ defaultContentLanguage = "zh-cn" 要覆盖默认值, 请在你项目的 i18n 目录 `i18n/.toml` 中创建一个新文件, 并从 `themes/DoIt/i18n/en.toml` 中获得提示. -另外, 由于你的翻译可能会帮助到其他人, 请花点时间通过 [:(fas fa-code-branch fa-fw): 创建一个 PR](https://github.com/HEIGE-PCloud/DoIt/pulls) 来贡献主题翻译, 谢谢! +另外, 由于你的翻译可能会帮助到其他人, 请花点时间通过 [{{< fa-icon solid code-branch >}} 创建一个 PR](https://github.com/HEIGE-PCloud/DoIt/pulls) 来贡献主题翻译, 谢谢! ## 搜索 diff --git a/exampleSite/content/posts/theme-documentation-content/index.en.md b/exampleSite/content/posts/theme-documentation-content/index.en.md index 465f4f1f3..e9d73f2f5 100644 --- a/exampleSite/content/posts/theme-documentation-content/index.en.md +++ b/exampleSite/content/posts/theme-documentation-content/index.en.md @@ -51,7 +51,7 @@ such as **links**, **images**, `image` shortcode, `music` shortcode and some par Images in page resources or assets directory [processing](https://gohugo.io/content-management/image-processing/) will be supported in the future. -It's really cool! :(far fa-grin-squint fa-fw): +It's really cool! {{< fa-icon regular grin-squint >}} {{< /admonition >}} ## Author Settings {#author-setup} @@ -121,7 +121,6 @@ twemoji: false lightgallery: true ruby: true fraction: true -fontawesome: true linkToMarkdown: true linkToSource: false linkToEdit: false @@ -200,7 +199,6 @@ related: * **lightgallery**: if `true`, images in the content will be shown as the gallery. * **ruby**: {{< version 0.2.0 >}} if `true`, the content will enable the [ruby extended syntax](#ruby). * **fraction**: {{< version 0.2.0 >}} if `true`, the content will enable the [fraction extended syntax](#fraction). -* **fontawesome**: {{< version 0.2.0 >}} if `true`, the content will enable the [Font Awesome extended syntax](#fontawesome). * **linkToMarkdown**: if `true`, the footer of the content will be shown the link to the original Markdown file. * **linkToSource**: {{< version 0.2.14 >}} if `false`, turn off the **view source** link in the footer. You can set it to the link to the source file of the post. Use the magic variable `{path}` to specify the relative path of the post, for example, the `{path}` for this post is `posts/theme-documentation-content/index.en.md`. * **linkToEdit**: {{< version 0.2.13 >}} if `false`, turn off the **edit this page** link in the footer. You can set it to the link to edit the page. Use the magic variable `{path}` to specify the relative path of the post, for example, the `{path}` for this post is `posts/theme-documentation-content/index.en.md`. @@ -406,57 +404,3 @@ The rendered output looks like this: [Light]/[Dark] [90]/[100] - -### Font Awesome {#fontawesome} - -**DoIt** theme uses [Font Awesome](https://fontawesome.com/) as the icon library. -You can easily use these icons in your articles. - -Get the `class` of icons you wanted from the [Font Awesome website](https://fontawesome.com/icons?d=gallery). - -```markdown -Gone camping! {?:}(fas fa-campground fa-fw): Be back soon. - -That is so funny! {?:}(far fa-grin-tears): -``` - -The rendered output looks like this: - -Gone camping! :(fas fa-campground fa-fw): Be back soon. - -That is so funny! :(far fa-grin-tears): - -### Escape character {#escape-character} - -In some special cases (when writing this theme documentation :(far fa-grin-squint-tears):), -your content will conflict with basic or extended Markdown syntax, and it is inevitable. - -The escape character syntax can help you build the content you wanted: - -```markdown -{{??}X} -> X -``` - -For example, two `:` will enable emoji syntax, which is not the behavior you want. The escape character syntax is like this: - -```markdown -{{??}:}joy: -``` - -The rendered output looks like this: - -**{?:}joy{?:}** instead of **:joy:** - -{{< admonition tip >}} -This is related to **[an issue for Hugo](https://github.com/gohugoio/hugo/issues/4978)**, which has not been resolved. -{{< /admonition >}} - -Another example is: - -```markdown -[link{{??}]}(#escape-character) -``` - -The rendered output looks like this: - -**[link{?]}(#escape-character)** instead of **[link](#escape-character)**. diff --git a/exampleSite/content/posts/theme-documentation-content/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-content/index.zh-cn.md index 9c0a9bf68..cab0b7336 100644 --- a/exampleSite/content/posts/theme-documentation-content/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-content/index.zh-cn.md @@ -50,7 +50,7 @@ math: 例如 **链接**, **图片**, `image` shortcode, `music` shortcode 和**前置参数**中的部分参数. 页面资源或者 **assets** 目录中的[图片处理](https://gohugo.io/content-management/image-processing/)会在未来的版本中得到支持. -非常酷的功能! :(far fa-grin-squint fa-fw): +非常酷的功能! {{< fa-icon regular grin-squint >}} {{< /admonition >}} ## 作者配置 {#author-setup} @@ -120,7 +120,6 @@ twemoji: false lightgallery: true ruby: true fraction: true -fontawesome: true linkToMarkdown: true linkToSource: false linkToEdit: false @@ -199,7 +198,6 @@ related: * **lightgallery**: 如果设为 `true`, 文章中的图片将可以按照画廊形式呈现. * **ruby**: {{< version 0.2.0 >}} 如果设为 `true`, 这篇文章会使用 [上标注释扩展语法](#ruby). * **fraction**: {{< version 0.2.0 >}} 如果设为 `true`, 这篇文章会使用 [分数扩展语法](#fraction). -* **fontawesome**: {{< version 0.2.0 >}} 如果设为 `true`, 这篇文章会使用 [Font Awesome 扩展语法](#fontawesome). * **linkToMarkdown**: 如果设为 `true`, 内容的页脚将显示指向原始 Markdown 文件的链接. * **linkToSource**: {{< version 0.2.14 >}} 如果设为 `false`, 则关闭页脚 **view source** 的链接. 你可以将其设置为一个指向文章原始文件的链接. 使用魔法变量 `{path}` 来获取文章的相对路径, 这篇文章的 `{path}` 是 `posts/theme-documentation-content/index.en.md`. * **linkToEdit**:{{< version 0.2.13 >}} 如果设为 `false`, 则关闭页脚 **编辑此页** 的链接. 你可以将其设置为一个用于编辑这个页面的链接. 使用魔法变量 `{path}` 来获取这篇文章的相对路径, 这篇文章的 `{path}` 是 `posts/theme-documentation-content/index.zh-cn.md`. @@ -405,57 +403,3 @@ $$ \ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-} $$ [浅色]/[深色] [90]/[100] - -### Font Awesome {#fontawesome} - -**DoIt** 主题使用 [Font Awesome](https://fontawesome.com/) 作为图标库. -你同样可以在文章中轻松使用这些图标. - -从 [Font Awesome 网站](https://fontawesome.com/icons?d=gallery) 上获取所需的图标 `class`. - -```markdown -去露营啦! {?:}(fas fa-campground fa-fw): 很快就回来. - -真开心! {?:}(far fa-grin-tears): -``` - -呈现的输出效果如下: - -去露营啦! :(fas fa-campground fa-fw): 很快就回来. - -真开心! :(far fa-grin-tears): - -### 转义字符 {#escape-character} - -在某些特殊情况下 (编写这个主题文档时 :(far fa-grin-squint-tears):), -你的文章内容会与 Markdown 的基本或者扩展语法冲突, 并且无法避免. - -转义字符语法可以帮助你渲染出想要的内容: - -```markdown -{{??}X} -> X -``` - -例如, 两个 `:` 会启用 emoji 语法. 但有时候这不是你想要的结果. 可以像这样使用转义字符语法: - -```markdown -{{??}:}joy: -``` - -呈现的输出效果如下: - -**{?:}joy{?:}** 而不是 **:joy:** - -{{< admonition tip >}} -这个方法可以间接解决一个还未解决的 **[Hugo 的 issue](https://github.com/gohugoio/hugo/issues/4978)**. -{{< /admonition >}} - -另一个例子是: - -```markdown -[link{{??}]}(#escape-character) -``` - -呈现的输出效果如下: - -**[link{?]}(#escape-character)** 而不是 **[link](#escape-character)**. diff --git a/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.en.md b/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.en.md index a920b6886..64dce1c45 100644 --- a/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.en.md +++ b/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.en.md @@ -36,7 +36,7 @@ Hugo **extended** version is necessary for `style` shortcode. The `style` shortcode has two positional parameters. The **first** one is the custom style content, -which supports nesting syntax in [:(fab fa-sass fa-fw): SASS](https://sass-lang.com/documentation/style-rules/declarations#nesting) +which supports nesting syntax in [{{< fa-icon brands sass >}} SASS](https://sass-lang.com/documentation/style-rules/declarations#nesting) and `&` referring to this parent HTML element. And the **second** one is the tag name of the HTML element wrapping the content you want to change the style, and whose default value is `div`. @@ -1350,7 +1350,7 @@ The rendered output looks like this: {{< version 0.2.8 >}} -`script` is a shortcode to insert custom **:(fab fa-js fa-fw): Javascript** in your post. +`script` is a shortcode to insert custom **{{< fa-icon brands js >}} Javascript** in your post. {{< admonition >}} The script content can be guaranteed to be executed in order after all third-party libraries are loaded. So you are free to use third-party libraries. @@ -1529,3 +1529,17 @@ Yet another tab {{< /tabs >}} Due to limitations in the Hugo shortcode system, nested tabs may not work as expected. + +## fa-icon + +`fa-icon` shortcode is used to insert [{{< fa-icon brands font-awesome >}}**Font Awesome 5**](https://fontawesome.com/v5/search?m=free) icons. + +A `fa-icon` example: + +```markdown +{{}} +``` + +The rendered output looks like this: + +{{< fa-icon regular smile >}} diff --git a/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.zh-cn.md index 105f7ecf3..bbf70c872 100644 --- a/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-extended-shortcodes/index.zh-cn.md @@ -39,7 +39,7 @@ Hugo **extended** 版本对于 `style` shortcode 是必需的. `style` shortcode 有两个位置参数. -第一个参数是自定义样式的内容. 它支持 [:(fab fa-sass fa-fw): SASS](https://sass-lang.com/documentation/style-rules/declarations#nesting) 中的嵌套语法, +第一个参数是自定义样式的内容. 它支持 [{{< fa-icon brands sass >}} SASS](https://sass-lang.com/documentation/style-rules/declarations#nesting) 中的嵌套语法, 并且 `&` 指代这个父元素. 第二个参数是包裹你要更改样式的内容的 HTML 标签, 默认值是 `div`. @@ -1352,7 +1352,7 @@ public class HelloWorld { {{< version 0.2.8 >}} -`script` shortcode 用来在你的文章中插入 **:(fab fa-js fa-fw): Javascript** 脚本. +`script` shortcode 用来在你的文章中插入 **{{< fa-icon brands js >}} Javascript** 脚本. {{< admonition >}} 脚本内容可以保证在所有的第三方库加载之后按顺序执行. @@ -1532,3 +1532,17 @@ print("Hello world!") {{< /tabs >}} 由于 Hugo shortcode 系统的限制,嵌套的选项卡可能无法正常工作。 + +## fa-icon + +`fa-icon` shortcode 用于插入 [{{< fa-icon brands font-awesome >}}**Font Awesome 5**](https://fontawesome.com/v5/search?m=free) 图标。 + +一个 `fa-icon` 示例: + +```markdown +{{}} +``` + +呈现的输出效果如下: + +{{< fa-icon regular smile >}} diff --git a/exampleSite/data/authors/PCloud.toml b/exampleSite/data/authors/PCloud.toml index 23277aab4..d4e03ed1b 100644 --- a/exampleSite/data/authors/PCloud.toml +++ b/exampleSite/data/authors/PCloud.toml @@ -1,5 +1,5 @@ name = "PCloud" link = "https://github.com/HEIGE-PCloud" email = "heige.pcloud@outlook.com" -avatar = "https://avatars.githubusercontent.com/u/52968553?v=4" +avatar = "/images/PCloud.webp" # gravatarEmail = "" \ No newline at end of file diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html index 56930bd5a..617094b12 100644 --- a/layouts/_default/summary.html +++ b/layouts/_default/summary.html @@ -37,7 +37,8 @@

{{- $categories := slice -}} {{- range .Params.categories -}} {{- $category := partialCached "function/path.html" . . | printf "/categories/%v" | $.Site.GetPage -}} - {{- $categories = $categories | append (printf `%v` $category.RelPermalink $category.Title) -}} + {{- $icon := partial "plugin/fontawesome.html" (dict "Style" "regular" "Icon" "folder") -}} + {{- $categories = $categories | append (printf `%v%v` $category.RelPermalink $icon $category.Title) -}} {{- end -}} {{- with delimit $categories " " -}}