Skip to content

Commit

Permalink
Build doc on circleci (#31)
Browse files Browse the repository at this point in the history
* doc: Use relative URLs and disable terms and taxonomies

* Rename config.yml to config.yaml

* CircleCI: URL fixes to make doc build

* doc: specify getstarted link so that CircleCI URL replacement will catch it
  • Loading branch information
stefanv authored Oct 21, 2021
1 parent f9419f2 commit a9b1b8d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 8 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ jobs:
- run:
name: Build site
command: |
sed -i '/^theme/a relativeURLs: true' doc/config.yml
sed -i '/^theme/a themesdir: "../.."' doc/config.yml
sed -i 's/getstarted/getstarted\/index.html/g' doc/config.yml
sed -i 's/link: \//link: \/index.html/g' doc/config.yml
cd doc ; hugo
(cd doc ;
sed -i '1s/^/uglyurls: true\n/' config.yaml ;
sed -i 's/\(url: \/.\+\)\//\1.html/' config.yaml ;
sed -i 's/url: \/$/url: \/index.html/' config.yaml ;
sed -i 's/\(link: \/.\+\)\//\1.html/' config.yaml ;
sed -i 's/\(buttonlink: \/.\+\)\//\1.html/' config.yaml ;
sed -i 's/link: \/$/link: \/index.html/' config.yaml ;
hugo --themesDir="../..")
- store_artifacts:
path: doc/public/
4 changes: 3 additions & 1 deletion doc/config.yml → doc/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ baseURL: "https://theme.scientific-python.org/"
languageCode: "en-us"
title: "Scientific Python Hugo Theme documentation"
theme: scientific-python-hugo-theme
relativeURLs: true
disableKinds: ["term", "taxonomy"]

params:
images:
Expand All @@ -16,7 +18,7 @@ params:
title: Hugo Theme
subtitle: Used by core projects in the scientific Python ecosystem.
buttontext: Go to docs
buttonlink: getstarted
buttonlink: /getstarted/
image: logo.svg
navbar:
- title: GitHub
Expand Down

0 comments on commit a9b1b8d

Please sign in to comment.