A simple, static site blog generator using Markdown, Bun, and TypeScript.
- Write a short sentence about what you have learned from each book you read.
- Written in TypeScript and powered by Bun
- Generates static HTML from Markdown content
- Syntax highlighting using highlight.js
- Responsive design with mobile support
- Dark theme inspired by GitHub dark mode
- Sitemap generation
- Automatic deployment to GitHub Pages
- Install Bun:
curl -fsSL https://bun.sh/install | bash
- Git
-
Clone the repository:
git clone https://github.com/your-username/blog.git cd blog
-
Install dependencies:
bun install
-
Update site configuration: Edit
src/build.ts
and update theSITE_CONFIG
object with your information.
Edit the posts.md
file to add or modify posts. The format is:
# Post Title
YYYY-MM-DD (optional: updated on YYYY-MM)
tag1, tag2, tag3
Post content goes here...
## Subheading
More content...
Posts are manually ordered in the file, with the newest posts at the top.
To build and preview the blog locally:
bun run preview
This will build the blog and start a local server at http://localhost:3000
.
To only build the blog:
bun run build
To only start the development server (after building):
bun run serve
The blog automatically deploys to GitHub Pages when you push changes to the main
branch.
- Make sure GitHub Pages is enabled in your repository settings, using the GitHub Actions deployment option.
- Push changes to the
main
branch. - GitHub Actions will build and deploy your site.
- CSS Styling: Edit
static/style.css
to customize the appearance - Site Configuration: Update the
SITE_CONFIG
object insrc/build.ts
- Static Assets: Add images and other static files to the
static/
directory
MIT