From bf276fbde644782d301ec2e34258987a6be7ec76 Mon Sep 17 00:00:00 2001 From: Brady Fomegne Date: Sat, 8 Nov 2025 11:15:36 +0100 Subject: [PATCH 1/4] Updated submodule to the latest version of dot-org-hugo-theme Signed-off-by: Brady Fomegne --- Makefile | 28 ---------------------------- config/_default/hugo.yaml | 7 ++++++- package.json | 29 +++++++++++++---------------- themes/dot-org-hugo-theme | 2 +- 4 files changed, 20 insertions(+), 46 deletions(-) delete mode 100644 Makefile diff --git a/Makefile b/Makefile deleted file mode 100644 index 1ec327f..0000000 --- a/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -serve: - hugo server \ - --disableFastRender \ - --buildDrafts \ - --buildFuture \ - --ignoreCache - --printI18nWarnings \ - --printMemoryUsage \ - --printPathWarnings \ - --printUnusedTemplates \ - --templateMetrics \ - --templateMetricsHints \ - --gc - -production-build: - git submodule update --init --recursive - hugo \ - --minify - npx -y pagefind --site public - -preview-build: - git submodule update --init --recursive - hugo \ - --baseURL $(DEPLOY_PRIME_URL) \ - --buildDrafts \ - --buildFuture \ - --minify - npx -y pagefind --site public diff --git a/config/_default/hugo.yaml b/config/_default/hugo.yaml index 9875d0b..7bcb82f 100644 --- a/config/_default/hugo.yaml +++ b/config/_default/hugo.yaml @@ -8,7 +8,7 @@ timeZone: "Africa/Douala" ######################## i18n #################### # Auto-detect Chinese/Japanese/Korean Languages in the content. see: https://gohugo.io/getting-started/configuration/#hascjklanguage -hasCJKLanguage: true +hasCJKLanguage: false # Set default content directory for multilingual contentDir: content/en/ # Set fallback if international version is not available @@ -23,3 +23,8 @@ privacy: privacyEnhanced: true vimeo: enableDNT: true + ++markup: ++ goldmark: ++ renderer: ++ unsafe: true diff --git a/package.json b/package.json index fa9c37a..2e40638 100644 --- a/package.json +++ b/package.json @@ -4,33 +4,30 @@ "description": "", "main": "none.js", "scripts": { - "build": "hugo --theme=dot-org-hugo-theme", - "start": "hugo serve --logLevel info --configDir=config --buildDrafts --buildFuture --ignoreCache --disableFastRender --gc --printI18nWarnings --printMemoryUsage --printPathWarnings --printUnusedTemplates --templateMetrics --templateMetricsHints", - "dev": "npm run dev:start", - "dev:start": "hugo serve --logLevel info --configDir=config --buildDrafts --buildFuture --ignoreCache --disableFastRender --gc --printI18nWarnings --printMemoryUsage --printPathWarnings --printUnusedTemplates --templateMetrics --templateMetricsHints", - "dev:start:with-pagefind": "hugo --baseURL=/ --theme=dot-org-hugo-theme && npm_config_yes=true npx pagefind --site 'public' --output-path 'static/pagefind' && npm run dev:start", - "dev:build": "hugo --theme=dot-org-hugo-theme" + "serve": "hugo --theme=dot-org-hugo-theme", + "build:dev": "hugo --buildDrafts --buildFuture --minify && npx -y pagefind --site public", + "build:prod": "hugo --minify && npx -y pagefind --site public" }, "repository": { - "type": "git", - "url": "https://github.com/cncf/dot-org-hugo-theme" + "type": "git", + "url": "https://github.com/cncf/dot-org-hugo-theme" }, "keywords": [], "author": "", "license": "ISC", "bugs": { - "url": "https://github.com/cncf/dot-org-hugo-theme/issues" + "url": "https://github.com/cncf/dot-org-hugo-theme/issues" }, "homepage": "https://github.com/cncf/dot-org-hugo-theme#readme", "dependencies": { - "autoprefixer": "^10.4.16", - "hugo-extended": "^0.126.0", - "netlify-cli": "^17", - "postcss": "^8.4.31", - "postcss-cli": "^11" + "autoprefixer": "^10.4.21", + "hugo-extended": "^0.148.1", + "netlify-cli": "^22.3.0", + "postcss": "^8.5.6", + "postcss-cli": "^11.0.1", + "sass-embedded": "^1.89.2" }, "devDependencies": { - "prettier": "^3.0.3", - "prettier-plugin-go-template": "^0.0.15" + "prettier": "^3.6.2" } } diff --git a/themes/dot-org-hugo-theme b/themes/dot-org-hugo-theme index 57c1fc6..b730676 160000 --- a/themes/dot-org-hugo-theme +++ b/themes/dot-org-hugo-theme @@ -1 +1 @@ -Subproject commit 57c1fc627edcc358d083274593919074623e38ec +Subproject commit b73067605e724b8f8ef6323e37437d62c24ba125 From 8de19f04ea14d41316612be89ff00bd8970fa91a Mon Sep 17 00:00:00 2001 From: Brady Fomegne Date: Sun, 9 Nov 2025 03:42:35 +0100 Subject: [PATCH 2/4] update --- .github/workflows/hugo.yml | 5 +++++ README.md | 22 ++++++---------------- config/_default/hugo.yaml | 8 ++++---- package.json | 5 +++-- 4 files changed, 18 insertions(+), 22 deletions(-) diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index 1566be2..511064d 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -39,15 +39,19 @@ jobs: run: | wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ && sudo dpkg -i ${{ runner.temp }}/hugo.deb + - name: Install Dart Sass run: sudo snap install dart-sass + - name: Checkout uses: actions/checkout@v4 with: submodules: recursive + - name: Setup Pages id: pages uses: actions/configure-pages@v5 + - name: Install Node.js dependencies run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" - name: Build with Hugo @@ -59,6 +63,7 @@ jobs: --minify \ --baseURL "${{ steps.pages.outputs.base_url }}/" npm_config_yes=true npx pagefind --site 'public' --output-path 'public/pagefind' + - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: diff --git a/README.md b/README.md index 45f7ab4..c33c3e2 100644 --- a/README.md +++ b/README.md @@ -43,20 +43,20 @@ npm install 4. Build the site: ```bash -npm run build +npm run build:dev ``` 5. Start the local server with live reload: ```bash -npm run start +npm start ``` ## Other npm commands for working with a local instance -- `npm run dev:start` - Starts the local dev environment using exampleSite -- `npm run dev:start:with-pagefind` - Starts the local dev environment using exampleSite with working pagefind search -- `npm run dev:build` - Builds the site using exampleSite +- `npm run dev:start` - Starts the local dev environment (without pagefind) +- `npm run dev:build` - Builds the site for dev environment +- `npm run dev:prod` - Builds the site for prod envirionment ### To run in docker @@ -72,18 +72,8 @@ If modifying the theme files, you should never edit the theme that is imported v ## Updating the theme -Some brief notes on how to update the theme: - From the site root: ``` -git submodule init -git submodule update -cd themes/dot-org-hugo-theme -git fetch -git checkout main -git pull origin main -cd ../.. -git add themes/dot-org-hugo-theme -git commit -m "Updated submodule to the latest version of dot-org-hugo-theme" -s +git submodule update --init --recursive ``` diff --git a/config/_default/hugo.yaml b/config/_default/hugo.yaml index 7bcb82f..917b22f 100644 --- a/config/_default/hugo.yaml +++ b/config/_default/hugo.yaml @@ -24,7 +24,7 @@ privacy: vimeo: enableDNT: true -+markup: -+ goldmark: -+ renderer: -+ unsafe: true +markup: + goldmark: + renderer: + unsafe: true diff --git a/package.json b/package.json index 2e40638..7d2c20e 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,9 @@ "description": "", "main": "none.js", "scripts": { - "serve": "hugo --theme=dot-org-hugo-theme", - "build:dev": "hugo --buildDrafts --buildFuture --minify && npx -y pagefind --site public", + "start": "hugo server --disableFastRender --ignoreCache --printI18nWarnings --printMemoryUsage --printPathWarnings --printUnusedTemplates --templateMetrics --templateMetricsHints --gc", + "start:with-pagefind": "hugo --baseURL=/ && npx -y pagefind --site public --output-path static/pagefind && npm start", + "build:dev": "hugo --buildDrafts --buildFuture --baseURL=/ && npx -y pagefind --site public", "build:prod": "hugo --minify && npx -y pagefind --site public" }, "repository": { From d1e5f2639a3027cd212952eaae04a686bd09b6da Mon Sep 17 00:00:00 2001 From: Brady Fomegne Date: Sun, 9 Nov 2025 04:04:20 +0100 Subject: [PATCH 3/4] fix ci --- .github/workflows/hugo.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index 511064d..72338f8 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -59,10 +59,7 @@ jobs: HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache HUGO_ENVIRONMENT: production run: | - hugo \ - --minify \ - --baseURL "${{ steps.pages.outputs.base_url }}/" - npm_config_yes=true npx pagefind --site 'public' --output-path 'public/pagefind' + npm build:prod - name: Upload artifact uses: actions/upload-pages-artifact@v3 From 2c09053188c2d3aadf4d37fc5888328a1f844e69 Mon Sep 17 00:00:00 2001 From: Brady Fomegne Date: Sun, 9 Nov 2025 04:10:56 +0100 Subject: [PATCH 4/4] fix --- .github/workflows/hugo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index 72338f8..0b0f1eb 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -59,7 +59,7 @@ jobs: HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache HUGO_ENVIRONMENT: production run: | - npm build:prod + npm run build:prod - name: Upload artifact uses: actions/upload-pages-artifact@v3