diff options
author | Steve Miller <me@r15cookie.com> | 2021-05-21 06:17:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-21 06:17:19 +0300 |
commit | 6004f5dcd833eddbb01f0a40c0beb2062075c90e (patch) | |
tree | 442307f388c2fb07f7af63a7abb4e55e494d703e | |
parent | 9a392595e2cd54b120cd68ba52181bdab2700896 (diff) |
Move to Relative Links (#9)
* Absolute links to Relative Links
* Additional updates to permalinks
Signed-off-by: Steve Miller <me@r15cookie.com>
-rw-r--r-- | assets/css/custom.css | 2 | ||||
-rw-r--r-- | layouts/_default/list.html | 2 | ||||
-rw-r--r-- | layouts/index.html | 2 | ||||
-rw-r--r-- | layouts/partials/head.html | 4 | ||||
-rw-r--r-- | layouts/partials/post-list.html | 2 | ||||
-rw-r--r-- | layouts/post/single.html | 2 | ||||
-rw-r--r-- | layouts/shortcodes/card.html | 4 |
7 files changed, 9 insertions, 9 deletions
diff --git a/assets/css/custom.css b/assets/css/custom.css index 65a0929..acaaaac 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -1,6 +1,6 @@ /* base */ body { - background-image: url('{{ "img/geometry2.png" | absURL }}'); + background-image: url('{{ "img/geometry2.png" | relURL }}'); } /* anchors */ diff --git a/layouts/_default/list.html b/layouts/_default/list.html index dab975e..46f70de 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -5,7 +5,7 @@ {{ $pages := .Pages }} {{ range $pages.ByPublishDate.Reverse }} <h2 class="post-list {{ if ne .Params.show_summary false }}summary{{ end }}"> - <a href="{{ .Permalink }}"> + <a href="{{ .RelPermalink }}"> {{ .Title }} </a> </h2> diff --git a/layouts/index.html b/layouts/index.html index 75987b9..283c619 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -5,7 +5,7 @@ {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} {{ range $pages.ByPublishDate.Reverse }} <h2 class="post-list {{ if ne .Params.show_summary false }}summary{{ end }}"> - <a href="{{ .Permalink }}"> + <a href="{{ .RelPermalink }}"> {{ .Title }} </a> </h2> diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 6b23466..68540ee 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -24,11 +24,11 @@ <meta name="msapplication-TileColor" content="#ffffff"> <meta name="theme-color" content="#ffffff"> - <link rel="stylesheet" type="text/css" href="{{ "css/paper.css" | absURL }}"> + <link rel="stylesheet" type="text/css" href="{{ "css/paper.css" | relURL }}"> {{ $customCssPath := "css/custom.css" }} {{ $customCss:= resources.Get $customCssPath | resources.ExecuteAsTemplate $customCssPath . }} - <link rel="stylesheet" type="text/css" href="{{ $customCss.Permalink }}"> + <link rel="stylesheet" type="text/css" href="{{ $customCss.RelPermalink }}"> {{ $title := print .Title " | " .Site.Title }} {{ if .IsHome }} diff --git a/layouts/partials/post-list.html b/layouts/partials/post-list.html index 7f0e2f9..1dc7471 100644 --- a/layouts/partials/post-list.html +++ b/layouts/partials/post-list.html @@ -2,7 +2,7 @@ {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} {{ range $pages.ByPublishDate.Reverse }} <h2 class="post-list {{ if ne .Params.show_summary false }}summary{{ end }}"> - <a href="{{ .Permalink }}"> + <a href="{{ .RelPermalink }}"> {{ .Title }} </a> </h2> diff --git a/layouts/post/single.html b/layouts/post/single.html index af31882..fd95b62 100644 --- a/layouts/post/single.html +++ b/layouts/post/single.html @@ -8,7 +8,7 @@ {{ with .Params.tags }} <strong>Tags: </strong> {{ range . }} - <a href="{{ "tags/" | absURL }}{{ . | urlize }}">{{ . }}</a> + <a href="{{ "tags/" | relURL }}{{ . | urlize }}">{{ . }}</a> {{ end }} {{ end }} diff --git a/layouts/shortcodes/card.html b/layouts/shortcodes/card.html index 42a9fbb..d5faa66 100644 --- a/layouts/shortcodes/card.html +++ b/layouts/shortcodes/card.html @@ -18,8 +18,8 @@ {{ end }} <div class="card row flex-center" style=""> - <a href="{{ $original.Permalink }}" class="img-link"> - <img src="{{ $new.Permalink }}"> + <a href="{{ $original.RelPermalink }}" class="img-link"> + <img src="{{ $new.RelPermalink }}"> </a> <div class="card-body"> {{ with (.Get "title" )}} |