Skip to content

Commit ae32180

Browse files
committed
website/: add static website generation
Signed-off-by: Thilo Fromm <[email protected]>
1 parent 5bfabd9 commit ae32180

File tree

9 files changed

+90
-0
lines changed

9 files changed

+90
-0
lines changed

.github/workflows/gh-pages.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
deploy:
11+
if: github.repository == 'uapi-group/kernel'
12+
runs-on: ubuntu-22.04
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
submodules: true
19+
fetch-depth: 0
20+
21+
- name: Setup Hugo
22+
uses: peaceiris/actions-hugo@v2
23+
with:
24+
hugo-version: '0.104.3'
25+
extended: true
26+
27+
- name: Build
28+
run: cd website && hugo --minify -d ../public
29+
30+
- name: Deploy
31+
uses: peaceiris/actions-gh-pages@v3
32+
if: ${{ github.ref == 'refs/heads/main' }}
33+
with:
34+
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
publish_dir: ./public

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
website/public
2+
website/.hugo_build.lock
3+
website/resources/_gen

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "website/themes/hugo-book"]
2+
path = website/themes/hugo-book
3+
url = https://github.com/alex-shpak/hugo-book

website/README.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Static website generation for UAPI group specifications
2+
3+
This repository uses Hugo for static HTML generation.
4+
See https://gohugo.io/getting-started/quick-start/ for a brief intro.
5+
6+
The website uses the [hugo-book](https://github.com/alex-shpak/hugo-book) theme; it is included in this repo as a git submodule.
7+
After cloning this repo please run `git submodule init; git submodule update`.
8+
If you check out a branch or tag, make sure the submodule is up to date by running `git submodule update`.
9+
10+
## Website repo layout
11+
12+
Content resides in the [content](content/) folder.
13+
The top-level README.md is soft-linked to `content/_index.md` and serves as index page.
14+
15+
To add content, either put files into the `content/docs` folder.
16+
Documents there are automatically added to the naviation menu on the left.
17+
18+
## Making changes and testing
19+
20+
You'll need [hugo installed](https://gohugo.io/getting-started/installing/) for rendering changes.
21+
22+
First, make your edits.
23+
Then, start hugo locally (in the repo's `website` directory)to review your changes:
24+
25+
```shell
26+
$ hugo server --minify --disableFastRender
27+
```
28+
29+
Review your changes at http://localhost:1313/kernel/ .

website/archetypes/default.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: "{{ replace .Name "-" " " | title }}"
3+
date: {{ .Date }}
4+
draft: true
5+
---
6+

website/assets/_variables.scss

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
$body-min-width: 20rem;
2+
$container-max-width: 110rem;
3+
4+
$menu-width: 15rem;
5+
$toc-width: 15rem;

website/config.toml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
baseURL = "https://uapi-group.org/kernel"
2+
languageCode = "en-us"
3+
title = "UAPI group generic documents and meeting minutes"
4+
theme = "hugo-book"
5+
6+
[markup.goldmark.renderer]
7+
unsafe = true # Allow HTML in md files

website/content/_index.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../README.md

website/themes/hugo-book

Submodule hugo-book added at 9e9c7d3

0 commit comments

Comments
 (0)