Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,28 @@ 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
env:
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 run build:prod

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
28 changes: 0 additions & 28 deletions Makefile

This file was deleted.

22 changes: 6 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
```
7 changes: 6 additions & 1 deletion config/_default/hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -23,3 +23,8 @@ privacy:
privacyEnhanced: true
vimeo:
enableDNT: true

markup:
goldmark:
renderer:
unsafe: true
30 changes: 14 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,31 @@
"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"
"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": {
"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"
}
}
2 changes: 1 addition & 1 deletion themes/dot-org-hugo-theme
Loading