diff options
author | Eddie Webb <ollitech@gmail.com> | 2020-02-06 18:05:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-06 18:05:33 +0300 |
commit | 03879d6427693a686fb3d8b884bda3b87dfea7fd (patch) | |
tree | 325966750059e3fac65bf56836e5aad41b605435 | |
parent | ddac4d5c721bc10799a0ac6664a9ac4ba268acd4 (diff) |
Flexible names (#50)
* can rename publications
* seo - page title and description now page specific
-rw-r--r-- | layouts/_default/baseof.html | 8 | ||||
-rw-r--r-- | layouts/_default/section.html | 4 | ||||
-rw-r--r-- | layouts/index.html | 4 | ||||
-rw-r--r-- | layouts/partials/nav.html | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 78f88b8..55e466f 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -3,11 +3,11 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> - <title>{{ .Title }}</title> - <meta property="og:title" content="{{ .Title }}" /> + <title>{{ .Site.Title }} | {{ .Title }}</title> + <meta property="og:title" content="{{ .Site.Title }} | {{ .Title }}" /> <meta property="og:image" content="{{ .Site.Params.profileImage | absURL }}" /> - <meta name="description" content="{{ .Site.Params.description }}"> - <meta property="og:description" content="{{ .Site.Params.description }}" /> + <meta name="description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{else}}{{ .Description }}{{ end }}"> + <meta property="og:description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{else}}{{ .Description }}{{ end }}" /> <meta name="author" content="{{ .Site.Params.firstName }} {{ .Site.Params.lastName }}"> <!-- Bootstrap core CSS --> <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"> diff --git a/layouts/_default/section.html b/layouts/_default/section.html index 5a8dfc6..561f19f 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -5,13 +5,13 @@ <h1 id="{{ urlize .Title }}">{{ .Title }}</h1> <p>{{ .Content }}</p> {{ range .Data.Pages.ByWeight }} - {{ partial (printf "%s%s" .Section "Summary") . }} + {{ partial (printf "%s%s" .Type "Summary") . }} {{ end }} {{ range .Sections }} <h2 id="{{ urlize .Title }}"><a href="{{ .Permalink }}">{{ .Title }}</a></h2> <p>{{ .Content }}</p> {{ range .Pages }} - {{ partial (printf "%s%s" .Section "Summary") . }} + {{ partial (printf "%s%s" .Type "Summary") . }} {{ end }} {{ end }} </div> diff --git a/layouts/index.html b/layouts/index.html index c53cc70..7ebe038 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -17,7 +17,7 @@ {{ end }} {{ if .Site.Params.showPublications }} {{ with .Site.GetPage "section" "publications" }} - {{ .Scratch.Set "sectionId" "publications" }} + {{ .Scratch.Set "sectionId" (default "Publications" .Site.Params.publicationsAlternateName) }} {{ partial "sectionSummary" . }} {{ end }} {{ end }} @@ -33,4 +33,4 @@ {{ partial "sectionSummary" . }} {{ end }} {{ end }} -{{ end }} +{{ end }}
\ No newline at end of file diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index 8c6c478..6aa07ed 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -30,7 +30,7 @@ {{ end }} {{ if .Site.Params.showPublications }} <li class="nav-item"> - <a class="nav-link js-scroll-trigger" href="/#publications">Publications</a> + <a class="nav-link js-scroll-trigger" href="/#{{ default "Publications" .Site.Params.publicationsAlternateName }}">{{ default "Publications" .Site.Params.publicationsAlternateName }}</a> </li> {{ end }} {{ if .Site.Params.showExperience }} |