Smolpress is a small website builder. It aims to be an alternative to the increasingly complex static site generators and content managers available today.
With smolpress you would just write your posts in markdown using the built-in online editor. The markdown content is saved on the disk and converted to html on the spot. No database is required, everything is file based.
It can be used for personal websites, blogs, quick prototypes or as a baseline for more complex sites.
A node.js server is used to provide some dynamic content like comments, image upload and markdown editing.
- All content statically generated
- Admin panel with authentication
- Online markdown editor
- Image upload with resizing and optimization
- Support for ejs templates
- Page metadata (front-matter)
- Default theme
- Simple comments system
- RSS feed
- No database, everthing is file based
How does it compare to a static site generator (SSG) ?
Smolpress is also a static site generator and supports ejs templates in addition to markdown files. To statically generate the site simply start the server. While smolpress runs on a node.js server to provide some dynamic features, your posts are statically generated at all time so you can move them to a different web server if you feel the need.
Compared to an SSG, smolpress provides an online markdown editor so you can edit your posts using your own website rather than using an external editor and fiddling with live-reload or deploy scripts.
How does it compare to a content management system (CMS) ?
Smolpress is very similar to a CMS, in the sense that you can manage your content from an online interface. However it is smaller, much smaller than a real CMS like Wordpress.
With smolpress all posts sit nicely on the disk written in Markdown and are not deeply burried inside a database. In fact smolpress does not even require a database.
npm install -g smolpress cd blog smolpress init export SMOLPRESS_VAULT_PASSWORD=yourpassword smolpress start
If you're running Windows replace the
export command above with
Alternate installation (that doesn't involve the global
git clone https://github.com/mihaifm/smolpress blog cd blog npm install export SMOLPRESS_VAULT_PASSWORD=yourpassword node index.js
Now simply visit
localhost:3939 to view your blog and
localhost:3939/admin to create a new post.
Smolpress provides a single user that is created when visiting
/admin. User data is stored in a text file (
data/vault.txt) which is encrypted with the password available in the SMOLPRESS_VAULT_PASSWORD environment variable. User password is also hashed with sha512.
You can edit any post by visiting the
/admin panel and clicking the
Edit link for any post. Click
Preview to see the markdown output and
Save to have the post converted to html.
Images can be uploaded via the
/media link in the admin panel. New images are stored in
source/media and copied to
public/media when the site in generated.
Page front matter
Smolpress uses front-matter to add metadata to your pages. Any property name is supported and can be later used in the theme for customization.
date properties are supported by the default theme.
Date format needs to be specified in the
/settings panel. Simple and advanced formats are provided by dayjs.
The comments system is simple and smol. Comments are saved as json files and converted to html when the site is generated. There is no anti-spam protection but the number of comments per post and comment length are limited by config options. It should also be fairly straightforward to install something like Akismet to prevent spam.
Themes are based on ejs templates and are placed in the
themes folder. Smolpress has a default theme called
tiny. Changing the theme can be done in the
It is recommended to make a copy of the default theme and naming it to something else before making and customizations to the site. This way you won't lose any changes when updating smolpress.
RSS feed is generated automatically for the entire site. RSS fields can be configured by editing
data/feedconfig.json. This file is generated with some placeholder values when the server is first started.
- SMOLPRESS_VAULT_PASSWORD - encryption password for the "vault" containing user data.
- SMOLPRESS_PORT - server port. Default:
- SMOLPRESS_SRC_PATH - path to the markdown page sources. Default:
- SMOLPRESS_OUTPUT_PATH - path to the generated static files. Default:
- SMOLPRESS_DATA_PATH - path to the data folder. Default:
- SMOLPRESS_THEMES_PATH - path to the themes folder. Default:
- SMOLPRESS_KEEP_LIST - comma separated list of files/folders to be kept when cleaning the output folder
A smol number of options like site title and description are available in the
config.json file (stored in the
You can edit the file manually or use the
/settings panel of your website.