BrightBytes is a Gatsby blog built from MDX articles and React components. GitHub Pages serves the generated HTML, scripts, and images, so reading the site does not require an application server.
Architecture
- MDX files contain article text, frontmatter, code examples, and local images.
- React templates provide article pages, topic lists, search, and series navigation.
- Gatsby resolves content and generates responsive images and static pages.
- GitHub Pages hosts the resulting
public/directory.
Drafts appear during development and are excluded from the production article pages, feeds, search, and sitemap.
Run and build
From the BrightBytes checkout, use the repository's supported Node.js version:
npm ci
npm run developOpen the local URL printed by Gatsby. To add an article, create src/blog/<name>/index.mdx with a title, description, unique slug, date, tags, and any local images. Set draft: true while writing.
Stop the development server before producing the release build:
npm run build
npm run check:build
npm run serveThe final command previews the generated site locally.
Publish it
The repository's deployment script builds with path-prefix support, checks the output, and sends public/ to the gh-pages branch:
npm run deployConfigure GitHub Pages to serve that branch. Keep the site URL and path prefix aligned with the destination. For a custom domain, configure DNS and keep the domain in static/CNAME, which Gatsby copies into the build.
Where it fits
This setup works well for technical writing, project portfolios, and documentation that can be generated ahead of time. MDX keeps the article close to its code examples and images; reusable templates keep the presentation consistent across posts.





