A simple static blog generator that creates a minimalist blog similar to danluu.com.
- Place your markdown posts in the
postsdirectory using the format:YYYY-MM-DD-post-title.md - Each post should have front matter with a title:
--- title: "Your Post Title" --- Your post content here...
- The generator will:
- Convert markdown posts to HTML
- Create an index page with a chronological list of posts
- Generate static HTML files ready for GitHub Pages
-
Install dependencies:
npm install
-
Generate static files:
node generate_posts.js
-
Preview locally:
python3 -m http.server 8000
- Push your changes to the main branch
- GitHub Actions will automatically:
- Generate the static files
- Deploy to GitHub Pages
- Your blog will be available at:
https://[username].github.io/[repository-name]/
Note: Make sure to enable GitHub Pages in your repository settings and set it to deploy from the gh-pages branch.