diff options
author | Vincent Tam <sere@live.hk> | 2019-07-27 03:59:38 +0300 |
---|---|---|
committer | Vincent Tam <sere@live.hk> | 2019-07-27 03:59:38 +0300 |
commit | ea559816a226c3b973ab097ee85eeab5eee411af (patch) | |
tree | e936cf9c65f055d1b319f15e2571d642a10947ca | |
parent | 7f91aaf7add8a8c2528b513a9ef9315cd2ae9db3 (diff) |
Replaced by relative links and adopted SRI
-rw-r--r-- | layouts/_default/baseof.html | 4 | ||||
-rw-r--r-- | layouts/_default/list.html | 8 | ||||
-rw-r--r-- | layouts/_default/single.html | 14 |
3 files changed, 13 insertions, 13 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index c26ad07..2da22f5 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -10,8 +10,8 @@ </title> <link href="{{ .Site.BaseURL }}index.xml" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" /> {{ $basecss := resources.Get "css/style.css" }} - {{ $style := $basecss | resources.Minify }} - <link rel="stylesheet" href="{{ $style.Permalink }}" /> + {{ $style := $basecss | resources.Minify | resources.Fingerprint }} + <link rel="stylesheet" href="{{ $style.RelPermalink }}" integrity="{{ $style.Data.Integrity }}" /> <link rel="stylesheet" href="{{ "css/icomoon.min.css" | relURL }}" /> {{- block "css" . -}} {{ end }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index c33db04..af52155 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,23 +1,23 @@ {{ define "main" }} <header> <h1> - <a href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}"><i class="icon-rss"></i></a>{{ .Title }} + <a href='{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}'><i class="icon-rss"></i></a>{{ .Title }} </h1> </header> <ul> {{- range .Paginator.Pages -}} <li> - <a href="{{ .Permalink }}"> + <a href="{{ .RelPermalink }}"> {{- .Date.Format "02/01/2006" }} - {{ .Title -}} </a> <div class="meta"> {{- range .Params.categories -}} - <a class="categories" href="{{ "/categories/" | relLangURL }}{{ . | urlize }}"> + <a class="categories" href='{{ "categories/" | relLangURL }}{{ . | urlize }}'> {{- . -}} </a> {{- end -}} {{- range .Params.tags -}} - <a class="tags" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}"> + <a class="tags" href='{{ "tags/" | relLangURL }}{{ . | urlize }}'> {{- . -}} </a> {{- end -}} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 5bdd6f6..588db47 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,17 +1,17 @@ {{- define "css" -}} {{- with .Resources.Match "images/lightbox/*.*" -}} - <link rel="stylesheet" href="/css/baguetteBox.min.css" /> + <link rel="stylesheet" href="{{ "css/baguetteBox.min.css" | relURL }}" /> {{- end -}} {{- with .Resources.Match "images/gallery/*.*" -}} - <link rel="stylesheet" href="/css/baguetteBox.min.css" /> + <link rel="stylesheet" href="{{ "css/baguetteBox.min.css" | relURL }}" /> {{- end }} {{ $pygmcss := resources.Get "css/pygments.css" }} - {{ $pygments := $pygmcss | resources.Minify }} - <link rel="stylesheet" href="{{ $pygments.Permalink }}" /> + {{ $pygments := $pygmcss | resources.Minify | resources.Fingerprint }} + <link rel="stylesheet" href="{{ $pygments.RelPermalink }}" integrity="{{ $pygments.Data.integrity }}" /> {{- if .Site.Params.staticman -}} {{ $smcss := resources.Get "css/staticman.css" }} {{ $staticman := $smcss | resources.Minify }} - <link rel="stylesheet" href="{{ $staticman.Permalink }}" /> + <link rel="stylesheet" href="{{ $staticman.RelPermalink }}" /> {{- end -}} {{- end -}} {{- define "title" -}} @@ -30,12 +30,12 @@ </h1> <div class="meta"> {{ range .Params.categories }} - <a class="categories" href="{{ "/categories/" | relLangURL }}{{ . | urlize }}"> + <a class="categories" href="{{ "categories/" | relLangURL }}{{ . | urlize }}"> {{- . -}} </a> {{- end -}} {{ range .Params.tags }} - <a class="tags" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}"> + <a class="tags" href="{{ "tags/" | relLangURL }}{{ . | urlize }}"> {{- . -}} </a> {{- end -}} |