From cc235ef6f990d85995329da3fe80f62fb1d667c0 Mon Sep 17 00:00:00 2001 From: Robin Moffatt Date: Tue, 6 Dec 2022 10:18:40 +0000 Subject: [PATCH] upgrade hugo (#31) * Add security config for asciidoc * Remove Hugo.Generator for >0.85 compatibility * Bump version support to 105 --- .github/workflows/gh-pages-deployment.yml | 2 +- .github/workflows/preview-blog.yaml | 2 +- config.yaml | 20 ++++++++++++++++++++ themes/story/layouts/_default/baseof.html | 3 +-- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gh-pages-deployment.yml b/.github/workflows/gh-pages-deployment.yml index 65fbf2fa..7f440548 100644 --- a/.github/workflows/gh-pages-deployment.yml +++ b/.github/workflows/gh-pages-deployment.yml @@ -26,7 +26,7 @@ jobs: - name: Setup Hugo uses: peaceiris/actions-hugo@v2 with: - hugo-version: '0.85.0' + hugo-version: '0.105.0' - name: Build run: hugo diff --git a/.github/workflows/preview-blog.yaml b/.github/workflows/preview-blog.yaml index 494ac97e..62d0816c 100644 --- a/.github/workflows/preview-blog.yaml +++ b/.github/workflows/preview-blog.yaml @@ -21,7 +21,7 @@ jobs: - name: Setup Hugo uses: peaceiris/actions-hugo@v2 with: - hugo-version: '0.85.0' + hugo-version: '0.105.0' - name: Setup base URL env var run: | diff --git a/config.yaml b/config.yaml index 3c318f5e..71abd39a 100644 --- a/config.yaml +++ b/config.yaml @@ -70,3 +70,23 @@ markup: goldmark: renderer: unsafe: true + +security: + enableInlineShortcodes: false + exec: + allow: + - ^dart-sass-embedded$ + - ^go$ + - ^npx$ + - ^postcss$ + - ^asciidoctor$ + osEnv: + - (?i)^((HTTPS?|NO)_PROXY|PATH(EXT)?|APPDATA|TE?MP|TERM)$ + funcs: + getenv: + - ^HUGO_ + http: + methods: + - (?i)GET|POST + urls: + - .* diff --git a/themes/story/layouts/_default/baseof.html b/themes/story/layouts/_default/baseof.html index fa818dde..a8a9d8f2 100644 --- a/themes/story/layouts/_default/baseof.html +++ b/themes/story/layouts/_default/baseof.html @@ -9,8 +9,7 @@ {{ with .Description }}{{ end }} {{ with .Keywords }}{{ end }} - {{ .Hugo.Generator }} - + {{ block "social" . }} {{ end }}