From ddc6fdc795c659eb560d33e207e70150eb903add Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 2 Mar 2026 18:01:47 +0000 Subject: [PATCH 1/3] Replace Minimal Mistakes with custom Tailwind CSS blog template Builds a fully custom Jekyll theme using Tailwind CSS (Play CDN) with a dark slate palette, gradient accents, and scroll/fade-in animations throughout. - _layouts/default.html: base shell with fixed blurred nav, footer, Tailwind Play CDN, @keyframes fadeIn/fadeUp, and IntersectionObserver scroll-reveal - _layouts/home.html: hero section with author avatar + staggered post cards - _layouts/post.html: article view with back link, metadata header, prose styles - _layouts/page.html: clean static page with gradient divider - _config.yml: remove minimal-mistakes theme and jekyll-include-cache plugin - Gemfile: remove minimal-mistakes-jekyll gem - _posts/2026-03-01-hello-world.markdown: initial post to populate the template https://claude.ai/code/session_01K2fA37nLPGSWShv78GxqBy --- Gemfile | 2 - _config.yml | 15 +- _layouts/default.html | 184 +++++++++++++++++++++++++ _layouts/home.html | 116 ++++++++++++++++ _layouts/page.html | 18 +++ _layouts/post.html | 73 ++++++++++ _posts/2026-03-01-hello-world.markdown | 51 +++++++ index.html | 1 - 8 files changed, 444 insertions(+), 16 deletions(-) create mode 100644 _layouts/default.html create mode 100644 _layouts/home.html create mode 100644 _layouts/page.html create mode 100644 _layouts/post.html create mode 100644 _posts/2026-03-01-hello-world.markdown diff --git a/Gemfile b/Gemfile index de77416..4557963 100644 --- a/Gemfile +++ b/Gemfile @@ -2,13 +2,11 @@ source "https://rubygems.org" ruby RUBY_VERSION gem "jekyll" -gem "minimal-mistakes-jekyll" group :jekyll_plugins do gem "jekyll-paginate" gem "jekyll-sitemap" gem "jekyll-gist" gem "jekyll-feed" - gem "jekyll-include-cache" gem "jekyll-octicons" end diff --git a/_config.yml b/_config.yml index eca50f0..8dfb18b 100644 --- a/_config.yml +++ b/_config.yml @@ -4,10 +4,6 @@ description: Software developer and technical writer based in Vancouver, Canada. baseurl: "" url: "http://alphang.com" -# Theme -theme: minimal-mistakes-jekyll -minimal_mistakes_skin: "dark" - # Build settings markdown: kramdown highlighter: rouge @@ -19,7 +15,6 @@ plugins: - jekyll-sitemap - jekyll-gist - jekyll-feed - - jekyll-include-cache - jekyll-octicons # Pagination @@ -34,10 +29,8 @@ author: avatar: "/assets/brick-road-alpha.jpg" links: - label: "GitHub" - icon: "fab fa-fw fa-github" url: "https://github.com/alphang" - label: "LinkedIn" - icon: "fab fa-fw fa-linkedin" url: "https://www.linkedin.com/in/alphang" # Defaults @@ -46,16 +39,12 @@ defaults: path: "" type: posts values: - layout: single - author_profile: true - read_time: true - share: false + layout: post - scope: path: "" type: pages values: - layout: single - author_profile: true + layout: page exclude: - CLAUDE.md diff --git a/_layouts/default.html b/_layouts/default.html new file mode 100644 index 0000000..996c1f9 --- /dev/null +++ b/_layouts/default.html @@ -0,0 +1,184 @@ + + + + + + {% if page.title %}{{ page.title }} — {% endif %}{{ site.title }} + + + {% feed_meta %} + + + + + + + + + + + + + + + + + +
+ {{ content }} +
+ + + + + + + + + diff --git a/_layouts/home.html b/_layouts/home.html new file mode 100644 index 0000000..3d0ac66 --- /dev/null +++ b/_layouts/home.html @@ -0,0 +1,116 @@ +--- +layout: default +--- + +
+ + +
+ {% if site.author.avatar %} +
+ {{ site.author.name }} +
+

Author

+

{{ site.author.name }}

+
+
+ {% endif %} + +

+ Software developer
+ & technical writer. +

+

+ {{ site.description }} +

+
+ + +
+

+ Latest Posts + +

+ + {% if paginator.posts.size > 0 %} +
+ {% for post in paginator.posts %} +
+
+
+
+ + {% if post.categories.size > 0 %} + · + {% for cat in post.categories limit:2 %} + {{ cat }} + {% endfor %} + {% endif %} +
+ +

+ {{ post.title }} +

+ + {% if post.excerpt %} +

+ {{ post.excerpt | strip_html | truncate: 150 }} +

+ {% endif %} +
+ +
+ + Read + + + + +
+
+
+ {% endfor %} +
+ + {% if paginator.total_pages > 1 %} + + {% endif %} + + {% else %} +
+

No posts yet — check back soon.

+
+ {% endif %} + +
+
diff --git a/_layouts/page.html b/_layouts/page.html new file mode 100644 index 0000000..9ac7b70 --- /dev/null +++ b/_layouts/page.html @@ -0,0 +1,18 @@ +--- +layout: default +--- + +
+ +
+

+ {{ page.title }} +

+
+
+ +
+ {{ content }} +
+ +
diff --git a/_layouts/post.html b/_layouts/post.html new file mode 100644 index 0000000..78b96cc --- /dev/null +++ b/_layouts/post.html @@ -0,0 +1,73 @@ +--- +layout: default +--- + +
+ + + + + +
+
+ + {% if page.categories.size > 0 %} + · + {% for cat in page.categories limit:3 %} + {{ cat }} + {% endfor %} + {% endif %} +
+ +

+ {{ page.title }} +

+ +
+ {% if site.author.avatar %} + {{ site.author.name }} + {% endif %} +
+

{{ site.author.name }}

+

{{ site.author.location }}

+
+
+
+ + +
+ {{ content }} +
+ + + + +
diff --git a/_posts/2026-03-01-hello-world.markdown b/_posts/2026-03-01-hello-world.markdown new file mode 100644 index 0000000..157ac19 --- /dev/null +++ b/_posts/2026-03-01-hello-world.markdown @@ -0,0 +1,51 @@ +--- +layout: post +title: "Hello, World" +date: 2026-03-01 12:00:00 -0700 +categories: meta +--- + +A first post to break in the new look. + +## What changed + +The site has been rebuilt with a custom Tailwind CSS template — clean, dark, and fully hand-rolled. The previous theme was [Minimal Mistakes](https://mmistakes.github.io/minimal-mistakes/), which is excellent but ships with a lot I wasn't using. + +The new setup is a thin layer of custom Jekyll layouts over Tailwind's utility classes, loaded via the Play CDN. No npm, no PostCSS pipeline, no build step beyond the standard `bundle exec jekyll build`. + +## What stays the same + +- Posts live in `_posts/` with standard Jekyll front matter +- Pages like About and Projects are plain Markdown files +- The site deploys to GitHub Pages via GitHub Actions on every push to `master` + +## Writing posts + +Front matter is minimal: + +```yaml +--- +layout: post +title: "Post Title" +date: 2026-03-01 12:00:00 -0700 +categories: writing code +--- +``` + +Everything else — author info, navigation, footer — comes from `_config.yml` and the layout files in `_layouts/`. + +## Code blocks + +Syntax highlighting is handled by Rouge (Jekyll's default). Inline `code` and fenced blocks both render cleanly in the dark theme. + +```javascript +function greet(name) { + return `Hello, ${name}!`; +} + +console.log(greet('World')); +``` + +--- + +Source is on [GitHub](https://github.com/alphang/alphang.github.io). diff --git a/index.html b/index.html index b95bb1f..e4d427d 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,3 @@ --- layout: home -author_profile: true --- From 24be8deb0f768762bbdbe6a80dc9e5e63d6b675a Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 2 Mar 2026 18:21:24 +0000 Subject: [PATCH 2/3] Add branch preview workflow via Surge.sh Triggers on pushes to claude/** branches and on PRs targeting master. Builds the Jekyll site, deploys to a Surge.sh subdomain derived from the branch name, and posts/updates the preview URL as a PR comment. Requires SURGE_LOGIN and SURGE_TOKEN repository secrets. https://claude.ai/code/session_01K2fA37nLPGSWShv78GxqBy --- .github/workflows/preview.yml | 78 +++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 .github/workflows/preview.yml diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml new file mode 100644 index 0000000..f23aefe --- /dev/null +++ b/.github/workflows/preview.yml @@ -0,0 +1,78 @@ +name: Branch Preview + +on: + push: + branches: + - "claude/**" + pull_request: + branches: + - master + +permissions: + contents: read + pull-requests: write + +jobs: + preview: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.1" + bundler-cache: true + + - name: Build with Jekyll + run: bundle exec jekyll build + env: + JEKYLL_ENV: production + + - name: Derive preview URL + id: url + run: | + # Replace / and non-alphanumeric chars with hyphens, lowercase + SLUG=$(echo "${{ github.ref_name }}" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/-\+/-/g' | sed 's/^-\|-$//g') + # Surge subdomain max 63 chars; prefix with site name for uniqueness + SUBDOMAIN="alphang-${SLUG}" + SUBDOMAIN="${SUBDOMAIN:0:63}" + echo "url=https://${SUBDOMAIN}.surge.sh" >> "$GITHUB_OUTPUT" + echo "subdomain=${SUBDOMAIN}.surge.sh" >> "$GITHUB_OUTPUT" + + - name: Deploy to Surge.sh + run: | + npm install --global surge + surge ./_site "${{ steps.url.outputs.subdomain }}" --token "${{ secrets.SURGE_TOKEN }}" + env: + SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }} + + - name: Comment preview URL on PR + if: github.event_name == 'pull_request' + uses: actions/github-script@v7 + with: + script: | + const url = '${{ steps.url.outputs.url }}'; + const body = `## Preview deployment\n\n**${url}**\n\nBuilt from \`${{ github.ref_name }}\` @ \`${{ github.sha }}\`.`; + const { data: comments } = await github.rest.issues.listComments({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + }); + const existing = comments.find(c => c.body.startsWith('## Preview deployment')); + if (existing) { + await github.rest.issues.updateComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: existing.id, + body, + }); + } else { + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body, + }); + } From bd27ec9416d989c117856b1c1fc4ea538d1de115 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 2 Mar 2026 18:24:34 +0000 Subject: [PATCH 3/3] Remove Surge.sh preview workflow https://claude.ai/code/session_01K2fA37nLPGSWShv78GxqBy --- .github/workflows/preview.yml | 78 ----------------------------------- 1 file changed, 78 deletions(-) delete mode 100644 .github/workflows/preview.yml diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml deleted file mode 100644 index f23aefe..0000000 --- a/.github/workflows/preview.yml +++ /dev/null @@ -1,78 +0,0 @@ -name: Branch Preview - -on: - push: - branches: - - "claude/**" - pull_request: - branches: - - master - -permissions: - contents: read - pull-requests: write - -jobs: - preview: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: "3.1" - bundler-cache: true - - - name: Build with Jekyll - run: bundle exec jekyll build - env: - JEKYLL_ENV: production - - - name: Derive preview URL - id: url - run: | - # Replace / and non-alphanumeric chars with hyphens, lowercase - SLUG=$(echo "${{ github.ref_name }}" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/-\+/-/g' | sed 's/^-\|-$//g') - # Surge subdomain max 63 chars; prefix with site name for uniqueness - SUBDOMAIN="alphang-${SLUG}" - SUBDOMAIN="${SUBDOMAIN:0:63}" - echo "url=https://${SUBDOMAIN}.surge.sh" >> "$GITHUB_OUTPUT" - echo "subdomain=${SUBDOMAIN}.surge.sh" >> "$GITHUB_OUTPUT" - - - name: Deploy to Surge.sh - run: | - npm install --global surge - surge ./_site "${{ steps.url.outputs.subdomain }}" --token "${{ secrets.SURGE_TOKEN }}" - env: - SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }} - - - name: Comment preview URL on PR - if: github.event_name == 'pull_request' - uses: actions/github-script@v7 - with: - script: | - const url = '${{ steps.url.outputs.url }}'; - const body = `## Preview deployment\n\n**${url}**\n\nBuilt from \`${{ github.ref_name }}\` @ \`${{ github.sha }}\`.`; - const { data: comments } = await github.rest.issues.listComments({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - }); - const existing = comments.find(c => c.body.startsWith('## Preview deployment')); - if (existing) { - await github.rest.issues.updateComment({ - owner: context.repo.owner, - repo: context.repo.repo, - comment_id: existing.id, - body, - }); - } else { - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - body, - }); - }