Add example folder
This commit is contained in:
parent
104006503e
commit
2a2daaa42d
56
README.md
56
README.md
|
@ -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
8
example/markdown/test.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
Title: Home Page
|
||||
Author: anon
|
||||
|
||||
|
||||
# Site
|
||||
|
||||
Some text
|
||||
|
10
example/template.html
Normal file
10
example/template.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ title }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{ content }}
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user