feat(social): improve social links (#254)
* replace forkawesome and iconfont with simple icons * add more configs for social
This commit is contained in:
@@ -19,7 +19,7 @@ Emoji 可以通过多种方式在 Hugo 项目中启用.
|
||||
|
||||
<!--more-->
|
||||
|
||||
[`emojify`](https://gohugo.io/functions/emojify/) 方法可以直接在模板中调用, 或者使用 [内联 Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes).
|
||||
[`emojify`](https://gohugo.io/functions/emojify/) 方法可以直接在模板中调用, 或者使用 [行内 Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes).
|
||||
|
||||
要全局使用 emoji, 需要在你的网站 [配置](https://gohugo.io/getting-started/configuration/) 中设置 `enableEmoji` 为 `true`,
|
||||
然后你就可以直接在文章中输入 emoji 的代码.
|
||||
|
||||
@@ -290,69 +290,68 @@ Note that some of these parameters are explained in details in other sections of
|
||||
# Social config about the author
|
||||
[params.social]
|
||||
GitHub = "xxxx"
|
||||
Linkedin = "xxxx"
|
||||
Linkedin = ""
|
||||
Twitter = "xxxx"
|
||||
Instagram = "xxxx"
|
||||
Email = "xxxx@xxxx.com"
|
||||
Facebook = "xxxx"
|
||||
Telegram = "xxxx"
|
||||
# Medium = "xxxx"
|
||||
# Gitlab = "xxxx"
|
||||
Youtubelegacy = "xxxx"
|
||||
# Youtubecustom = "xxxx"
|
||||
# Youtubechannel = "xxxx"
|
||||
# Tumblr ="xxxx"
|
||||
# Quora = "xxxx"
|
||||
# Keybase = "xxxx"
|
||||
# Pinterest = "xxxx"
|
||||
# Reddit = "xxxx"
|
||||
# Codepen = "xxxx"
|
||||
# FreeCodeCamp = "xxxx"
|
||||
# Bitbucket = "xxxx"
|
||||
# Stackoverflow = "xxxx"
|
||||
# Weibo = "xxxx"
|
||||
# Odnoklassniki = "xxxx"
|
||||
# VK = "xxxx"
|
||||
# Flickr = "xxxx"
|
||||
# Xing = "xxxx"
|
||||
# Snapchat = "xxxx"
|
||||
# Soundcloud = "xxxx"
|
||||
# Spotify = "xxxx"
|
||||
# Bandcamp = "xxxx"
|
||||
# Paypal = "xxxx"
|
||||
# Fivehundredpx = "xxxx"
|
||||
# Mix = "xxxx"
|
||||
# Goodreads = "xxxx"
|
||||
# Lastfm = "xxxx"
|
||||
# Foursquare = "xxxx"
|
||||
# Hackernews = "xxxx"
|
||||
# Kickstarter = "xxxx"
|
||||
# Patreon = "xxxx"
|
||||
# Steam = "xxxx"
|
||||
# Twitch = "xxxx"
|
||||
# Strava = "xxxx"
|
||||
# Skype = "xxxx"
|
||||
# Whatsapp = "xxxx"
|
||||
# Zhihu = "xxxx"
|
||||
# Douban = "xxxx"
|
||||
# Angellist = "xxxx"
|
||||
# Slidershare = "xxxx"
|
||||
# Jsfiddle = "xxxx"
|
||||
# Deviantart = "xxxx"
|
||||
# Behance = "xxxx"
|
||||
# Dribble = "xxxx"
|
||||
# Wordpress = "xxxx"
|
||||
# Vine = "xxxx"
|
||||
# Googlescholar = "xxxx"
|
||||
# Researchgate = "xxxx"
|
||||
# Mastodon = "xxxx"
|
||||
# MastodonPrefix = "https://mastodon.technology/"
|
||||
# Thingiverse = "xxxx"
|
||||
# Devto = "xxxx"
|
||||
# Gitea = "xxxx"
|
||||
# XMPP = "xxxx"
|
||||
# Matrix = "xxxx"
|
||||
# Bilibili = "xxxx"
|
||||
Medium = ""
|
||||
Gitlab = ""
|
||||
Youtubelegacy = ""
|
||||
Youtubecustom = ""
|
||||
Youtubechannel = ""
|
||||
Tumblr = ""
|
||||
Quora = ""
|
||||
Keybase = ""
|
||||
Pinterest = ""
|
||||
Reddit = ""
|
||||
Codepen = ""
|
||||
FreeCodeCamp = ""
|
||||
Bitbucket = ""
|
||||
Stackoverflow = ""
|
||||
Weibo = ""
|
||||
Odnoklassniki = ""
|
||||
VK = ""
|
||||
Flickr = ""
|
||||
Xing = ""
|
||||
Snapchat = ""
|
||||
Soundcloud = ""
|
||||
Spotify = ""
|
||||
Bandcamp = ""
|
||||
Paypal = ""
|
||||
Fivehundredpx = ""
|
||||
Mix = ""
|
||||
Goodreads = ""
|
||||
Lastfm = ""
|
||||
Foursquare = ""
|
||||
Hackernews = ""
|
||||
Kickstarter = ""
|
||||
Patreon = ""
|
||||
Steam = ""
|
||||
Twitch = ""
|
||||
Strava = ""
|
||||
Skype = ""
|
||||
Whatsapp = ""
|
||||
Zhihu = ""
|
||||
Douban = ""
|
||||
Angellist = ""
|
||||
Slidershare = ""
|
||||
Jsfiddle = ""
|
||||
Deviantart = ""
|
||||
Behance = ""
|
||||
Dribbble = ""
|
||||
Wordpress = ""
|
||||
Vine = ""
|
||||
Googlescholar = ""
|
||||
Researchgate = ""
|
||||
Mastodon = ""
|
||||
Thingiverse = ""
|
||||
Devto = ""
|
||||
Gitea = ""
|
||||
XMPP = ""
|
||||
Matrix = ""
|
||||
Bilibili = ""
|
||||
Email = "xxxx@xxxx.com"
|
||||
RSS = true # {{< version 0.2.0 >}}
|
||||
|
||||
# {{< version 0.2.0 changed >}} Page config
|
||||
@@ -536,6 +535,9 @@ Note that some of these parameters are explained in details in other sections of
|
||||
normalizeCSS = ''
|
||||
# {{< link "https://fontawesome.com/" "fontawesome-free" >}}@5.12.1
|
||||
fontawesomeFreeCSS = ''
|
||||
# {{< version 0.2.0 >}} {{< link "https://github.com/simple-icons/simple-icons" "simple-icons" >}}@2.9.0
|
||||
# ('https://cdn.jsdelivr.net/npm/simple-icons@v2/icons/')
|
||||
simpleIconsPrefix = 'https://cdn.jsdelivr.net/npm/simple-icons@v2/icons/'
|
||||
# animate.css@3.7.2 https://github.com/daneden/animate.css
|
||||
animateCSS = ''
|
||||
# {{< link "https://github.com/cferdinandi/smooth-scroll" "smooth-scroll" >}}@16.1.2
|
||||
@@ -672,6 +674,37 @@ smoothScrollJS = 'https://cdn.jsdelivr.net/npm/smooth-scroll@16/dist/smooth-scro
|
||||
```
|
||||
{{< /admonition >}}
|
||||
|
||||
{{< admonition tip "Tips about social Configuration" >}}
|
||||
{{< version 0.2.0 >}}
|
||||
|
||||
You can directly set your ID to get a default social link and its icon:
|
||||
|
||||
```toml
|
||||
[params.social]
|
||||
Mastodon = "@xxxx"
|
||||
```
|
||||
|
||||
The social link generated is `https://mastodon.technology/@xxxx`.
|
||||
|
||||
Or You can set more options through a dict:
|
||||
|
||||
```toml
|
||||
[params.social]
|
||||
[params.social.Mastodon]
|
||||
# weight when arranging icons (the greater the weight, the later the icon is positioned)
|
||||
weight = 0
|
||||
# your social ID
|
||||
id = "@xxxx"
|
||||
# prefix of your social link
|
||||
prefix = "https://mastodon.social/"
|
||||
# content hovering on the icon
|
||||
title = "Mastodon"
|
||||
```
|
||||
|
||||
The default configuration of all supported social links is located in `themes/LoveIt/assets/data/social.yaml`,
|
||||
which is you can refer to.
|
||||
{{< /admonition >}}
|
||||
|
||||

|
||||
|
||||
### 3.2 Favicons, Browserconfig, Manifest
|
||||
|
||||
@@ -295,69 +295,68 @@ Note that some of these parameters are explained in details in other sections of
|
||||
# Social config about the author
|
||||
[params.social]
|
||||
GitHub = "xxxx"
|
||||
Linkedin = "xxxx"
|
||||
Linkedin = ""
|
||||
Twitter = "xxxx"
|
||||
Instagram = "xxxx"
|
||||
Email = "xxxx@xxxx.com"
|
||||
Facebook = "xxxx"
|
||||
Telegram = "xxxx"
|
||||
# Medium = "xxxx"
|
||||
# Gitlab = "xxxx"
|
||||
Youtubelegacy = "xxxx"
|
||||
# Youtubecustom = "xxxx"
|
||||
# Youtubechannel = "xxxx"
|
||||
# Tumblr ="xxxx"
|
||||
# Quora = "xxxx"
|
||||
# Keybase = "xxxx"
|
||||
# Pinterest = "xxxx"
|
||||
# Reddit = "xxxx"
|
||||
# Codepen = "xxxx"
|
||||
# FreeCodeCamp = "xxxx"
|
||||
# Bitbucket = "xxxx"
|
||||
# Stackoverflow = "xxxx"
|
||||
# Weibo = "xxxx"
|
||||
# Odnoklassniki = "xxxx"
|
||||
# VK = "xxxx"
|
||||
# Flickr = "xxxx"
|
||||
# Xing = "xxxx"
|
||||
# Snapchat = "xxxx"
|
||||
# Soundcloud = "xxxx"
|
||||
# Spotify = "xxxx"
|
||||
# Bandcamp = "xxxx"
|
||||
# Paypal = "xxxx"
|
||||
# Fivehundredpx = "xxxx"
|
||||
# Mix = "xxxx"
|
||||
# Goodreads = "xxxx"
|
||||
# Lastfm = "xxxx"
|
||||
# Foursquare = "xxxx"
|
||||
# Hackernews = "xxxx"
|
||||
# Kickstarter = "xxxx"
|
||||
# Patreon = "xxxx"
|
||||
# Steam = "xxxx"
|
||||
# Twitch = "xxxx"
|
||||
# Strava = "xxxx"
|
||||
# Skype = "xxxx"
|
||||
# Whatsapp = "xxxx"
|
||||
# Zhihu = "xxxx"
|
||||
# Douban = "xxxx"
|
||||
# Angellist = "xxxx"
|
||||
# Slidershare = "xxxx"
|
||||
# Jsfiddle = "xxxx"
|
||||
# Deviantart = "xxxx"
|
||||
# Behance = "xxxx"
|
||||
# Dribble = "xxxx"
|
||||
# Wordpress = "xxxx"
|
||||
# Vine = "xxxx"
|
||||
# Googlescholar = "xxxx"
|
||||
# Researchgate = "xxxx"
|
||||
# Mastodon = "xxxx"
|
||||
# MastodonPrefix = "https://mastodon.technology/"
|
||||
# Thingiverse = "xxxx"
|
||||
# Devto = "xxxx"
|
||||
# Gitea = "xxxx"
|
||||
# XMPP = "xxxx"
|
||||
# Matrix = "xxxx"
|
||||
# Bilibili = "xxxx"
|
||||
Medium = ""
|
||||
Gitlab = ""
|
||||
Youtubelegacy = ""
|
||||
Youtubecustom = ""
|
||||
Youtubechannel = ""
|
||||
Tumblr = ""
|
||||
Quora = ""
|
||||
Keybase = ""
|
||||
Pinterest = ""
|
||||
Reddit = ""
|
||||
Codepen = ""
|
||||
FreeCodeCamp = ""
|
||||
Bitbucket = ""
|
||||
Stackoverflow = ""
|
||||
Weibo = ""
|
||||
Odnoklassniki = ""
|
||||
VK = ""
|
||||
Flickr = ""
|
||||
Xing = ""
|
||||
Snapchat = ""
|
||||
Soundcloud = ""
|
||||
Spotify = ""
|
||||
Bandcamp = ""
|
||||
Paypal = ""
|
||||
Fivehundredpx = ""
|
||||
Mix = ""
|
||||
Goodreads = ""
|
||||
Lastfm = ""
|
||||
Foursquare = ""
|
||||
Hackernews = ""
|
||||
Kickstarter = ""
|
||||
Patreon = ""
|
||||
Steam = ""
|
||||
Twitch = ""
|
||||
Strava = ""
|
||||
Skype = ""
|
||||
Whatsapp = ""
|
||||
Zhihu = ""
|
||||
Douban = ""
|
||||
Angellist = ""
|
||||
Slidershare = ""
|
||||
Jsfiddle = ""
|
||||
Deviantart = ""
|
||||
Behance = ""
|
||||
Dribbble = ""
|
||||
Wordpress = ""
|
||||
Vine = ""
|
||||
Googlescholar = ""
|
||||
Researchgate = ""
|
||||
Mastodon = ""
|
||||
Thingiverse = ""
|
||||
Devto = ""
|
||||
Gitea = ""
|
||||
XMPP = ""
|
||||
Matrix = ""
|
||||
Bilibili = ""
|
||||
Email = "xxxx@xxxx.com"
|
||||
RSS = true # {{< version 0.2.0 >}}
|
||||
|
||||
# {{< version 0.2.0 changed >}} Page config
|
||||
@@ -541,6 +540,9 @@ Note that some of these parameters are explained in details in other sections of
|
||||
normalizeCSS = ''
|
||||
# {{< link "https://fontawesome.com/" "fontawesome-free" >}}@5.12.1
|
||||
fontawesomeFreeCSS = ''
|
||||
# {{< version 0.2.0 >}} {{< link "https://github.com/simple-icons/simple-icons" "simple-icons" >}}@2.9.0
|
||||
# ('https://cdn.jsdelivr.net/npm/simple-icons@v2/icons/')
|
||||
simpleIconsPrefix = 'https://cdn.jsdelivr.net/npm/simple-icons@v2/icons/'
|
||||
# animate.css@3.7.2 https://github.com/daneden/animate.css
|
||||
animateCSS = ''
|
||||
# {{< link "https://github.com/cferdinandi/smooth-scroll" "smooth-scroll" >}}@16.1.2
|
||||
@@ -677,6 +679,37 @@ smoothScrollJS = 'https://cdn.jsdelivr.net/npm/smooth-scroll@16/dist/smooth-scro
|
||||
```
|
||||
{{< /admonition >}}
|
||||
|
||||
{{< admonition tip "Tips about social Configuration" >}}
|
||||
{{< version 0.2.0 >}}
|
||||
|
||||
You can directly set your ID to get a default social link and its icon:
|
||||
|
||||
```toml
|
||||
[params.social]
|
||||
Mastodon = "@xxxx"
|
||||
```
|
||||
|
||||
The social link generated is `https://mastodon.technology/@xxxx`.
|
||||
|
||||
Or You can set more options through a dict:
|
||||
|
||||
```toml
|
||||
[params.social]
|
||||
[params.social.Mastodon]
|
||||
# weight when arranging icons (the greater the weight, the later the icon is positioned)
|
||||
weight = 0
|
||||
# your social ID
|
||||
id = "@xxxx"
|
||||
# prefix of your social link
|
||||
prefix = "https://mastodon.social/"
|
||||
# content hovering on the icon
|
||||
title = "Mastodon"
|
||||
```
|
||||
|
||||
The default configuration of all supported social links is located in `themes/LoveIt/assets/data/social.yaml`,
|
||||
which is you can refer to.
|
||||
{{< /admonition >}}
|
||||
|
||||

|
||||
|
||||
### 3.2 Favicons, Browserconfig, Manifest
|
||||
|
||||
@@ -293,69 +293,68 @@ hugo
|
||||
# 作者的社交信息设置
|
||||
[params.social]
|
||||
GitHub = "xxxx"
|
||||
# Linkedin = "xxxx"
|
||||
# Twitter = "xxxx"
|
||||
# Instagram = "xxxx"
|
||||
Linkedin = ""
|
||||
Twitter = "xxxx"
|
||||
Instagram = "xxxx"
|
||||
Facebook = "xxxx"
|
||||
Telegram = "xxxx"
|
||||
Medium = ""
|
||||
Gitlab = ""
|
||||
Youtubelegacy = ""
|
||||
Youtubecustom = ""
|
||||
Youtubechannel = ""
|
||||
Tumblr = ""
|
||||
Quora = ""
|
||||
Keybase = ""
|
||||
Pinterest = ""
|
||||
Reddit = ""
|
||||
Codepen = ""
|
||||
FreeCodeCamp = ""
|
||||
Bitbucket = ""
|
||||
Stackoverflow = ""
|
||||
Weibo = ""
|
||||
Odnoklassniki = ""
|
||||
VK = ""
|
||||
Flickr = ""
|
||||
Xing = ""
|
||||
Snapchat = ""
|
||||
Soundcloud = ""
|
||||
Spotify = ""
|
||||
Bandcamp = ""
|
||||
Paypal = ""
|
||||
Fivehundredpx = ""
|
||||
Mix = ""
|
||||
Goodreads = ""
|
||||
Lastfm = ""
|
||||
Foursquare = ""
|
||||
Hackernews = ""
|
||||
Kickstarter = ""
|
||||
Patreon = ""
|
||||
Steam = ""
|
||||
Twitch = ""
|
||||
Strava = ""
|
||||
Skype = ""
|
||||
Whatsapp = ""
|
||||
Zhihu = ""
|
||||
Douban = ""
|
||||
Angellist = ""
|
||||
Slidershare = ""
|
||||
Jsfiddle = ""
|
||||
Deviantart = ""
|
||||
Behance = ""
|
||||
Dribbble = ""
|
||||
Wordpress = ""
|
||||
Vine = ""
|
||||
Googlescholar = ""
|
||||
Researchgate = ""
|
||||
Mastodon = ""
|
||||
Thingiverse = ""
|
||||
Devto = ""
|
||||
Gitea = ""
|
||||
XMPP = ""
|
||||
Matrix = ""
|
||||
Bilibili = ""
|
||||
Email = "xxxx@xxxx.com"
|
||||
# Facebook = "xxxx"
|
||||
# Telegram = "xxxx"
|
||||
# Medium = "xxxx"
|
||||
# Gitlab = "xxxx"
|
||||
# Youtubelegacy = "xxxx"
|
||||
# Youtubecustom = "xxxx"
|
||||
# Youtubechannel = "xxxx"
|
||||
# Tumblr ="xxxx"
|
||||
# Quora = "xxxx"
|
||||
# Keybase = "xxxx"
|
||||
# Pinterest = "xxxx"
|
||||
# Reddit = "xxxx"
|
||||
# Codepen = "xxxx"
|
||||
# FreeCodeCamp = "xxxx"
|
||||
# Bitbucket = "xxxx"
|
||||
# Stackoverflow = "xxxx"
|
||||
Weibo = "xxxx"
|
||||
# Odnoklassniki = "xxxx"
|
||||
# VK = "xxxx"
|
||||
# Flickr = "xxxx"
|
||||
# Xing = "xxxx"
|
||||
# Snapchat = "xxxx"
|
||||
# Soundcloud = "xxxx"
|
||||
# Spotify = "xxxx"
|
||||
# Bandcamp = "xxxx"
|
||||
# Paypal = "xxxx"
|
||||
# Fivehundredpx = "xxxx"
|
||||
# Mix = "xxxx"
|
||||
# Goodreads = "xxxx"
|
||||
# Lastfm = "xxxx"
|
||||
# Foursquare = "xxxx"
|
||||
# Hackernews = "xxxx"
|
||||
# Kickstarter = "xxxx"
|
||||
# Patreon = "xxxx"
|
||||
# Steam = "xxxx"
|
||||
# Twitch = "xxxx"
|
||||
# Strava = "xxxx"
|
||||
# Skype = "xxxx"
|
||||
# Whatsapp = "xxxx"
|
||||
Zhihu = "xxxx"
|
||||
Douban = "xxxx"
|
||||
# Angellist = "xxxx"
|
||||
# Slidershare = "xxxx"
|
||||
# Jsfiddle = "xxxx"
|
||||
# Deviantart = "xxxx"
|
||||
# Behance = "xxxx"
|
||||
# Dribble = "xxxx"
|
||||
# Wordpress = "xxxx"
|
||||
# Vine = "xxxx"
|
||||
# Googlescholar = "xxxx"
|
||||
# Researchgate = "xxxx"
|
||||
# Mastodon = "xxxx"
|
||||
# MastodonPrefix = "https://mastodon.technology/"
|
||||
# Thingiverse = "xxxx"
|
||||
# Devto = "xxxx"
|
||||
# Gitea = "xxxx"
|
||||
# XMPP = "xxxx"
|
||||
# Matrix = "xxxx"
|
||||
Bilibili = "xxxx"
|
||||
RSS = true # {{< version 0.2.0 >}}
|
||||
|
||||
# {{< version 0.2.0 changed >}} 文章页面配置
|
||||
@@ -388,7 +387,7 @@ hugo
|
||||
# 默认块定界符是 $$ ... $$ 和 \\[ ... \\]
|
||||
blockLeftDelimiter = ""
|
||||
blockRightDelimiter = ""
|
||||
# 默认内联定界符是 $ ... $ 和 \\( ... \\)
|
||||
# 默认行内定界符是 $ ... $ 和 \\( ... \\)
|
||||
inlineLeftDelimiter = ""
|
||||
inlineRightDelimiter = ""
|
||||
# KaTeX 插件 copy_tex
|
||||
@@ -539,6 +538,9 @@ hugo
|
||||
normalizeCSS = ''
|
||||
# {{< link "https://fontawesome.com/" "fontawesome-free" >}}@5.12.1
|
||||
fontawesomeFreeCSS = ''
|
||||
# {{< version 0.2.0 >}} {{< link "https://github.com/simple-icons/simple-icons" "simple-icons" >}}@2.9.0
|
||||
# ('https://cdn.jsdelivr.net/npm/simple-icons@v2/icons/')
|
||||
simpleIconsPrefix = 'https://cdn.jsdelivr.net/npm/simple-icons@v2/icons/'
|
||||
# animate.css@3.7.2 https://github.com/daneden/animate.css
|
||||
animateCSS = ''
|
||||
# {{< link "https://github.com/cferdinandi/smooth-scroll" "smooth-scroll" >}}@16.1.2
|
||||
@@ -675,6 +677,37 @@ smoothScrollJS = 'https://cdn.jsdelivr.net/npm/smooth-scroll@16/dist/smooth-scro
|
||||
```
|
||||
{{< /admonition >}}
|
||||
|
||||
{{< admonition tip "关于社交链接配置的技巧" >}}
|
||||
{{< version 0.2.0 >}}
|
||||
|
||||
你可以直接配置你的社交 ID 来生成一个默认社交链接和图标:
|
||||
|
||||
```toml
|
||||
[params.social]
|
||||
Mastodon = "@xxxx"
|
||||
```
|
||||
|
||||
生成的社交链接是 `https://mastodon.technology/@xxxx`.
|
||||
|
||||
或者你可以通过一个字典来设置更多的选项:
|
||||
|
||||
```toml
|
||||
[params.social]
|
||||
[params.social.Mastodon]
|
||||
# 排列图标时的权重 (权重越大, 图标的位置越靠后)
|
||||
weight = 0
|
||||
# 你的社交 ID
|
||||
id = "@xxxx"
|
||||
# 你的社交链接的前缀
|
||||
prefix = "https://mastodon.social/"
|
||||
# 当鼠标停留在图标上时的提示内容
|
||||
title = "Mastodon"
|
||||
```
|
||||
|
||||
所有支持的社交链接的默认配置位于 `themes/LoveIt/assets/data/social.yaml`.
|
||||
你可以参考它来配置你的社交链接.
|
||||
{{< /admonition >}}
|
||||
|
||||

|
||||
|
||||
### 3.2 网站图标, 浏览器配置, 网站清单
|
||||
|
||||
Reference in New Issue
Block a user