Why do I create this generator when the world has a lot of engine such as Hexo, Hugo, VuePress,...?
I've tried many of them, but it was a mess for me when trying to config and customize theme. So I decided to create an own generator to hold the full control.
The letter s
stands for Static and Simple. I just want to create a simple static site generator for my blog. Of course, I don't wan to compete with the existences.
You can check-out the demo here: https://slog.tatthien.com/
- Clone this repository.
- Create your content in markdown format inside the directories
posts
andpages
. npm run build
oryarn build
to build the static files.- The static files will be generated in the directory
public
. - Upload the
public
to your web host.
Assets
Watching the file changes:
npm run asset:dev
or yarn asset:dev
Building the css, javascript:
npm run asset:build
or yarn asset:build
Preview
There are two ways to preview the static content in public
.
-
Just run
npm run server:start
oryarn server:start
-
Install package https://github.com/indexzero/http-server, go to
public
then run the commandhttp-server
.
Your web host
- Run the command
npm run build
oryarn build
- Upload the
public
to your web host.
Netlify
- On Netlify, setup up a new project from GitHub with the following settings:
- Build command
npm run build
oryarn build
- Public direcetory
public/
- Hit the deploy button.