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
|
mkdir -p demo/themes/hugo-coder
|
||||||
rsync -av exampleSite/ demo
|
rsync -av exampleSite/ demo
|
||||||
rsync -av --exclude='demo' --exclude='exampleSite' --exclude='.git' . demo/themes/hugo-coder
|
rsync -av --exclude='demo' --exclude='exampleSite' --exclude='.git' . demo/themes/hugo-coder
|
||||||
cd demo && ./hugow
|
cd ./demo && ./hugow
|
||||||
cd .. && rm -rf resources
|
rm -rf ./resources && cp -r ./demo/resources ./resources
|
||||||
cp -r demo/resources resources
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf demo
|
rm -rf demo
|
||||||
|
|
|
@ -21,22 +21,22 @@
|
||||||
{{ if .Site.IsServer }}
|
{{ if .Site.IsServer }}
|
||||||
{{ $cssOpts := (dict "targetPath" "css/coder.css" "enableSourceMap" true ) }}
|
{{ $cssOpts := (dict "targetPath" "css/coder.css" "enableSourceMap" true ) }}
|
||||||
{{ $styles := resources.Get "scss/coder.scss" | resources.ExecuteAsTemplate "style.coder.css" . | toCSS $cssOpts }}
|
{{ $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 }}
|
{{ else }}
|
||||||
{{ $cssOpts := (dict "targetPath" "css/coder.css" ) }}
|
{{ $cssOpts := (dict "targetPath" "css/coder.css" ) }}
|
||||||
{{ $styles := resources.Get "scss/coder.scss" | resources.ExecuteAsTemplate "style.coder.css" . | toCSS $cssOpts | minify | fingerprint }}
|
{{ $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 }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if .Site.Params.rtl }}
|
{{ if .Site.Params.rtl }}
|
||||||
{{ if .Site.IsServer }}
|
{{ if .Site.IsServer }}
|
||||||
{{ $cssOpts := (dict "targetPath" "css/coder-rtl.css" "enableSourceMap" true ) }}
|
{{ $cssOpts := (dict "targetPath" "css/coder-rtl.css" "enableSourceMap" true ) }}
|
||||||
{{ $styles := resources.Get "scss/coder-rtl.scss" | resources.ExecuteAsTemplate "style.coder-rtl.css" . | toCSS $cssOpts }}
|
{{ $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 }}
|
{{ else }}
|
||||||
{{ $cssOpts := (dict "targetPath" "css/coder-rtl.css" ) }}
|
{{ $cssOpts := (dict "targetPath" "css/coder-rtl.css" ) }}
|
||||||
{{ $styles := resources.Get "scss/coder-rtl.scss" | resources.ExecuteAsTemplate "style.coder-rtl.css" . | toCSS $cssOpts | minify | fingerprint }}
|
{{ $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 }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
{{ with .Site.Menus.main}}
|
{{ with .Site.Menus.main}}
|
||||||
{{ range sort . }}
|
{{ range sort . }}
|
||||||
<li class="navigation-item">
|
<li class="navigation-item">
|
||||||
<a class="navigation-link" href="{{ .URL | absLangURL }}">{{ .Name }}</a>
|
<a class="navigation-link" href="{{ .URL | relLangURL }}">{{ .Name }}</a>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in New Issue