From 3ac0329f71c6da6b8b6eb03b74ab0989c8eb971f Mon Sep 17 00:00:00 2001 From: gurusabarish Date: Mon, 26 Oct 2020 23:11:53 +0530 Subject: Navbar and Breadcrumbs URL fix --- config.yaml | 2 +- exampleSite/config.yaml | 2 +- layouts/_default/single.html | 54 +++++++++++--------------------------------- layouts/partials/header.html | 4 ++-- 4 files changed, 17 insertions(+), 45 deletions(-) diff --git a/config.yaml b/config.yaml index b5ccc03..8e0a2d5 100644 --- a/config.yaml +++ b/config.yaml @@ -3,7 +3,7 @@ languageCode: "en-us" title: "Hugo-profile" googleanalytics: UA-167646412-8 -disqusShortname: yourdisqusname +disqusShortname: Paginate: 3 taxonomies: diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 347ace0..1a0ef29 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -4,7 +4,7 @@ title: "Hugo-profile" theme: "hugo-profile" googleanalytics: UA-xxxxxxx-x -disqusShortname: yourdisqusname +disqusShortname: Paginate: 3 taxonomies: diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 96511f5..7a93b0e 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -181,23 +181,22 @@
- {{ $siteUrl := replace .Permalink ( printf "%s" .Site.BaseURL) "" }} - {{ $.Scratch.Add "sitePath" .Site.BaseURL }} - - {{ $.Scratch.Add "siteBreadcrumbs" (slice (dict "url" .Site.BaseURL "name" "home" "position" 1 )) }} - {{ range $index, $element := split $siteUrl "/" }} - {{ $.Scratch.Add "sitePath" $element }} - {{ $.Scratch.Add "sitePath" "/" }} - {{ if ne $element "" }} - {{ $.Scratch.Add "siteBreadcrumbs" (slice (dict "url" ($.Scratch.Get "sitePath") "name" . "position" (add $index 2))) }} - {{ end }} - {{ end }} -
@@ -233,32 +232,5 @@ - - {{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }} - {{ $.Scratch.Add "path" .Site.BaseURL }} - - {{ $.Scratch.Add "breadcrumb" (slice (dict "url" .Site.BaseURL "name" "home" "position" 1 )) }} - {{ range $index, $element := split $url "/" }} - {{ $.Scratch.Add "path" $element }} - {{ $.Scratch.Add "path" "/" }} - {{ if ne $element "" }} - {{ $.Scratch.Add "breadcrumb" (slice (dict "url" ($.Scratch.Get "path") "name" . "position" (add $index 2))) }} - {{ end }} - {{ end }} - - {{ end }} \ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 6c64dd0..618de7e 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,6 +1,6 @@