Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(social): allow removing RSS link from social links by setting rss = "" #544

Merged
merged 1 commit into from
May 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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