This blog is configured in your Doom Emacs with the Claude Code documentation style.
- Use
SPC B n
(capital B) to create a new post - Enter the title when prompted
- The post will be created with automatic filename and filled template
- Use
SPC B p
(capital B) to publish all posts - Files will be generated in
~/blog/public/
- Run
./build.sh
for command-line building - Run
make build-prod
for production build with minification
~/blog/
├── posts/ # Your org-mode blog posts
├── static/ # CSS, JS, and other assets
│ ├── css/ # Stylesheets
│ ├── js/ # JavaScript files
│ └── favicon.svg # Site favicon
├── templates/ # Post templates
├── public/ # Generated HTML output
├── .github/ # GitHub Actions workflows
│ └── workflows/
│ ├── publish.yml # Main deployment workflow
│ ├── pr-preview.yml # Pull request previews
│ └── ci.yml # Continuous integration
├── build.sh # Build script
├── generate-sitemap.sh # Sitemap generator
├── minify.sh # Asset minification
├── Makefile # Build automation
├── .blogrc # Configuration file
└── htmlize.el # Syntax highlighting support
The blog can be configured through environment variables in .blogrc
:
export BLOG_AUTHOR="your-name"
export BLOG_EMAIL="your-email@example.com"
export BLOG_URL="https://your-domain.com"
export MINIFY_ASSETS="false" # Set to "true" for production
- Create new post:
SPC B n
(capital B) in Doom Emacs - Write your content in org-mode
- Publish locally:
SPC B p
(capital B) in Doom Emacs or run./build.sh
- Serve locally:
make serve
orcd ~/blog/public && python -m http.server
- Deploy: Push to GitHub, automatic deployment via Actions
To create draft posts that won't be published:
- Add
#+DRAFT: true
to the post header - When ready to publish, change to
#+DRAFT: false
or remove the line - Draft posts are excluded from the sitemap and won't be built
Example draft post header:
#+TITLE: My Draft Post
#+DATE: <2025-01-01>
#+AUTHOR: bytenoob
#+DRAFT: true
#+OPTIONS: toc:t num:nil
The blog includes:
- Modern Design: Clean, responsive design inspired by Claude Code docs
- Automatic Features:
- Archive/index generation with newest-first sorting
- Date extraction from filenames and metadata
- Cache busting for CSS/JS assets
- Sitemap.xml generation for SEO
- 404 error page
- Developer Experience:
- Colored build output with progress indicators
- Production build with asset minification
- GitHub Actions for CI/CD
- Pull request preview builds
- User Experience:
- Dark mode support
- Mobile responsive design
- Fast page loads with optimized assets
- Comprehensive syntax highlighting
The blog supports syntax highlighting for code blocks through a dual approach:
-
Server-side highlighting (via htmlize.el):
- Emacs Lisp, Python, JavaScript, Shell, HTML/CSS, SQL
-
Client-side fallback (via JavaScript):
- Go, Rust, JSON, YAML
- Automatically applied for better accuracy
To add support for more languages:
- Install the Emacs mode in
~/.config/doom/packages.el
- Run
doom sync
to install - Test with
./build.sh
- If needed, extend the JavaScript fallback in
static/js/blog.js
The blog includes three workflows:
-
publish.yml: Main deployment to GitHub Pages
- Triggers on push to main branch
- Builds site with production optimizations
- Deploys to GitHub Pages
-
pr-preview.yml: Preview builds for pull requests
- Generates preview artifacts
- Comments on PR with build statistics
-
ci.yml: Continuous integration checks
- Validates Org file syntax and metadata
- Runs ShellCheck on scripts
- Tests build process
- Checks for broken internal links
- Enable GitHub Pages in repository settings
- Set source to "GitHub Actions"
- Push to main branch to trigger deployment
- Add
CNAME
file tostatic/
directory - Update
BLOG_URL
in.blogrc
or GitHub Secrets - Configure DNS settings with your domain provider
- Build errors: Check
build.sh
output for detailed error messages - Syntax highlighting issues: Ensure required Emacs modes are installed
- GitHub Actions failures: Check workflow logs in Actions tab
- Local preview issues: Ensure Python 3 is installed for local server