This is a simple blog service that just works. There are great alternatives with a lot more functionality but sometimes, all you need is a simple service that serves Markdown files in the style of a blog.
To run the application using Docker:
sudo docker run -d -p 4173:4173 -v $(pwd)/content:/app/content -e NODE_ENV=production -e HOST=0.0.0.0 ghcr.io/itschotsch/blog:latest
To run the application using Docker Compose:
sudo docker compose up -d
To run the application using Docker:
sudo docker build -t blog .
sudo docker run -d -p 4173:4173 -v $(pwd)/content:/app/content -e NODE_ENV=production -e HOST=0.0.0.0 blog
To run the application using NPM:
npm run build && npm run preview
To create a post, create a Markdown file in content/posts
.
Optionally, include a frontmatter for metadata in YAML syntax.
For example, content/posts/HelloWorld.md
may look as follows:
---
title: Hello, World!
datetime: 2025-01-01 00:01
images:
- src: example.png
alt: Example image
title: Example image
---
*Hello*, **World**!
Images referenced with relative paths such as example.png
in the example above should be placed in content/media
.
In content/configuration.yaml
, you can make some customisations:
title
: The title of your blog, which is displayed at the very top of the page as well as on the tab.language
: The language code of your blog, which is used in the<html lang="%lang%">
tag and affects the text hyphenation.stylesheets
: A list of stylesheets to be used. These can be absolute URLs for CDNs or relative URLs for CSS files placed incontent/style
.
This application is written in SvelteKit / Svelte 5.
Install the dependencies with npm install
(or pnpm install
or yarn
) and start a development server:
npm run dev
To build a production version of the app:
npm run build
You can preview the production build with npm run preview
.