Skip to content

Commit f098512

Browse files
authored
Merge pull request #9 from manics/readthedocs
Switch to readthedocs
2 parents 172d148 + 27bd290 commit f098512

4 files changed

Lines changed: 36 additions & 89 deletions

File tree

.github/workflows/hugo.yaml

Lines changed: 0 additions & 89 deletions
This file was deleted.

.readthedocs.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# https://docs.readthedocs.com/platform/stable/build-customization.html
2+
3+
version: 2
4+
5+
build:
6+
os: ubuntu-24.04
7+
tools:
8+
python: "3"
9+
nodejs: "22"
10+
11+
jobs:
12+
install:
13+
- ./ci/download-hugo.sh
14+
build:
15+
html:
16+
- ./ci/readthedocs-build.sh

ci/download-hugo.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
set -eu
3+
4+
HUGO_VERSION=0.124.1
5+
curl -sfL https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz | tar -zxvf - hugo

ci/readthedocs-build.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
set -eu
3+
4+
npm ci
5+
6+
BASE_URL=/$(echo $READTHEDOCS_CANONICAL_URL | cut -d/ -f4-)
7+
8+
# For maximum backward compatibility with Hugo modules
9+
export HUGO_ENVIRONMENT=production HUGO_ENV=production
10+
11+
./hugo \
12+
--gc \
13+
--minify \
14+
--baseURL "$BASE_URL" \
15+
--destination="${READTHEDOCS_OUTPUT}/html"

0 commit comments

Comments
 (0)