Static site generator made by TypeScript & Node.js.
npm install -g ritsu
Or use from source
git clone https://github.com/H2O-2/ritsu.git cd ritsu/dist node index [command]
Ritsu comes with a full set of command-line tool.
ritsu init [blog-name] ritsu i [blog-name]
This command will initialize a blog directory. If no blog name specified, the directory name will default to
Create a new post.
ritsu new <post> [template] ritsu n <post> [template]
This command will create a new empty post. If no template is specified, Ritsu will use template named default.md in the
templates directory. You can find the created post in
drafts directory and start writing!
Publish your post.
$ ritsu publish <post> [date] $ ritsu p <post> [date]
This command will publish your post. Note that only published posts can be generated. If no date is specified (for the formate of the date see https://momentjs.com/docs/#/displaying/) then ritsu will use current time. You can find the published post in
Delete your post.
ritsu delete <post> ritsu d <post>
This command will delete your published post and move the deleted post to
trash directory. If you want to recover the post, please move the post to the
drafts directory first, then run
ritsu publish again.
$ ritsu generate [directory-name] $ ritsu g [directory-name]
This command will build all EJS and style files and generate your blog. If no directory name is specified, the directory name will default to
Note: Use this command only if it's the first time your are generating your site or have made changes to configs and styles. Otherwise ritsu update is faster.
Purge generated blog.
$ ritsu purge <generated-directory>
This command will remove the site generated by
$ ritsu update [generated-directory]
This command will update the blog with your new posts and keep other componenets (e.g. style) intact, thus faster than
Deploy blog to GitHub.
ritsu deploy [generated-directory]
This command will deploy your blog to GitHub. Remember to specify your GitHub info in
Note: If you are encountering problems with
node-sassmodule, modify your npm permission according to instructions here.
There are two configuration files for Ritsu:
For detailed information, see comments written in each file.
加载 Disqus 评论