Skip to content

Commit 1e50201

Browse files
committed
add docs, fixes #181
This is part of the docs migration from the Wiki to the main repository. (#181) I've renamed the "Home" doc page to README so it is shown when you open the repository's [`doc` directory on GitHub](https://github.com/JSRocksHQ/harmonic/tree/doc/doc). (note: I'll erase this branch after merging, if you are reading the commit history then replace "doc/doc" with "master/doc") Please test to see if all the documentation's links are working properly. I've fixed a few typos and broken links in this migration as well. Side-note: I've removed the "LICENSE" from the `package.json`'s `files` array as the LICENSE file is always included regardless of settings (https://docs.npmjs.com/files/package.json#files).
1 parent 81979ae commit 1e50201

File tree

11 files changed

+478
-9
lines changed

11 files changed

+478
-9
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Harmonic is being developed with some goals:
1313
- Create the JS Rocks website with Harmonic!
1414
(Actually, the website is already online: [JS Rocks](http://jsrocks.org/))
1515

16-
Check out the full documentation in [Harmonic's Wiki](https://github.com/JSRocksHQ/harmonic/wiki/).
16+
Check out the full [Harmonic documentation](doc).
1717

1818
## Installing
1919

@@ -22,7 +22,7 @@ Harmonic is available on npm:
2222
```shell
2323
npm install harmonic -g
2424
```
25-
For more details, check out the full documentation: [Installing](https://github.com/JSRocksHQ/harmonic/wiki/Installing)
25+
For more details, check out the full documentation: [Installing](doc/installing.md)
2626

2727
## Init
2828
First thing you will need to do is to initialize a new Harmonic website.
@@ -32,7 +32,7 @@ harmonic init [PATH]
3232
```
3333
[PATH] is your website dir. The default path is the current dir.
3434
Harmonic will prompt you asking for some data about your website:
35-
![Config](https://raw.githubusercontent.com/wiki/JSRocksHQ/harmonic/img/config.png)
35+
![Config](doc/img/config.png)
3636

3737
Harmonic will then generate a config file, which is a simple JSON object.
3838
Any time you want, you can configure your static website with the CLI `config` command:
@@ -41,7 +41,7 @@ cd [PATH]
4141
harmonic config
4242
```
4343
Now, enter in your website dir and you are ready to start [creating posts](#blogging)!
44-
For more details, check out the full documentation: [Config](https://github.com/JSRocksHQ/harmonic/wiki/Config/)
44+
For more details, check out the full documentation: [Config](doc/config.md)
4545

4646
## Blogging
4747
Harmonic follows the same pattern as others static site generators that you may know.
@@ -52,7 +52,7 @@ You must write your posts in [Markdown](http://daringfireball.net/projects/markd
5252
cd your_awesome_website
5353
harmonic new_post "Hello World"
5454
```
55-
![New Post](https://raw.githubusercontent.com/wiki/JSRocksHQ/harmonic/img/new_post.png)
55+
![New Post](doc/img/new_post.png)
5656

5757
After running `new_post`, a markdown file will be generated in the `/src/posts/[lang]` folder, ready for editing.
5858

@@ -72,7 +72,7 @@ categories: JavaScript, ES2015
7272
authorName: Jaydson
7373
-->
7474
```
75-
You can check all possible header values in the [header page](https://github.com/JSRocksHQ/harmonic/wiki/markdown-header).
75+
You can check all possible header values in the [header page](doc/markdown-header.md).
7676

7777
#### Markdown content
7878
Everything after the header is the post content.
@@ -100,7 +100,7 @@ The code above will be parsed to something like this:
100100
<li>Item 3</li>
101101
</ul>
102102
```
103-
For more details, you can check the full documentation: [Blogging](https://github.com/JSRocksHQ/harmonic/wiki/Blogging).
103+
For more details, you can check the full documentation: [Blogging](doc/blogging.md).
104104
## New Page
105105
```
106106
cd your_awesome_website
@@ -132,4 +132,4 @@ harmonic --help
132132
```
133133

134134
## Contributing
135-
See the [Contributing guide](https://github.com/JSRocksHQ/harmonic/blob/master/CONTRIBUTING.md).
135+
See the [Contributing guide](CONTRIBUTING.md).

doc/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Documentation
2+
3+
[Installing](installing.md)
4+
[Config](config.md)
5+
[Blogging](blogging.md)
6+
[Markdown Header](markdown-header.md)
7+
[Themes](themes.md)

doc/blogging.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Blogging
2+
3+
Harmonic follow the pattern of others static site generators you may know.
4+
You must write your posts in [Markdown](http://daringfireball.net/projects/markdown/) format.
5+
6+
## New post:
7+
```
8+
harmonic new_post "Hello World"
9+
```
10+
![New Post](img/new_post.png)
11+
12+
After running **_new_post_**, the markdown file will be generated in _**/src/posts/**_ folder.
13+
14+
### Markdown header
15+
The markdown file have a header which defines the post meta-data.
16+
Example:
17+
```markdown
18+
<!--
19+
layout: post
20+
title: hello world
21+
date: 2014-05-17T08:18:47.847Z
22+
comments: true
23+
published: true
24+
keywords: JavaScript, ES6
25+
description: Hello world post
26+
categories: JavaScript, ES6
27+
authorName: Jaydson
28+
-->
29+
```
30+
You can check all possible header values in the [header page](markdown-header.md).
31+
32+
### Markdown content
33+
Everything after the header is the post content.
34+
Example:
35+
```markdown
36+
# Hello World
37+
This is my awesome post using [harmonic](https://github.com/es6rocks/harmonic).
38+
39+
This is a list:
40+
- Item 1
41+
- Item 2
42+
- Item 3
43+
```
44+
The code above will be parsed to something like this:
45+
```html
46+
<h1 id="hello-world">Hello World</h1>
47+
<p>
48+
This is my awesome post using
49+
<a href="https://github.com/es6rocks/harmonic">harmonic</a>.
50+
</p>
51+
<p>This is a list: </p>
52+
<ul>
53+
<li>Item 1</li>
54+
<li>Item 2</li>
55+
<li>Item 3</li>
56+
</ul>
57+
```
58+
59+
[<<< Config](config.md) | [Markdown Header >>>](markdown-header.md)

doc/config.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Config
2+
3+
The Harmonic config file is a simple JSON object.
4+
You can configure your static website with the CLI _config_ command:
5+
```shell
6+
harmonic config
7+
```
8+
![Config](img/config.png)
9+
10+
Feel free to open and change your harmonic config file, actually some of these configurations aren't available on the command line helper.
11+
So, let's check the full config file:
12+
<table>
13+
<tr>
14+
<td>
15+
<strong>key</strong>
16+
</td>
17+
<td>
18+
<strong>value</strong>
19+
</td>
20+
<td>
21+
<strong>example</strong>
22+
</td>
23+
</tr>
24+
<tr>
25+
<tr>
26+
<td>
27+
name
28+
</td>
29+
<td>
30+
The name of your website
31+
</td>
32+
<td>
33+
<i>My awesome blog</i>
34+
</td>
35+
</tr>
36+
<tr>
37+
<td>
38+
title
39+
</td>
40+
<td>
41+
The title of your webiste
42+
</td>
43+
<td>
44+
<i>My awesome title</i>
45+
</td>
46+
</tr>
47+
<tr>
48+
<td>
49+
domain
50+
</td>
51+
<td>
52+
The domain of your website - NOT IMPLEMENTED YET*
53+
</td>
54+
<td>
55+
<i>http://es6rocks.com</i>
56+
</td>
57+
</tr>
58+
<tr>
59+
<td>
60+
subtitle
61+
</td>
62+
<td>
63+
The subtitle of your website - NOT IMPLEMENTED YET*
64+
</td>
65+
<td>
66+
<i>My awesome subtitle</i>
67+
</td>
68+
</tr>
69+
<tr>
70+
<td>
71+
author
72+
</td>
73+
<td>
74+
Your name
75+
</td>
76+
<td>
77+
<i>John da Silva</i>
78+
</td>
79+
</tr>
80+
<tr>
81+
<td>
82+
keywords
83+
</td>
84+
<td>
85+
The keywords of the page or post - NOT IMPLEMENTED YET*
86+
</td>
87+
<td>
88+
<i>JavaScript, HTML5, CSS3</i>
89+
</td>
90+
</tr>
91+
<tr>
92+
<td>
93+
description
94+
</td>
95+
<td>
96+
Some description of your website
97+
</td>
98+
<td>
99+
<i>Just a description</i>
100+
</td>
101+
</tr>
102+
<tr>
103+
<td>
104+
template
105+
</td>
106+
<td>
107+
The template you choose to use
108+
</td>
109+
<td>
110+
<i>default</i>
111+
</td>
112+
</tr>
113+
<tr>
114+
<td>
115+
posts_permalink
116+
</td>
117+
<td>
118+
The posts permalink of your website
119+
</td>
120+
<td>
121+
<i>:year/:month/:title</i>
122+
</td>
123+
</tr>
124+
<tr>
125+
<td>
126+
pages_permalink
127+
</td>
128+
<td>
129+
The pages permalink of your website
130+
</td>
131+
<td>
132+
<i>pages/:title</i>
133+
</td>
134+
</tr>
135+
</table>
136+
137+
All this information are available in any template as _**config**_.
138+
139+
[<<< Installing](installing.md) | [Blogging >>>](blogging.md)

doc/img/config.png

46.7 KB
Loading

doc/img/harmonic-cli.png

42.7 KB
Loading

doc/img/new_post.png

22 KB
Loading

doc/installing.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Installing
2+
3+
## Prerequirements
4+
5+
- Node.js >= 0.10 or io.js.
6+
- npm.
7+
8+
## Simple installation
9+
10+
Harmonic is available on npm:
11+
12+
```shell
13+
npm install harmonic -g
14+
```
15+
16+
## Bleeding edge installation
17+
18+
You can install Harmonic directly from the GitHub repository:
19+
20+
```shell
21+
git clone https://github.com/es6rocks/harmonic.git
22+
cd harmonic
23+
npm link
24+
```
25+
26+
If everything is ok, you can type `harmonic` in your terminal, and you will get the harmonic menu:
27+
![Harmonic CLI](img/harmonic-cli.png)
28+
29+
[<<< Index](README.md) | [Config >>>](config.md)

doc/markdown-header.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Markdown header
2+
3+
The markdown header is the metadata for your post or page.
4+
Let's check all available options harmonic have:
5+
<table>
6+
<tr>
7+
<td>
8+
layout
9+
</td>
10+
<td>
11+
The layout of the file (post|page) - NOT IMPLEMENTED YET*
12+
</td>
13+
</tr>
14+
<tr>
15+
<td>
16+
title
17+
</td>
18+
<td>
19+
The title of your post or page
20+
</td>
21+
</tr>
22+
<tr>
23+
<td>
24+
date
25+
</td>
26+
<td>
27+
The date in JSON format (Ex: new Date().toJSON())
28+
</td>
29+
</tr>
30+
<tr>
31+
<td>
32+
comments
33+
</td>
34+
<td>
35+
If the page or post have comments enabled - NOT IMPLEMENTED YET*
36+
</td>
37+
</tr>
38+
<tr>
39+
<td>
40+
published
41+
</td>
42+
<td>
43+
If the page or post is available online - NOT IMPLEMENTED YET*
44+
</td>
45+
</tr>
46+
<tr>
47+
<td>
48+
keywords
49+
</td>
50+
<td>
51+
The keywords of the page or post - NOT IMPLEMENTED YET*
52+
</td>
53+
</tr>
54+
<tr>
55+
<td>
56+
description
57+
</td>
58+
<td>
59+
The post/page description
60+
</td>
61+
</tr>
62+
<tr>
63+
<td>
64+
categories
65+
</td>
66+
<td>
67+
The categories
68+
</td>
69+
</tr>
70+
<tr>
71+
<td>
72+
authorName
73+
</td>
74+
<td>
75+
The authorName
76+
</td>
77+
</tr>
78+
</table>
79+
80+
NOT IMPLEMENTED YET means the default theme doesn't support those features.
81+
82+
[<<< Blogging](blogging.md) | [Themes >>>](themes.md)

0 commit comments

Comments
 (0)