From 72685a748151892d853ef080e2639cf3fe8a2c02 Mon Sep 17 00:00:00 2001 From: Ryan Watters Date: Sun, 5 Mar 2017 03:47:06 -0600 Subject: [PATCH] Remove all references to baseurl in templates --- content/templates/base.md | 11 ++++++----- layouts/404.html | 2 +- layouts/_default/section.html | 1 - layouts/_default/taxonomy.html | 2 +- layouts/_default/terms.html | 1 - layouts/partials/breadcrumb.html | 3 +-- layouts/partials/contents-list.html | 1 - layouts/partials/head/metadata-favicons.html | 16 ++++++++-------- layouts/partials/head/metadata-opengraph.html | 2 +- layouts/partials/homepage/homepage-hero.html | 2 +- layouts/partials/list-icon.html | 4 ---- layouts/partials/site-header.html | 3 +-- layouts/partials/site-navigation.html | 6 ++---- layouts/partials/site-scripts.html | 6 +++--- layouts/section/showcase.html | 6 +++--- 15 files changed, 28 insertions(+), 38 deletions(-) delete mode 100644 layouts/partials/list-icon.html diff --git a/content/templates/base.md b/content/templates/base.md index 034039530..a61f9f50b 100644 --- a/content/templates/base.md +++ b/content/templates/base.md @@ -15,18 +15,18 @@ toc: true wip: true --- -Go 1.6 includes a powerful new keyword, `block`. This construct allows you to define the outer shell of your pages one or more master template(s), filling in or overriding portions as necessary. +Go 1.6 includes a powerful new keyword, `block`. This construct allows you to define the outer shell of your pages' one or more master template(s) and then fill in or override portions as necessary. ## Base Template Lookup Order -This is the order Hugo searches for a base template: +This is the order Hugo searches for your base template: 1. `/layouts//-baseof.html` 2. `/layouts//baseof.html` 3. `/layouts/_default/-baseof.html` 4. `/layouts/_default/baseof.html` -As an example, with a site using the theme `exampletheme`, when rendering the section list for the section `post`. Hugo picks the `section/post.html` as the template and this template has a `define` section that indicates it needs a base template. This is then the lookup order: +As an example, let's assume your site is using the theme when rendering the section list for the section `post`. Hugo picks the `section/post.html` as the template and this template has a `define` section that indicates it needs a base template. This is then the lookup order: 1. `/layouts/section/post-baseof.html` 2. `/themes//layouts/section/post-baseof.html` @@ -59,8 +59,9 @@ The following defines a simple base template at `_default/baseof.html`). As a de {{ block "main" . }} {{ end }} - - + {{ block "footer" . }} + + {{ end }} ``` diff --git a/layouts/404.html b/layouts/404.html index 65ab60287..a6fee2fc2 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -5,7 +5,7 @@

Page Not Found

diff --git a/layouts/_default/section.html b/layouts/_default/section.html index 694a22ed5..d94fc0ca9 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -5,7 +5,6 @@
{{partial "breadcrumb.html" . }}

- {{- .Title | markdownify -}}

{{partial "content-header-links.html" . }} {{partial "tags.html" . }} diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index c7dac0807..b2d1f5676 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -2,7 +2,7 @@
-

{{.Data.Plural}}: {{ replace .Title "-" " "}}

+

{{.Data.Plural}}: {{ replace .Title "-" " "}}

{{partial "contents-list.html" . }} diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index 289ca4b25..2cfe8d85b 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -7,7 +7,6 @@
{{ $data := .Data }} {{ $dataPlural := add (.Title | urlize) "/"}} - {{ $base := $.Site.BaseURL }} diff --git a/layouts/partials/breadcrumb.html b/layouts/partials/breadcrumb.html index 3f4bd36f1..dacc4eeb1 100644 --- a/layouts/partials/breadcrumb.html +++ b/layouts/partials/breadcrumb.html @@ -2,8 +2,7 @@