Skip to content

Commit

Permalink
feat(social): allow removing RSS link from social links by setting rs…
Browse files Browse the repository at this point in the history
…s=""
  • Loading branch information
razonyang committed May 24, 2022
1 parent 86db6b7 commit 2e6f3d8
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions exampleSite/config/_default/author.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ location = "Earth"
facebook = "yourfacebookusername"
github = "yourgithubusername"
twitter = "yourtwitterusername"
# rss = "" # Disable RSS link
1 change: 1 addition & 0 deletions exampleSite/config/_default/social.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ liberapay = "yourliberapayaccount"
paypal="yourpaypalaccount"
patreon="yourpatreonaccount"
tipeee="yourtipeeeaccount-fr"
# rss = "" # Disable RSS link
1 change: 1 addition & 0 deletions exampleSite/content/docs/widgets/social-links/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,4 @@ github = "githubusername"
| `paypal` | Paypal Username |
| `patreon` | Patreon Username |
| `tipeee` | Tipeee Username |
| `rss` | Empty string for disabling the RSS link |
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,4 @@ github = "githubusername"
| `paypal` | Paypal 用户名 |
| `patreon` | Patreon 用户名 |
| `tipeee` | Tipeee 用户名 |
| `rss` | 空字符串以禁用 RSS 链接 |
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,4 @@ github = "githubusername"
| `paypal` | Paypal 使用者名稱 |
| `patreon` | Patreon 使用者名稱 |
| `tipeee` | Tipeee 使用者名稱 |
| `rss` | 空字符串以禁用 RSS 链接 |
6 changes: 5 additions & 1 deletion layouts/partials/helpers/social-links.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@
{{- end -}}
{{- end -}}
{{- end -}}
{{- if default true .params.rss -}}
{{- $rss := true -}}
{{- if isset .links "rss" -}}
{{- $rss = ne "" .links.rss -}}
{{- end -}}
{{- if and (default true .params.rss) $rss -}}
{{- $rss := false -}}
{{- with .home.OutputFormats.Get "rss" -}}
{{- $rss = . -}}
Expand Down

0 comments on commit 2e6f3d8

Please sign in to comment.