diff options
author | Jonathan Rutheiser <jonathan.rutheiser@gmail.com> | 2019-08-25 22:46:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-25 22:46:06 +0300 |
commit | fba4893aaff5a8d65631927a1b166e58a53f36ef (patch) | |
tree | 66a2201ebb34cf0c63be8a1e05de469e3f747267 | |
parent | a9163c886b2ec545557c7ca803a312f3326a70b1 (diff) | |
parent | 30af0d27b6d248655d6034a90b86702f46581047 (diff) |
Merge pull request #33 from jrutheiser/jrutheiser/hugo-updates
Fix issues from gohugoio/hugoThemes#682
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | exampleSite/config.toml | 3 | ||||
-rw-r--r-- | layouts/index.html | 2 | ||||
-rw-r--r-- | layouts/partials/footer.html | 4 | ||||
-rw-r--r-- | layouts/partials/head.html | 12 |
5 files changed, 14 insertions, 9 deletions
@@ -30,7 +30,7 @@ file located in the [exampleSite](https://github.com/jrutheiser/hugo-lithium-the ### Post -Used for blog posts. Blog posts are listed on the homepage. +Used for blog posts. Run `hugo new post/<post-name>.md` to create a post. diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 4ede958..8fa0c38 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -4,6 +4,7 @@ title = "Lithium Theme" theme = "hugo-lithium-theme" googleAnalytics = "" disqusShortname = "" +disableKinds = ["taxonomy", "taxonomyTerm", "section", "404"] [permalinks] post = "/:year/:month/:day/:title/" @@ -20,6 +21,8 @@ disqusShortname = "" url = "" [params] + mainSections = ["post"] + description = "" # path to the favicon, under "static" diff --git a/layouts/index.html b/layouts/index.html index 6747e91..21a1ab7 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -3,7 +3,7 @@ <main class="content" role="main"> <div class="archive"> - {{ range (where .Data.Pages "Type" "post").GroupByDate "2006" }} + {{ range (where site.RegularPages "Type" "in" site.Params.mainSections).GroupByDate "2006" }} <h2 class="archive-title">{{ .Key }}</h2> {{ range .Pages }} <article class="archive-item"> diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index ced27b2..a97e90b 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,8 +1,10 @@ <footer class="footer"> <ul class="footer-links"> + {{ with .OutputFormats.Get "RSS" }} <li> - <a href="{{ .Site.RSSLink }}" type="application/rss+xml" target="_blank">RSS feed</a> + <a href="{{ .RelPermalink }}" type="application/rss+xml" target="_blank">RSS feed</a> </li> + {{ end }} <li> <a href="https://gohugo.io/" class="footer-links-kudos">Made with <img src="{{ .Site.BaseURL }}images/hugo-logo.png" width="22" height="22"></a> </li> diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 686ac86..9eaf1e4 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,8 +1,8 @@ <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> -{{ .Hugo.Generator }} +{{ hugo.Generator }} -{{ if eq .URL "/" }} +{{ if .IsHome }} <title>{{ .Title }}</title> <meta property="og:title" content="{{ .Title }}"> <meta property="og:type" content="website"> @@ -14,7 +14,7 @@ <link href='{{ . | absURL }}' rel='icon' type='image/x-icon'/> {{ end }} -{{ if eq .URL "/" }} +{{ if .IsHome }} <meta property="description" content="{{ .Site.Params.description }}"> {{ else }} {{ if .Description }} @@ -26,9 +26,9 @@ <meta property="keywords" content ="{{ delimit .Keywords ", " }}"> {{ end }} -{{ if .RSSLink }} -<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" /> -{{ end }} +{{ with .OutputFormats.Get "rss" -}} + {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} +{{ end -}} <link rel="icon" href="{{ .Site.BaseURL }}images/{{ .Site.Params.icon.url }}" type="image/x-icon"/> <link rel="stylesheet" href="{{ .Site.BaseURL }}css/main.css" media="all"> |