forked from uapi-group/kernel-features
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
website/: add static website generation
Signed-off-by: Thilo Fromm <[email protected]>
- Loading branch information
Showing
9 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
deploy: | ||
if: github.repository == 'uapi-group/kernel' | ||
runs-on: ubuntu-22.04 | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
|
||
- name: Setup Hugo | ||
uses: peaceiris/actions-hugo@v2 | ||
with: | ||
hugo-version: '0.104.3' | ||
extended: true | ||
|
||
- name: Build | ||
run: cd website && hugo --minify -d ../public | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
website/public | ||
website/.hugo_build.lock | ||
website/resources/_gen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "website/themes/hugo-book"] | ||
path = website/themes/hugo-book | ||
url = https://github.com/alex-shpak/hugo-book |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Static website generation for UAPI group specifications | ||
|
||
This repository uses Hugo for static HTML generation. | ||
See https://gohugo.io/getting-started/quick-start/ for a brief intro. | ||
|
||
The website uses the [hugo-book](https://github.com/alex-shpak/hugo-book) theme; it is included in this repo as a git submodule. | ||
After cloning this repo please run `git submodule init; git submodule update`. | ||
If you check out a branch or tag, make sure the submodule is up to date by running `git submodule update`. | ||
|
||
## Website repo layout | ||
|
||
Content resides in the [content](content/) folder. | ||
The top-level README.md is soft-linked to `content/_index.md` and serves as index page. | ||
|
||
To add content, either put files into the `content/docs` folder. | ||
Documents there are automatically added to the naviation menu on the left. | ||
|
||
## Making changes and testing | ||
|
||
You'll need [hugo installed](https://gohugo.io/getting-started/installing/) for rendering changes. | ||
|
||
First, make your edits. | ||
Then, start hugo locally (in the repo's `website` directory)to review your changes: | ||
|
||
```shell | ||
$ hugo server --minify --disableFastRender | ||
``` | ||
|
||
Review your changes at http://localhost:1313/kernel/ . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: "{{ replace .Name "-" " " | title }}" | ||
date: {{ .Date }} | ||
draft: true | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$body-min-width: 20rem; | ||
$container-max-width: 110rem; | ||
|
||
$menu-width: 15rem; | ||
$toc-width: 15rem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
baseURL = "https://uapi-group.org/kernel" | ||
languageCode = "en-us" | ||
title = "UAPI group generic documents and meeting minutes" | ||
theme = "hugo-book" | ||
|
||
[markup.goldmark.renderer] | ||
unsafe = true # Allow HTML in md files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../README.md |