Skip to content

Commit a47dd55

Browse files
windcbfclaude
andcommitted
Migrate website from static HTML to Hugo with i18n support
- Replace flat HTML pages with Hugo template engine - Extract shared nav, footer, head, background into partials - Add i18n support for 4 languages: EN, 简体中文, 繁體中文, 日本語 - Add language switcher dropdown in footer - Add GitHub Actions workflow for Hugo build and deploy - Move static assets (css, js, images) to static/ directory Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7205ec5 commit a47dd55

71 files changed

Lines changed: 15218 additions & 4798 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.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Deploy Hugo site to Pages
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
defaults:
18+
run:
19+
shell: bash
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
env:
25+
HUGO_VERSION: 0.159.2
26+
steps:
27+
- name: Install Hugo CLI
28+
run: |
29+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
30+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
- name: Setup Pages
34+
id: pages
35+
uses: actions/configure-pages@v5
36+
- name: Build with Hugo
37+
env:
38+
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
39+
HUGO_ENVIRONMENT: production
40+
run: |
41+
hugo \
42+
--gc \
43+
--minify \
44+
--baseURL "${{ steps.pages.outputs.base_url }}/"
45+
- name: Upload artifact
46+
uses: actions/upload-pages-artifact@v3
47+
with:
48+
path: ./public
49+
50+
deploy:
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
runs-on: ubuntu-latest
55+
needs: build
56+
steps:
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v4

.gitignore

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

archetypes/default.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
+++
2+
date = '{{ .Date }}'
3+
draft = true
4+
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
5+
+++

blog/index.html

Lines changed: 0 additions & 181 deletions
This file was deleted.

0 commit comments

Comments
 (0)