Skip to content
Open
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: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -81,9 +81,7 @@ For example:
</body>
</html>

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.

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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:

Expand Down