Skip to content

Commit 5183fb4

Browse files
committed
build: automate landing page build and update docs
Integrate the landing page generation into the deployment workflow and provide updated documentation for the new project structure. These changes ensure the live site remains synchronized with its source and offer clear instructions for local development and site maintenance.
1 parent f4b6c62 commit 5183fb4

2 files changed

Lines changed: 28 additions & 8 deletions

File tree

.github/workflows/deploy-website.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ jobs:
2626
cd website/source
2727
hugo --baseURL="/wiki/" --destination="../wiki"
2828
29+
- name: Build landing page
30+
run: |
31+
cd website/source-landing
32+
hugo --destination="../_build"
33+
cp ../_build/index.html ../index.html
34+
rm -rf ../_build
35+
2936
- name: Stage publish directory
3037
run: |
3138
mkdir -p _publish

website/README.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@ Static website for the Python Class Pollution research project, including the la
66

77
```
88
website/
9-
├── index.html # Landing page
10-
├── img/ # Hero icon and demo GIFs
11-
├── source/ # Wiki source (Hugo content + layouts)
12-
│ ├── content/ # Markdown pages
13-
│ ├── layouts/ # Custom Hugo templates
14-
│ ├── static/ # Wiki CSS and assets
15-
│ └── hugo.toml # Hugo config
16-
└── wiki/ # Built wiki (generated from source/)
9+
├── index.html # Landing page (generated from source-landing/)
10+
├── img/ # Hero icon and demo GIFs
11+
├── source-landing/ # Landing-page source (Hugo, single home page)
12+
│ ├── content/ # _index.md — landing page markdown
13+
│ ├── layouts/ # index.html template with the landing styles
14+
│ └── hugo.toml # Hugo config
15+
├── source/ # Wiki source (Hugo content + layouts)
16+
│ ├── content/ # Markdown pages
17+
│ ├── layouts/ # Custom Hugo templates
18+
│ ├── static/ # Wiki CSS and assets
19+
│ └── hugo.toml # Hugo config
20+
└── wiki/ # Built wiki (generated from source/)
1721
```
1822

1923
## Running locally
@@ -41,6 +45,15 @@ hugo --baseURL="/wiki/" --destination="../wiki"
4145

4246
This generates the static site under `website/wiki/`.
4347

48+
## Rebuilding the landing page
49+
50+
The landing page is generated from `source-landing/content/_index.md` using a single Hugo home template at `source-landing/layouts/index.html` (which contains the page's inline styles). To edit copy, edit the markdown — don't edit `index.html` directly.
51+
52+
```bash
53+
cd source-landing
54+
hugo --destination=/tmp/landing-build && cp /tmp/landing-build/index.html ../index.html
55+
```
56+
4457
## Deployment
4558

4659
The site is deployed to <https://class-pollution.github.io> via the GitHub Actions workflow at `.github/workflows/deploy-website.yml`. On every push to `main` that touches `website/`, the workflow:

0 commit comments

Comments
 (0)