Fix assets permalinks

This commit is contained in:
Luiz de Prá 2018-09-15 09:05:38 -03:00
parent 572ce8b96d
commit a094f8fe7b
4 changed files with 8 additions and 9 deletions

View File

@ -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

View File

@ -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 }}

View File

@ -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 }}

View File

@ -1,7 +1,7 @@
<section class="container centered"> <section class="container centered">
<div class="about"> <div class="about">
{{ with .Site.Params.avatarurl }} {{ with .Site.Params.avatarurl }}
<div class="avatar"><img src="{{.}}" alt="avatar"></div> <div class="avatar"><img src="{{ . }}" alt="avatar"></div>
{{ end }} {{ end }}
<h1>{{ .Site.Params.author }}</h1> <h1>{{ .Site.Params.author }}</h1>
<h2>{{ .Site.Params.info }}</h2> <h2>{{ .Site.Params.info }}</h2>