Set up Astro with GitHub Pages and migrate homepage from new-homepage branch#1966
Draft
Set up Astro with GitHub Pages and migrate homepage from new-homepage branch#1966
Conversation
4 tasks
Agent-Logs-Url: https://github.com/counterfact/api-simulator/sessions/43628429-220a-4b27-8e3f-46cb6a0c81e2 Co-authored-by: pmcelhaney <51504+pmcelhaney@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Set up Astro with GitHub Pages and migrate homepage
Set up Astro with GitHub Pages and migrate homepage from new-homepage branch
Apr 27, 2026
pmcelhaney
requested changes
Apr 27, 2026
Collaborator
pmcelhaney
left a comment
There was a problem hiding this comment.
Extract the inline CSS and JS into files.
Agent-Logs-Url: https://github.com/counterfact/api-simulator/sessions/daa2911f-811d-4bc5-958c-7eab9c30187a Co-authored-by: pmcelhaney <51504+pmcelhaney@users.noreply.github.com>
Contributor
Author
Done in commit 27e46fe. The inline CSS is now in Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
| @@ -0,0 +1,33 @@ | |||
| function copyCmd() { | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates the counterfact.dev homepage from Jekyll to Astro, deploying via GitHub Actions to GitHub Pages. The new-homepage branch's
docs/index.htmlbecomes the foundation.Summary
Introduces a self-contained Astro v5 project under
site/with a layout/page split, wires up official GitHub Pages deployment, and migrates the dark-themed homepage HTML. CSS and JavaScript are kept in their own source files and bundled by Vite during build.Original Prompt
We want to move this site to Astro and deploy it via GitHub Pages, using the existing
index.htmlfrom thenew-homepagebranch as the foundation.This should be done in a way that preserves the current homepage content while setting us up for future expansion (docs, additional pages, etc.).
Goals
index.html(fromnew-homepage) into an Astro layout/template/)Manual acceptance tests
cd site && npm install && npm run dev— homepage renders with correct dark theme, nav, hero, and code sectionscd site && npm run build— exits 0,site/dist/containsindex.html,counterfact.svg, andCNAMEnpm run preview— no broken assets, fonts load, SVG logo appearsmain—Deploy Site to GitHub Pagesworkflow passes in Actionsnew-homepagebranch'sdocs/index.htmlTasks
site/Astro project —package.json(astro v5.18.1),astro.config.mjs(static output,site: "https://counterfact.dev"),tsconfig.json,.gitignoresite/src/layouts/MainLayout.astro— HTML shell with<head>, Google Fonts links, andimport "../styles/main.css"; exposes optionaltitlepropsite/src/styles/main.css— ~900 lines of CSS extracted from the original inline<style>blocksite/src/pages/index.astro— full body content fromnew-homepage/docs/index.html; curly braces in code examples escaped as{/}to prevent Astro template-expression misparse; references../scripts/main.jsvia<script> import </script>site/src/scripts/main.js— clipboard copy andIntersectionObserverJS extracted from the original inline<script>blocksite/public/—CNAME(counterfact.dev) andcounterfact.svg; imagesrcupdated from./counterfact.svg→/counterfact.svg.github/workflows/deploy-site.yaml— triggers onmainpush andworkflow_dispatch; uses Node 22,npm ci, and the officialconfigure-pages/upload-pages-artifact/deploy-pagesaction chain.gitignore— excludessite/node_modules,site/dist,site/.astrodocs/index.html— synced to thenew-homepagebranch version