Skip to content

Commit 1b4751e

Browse files
cb341claude
andauthored
Replace Astro with Jekyll (#13)
* chore: remove astro, init jekyll with gemfile and config Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: add base layout Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: migrate blog posts to _posts/ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: migrate project pages to _projects/ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: add static pages (about, til, uses) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: add index, blog listing, projects listing, rss Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: add post-build html prettification Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * ci: update github actions for jekyll Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: add blog tags page Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: restore footer and active nav bold styling from original site Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: restore missing margin-y * ci: simplify workflow, let github pages build jekyll natively Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor: extract navlink include, remove nav conditionals Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor: rewrite about page in plain markdown Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor: simplify projects listing page Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore: remove AGENT_INSTRUCTIONS.md, favicon, clean up exclude list Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore: remove unused project images Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor: make navlink.html readable with whitespace control tags Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: remove redundant dateModified from ld+json Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: rename projects/index.html to .md so markdown renders Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: non existent margin-x * ci: add build and htmlproofer check Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: broken links in hackts-design and uses; tune htmlproofer ignores Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: resolve all htmlproofer warnings, drop --no-enforce-https - Fix HTTP links in post-1 (daringfireball, fileformat, markitdown all support HTTPS) - Simplify turbo:submit-end link to page root (fragment with colon is a htmlproofer false positive) - Drop --no-enforce-https from CI now that all links are HTTPS - Drop turbo.hotwired.dev from ignore list - Add comments explaining bot-blocking ignores and blog/tags TODO Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: ignore reddit.com in htmlproofer (bot-blocking) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: clean up HTML output and deploy workflow - Move Liquid assigns before DOCTYPE to eliminate blank lines from conditionals - Add .nojekyll to disable GitHub Pages native builder - Fix deploy workflow: add Ruby/Jekyll build step and path: _site/ for artifact upload (native GitHub Pages builder doesn't support custom plugins like jekyll-sitemap) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Revert "fix: clean up HTML output and deploy workflow" This reverts commit 43c51e0. * fix: clean HTML output and fix deploy workflow - Move Liquid assigns before <!DOCTYPE> with {%- -%} stripping to eliminate blank lines emitted by conditionals in <head> - Fix deploy workflow: add ruby/setup-ruby + jekyll build steps and path: _site/ for artifact upload; GitHub Pages native builder only supports Jekyll 3.x, so we must build ourselves via Actions to use Jekyll 4.x and jekyll-sitemap Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: eliminate blank lines in generated HTML using {%- -%} whitespace stripping Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor: simplify project-wide - _config.yml: single global layout default (removes redundant layout: base from all pages) - _config.yml: add date_format site variable, use it across all templates - base.html: replace <center> tags with text-align CSS, move body style to stylesheet - base.html: remove overflow-y: scroll (browser default), remove redundant aria-labels - bin/build: use prettier unconditionally instead of conditional beautifier/prettier - bin/fastcheck: actually check formatting with prettier --check - rss.xml: fix license MIT → CC BY 4.0 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor: remove redundant "Read more" links, title link is sufficient Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: revert margin changes * chore: remove unused astro workflow Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * ci: use bin/build in both CI and deploy (includes prettier formatting) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * ci: fix workflow discrepancies - CI: only run on non-main branches to avoid double-running with deploy - Deploy: add htmlproofer step so broken links can't ship via direct push to main Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor: extract htmlproofer into bin/check, use in both workflows Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor: rename bin/check → bin/htmlproofer, bin/fastcheck → bin/prettier Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: update README for Jekyll migration Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: address code review findings - bin/prettier → bin/format (avoids shadowing prettier binary), remove redundant build step - _config.yml: remove redundant baseurl: "" - rss.xml: add {%- -%} whitespace stripping on for/if tags - base.html: expand one-liner Liquid assigns for readability - deploy.yml: remove bin/htmlproofer (transient network failures shouldn't block deploy; CI covers it) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: clean up index.html and projects/index.md - Remove unnecessary wrapping <div> from index.html - Remove redundant aria-labels that duplicate visible link text - Remove stray blank line before </article> - Add {%- -%} whitespace stripping to projects/index.md for loop Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor: simplify base.html layout assigns - Use | default: filter instead of if/else for title and description - Remove dead image override branching (no page sets page.image) - Inline og-image.png directly in meta tags Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: switch from prettier to htmlbeautifier for post-build formatting prettier cannot re-indent Jekyll's content injection ({{ content }} inserted verbatim). htmlbeautifier properly re-indents the full HTML tree including injected content. - bin/build: use htmlbeautifier via find instead of prettier - bin/format: removed (htmlbeautifier has no --check mode) - Gemfile: add htmlbeautifier dependency - Workflows: remove Node/npm setup (no longer needed) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore: add bin/prettier for source md formatting, fix md style issues - bin/prettier checks .md files only (excludes .html — Liquid templates are not parseable by prettier without mangling) - Fix missing newline at EOF in PR template - Reformat long YAML tag arrays in project frontmatter - Add blank line before headings in projects/index.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore: drop prettier, use htmlbeautifier only bin/build runs jekyll build + htmlbeautifier on _site/. Both CI and deploy use bin/build — no prettier anywhere. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: address code review comments in base.html - Add comment explaining " | " separator in page_title - Add comment explaining og_type heuristic (page.date = article) - Add TODO for og-image.png (social sharing preview image) - Add CSS comment explaining why main resets text-align to left Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * ci: only purge CF cache after successful deploy Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: use bundle exec htmlbeautifier in bin/build Ensures the bundled gem is used rather than whatever is in PATH, which may not exist on a fresh CI runner. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b2c1289 commit 1b4751e

97 files changed

Lines changed: 894 additions & 9949 deletions

File tree

Some content is hidden

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

.github/pull_request_template/blog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ Please ensure the following items are completed before requesting review:
2020
## Cross-posting Links
2121

2222
- [ ] Published on [renuo.ch/blog](https://renuo.ch/blog)
23-
- [ ] Published on [dev.to](https://dev.to)
23+
- [ ] Published on [dev.to](https://dev.to)

.github/workflows/astro.yml

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

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches-ignore: ["main"]
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: ruby/setup-ruby@v1
14+
with:
15+
ruby-version: "3.3"
16+
bundler-cache: true
17+
- run: bin/build
18+
- run: bin/htmlproofer

.github/workflows/deploy.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy 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+
jobs:
18+
deploy:
19+
environment:
20+
name: github-pages
21+
url: ${{ steps.deployment.outputs.page_url }}
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: ruby/setup-ruby@v1
26+
with:
27+
ruby-version: "3.3"
28+
bundler-cache: true
29+
- run: bin/build
30+
- uses: actions/configure-pages@v5
31+
- uses: actions/upload-pages-artifact@v3
32+
with:
33+
path: _site/
34+
- id: deployment
35+
uses: actions/deploy-pages@v4
36+
- name: Purge Cloudflare cache
37+
if: steps.deployment.outcome == 'success'
38+
run: |
39+
curl -s -X POST "https://api.cloudflare.com/client/v4/zones/${{ secrets.CLOUDFLARE_ZONE_ID }}/purge_cache" \
40+
-H "Authorization: Bearer ${{ secrets.CLOUDFLARE_API_TOKEN }}" \
41+
-H "Content-Type: application/json" \
42+
--data '{"purge_everything":true}'

.gitignore

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
1-
# build output
2-
dist/
3-
# generated types
4-
.astro/
5-
6-
# dependencies
7-
node_modules/
1+
# Jekyll build output
2+
_site/
3+
.jekyll-cache/
4+
.jekyll-metadata
85

9-
# logs
10-
npm-debug.log*
11-
yarn-debug.log*
12-
yarn-error.log*
13-
pnpm-debug.log*
6+
# Bundler
7+
vendor/
148

9+
# macOS-specific files
10+
.DS_Store
1511

1612
# environment variables
1713
.env
1814
.env.production
1915

20-
# macOS-specific files
21-
.DS_Store
22-
2316
# jetbrains setting folder
2417
.idea/
18+
19+
# Legacy Astro artifacts (to be removed)
20+
dist/
21+
.astro/
22+
node_modules/

.prettierrc.mjs

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

0 commit comments

Comments
 (0)