iredmail-doc/USAGE.md

68 lines
2.1 KiB
Markdown
Raw Normal View History

# How to write documents with Markdown
2014-09-17 08:42:48 -05:00
2014-09-20 08:28:32 -05:00
* Organize articles in directories, each directory is a chapter.
2016-04-22 00:13:31 -05:00
* Order of chapters is hard-coded in file `convert.sh` (parameter
`all_chapter_dirs`), so that we can avoid complex/unnecessary way to order them.
2014-09-20 08:28:32 -05:00
* Chapter title is defined in file `_title.md` under chapter folder.
2014-10-08 07:44:06 -05:00
* Chapter summary is defined in file `_summary.md` under chapter folder.
2015-01-04 10:17:26 -06:00
* Additional links stored in file `_links.md` will be appended to chapter.
2014-09-20 08:28:32 -05:00
```
2016-04-22 00:13:31 -05:00
|- <language>/
|- _lang.md: Full name of the language. REQUIRED. e.g. `English` for `en_US`.
|- chapter_name_1/
|- _title.md: Chapter title. REQUIRED
|- _links.md: Additional links, will be appended to chapter. OPTIONAL
|- _summary.md: Summary text of this chapter, will be displayed under
chapter title. OPTIONAL
|- what_is_iredmail.md
|- why_choose_iredmail.md
|- chapter_name_2/
|- ...
|- chapter_name_3/
|- ...
|- ...
2014-09-20 08:28:32 -05:00
- html/css/markdown.css
- html/images/
```
2014-10-08 07:44:06 -05:00
* Articles will be ordered automatically, if you want to specify the order,
prepend a digit number and `-` in article files, script `convert.sh` will
remove this prefix during converting Markdown source file to HTML file. e.g.
2016-09-02 07:05:24 -05:00
* The first line in article file will be used as article title. Note: it must
be the first line in file, not the first non-empty line.
2014-09-17 08:42:48 -05:00
```
2014-10-08 07:44:06 -05:00
- chapter_name_x/
2014-09-17 08:42:48 -05:00
|- _title.md
|- 1-what_is_iredmail.md
|- 2-why_choose_iredmail.md
|- 3-price.md
2014-12-03 21:11:39 -06:00
...
|- 0-hidden_article.md
2014-09-17 08:42:48 -05:00
```
2014-12-03 21:11:39 -06:00
* If you don't want to show an article in index page, prepend `0-` in its
file name as shown above.
2014-10-08 07:44:06 -05:00
* Run script `convert.sh` to convert Markdown files to HTML static files.
* It will generate index file `html/index.html` which includes all articles
with relative links to HTML files.
* it also generates README.md file used by bitbucket.org as index page.
2014-09-17 08:42:48 -05:00
```bash
$ bash convert.sh
```
2016-04-21 23:37:35 -05:00
To recompile all files, append flag `--all`:
```bash
$ bash convert.sh --all
```
## Required Python modules
* markdown
* markdown_checklist