Fix assets permalinks
This commit is contained in:
parent
572ce8b96d
commit
a094f8fe7b
5
Makefile
5
Makefile
|
@ -10,9 +10,8 @@ release:
|
|||
mkdir -p demo/themes/hugo-coder
|
||||
rsync -av exampleSite/ demo
|
||||
rsync -av --exclude='demo' --exclude='exampleSite' --exclude='.git' . demo/themes/hugo-coder
|
||||
cd demo && ./hugow
|
||||
cd .. && rm -rf resources
|
||||
cp -r demo/resources resources
|
||||
cd ./demo && ./hugow
|
||||
rm -rf ./resources && cp -r ./demo/resources ./resources
|
||||
|
||||
clean:
|
||||
rm -rf demo
|
||||
|
|
|
@ -21,22 +21,22 @@
|
|||
{{ if .Site.IsServer }}
|
||||
{{ $cssOpts := (dict "targetPath" "css/coder.css" "enableSourceMap" true ) }}
|
||||
{{ $styles := resources.Get "scss/coder.scss" | resources.ExecuteAsTemplate "style.coder.css" . | toCSS $cssOpts }}
|
||||
<link rel="stylesheet" href="{{ $styles.Permalink }}" media="screen">
|
||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen">
|
||||
{{ else }}
|
||||
{{ $cssOpts := (dict "targetPath" "css/coder.css" ) }}
|
||||
{{ $styles := resources.Get "scss/coder.scss" | resources.ExecuteAsTemplate "style.coder.css" . | toCSS $cssOpts | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" media="screen">
|
||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}" media="screen">
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.rtl }}
|
||||
{{ if .Site.IsServer }}
|
||||
{{ $cssOpts := (dict "targetPath" "css/coder-rtl.css" "enableSourceMap" true ) }}
|
||||
{{ $styles := resources.Get "scss/coder-rtl.scss" | resources.ExecuteAsTemplate "style.coder-rtl.css" . | toCSS $cssOpts }}
|
||||
<link rel="stylesheet" href="{{ $styles.Permalink }}" media="screen">
|
||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen">
|
||||
{{ else }}
|
||||
{{ $cssOpts := (dict "targetPath" "css/coder-rtl.css" ) }}
|
||||
{{ $styles := resources.Get "scss/coder-rtl.scss" | resources.ExecuteAsTemplate "style.coder-rtl.css" . | toCSS $cssOpts | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" media="screen">
|
||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}" media="screen">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
{{ with .Site.Menus.main}}
|
||||
{{ range sort . }}
|
||||
<li class="navigation-item">
|
||||
<a class="navigation-link" href="{{ .URL | absLangURL }}">{{ .Name }}</a>
|
||||
<a class="navigation-link" href="{{ .URL | relLangURL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<section class="container centered">
|
||||
<div class="about">
|
||||
{{ with .Site.Params.avatarurl }}
|
||||
<div class="avatar"><img src="{{.}}" alt="avatar"></div>
|
||||
<div class="avatar"><img src="{{ . }}" alt="avatar"></div>
|
||||
{{ end }}
|
||||
<h1>{{ .Site.Params.author }}</h1>
|
||||
<h2>{{ .Site.Params.info }}</h2>
|
||||
|
|
Loading…
Reference in New Issue