From ec2a611cc9c7c350ab5cf89790c3a36038fe7c87 Mon Sep 17 00:00:00 2001 From: Zhang Huangbin Date: Wed, 8 Oct 2014 20:44:06 +0800 Subject: [PATCH] Sync USAGE.md. --- USAGE.md | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/USAGE.md b/USAGE.md index fef2e1e7..1b45a941 100644 --- a/USAGE.md +++ b/USAGE.md @@ -1,35 +1,44 @@ # How to write ebooks with Markdown * Organize articles in directories, each directory is a chapter. +* Order of chapters is hard-coded in file `convert.sh`, so that we can avoid + complex/unnecessary way to order them. * Chapter title is defined in file `_title.md` under chapter folder. +* Chapter summary is defined in file `_summary.md` under chapter folder. +* Addition links stored in file `_links.md` will be appended to chapter. ``` -- 1-introduction/ - |- _title.md +- chapter_name_1/ + |- _title.md: Chapter title. REQUIRED + |- _links.md: Addition 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 - |- price.md -- 2-faq/ -- 3-install/ +- chapter_name_2/ +- chapter_name_3/ ... - html/css/markdown.css - html/images/ ``` -* Articles will be ordered automatically, if you want to force the order, - prepend a digit number and `-` in article files. e.g. +* 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. ``` -- 1-introduction/ +- chapter_name_x/ |- _title.md |- 1-what_is_iredmail.md |- 2-why_choose_iredmail.md |- 3-price.md ``` -* Convert all Markdown files to HTML static files. Script `convert.sh` will -also generate index file `html/index.html` (which includes all articles with -valid internal links). +* 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. ```bash $ bash convert.sh