Skip to content

Commit 8032e43

Browse files
committed
Initial commit
0 parents  commit 8032e43

52 files changed

Lines changed: 3118 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
# See https://git-scm.com/docs/gitattributes.
2+
3+
#------------------------------------------------------------------------------
4+
# Text files.
5+
#
6+
# text
7+
# - Converts line endings to LF in the repository.
8+
#
9+
# eol=lf
10+
# - Normalizes line endings to LF on checkin and prevents conversion to CRLF
11+
# when the file is checked out.
12+
#
13+
# whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
14+
# - Treats trailing whitespaces at the end of the line as an error.
15+
# - Does not treat blank lines added at the end of file as an error.
16+
# - Does not treat a space character that appears immediately before a tab
17+
# character in the initial indent part of the line as an error.
18+
# - Treats a tab character in the initial indent part of the line as an
19+
# error.
20+
# - Sets the tabwidth to 2.
21+
#
22+
# The whitespace configuration defines what diff and apply should consider
23+
# whitespace errors
24+
# - Errors are exposed by default in 'git diff --color'.
25+
# - Validate with 'git diff --check'.
26+
# - Deny applying with 'git apply --whitespace=error-all'.
27+
# - Fix automatically with 'git apply --whitespace=fix'.
28+
#------------------------------------------------------------------------------
29+
30+
*.config text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
31+
*.css text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=css
32+
*.dist text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
33+
*.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
34+
*.htm text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=html
35+
*.html text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=html
36+
*.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
37+
*.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
38+
*.js text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
39+
*.json text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
40+
*.lock text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
41+
*.map text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
42+
*.md text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=markdown
43+
*.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
44+
*.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
45+
*.po text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
46+
*.profile text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
47+
*.sass text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
48+
*.script text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
49+
*.scss text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=css
50+
*.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
51+
*.sql text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
52+
*.svg text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
53+
*.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
54+
*.toml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
55+
*.twig text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
56+
*.txt text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
57+
*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
58+
*.yaml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
59+
*.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
60+
61+
#------------------------------------------------------------------------------
62+
# Binary files.
63+
#
64+
# binary
65+
# - This is a macro for -text, -diff, -merge.
66+
#------------------------------------------------------------------------------
67+
68+
# Archive.
69+
*.iso binary
70+
*.tar binary
71+
72+
# Compressed.
73+
*.bz2 binary
74+
*.gz binary
75+
76+
# Compressed archive.
77+
*.phar binary
78+
*.rar binary
79+
*.tar.gz binary
80+
*.tgz binary
81+
*.zip binary
82+
83+
# Adobe.
84+
*.ai binary
85+
*.eps binary
86+
*.pdf binary
87+
*.ps binary
88+
*.psd binary
89+
90+
# Audio/video.
91+
*.mp3 binary
92+
*.mp4 binary
93+
*.oga binary
94+
*.ogg binary
95+
*.ogv binary
96+
*.ogx binary
97+
*.webm binary
98+
99+
# Fonts.
100+
*.eot binary
101+
*.otf binary
102+
*.ttf binary
103+
*.woff binary
104+
*.woff2 binary
105+
106+
# Images.
107+
*.bmp binary
108+
*.gif binary
109+
*.ico binary
110+
*.jfif binary
111+
*.jpe binary
112+
*.jpeg binary
113+
*.jpg binary
114+
*.png binary
115+
*.svgz binary
116+
*.tif binary
117+
*.tiff binary
118+
*.webp binary
119+
120+
# Libre Office.
121+
*.odb binary
122+
*.odf binary
123+
*.odg binary
124+
*.odm binary
125+
*.odp binary
126+
*.ods binary
127+
*.odt binary
128+
*.otg binary
129+
*.otp binary
130+
*.ots binary
131+
*.ott binary
132+
133+
# Microsoft Office.
134+
*.docx binary
135+
*.dotx binary
136+
*.potx binary
137+
*.pptx binary
138+
*.xlsx binary
139+
*.xltx binary
140+
141+
# Microsoft Office (legacy).
142+
*.doc binary
143+
*.dot binary
144+
*.pot binary
145+
*.ppt binary
146+
*.xls binary
147+
*.xlt binary
148+
149+
# Other.
150+
*.dll binary
151+
*.exe binary

.github/workflows/hugo.yaml

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
name: Build and deploy
2+
on:
3+
push:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
concurrency:
12+
group: pages
13+
cancel-in-progress: false
14+
defaults:
15+
run:
16+
shell: bash
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
env:
21+
DART_SASS_VERSION: 1.90.0
22+
GO_VERSION: 1.24.5
23+
HUGO_VERSION: 0.148.2
24+
NODE_VERSION: 22.18.0
25+
TZ: Europe/Oslo
26+
outputs:
27+
pages_base_url: ${{ steps.pages.outputs.base_url }}
28+
pages_base_path: ${{ steps.pages.outputs.base_path }}
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v5
32+
with:
33+
submodules: recursive
34+
fetch-depth: 0
35+
- name: Setup Go
36+
uses: actions/setup-go@v5
37+
with:
38+
go-version: ${{ env.GO_VERSION }}
39+
cache: false
40+
- name: Setup Node.js
41+
uses: actions/setup-node@v4
42+
with:
43+
node-version: ${{ env.NODE_VERSION }}
44+
- name: Setup Pages
45+
id: pages
46+
uses: actions/configure-pages@v5
47+
- name: Create directory for user-specific executable files
48+
run: |
49+
mkdir -p "${HOME}/.local"
50+
- name: Install Dart Sass
51+
run: |
52+
curl -sLJO "https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
53+
tar -C "${HOME}/.local" -xf "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
54+
rm "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
55+
echo "${HOME}/.local/dart-sass" >> "${GITHUB_PATH}"
56+
- name: Install Hugo
57+
run: |
58+
curl -sLJO "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
59+
mkdir "${HOME}/.local/hugo"
60+
tar -C "${HOME}/.local/hugo" -xf "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
61+
rm "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
62+
echo "${HOME}/.local/hugo" >> "${GITHUB_PATH}"
63+
- name: Verify installations
64+
run: |
65+
echo "Dart Sass: $(sass --version)"
66+
echo "Go: $(go version)"
67+
echo "Hugo: $(hugo version)"
68+
echo "Node.js: $(node --version)"
69+
- name: Install Node.js dependencies
70+
run: |
71+
[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true
72+
- name: Configure Git
73+
run: |
74+
git config core.quotepath false
75+
- name: Cache restore
76+
id: cache-restore
77+
uses: actions/cache/restore@v4
78+
with:
79+
path: ${{ runner.temp }}/hugo_cache
80+
key: hugo-${{ github.run_id }}
81+
restore-keys:
82+
hugo-
83+
- name: Build the site
84+
run: |
85+
hugo \
86+
--gc \
87+
--minify \
88+
--baseURL "${{ steps.pages.outputs.base_url }}/" \
89+
--cacheDir "${{ runner.temp }}/hugo_cache"
90+
- name: Cache save
91+
id: cache-save
92+
uses: actions/cache/save@v4
93+
with:
94+
path: ${{ runner.temp }}/hugo_cache
95+
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
96+
- name: Upload artifact for deploy job
97+
uses: actions/upload-pages-artifact@v3
98+
with:
99+
path: ./public
100+
- name: Upload artifact for validate job
101+
uses: actions/upload-artifact@v4
102+
with:
103+
name: publish-dir
104+
path: ./public
105+
validate:
106+
runs-on: ubuntu-latest
107+
needs: build
108+
steps:
109+
- name: Set up Ruby
110+
uses: ruby/setup-ruby@v1
111+
with:
112+
ruby-version: 3.3
113+
bundler-cache: true
114+
- name: Download artifact
115+
uses: actions/download-artifact@v4
116+
with:
117+
name: publish-dir
118+
path: ./
119+
- name: Validate HTML and CSS
120+
uses: anishathalye/proof-html@v2
121+
with:
122+
directory: ./
123+
enforce_https: true
124+
ignore_empty_alt: true
125+
ignore_url_re: |
126+
^foo$
127+
tokens: |
128+
{"https://github.com": "${{ secrets.GITHUB_TOKEN }}"}
129+
swap_urls: |
130+
${{ format('{{ "^{0}" : "" }}', needs.build.outputs.pages_base_path) }}
131+
- name: Install libxml2-utils
132+
run: sudo apt-get install libxml2-utils
133+
- name: Verify that RSS and sitemap are valid XML
134+
run: |
135+
xmllint --noout ./index.xml
136+
xmllint --noout ./sitemap.xml
137+
- name: Download RSS schema
138+
run: wget https://raw.githubusercontent.com/jthelin/rss2schema/refs/heads/main/schema/rss-2_0.xsd
139+
- name: Validate RSS
140+
uses: ChristophWurst/xmllint-action@v1
141+
with:
142+
xml-file: ./index.xml
143+
xml-schema-file: ./rss-2_0.xsd
144+
- name: Download sitemap schema
145+
run: wget https://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd
146+
- name: Validate sitemap
147+
uses: ChristophWurst/xmllint-action@v1
148+
with:
149+
xml-file: ./sitemap.xml
150+
xml-schema-file: ./sitemap.xsd
151+
deploy:
152+
environment:
153+
name: github-pages
154+
url: ${{ steps.deployment.outputs.page_url }}
155+
runs-on: ubuntu-latest
156+
needs: [build, validate]
157+
steps:
158+
- name: Deploy to GitHub Pages
159+
id: deployment
160+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.hugo_build.lock
2+
node_modules/
3+
public/
4+
resources/

0 commit comments

Comments
 (0)