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

add footer links to email, RSS, and socials #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
14 changes: 14 additions & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,17 @@ enableRobotsTXT = true
name = "Posts"
url = "/posts/"
weight = 2

[params]
author = "John Smith"
email = "[email protected]"
emailText = "Email"
rssText = "RSS feed"

[[params.socials]]
url = "http://example.com"
text = "Social Media"
[[params.socials]]
url = "http://example.com"
text = "Video Series"

10 changes: 1 addition & 9 deletions exampleSite/content/post/rich-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,10 @@ tags = [
]
+++

Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugo-s-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
<!--more-->
---

## Instagram Simple Shortcode

{{< instagram_simple BGvuInzyFAe hidecaption >}}

<br>

---

## YouTube Privacy Enhanced Shortcode

{{< youtube ZJthWmvUzzc >}}
Expand Down
15 changes: 15 additions & 0 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,18 @@
</ul>

<p><a href="#">Back to top</a></p>

<p>
{{ if isset .Site.Params "email" }}
<a href="mailto:{{ .Site.Params.email }}">{{ .Site.Params.emailText }}</a>
{{ end }}
{{ $url := "" }}
{{ with .OutputFormats.Get "rss" -}}
{{ if not (eq .Permalink "") }}
<a href="{{ .Permalink | safeURL }}">{{ $.Site.Params.rssText }}</a>
{{ end }}
{{ end -}}
{{ range .Site.Params.socials }}
<a href="{{ .url | safeURL }}">{{ .text }}</a>
{{ end }}
</p>