UNPKG

1.84 kBMarkdownView Raw
1Hikaru
2======
3
4A static site generator that generates routes based on directories naturally.
5-----------------------------------------------------------------------------
6
7[![npm](https://img.shields.io/npm/v/hikaru-coffee.svg?style=for-the-badge)](https://www.npmjs.com/package/hikaru-coffee)
8[![npm](https://img.shields.io/npm/dt/hikaru-coffee.svg?style=for-the-badge)](https://www.npmjs.com/package/hikaru-coffee)
9[![GitHub](https://img.shields.io/github/license/AlynxZhou/hikaru.svg?style=for-the-badge)](https://github.com/AlynxZhou/hikaru/blob/master/LICENSE)
10
11# Install
12
13Hikaru is a command line program (not a module) and you can install it from NPM:
14
15```
16# npm i -g hikaru-coffee
17```
18
19# Setup site
20
21```
22$ hikaru i hikaru-site
23$ cd hikaru-site
24$ npm install
25```
26
27# Install theme
28
29## Clone theme
30
31Using `hikaru-theme-aria` as example:
32
33```
34$ git clone https://github.com/AlynxZhou/hikaru-theme-aria.git themes/aria
35```
36
37Or if you want commit the whole site you can use submodule:
38
39```
40$ git submodule add https://github.com/AlynxZhou/hikaru-theme-aria.git themes/aria
41```
42
43## Edit config
44
45```
46$ $EDITOR config.yml
47```
48
49Set `themeDir` to `aria`
50
51```yaml
52themeDir: aria
53```
54
55Don't forget to config your theme as its README file.
56
57# Create src file
58
59## Edit file
60
61```
62$ $EDITOR srcs/my-first-post.md
63```
64
65## Add front matter
66
67```yaml
68---
69title: My First Post
70date: 2018-08-08 09:27:00
71layout: post
72---
73```
74
75## Add content
76
77```markdown
78Some content...
79
80<!--more-->
81
82# This is my first post!
83```
84
85# Start live server
86
87```
88$ hikaru s
89```
90
91# Build static files
92
93```
94$ hikaru b
95```
96
97# More
98
99Docs: [Here](docs/en/index.md)(Needs to update)
100
101Default theme ARIA: [hikaru-theme-aria](https://github.com/AlynxZhou/hikaru-theme-aria/)
102
103My blog built with Hikaru and ARIA: [喵's StackHarbor](https://sh.alynx.moe/)
104
105# License
106
107[Apache-2.0](LICENSE)