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
33 changes: 16 additions & 17 deletions .github/workflows/hugo.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Workflow for deploying the site to GitHub Pages
# Copied from: https://gohugo.io/hosting-and-deployment/hosting-on-github/
# The Hugo toolchain (Hugo extended + Go) is pinned by pixi.toml / pixi.lock,
# so this workflow just bootstraps pixi and runs the shared build task.
name: Deploy Hugo site to Pages

on:
Expand Down Expand Up @@ -32,15 +33,7 @@ jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.128.0
steps:
- name: Install Hugo CLI
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:
Expand All @@ -49,18 +42,24 @@ jobs:
- 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: Set up Pixi
uses: prefix-dev/setup-pixi@v0.9.6
with:
locked: true
cache: true
- name: Cache Hugo resources
uses: actions/cache@v5
with:
path: /tmp/hugo_cache
key: hugo-${{ hashFiles('go.sum', 'hugo.yaml') }}
restore-keys: |
hugo-
- name: Build with Hugo
env:
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
HUGO_CACHEDIR: /tmp/hugo_cache
HUGO_ENVIRONMENT: production
TZ: America/Los_Angeles
run: |
hugo \
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
pixi run build --baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Hugo build output
/public/
/resources/_gen/
.hugo_build.lock

# pixi environments (pixi.lock is committed; the env dir is not)
.pixi/
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,16 @@ of the Python Docs Editorial Board. If a member did not attend the meeting, remo

## Building the static site locally

1. First install Hugo.
1. First [install pixi](https://pixi.sh/latest/#installation), which pins the Hugo toolchain.

2. Run the command at the root of the repository:
2. Run the dev server at the root of the repository:

```
hugo server
pixi run serve
```

Use `pixi run build` to build the production site into `public/`.

## Writing new changelog

Use the template in [archetypes/changelog.md](archetypes/changelog.md).
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github.com/adityatelange/hugo-PaperMod v0.0.0-20260510052646-154d006e0182 h1:wKy2+NZXtaj3qjFwoj4RZfouaAxCAY/oY9iiUmGlCZE=
github.com/adityatelange/hugo-PaperMod v0.0.0-20260510052646-154d006e0182/go.mod h1:sp5WH671pzcVNpWKveBQKlBfu6T9uvcBI/4B3BSojKw=
2 changes: 1 addition & 1 deletion hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ menu:
module:
hugoVersion:
extended: true
min: 0.110.0
min: 0.146.0
imports:
- path: github.com/adityatelange/hugo-PaperMod
disable: false
Expand Down
16 changes: 9 additions & 7 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
# Netlify builds PR previews only; production deploys via GitHub Pages.
# The Hugo toolchain (Hugo extended + Go) is pinned by pixi.toml / pixi.lock.
# Netlify has no pixi preinstalled, so each build bootstraps it, then runs the
# same pixi tasks the GitHub Pages workflow uses.

[build]
publish = "public"
command = "hugo --gc --minify"

[build.environment]
HUGO_VERSION = "0.160.1"
command = "curl -fsSL https://pixi.sh/install.sh | bash && export PATH=\"$HOME/.pixi/bin:$PATH\" && pixi run --locked build"

[context.production.environment]
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"

[context.split1]
command = "hugo --gc --minify --enableGitInfo"
command = "curl -fsSL https://pixi.sh/install.sh | bash && export PATH=\"$HOME/.pixi/bin:$PATH\" && pixi run --locked build --enableGitInfo"

[context.split1.environment]
HUGO_ENV = "production"

[context.deploy-preview]
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
command = "curl -fsSL https://pixi.sh/install.sh | bash && export PATH=\"$HOME/.pixi/bin:$PATH\" && pixi run --locked preview -b $DEPLOY_PRIME_URL"

[context.branch-deploy]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
command = "curl -fsSL https://pixi.sh/install.sh | bash && export PATH=\"$HOME/.pixi/bin:$PATH\" && pixi run --locked branch -b $DEPLOY_PRIME_URL"

[context.next.environment]
HUGO_ENABLEGITINFO = "true"
Expand Down
Loading