1
Fork 0

Update to Hugo 0.55

This commit is contained in:
Jake Howard 2019-04-27 20:42:31 +01:00
parent d031ed486d
commit e65f54ff62
Signed by: jake
GPG key ID: 57AFB45680EDD477
6 changed files with 12 additions and 9 deletions

View file

@ -13,7 +13,7 @@ jobs:
command: git submodule sync && git submodule update --init command: git submodule sync && git submodule update --init
- run: - run:
name: Install Hugo name: Install Hugo
command: wget https://github.com/gohugoio/hugo/releases/download/v0.52/hugo_extended_0.52_Linux-64bit.deb -O /tmp/hugo.deb && sudo dpkg -i /tmp/hugo.deb command: wget https://github.com/gohugoio/hugo/releases/download/v0.55.4/hugo_extended_0.55.4_Linux-64bit.deb -O /tmp/hugo.deb && sudo dpkg -i /tmp/hugo.deb
- restore_cache: - restore_cache:
key: npm-{{ checksum "package-lock.json" }} key: npm-{{ checksum "package-lock.json" }}
- run: - run:

View file

@ -5,11 +5,14 @@
{{ if .Content }} {{ if .Content }}
<hr /> <hr />
{{ end }} {{ end }}
{{ $sorted_pages := sort .Site.Pages "Title" "asc" }} {{ $unique_id := .File.UniqueID }}
{{ $valid_pages := where $sorted_pages ".Parent" "!=" nil }} {{ range .Site.Pages.ByTitle }}
{{ range where $valid_pages ".Parent.UniqueID" .UniqueID }} {{ if .Parent }}
{{ if eq .Parent.File.UniqueID $unique_id }}
{{ partial "list_item.html" . }} {{ partial "list_item.html" . }}
{{ end }} {{ end }}
{{ end }}
{{ end }}
</div> </div>
</div> </div>
{{ end }} {{ end }}

View file

@ -4,7 +4,7 @@
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<description>Recent content in {{ .Title }}</description> <description>Recent content in {{ .Title }}</description>
<generator>Hugo {{ .Hugo.Version }} -- gohugo.io</generator> <generator>Hugo {{ hugo.Version }} -- gohugo.io</generator>
<language>{{ .Site.LanguageCode }}</language> <language>{{ .Site.LanguageCode }}</language>
<copyright>{{ partial "copyright.html" . | html }}</copyright> <copyright>{{ partial "copyright.html" . | html }}</copyright>
<managingEditor>{{ .Site.Params.author }}</managingEditor> <managingEditor>{{ .Site.Params.author }}</managingEditor>

View file

@ -1,6 +1,6 @@
{{ $home := .Site.GetPage "home" }} {{ $home := .Site.GetPage "home" }}
{{ $sections := where (where .Site.Pages.ByTitle "Kind" "section") "Parent.UniqueID" $home.UniqueID }} {{ $sections := where (where .Site.Pages.ByTitle "Kind" "section") "Parent.File.UniqueID" $home.File.UniqueID }}
{{ $pages := where .Site.RegularPages.ByTitle "Section" "" }} {{ $pages := where .Site.RegularPages.ByTitle "Section" "" }}
{{ $nav_pages := union $pages $sections }} {{ $nav_pages := union $pages $sections }}

View file

@ -3,7 +3,7 @@
command = "./scripts/release.sh" command = "./scripts/release.sh"
[build.environment] [build.environment]
HUGO_VERSION = "0.54.0" HUGO_VERSION = "0.55.4"
NODE_ENV = "production" NODE_ENV = "production"
NPM_CONFIG_PRODUCTION = "false" NPM_CONFIG_PRODUCTION = "false"

View file

@ -24,7 +24,7 @@ browserify $STATIC_SRC/js/index.js -o $STATIC_BUILD/js/app.js
cp -r $STATIC_SRC/scss $STATIC_BUILD/scss cp -r $STATIC_SRC/scss $STATIC_BUILD/scss
hugo gen chromastyles --style=monokai > $STATIC_BUILD/css/highlight.css hugo gen chromastyles --style=monokai > $STATIC_BUILD/css/highlight.css
hugo -vDEF --stepAnalysis --gc $HUGO_ARGS hugo -vDEF --gc $HUGO_ARGS
cp $BASEDIR/static/keybase.txt $OUTPUT_DIR/keybase.txt cp $BASEDIR/static/keybase.txt $OUTPUT_DIR/keybase.txt