Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add docs, fixes #181 #183

Merged
merged 1 commit into from
Jan 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Harmonic is being developed with some goals:
- Create the JS Rocks website with Harmonic!
(Actually, the website is already online: [JS Rocks](http://jsrocks.org/))

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

## Installing

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

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

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

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

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

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

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

## Contributing
See the [Contributing guide](https://github.com/JSRocksHQ/harmonic/blob/master/CONTRIBUTING.md).
See the [Contributing guide](CONTRIBUTING.md).
7 changes: 7 additions & 0 deletions doc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Documentation

[Installing](installing.md)
[Config](config.md)
[Blogging](blogging.md)
[Markdown Header](markdown-header.md)
[Themes](themes.md)
59 changes: 59 additions & 0 deletions doc/blogging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Blogging

Harmonic follow the pattern of others static site generators you may know.
You must write your posts in [Markdown](http://daringfireball.net/projects/markdown/) format.

## New post:
```
harmonic new_post "Hello World"
```
![New Post](img/new_post.png)

After running **_new_post_**, the markdown file will be generated in _**/src/posts/**_ folder.

### Markdown header
The markdown file have a header which defines the post meta-data.
Example:
```markdown
<!--
layout: post
title: hello world
date: 2014-05-17T08:18:47.847Z
comments: true
published: true
keywords: JavaScript, ES6
description: Hello world post
categories: JavaScript, ES6
authorName: Jaydson
-->
```
You can check all possible header values in the [header page](markdown-header.md).

### Markdown content
Everything after the header is the post content.
Example:
```markdown
# Hello World
This is my awesome post using [harmonic](https://github.com/es6rocks/harmonic).

This is a list:
- Item 1
- Item 2
- Item 3
```
The code above will be parsed to something like this:
```html
<h1 id="hello-world">Hello World</h1>
<p>
This is my awesome post using
<a href="https://github.com/es6rocks/harmonic">harmonic</a>.
</p>
<p>This is a list: </p>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
```

[<<< Config](config.md) | [Markdown Header >>>](markdown-header.md)
139 changes: 139 additions & 0 deletions doc/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# Config

The Harmonic config file is a simple JSON object.
You can configure your static website with the CLI _config_ command:
```shell
harmonic config
```
![Config](img/config.png)

Feel free to open and change your harmonic config file, actually some of these configurations aren't available on the command line helper.
So, let's check the full config file:
<table>
<tr>
<td>
<strong>key</strong>
</td>
<td>
<strong>value</strong>
</td>
<td>
<strong>example</strong>
</td>
</tr>
<tr>
<tr>
<td>
name
</td>
<td>
The name of your website
</td>
<td>
<i>My awesome blog</i>
</td>
</tr>
<tr>
<td>
title
</td>
<td>
The title of your webiste
</td>
<td>
<i>My awesome title</i>
</td>
</tr>
<tr>
<td>
domain
</td>
<td>
The domain of your website - NOT IMPLEMENTED YET*
</td>
<td>
<i>http://es6rocks.com</i>
</td>
</tr>
<tr>
<td>
subtitle
</td>
<td>
The subtitle of your website - NOT IMPLEMENTED YET*
</td>
<td>
<i>My awesome subtitle</i>
</td>
</tr>
<tr>
<td>
author
</td>
<td>
Your name
</td>
<td>
<i>John da Silva</i>
</td>
</tr>
<tr>
<td>
keywords
</td>
<td>
The keywords of the page or post - NOT IMPLEMENTED YET*
</td>
<td>
<i>JavaScript, HTML5, CSS3</i>
</td>
</tr>
<tr>
<td>
description
</td>
<td>
Some description of your website
</td>
<td>
<i>Just a description</i>
</td>
</tr>
<tr>
<td>
template
</td>
<td>
The template you choose to use
</td>
<td>
<i>default</i>
</td>
</tr>
<tr>
<td>
posts_permalink
</td>
<td>
The posts permalink of your website
</td>
<td>
<i>:year/:month/:title</i>
</td>
</tr>
<tr>
<td>
pages_permalink
</td>
<td>
The pages permalink of your website
</td>
<td>
<i>pages/:title</i>
</td>
</tr>
</table>

All this information are available in any template as _**config**_.

[<<< Installing](installing.md) | [Blogging >>>](blogging.md)
Binary file added doc/img/config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/img/harmonic-cli.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/img/new_post.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions doc/installing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Installing

## Prerequirements

- Node.js >= 0.10 or io.js.
- npm.

## Simple installation

Harmonic is available on npm:

```shell
npm install harmonic -g
```

## Bleeding edge installation

You can install Harmonic directly from the GitHub repository:

```shell
git clone https://github.com/es6rocks/harmonic.git
cd harmonic
npm link
```

If everything is ok, you can type `harmonic` in your terminal, and you will get the harmonic menu:
![Harmonic CLI](img/harmonic-cli.png)

[<<< Index](README.md) | [Config >>>](config.md)
82 changes: 82 additions & 0 deletions doc/markdown-header.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Markdown header

The markdown header is the metadata for your post or page.
Let's check all available options harmonic have:
<table>
<tr>
<td>
layout
</td>
<td>
The layout of the file (post|page) - NOT IMPLEMENTED YET*
</td>
</tr>
<tr>
<td>
title
</td>
<td>
The title of your post or page
</td>
</tr>
<tr>
<td>
date
</td>
<td>
The date in JSON format (Ex: new Date().toJSON())
</td>
</tr>
<tr>
<td>
comments
</td>
<td>
If the page or post have comments enabled - NOT IMPLEMENTED YET*
</td>
</tr>
<tr>
<td>
published
</td>
<td>
If the page or post is available online - NOT IMPLEMENTED YET*
</td>
</tr>
<tr>
<td>
keywords
</td>
<td>
The keywords of the page or post - NOT IMPLEMENTED YET*
</td>
</tr>
<tr>
<td>
description
</td>
<td>
The post/page description
</td>
</tr>
<tr>
<td>
categories
</td>
<td>
The categories
</td>
</tr>
<tr>
<td>
authorName
</td>
<td>
The authorName
</td>
</tr>
</table>

NOT IMPLEMENTED YET means the default theme doesn't support those features.

[<<< Blogging](blogging.md) | [Themes >>>](themes.md)
Loading