~alanorth/hugo-theme-bootstrap4-blog

8da12539f30bd722e73a5bafb90ca41b25e3da33 — TommySprat 2 years ago c17a7d2
Support baseurl without trailing slash
3 files changed, 6 insertions(+), 6 deletions(-)

M layouts/_default/baseof.html
M layouts/partials/cookie-consent.html
M layouts/robots.txt
M layouts/_default/baseof.html => layouts/_default/baseof.html +3 -3
@@ 14,10 14,10 @@

    {{ if eq .Lang "ar" }}
    {{ "<!-- ar -->" | safeHTML }}
    <link href="{{ .Site.BaseURL }}css/style.rtl.css" rel="stylesheet"{{ if not .Site.Params.disable_sri }} integrity="{{ .Site.Data.sri.styleltr}}" crossorigin="anonymous"{{ end }}>
    <link href="{{ "css/style.rtl.css" | absURL }}" rel="stylesheet"{{ if not .Site.Params.disable_sri }} integrity="{{ .Site.Data.sri.styleltr}}" crossorigin="anonymous"{{ end }}>
    {{ else }}
    {{ "<!-- combined, minified CSS -->" | safeHTML }}
    <link href="{{ .Site.BaseURL }}css/style.css" rel="stylesheet"{{ if not .Site.Params.disable_sri }} integrity="{{ .Site.Data.sri.style}}" crossorigin="anonymous"{{ end }}>
    <link href="{{ "css/style.css" | absURL }}" rel="stylesheet"{{ if not .Site.Params.disable_sri }} integrity="{{ .Site.Data.sri.style}}" crossorigin="anonymous"{{ end }}>
    {{ end }}

    {{ "<!-- RSS 2.0 feed -->" | safeHTML }}


@@ 55,7 55,7 @@
    {{ if (ne .Site.Params.header_visible false) }}
    <header class="blog-header">
      <div class="container">
        <h1 class="blog-title" dir="auto"><a href="{{ .Site.BaseURL }}" rel="home">{{ .Site.Title | safeHTML }}</a></h1>
        <h1 class="blog-title" dir="auto"><a href="{{ "/" | absURL }}" rel="home">{{ .Site.Title | safeHTML }}</a></h1>
        {{ if .Site.Params.description }}<p class="lead blog-description" dir="auto">{{ .Site.Params.description | markdownify }}</p>{{ end }}
      </div>
    </header>

M layouts/partials/cookie-consent.html => layouts/partials/cookie-consent.html +2 -2
@@ 1,5 1,5 @@
<link href="{{ .Site.BaseURL }}css/cookieconsent.min.css" rel="stylesheet" type="text/css"{{ if not .Site.Params.disable_sri }} integrity="{{ .Site.Data.sri.cookieconsentcss }}" crossorigin="anonymous"{{ end }}>
<script src="{{ .Site.BaseURL }}js/cookieconsent.min.js"{{ if not .Site.Params.disable_sri }} integrity="{{ .Site.Data.sri.cookieconsentjs }}" crossorigin="anonymous"{{ end }} async></script>
<link href="{{ "css/cookieconsent.min.css" | absURL }}" rel="stylesheet" type="text/css"{{ if not .Site.Params.disable_sri }} integrity="{{ .Site.Data.sri.cookieconsentcss }}" crossorigin="anonymous"{{ end }}>
<script src="{{ "js/cookieconsent.min.js" |absURL }}"{{ if not .Site.Params.disable_sri }} integrity="{{ .Site.Data.sri.cookieconsentjs }}" crossorigin="anonymous"{{ end }} async></script>

<script>
window.addEventListener("load", function(){

M layouts/robots.txt => layouts/robots.txt +1 -1
@@ 1,3 1,3 @@
Sitemap: {{ .Site.BaseURL }}sitemap.xml
Sitemap: {{ "sitemap.xml" | absURL }}

User-agent: *