diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml new file mode 100644 index 0000000..d65e2c5 --- /dev/null +++ b/.github/workflows/hugo.yml @@ -0,0 +1,62 @@ +name: Deploy Hugo site to Pages + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + +defaults: + run: + shell: bash + +env: + HUGO_VERSION: 0.166.0 + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + - name: Install Hugo + run: | + wget -q -O "${{ runner.temp }}/hugo.deb" \ + "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb" + sudo dpkg -i "${{ runner.temp }}/hugo.deb" + - name: Setup Pages + id: pages + uses: actions/configure-pages@v5 + - name: Build + env: + HUGO_ENVIRONMENT: production + TZ: Europe/Amsterdam + run: hugo --gc --minify --baseURL "${{ steps.pages.outputs.base_url }}/" + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./public + + deploy: + if: github.event_name != 'pull_request' + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8d5be44 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +public/ +resources/_gen/ +.hugo_build.lock +.claude/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..be00b3c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "themes/PaperMod"] + path = themes/PaperMod + url = https://github.com/adityatelange/hugo-PaperMod diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..d15b9a7 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,50 @@ +# minhtt159.github.io (hnimn.art) + +Personal blog. Hugo + PaperMod, deployed by GitHub Actions on merge to `main`. Commands are in `README.md`. + +## Content + +- Frontmatter: `title`, `date` (in the past, or Hugo hides it), `draft: true` until Minh flips it, `description`, `summary`, `tags`. Archetype: `archetypes/posts.md`. +- ASCII punctuation in prose: `-` not dashes, `->` not arrows, `...` not the ellipsis character, straight quotes. Goldmark renders typographic quotes; the source stays greppable. +- Work material is genericised: no customer, product, internal system, registry, or supplier names. Numbers are real and rounded. Sources and the disclosure rule live in `../resume/docs/blog-inspirations.md`. +- Every claim with a number traces to a verified source (`../resume/docs/facts.md` or a commit). Recalled numbers do not go in. +- One name per thing across a post. Timeless phrasing: no "currently", "soon", "not yet". + +## Colour scheme + +Catppuccin Latte (light) and Mocha (dark), `assets/css/extended/theme.css`. Roles follow the upstream style guide: base page, mantle secondary panes, surface0 surface elements, text body, subtext0 labels, blue links, green/yellow/red for good/caution/bad, tints at 15%. Change a colour there and only there; nothing else in the repo carries a hex value. + +## Fonts + +No third-party font requests. Body text uses PaperMod's system stack. Code and SVG mono text use `--font-mono` from `theme.css`: JetBrains Mono, self-hosted under `static/fonts/` (regular and bold woff2, OFL licence file next to them, `local()` first so an installed copy is used). Adding a face means the same recipe: woff2 in `static/fonts/`, licence alongside, `@font-face` with `font-display: swap` in `theme.css`, two weights at most. Never load from fonts.googleapis.com. + +## Diagrams + +Inline SVG in the markdown, one per post unless the post cannot be understood without a second. + +- Open with ``, then `` and `` that describe the mechanism in one or two sentences. `` is unique per post; marker ids carry the same prefix. +- No `