Skip to content

Commit da212a7

Browse files
committed
Switch to hugo static site
1 parent 16c9fb7 commit da212a7

55 files changed

Lines changed: 2545 additions & 525 deletions

Some content is hidden

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

.github/workflows/hugo.yaml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
name: Build and deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: false
17+
18+
defaults:
19+
run:
20+
shell: bash
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
env:
26+
DART_SASS_VERSION: 1.99.0
27+
GO_VERSION: 1.26.1
28+
HUGO_VERSION: 0.160.0
29+
NODE_VERSION: 24.14.1
30+
TZ: Europe/Belgrade
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v6
34+
with:
35+
submodules: recursive
36+
fetch-depth: 0
37+
38+
- name: Setup Go
39+
uses: actions/setup-go@v6
40+
with:
41+
go-version: ${{ env.GO_VERSION }}
42+
cache: false
43+
44+
- name: Setup Node.js
45+
uses: actions/setup-node@v6
46+
with:
47+
node-version: ${{ env.NODE_VERSION }}
48+
49+
- name: Setup Pages
50+
id: pages
51+
uses: actions/configure-pages@v6
52+
53+
- name: Create directory for user-specific executable files
54+
run: mkdir -p "${HOME}/.local"
55+
56+
- name: Install Dart Sass
57+
run: |
58+
curl -sLJO "https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
59+
tar -C "${HOME}/.local" -xf "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
60+
rm "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
61+
echo "${HOME}/.local/dart-sass" >> "${GITHUB_PATH}"
62+
63+
- name: Install Hugo
64+
run: |
65+
curl -sLJO "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
66+
mkdir "${HOME}/.local/hugo"
67+
tar -C "${HOME}/.local/hugo" -xf "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
68+
rm "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
69+
echo "${HOME}/.local/hugo" >> "${GITHUB_PATH}"
70+
71+
- name: Verify installations
72+
run: |
73+
echo "Dart Sass: $(sass --version)"
74+
echo "Go: $(go version)"
75+
echo "Hugo: $(hugo version)"
76+
echo "Node.js: $(node --version)"
77+
78+
- name: Install Node.js dependencies
79+
run: |
80+
[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true
81+
82+
- name: Configure Git
83+
run: git config core.quotepath false
84+
85+
- name: Cache restore
86+
id: cache-restore
87+
uses: actions/cache/restore@v5
88+
with:
89+
path: ${{ runner.temp }}/hugo_cache
90+
key: hugo-${{ github.run_id }}
91+
restore-keys: |
92+
hugo-
93+
94+
- name: Build the site
95+
run: |
96+
hugo build \
97+
--gc \
98+
--minify \
99+
--baseURL "${{ steps.pages.outputs.base_url }}/" \
100+
--cacheDir "${{ runner.temp }}/hugo_cache"
101+
102+
- name: Cache save
103+
id: cache-save
104+
uses: actions/cache/save@v5
105+
with:
106+
path: ${{ runner.temp }}/hugo_cache
107+
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
108+
109+
- name: Upload artifact
110+
uses: actions/upload-pages-artifact@v3
111+
with:
112+
path: ./public
113+
114+
deploy:
115+
environment:
116+
name: github-pages
117+
url: ${{ steps.deployment.outputs.page_url }}
118+
runs-on: ubuntu-latest
119+
needs: build
120+
steps:
121+
- name: Deploy to GitHub Pages
122+
id: deployment
123+
uses: actions/deploy-pages@v5

.gitignore

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

assets/css/_extra.scss

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
@import url("/legacy.css");
2+
3+
.site-nav {
4+
position: fixed;
5+
top: 0;
6+
z-index: 50;
7+
width: 100%;
8+
border-bottom: 1px solid rgba(30, 41, 59, 1);
9+
backdrop-filter: blur(12px);
10+
background: rgba(2, 6, 23, 0.82);
11+
}
12+
13+
.site-nav-inner {
14+
max-width: 72rem;
15+
margin: 0 auto;
16+
padding: 1rem 1.5rem;
17+
display: flex;
18+
align-items: center;
19+
justify-content: space-between;
20+
gap: 1rem;
21+
}
22+
23+
.site-brand {
24+
display: flex;
25+
align-items: center;
26+
gap: 0.5rem;
27+
color: #f8fafc;
28+
text-decoration: none;
29+
font-weight: 700;
30+
}
31+
32+
.site-brand img {
33+
width: 2rem;
34+
height: 2rem;
35+
display: block;
36+
}
37+
38+
.site-menu {
39+
display: none;
40+
align-items: center;
41+
gap: 2rem;
42+
}
43+
44+
.site-menu a,
45+
.site-nav-link {
46+
color: #94a3b8;
47+
text-decoration: none;
48+
font-size: 0.875rem;
49+
}
50+
51+
.site-menu a:hover,
52+
.site-nav-link:hover,
53+
.site-menu a[aria-current="page"] {
54+
color: #f8fafc;
55+
}
56+
57+
.app-container {
58+
max-width: none;
59+
margin: 0;
60+
padding: 0;
61+
}
62+
63+
.site-footer {
64+
border-top: 1px solid rgba(30, 41, 59, 1);
65+
background: #020617;
66+
color: #94a3b8;
67+
}
68+
69+
.site-footer-inner {
70+
max-width: 72rem;
71+
margin: 0 auto;
72+
padding: 1.5rem;
73+
}
74+
75+
.site-footer-copy {
76+
font-size: 0.95rem;
77+
margin-bottom: 0.75rem;
78+
}
79+
80+
.site-footer-links {
81+
display: flex;
82+
flex-wrap: wrap;
83+
gap: 1rem;
84+
}
85+
86+
.site-footer a {
87+
color: #22d3ee;
88+
font-weight: 600;
89+
text-decoration: none;
90+
}
91+
92+
@media (min-width: 768px) {
93+
.site-menu {
94+
display: flex;
95+
}
96+
}

0 commit comments

Comments
 (0)