harentius/blog
is a minimalistic blogging engine.
It is designed to use Markdown files for content and transform them into blog posts.
The directory structure represents a categories tree.
It consists of the following parts:
It is used to store and display blog posts. Provides an API to manage blog and a UI to display it. It is also available as a standalone Symfony bundle harentius/blog-bundle, which is a subsplit of this engine.
Renders markdown and publish it in a blogging application.
Requirements: docker, make, nodejs (for publisher)
- Clone the repository
git clone [email protected]:harentius/blog.git
- Start containers and do initial setup
make up
- Build a DB schema
make build-db
- Install npm modules for publisher
cd src/publisher && npm install
- The blog application should be available on the address http://localhost:8080
Mentioned steps run required containers and mounts source folder and can be used for development and experimenting.
For more check support/examples
configs for more production-ready setup.
- Generate API token
make api-key
- Create a blog post It is an markdown file with the following structure:
# Title (is required)
###### Meta Description: Blog Post Meta Description (Optional)
###### Meta Keywords: Blog Post Meta Keywords (Optional)
###### Published at: Publication date (Default is "now")
Here starts the content.
It also can contain an image
![](blog-post-url/some-image.png)
And a youtube video
[Video](https://www.youtube.com/embed/video_id?wmode=transparent)
The publisher also supports images and other files, including the cover file. They should be stored in the directory with the same name as the blog, but without ".md". For example:
/path/to/dir/with-blog-files/ Category/Subcategory/blog-post-url/
- Publish the blog post
HOST=https://blog.url API_TOKEN=your_api_token src/publisher/src/main.mjs add /path/to/dir/with-blog-files/ Category/Subcategory/blog-post-url.md
make build
make publish
make publish-blog-bundle