diff --git a/README.md b/README.md index eaccb5c..247d09b 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ To use SwBuilder, install the following dependencies first: Not all the dependencies are required, it depends on what feature you use. -### Getting Started +(-) Getting Started 1. Put the SConstruct file in the directory of your website sources. The output files will be generated in the `deploy` folder, and temporary files in the `temp` folder. @@ -61,7 +61,7 @@ Not all the dependencies are required, it depends on what feature you use. 4. Run `scons` to build your website. -### Creating Templates +(-) Creating Templates A template is just a text file with extension `template` or `blog_template`. You need to define the place to put page content by writing `{{content}}` in the template. @@ -81,9 +81,7 @@ For example: -Each page has its contents and metadata, you can use `{{key}}` to refer them in your template or pages. - -### Creating Pages +Each page has its contents and metadata, you can use `{{key}}` to refer them in your temp(-) Creating Pages A page can be defined by a html file or a markdown file. @@ -113,7 +111,7 @@ If your website is not directly under a domain, it's difficult to reference page Static Website Builder provides a useful `{{ref: path}}` directive, as well as `{{js: path}}`, they will be replaced with the actual path (relative to current page) in the build process. For example, `{{ref: a.html}}` will be replaced as `a.html` in `b.html`, but `../a.html` in `folder/b.html`. -### SConstruct +(-) SConstruct First you should import SwBuilder. Copy `site_scons` to your project, and write the following code at the beginning of your SConstruct. @@ -145,9 +143,7 @@ Use TargetList and Find to defined targets by wildcard matching. Define a concatenated and minified Javascript/CSS file: Javascript("target.js", ["source1.js", "source2.js"]) - CSS("target.css", ["source1.css", "source2.css"]) - -### Blog Support + CSS("target.css", ["source1.css", Blog Support To define blog posts, first call BlogInit: @@ -196,7 +192,7 @@ Finally, generate articles and lists: BlogGenerateList("blog/index.html", "template.blog_template") BlogGenerateTags("blog/index.html", "template.blog_template") -### Math Support +(-) Math Support Use HTML comments to create math formulas: