Add example folder

This commit is contained in:
uid 2017-11-17 10:42:46 +01:00
parent 104006503e
commit 2a2daaa42d
3 changed files with 28 additions and 46 deletions

View File

@ -1,53 +1,17 @@
# Ciclostile
## TODO
- select input and output folders and template by parameters or config file.
## Example
Input markdown:
```markdown
Title: Home Page
# Site
Some text
To install dependencies:
```
pip install -r requirements.txt
```
Look at the `example` folder to see how to setup a project.
Template:
```html
<!DOCTYPE html>
<html>
<head>
<title>{{ title }}</title>
</head>
<body>
{{ content }}
</body>
</html>
To build the example:
```
cd example
mkdir target
../ciclostile.py
```
Output html:
```html
<!DOCTYPE html>
<html>
<head>
<title>Home Page</title>
</head>
<body>
<h1>Site</h1>
<p>Some text</p>
</body>
</html>
```
In the `target` folder should now appear `test.html`

8
example/markdown/test.md Normal file
View File

@ -0,0 +1,8 @@
Title: Home Page
Author: anon
# Site
Some text

10
example/template.html Normal file
View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>{{ title }}</title>
</head>
<body>
{{ content }}
</body>
</html>