From edb47a383fe9c5578ed52a84493e367f9754b48d Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 18 Apr 2026 14:07:00 +0000 Subject: [PATCH 1/7] Update theme compatibility to Hugo 0.160.1 - Replace deprecated `toCSS` with `css.Sass` (deprecated in 0.128) - Switch SCSS transpiler from LibSass to Dart Sass (deprecated in 0.153) - Replace `.Site.Author` with `.Site.Params.author` (deprecated in 0.124) - Rename exampleSite/config.yml to hugo.yaml (canonical name since 0.110) - Move author under params, rename menu to menus (deprecated in 0.112) - Modernize CI: checkout@v4, actions-hugo@v3, official Pages deployment - Bump theme.toml min_version from 0.48 to 0.128 https://claude.ai/code/session_01K7R6LKnueqJmvh7djp2gnb --- .github/workflows/gh-pages.yml | 59 ++++++++++++++++++--------- exampleSite/{config.yml => hugo.yaml} | 16 ++++---- layouts/partials/footer.html | 2 +- layouts/partials/head.html | 2 +- theme.toml | 2 +- 5 files changed, 51 insertions(+), 30 deletions(-) rename exampleSite/{config.yml => hugo.yaml} (81%) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 5b310d3..0f6e0b1 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -5,26 +5,45 @@ on: branches: - main +concurrency: + group: pages + cancel-in-progress: true + jobs: - build-deploy: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Dart Sass + run: sudo snap install dart-sass + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v3 + with: + hugo-version: 'latest' + extended: true + + - name: Build + working-directory: ./exampleSite + run: hugo --minify --themesDir ../.. --baseURL https://normanderwan.github.io/Blogpaper/ + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./exampleSite/public + + deploy: + needs: build runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} steps: - - name: Checkout - uses: actions/checkout@v1 - - - name: Setup Hugo - uses: peaceiris/actions-hugo@v2 - with: - hugo-version: 'latest' - extended: true - - - name: Build - working-directory: ./exampleSite - run: hugo --minify --themesDir ../.. --baseURL https://normanderwan.github.io/Blogpaper/ - - - name: Deploy - uses: peaceiris/actions-gh-pages@v2 - env: - PERSONAL_TOKEN: ${{ secrets.PersonalAccessToken }} - PUBLISH_BRANCH: gh-pages - PUBLISH_DIR: ./exampleSite/public + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/exampleSite/config.yml b/exampleSite/hugo.yaml similarity index 81% rename from exampleSite/config.yml rename to exampleSite/hugo.yaml index 5437238..2ae7f5f 100644 --- a/exampleSite/config.yml +++ b/exampleSite/hugo.yaml @@ -1,12 +1,14 @@ -author: - name: Erwan Normand baseURL: https://example.com languageCode: en -menu: +title: Blogpaper +theme: Blogpaper + +params: + description: Example site for the Hugo's Blogpaper theme + author: + name: Erwan Normand + +menus: main: - name: About url: /about -params: - description: Example site for the Hugo's Blogpaper theme -title: Blogpaper -theme: Blogpaper diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 12f8577..2dc068f 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -3,7 +3,7 @@ {{- with .Site.Copyright -}} {{ . }} {{- else -}} - © {{ now.Year }} {{- with .Site.Author }} {{ .name }}. {{- end }} {{ .Site.Title }} + © {{ now.Year }} {{- with .Site.Params.author }} {{ .name }}. {{- end }} {{ .Site.Title }} {{- end -}} {{- end }} \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 60a292d..6dfaf23 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -32,7 +32,7 @@ {{- $scss_files := $scss_files | append (where (resources.Match "**.scss") ".Name" "!=" $blogpaper_scss_filepath) -}} {{- range $scss_files -}} - {{- $css := . | resources.ExecuteAsTemplate .Name . | toCSS (dict "outputStyle" "compressed") -}} + {{- $css := . | resources.ExecuteAsTemplate .Name . | css.Sass (dict "outputStyle" "compressed" "transpiler" "dartsass") -}} {{- $css_files = $css_files | append $css -}} {{- end -}} diff --git a/theme.toml b/theme.toml index abf29bb..387e48b 100644 --- a/theme.toml +++ b/theme.toml @@ -14,7 +14,7 @@ features = [ "minimalist", "graphical" ] -min_version = 0.48 +min_version = 0.128 [author] name = "Erwan Normand" From e38864101c5f6d2459012618b26fb6a799b5fc09 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 18 Apr 2026 14:11:32 +0000 Subject: [PATCH 2/7] Update README for Hugo 0.160.1 compatibility - Rename config.yml references to hugo.yaml - Move author under params, rename menu to menus in config example - Update paginate reference to pagination.pagerSize - Update troubleshooting error message for css.Sass + Dart Sass https://claude.ai/code/session_01K7R6LKnueqJmvh7djp2gnb --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6dc8b4c..5d6fa7a 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ See the [style guide](https://normanderwan.github.io/Blogpaper/posts/style-guide git submodule add https://github.com/NormandErwan/Blogpaper themes/Blogpaper ``` -4. Edit your `config.yml`: +4. Edit your `hugo.yaml`: ```yml theme: Blogpaper @@ -43,27 +43,27 @@ the next section to configure your site and add banner images on your pages. ## Configure -1. Edit your `config.yml`: +1. Edit your `hugo.yaml`: ```yml theme: Blogpaper title: # Your site title - author: - name: # Your name baseURL: # Hostname (and path) to the root, e.g. https://bep.is/ copyright: # Optional, will be displayed on site's footer, if this line is removed an default copyright will be generated languageCode: en # The language code of your site, by default "en" - menu: + menus: main: # Optional, the menu to display on top-right of your site, see https://gohugo.io/templates/menu-templates/#site-config-menus - name: About url: /about params: description: # The description of your site (used on a tag) subtitleLength: 25 # The number of words on the subtitle of a page + author: + name: # Your name ``` See for more configuration settings (such as `datetimeFormat`, - `mainSections` or `paginate`). + `mainSections` or `pagination.pagerSize`). See also how to configure [post summaries](https://gohugo.io/content-management/summaries/) on the homepage. Every page can have a subtitle, displayed bellow the title on the header of the page. @@ -122,8 +122,8 @@ the next section to configure your site and add banner images on your pages. ## Troubleshooting / FAQ - I can't generate the site. - - Problem: I have the error: `Problem: Building sites … ERROR Transformation failed: TOCSS: failed to transform "blogpaper.scss" (text/x-scss)`. - - Solution: [Reinstall Hugo](https://gohugo.io/getting-started/installing/), the *extended* version not the standard one. + - Problem: I have the error: `Error: error building site: SASS: failed to transform "blogpaper.scss"`. + - Solution: Install [Dart Sass](https://sass-lang.com/install/) and make sure it's on your `PATH`. This theme requires Dart Sass, not the deprecated LibSass. Also ensure you're using the [Hugo extended](https://gohugo.io/getting-started/installing/) version. - I want to customize the CSS. - Use your own CSS or SCSS files. Simply add the files in your `/assets/` folder. From a83452aec8cbc18767557b7cedf9fd0325e8bd40 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 18 Apr 2026 14:29:18 +0000 Subject: [PATCH 3/7] Apply modern web design and accessibility best practices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HTML/Templates: - baseof: add skip-to-content link and id/tabindex on
- head: remove obsolete IE meta tag, add canonical URL, Open Graph, Twitter Card meta tags, and JSON-LD structured data (WebSite / BlogPosting schemas) - nav: aria-label on