Static site generator
Project description
# stone
Yet another static website generator.
Used by half.systems
# Installation
pip install stone-site
# Usage
To get started with `stone`:
# Create template layout
stone example_site init --site-name 'example.com'
# Generate site
stone example_site generate
## Folder Structure
Site projects can be structured as you wish.
The layout which stone was developed along side is:
* root
* blog
* main
* templates
* templated HTML for blog and main
* site.json
As `site.json` is explicit about the location of templates and files, the
structure is flexible. You could locate separate template folder inside each
site or have one giant mess in your project root.
## Pages
The source markdown files should consist of simple markdown with a YAML header
that describe the attributes of the generated page including the page title and
the template it uses. For example:
```
template: base.html
title: TEST
# This is a header
Here is so lovely content.
```
There are additional attributes:
* date - Adds the date the page was create to the page metadata. This is
currently used when generating indexes for blogs. Format YYYY-MM-DD
## Templates
Templates support **jinja2**, an example:
`base.html`:
<html>
<head>
{% block head %}
<title>{{ title }}</title>
{% endblock %}
<head>
<body>
{% block body %}
<h1>{{ title }}</title>
<div id="post">
<!-- Most likely we are going to pass more html here --->
{{ content|safe }}
</div>
{% endblock %}
</body>
</html>
## Generating
To generate a particular site invoke `stone` with the location of the
project's root folder.
```
stone root_folder generate
```
### Example
An example project that generates an html version of this README can be found in
the example folder.
You can build it by running:
```
stone example generate
```
Yet another static website generator.
Used by half.systems
# Installation
pip install stone-site
# Usage
To get started with `stone`:
# Create template layout
stone example_site init --site-name 'example.com'
# Generate site
stone example_site generate
## Folder Structure
Site projects can be structured as you wish.
The layout which stone was developed along side is:
* root
* blog
* main
* templates
* templated HTML for blog and main
* site.json
As `site.json` is explicit about the location of templates and files, the
structure is flexible. You could locate separate template folder inside each
site or have one giant mess in your project root.
## Pages
The source markdown files should consist of simple markdown with a YAML header
that describe the attributes of the generated page including the page title and
the template it uses. For example:
```
template: base.html
title: TEST
# This is a header
Here is so lovely content.
```
There are additional attributes:
* date - Adds the date the page was create to the page metadata. This is
currently used when generating indexes for blogs. Format YYYY-MM-DD
## Templates
Templates support **jinja2**, an example:
`base.html`:
<html>
<head>
{% block head %}
<title>{{ title }}</title>
{% endblock %}
<head>
<body>
{% block body %}
<h1>{{ title }}</title>
<div id="post">
<!-- Most likely we are going to pass more html here --->
{{ content|safe }}
</div>
{% endblock %}
</body>
</html>
## Generating
To generate a particular site invoke `stone` with the location of the
project's root folder.
```
stone root_folder generate
```
### Example
An example project that generates an html version of this README can be found in
the example folder.
You can build it by running:
```
stone example generate
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
stone-site-0.1a1.dev3.tar.gz
(5.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stone-site-0.1a1.dev3.tar.gz.
File metadata
- Download URL: stone-site-0.1a1.dev3.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28006350fb8dfa67b526da253475b0f727702afcc3e2cd43328d9201203470da
|
|
| MD5 |
d29139b4f047e09a7568c5df0f269ec6
|
|
| BLAKE2b-256 |
3a4dcef74b3d32ff2ef023123ec9282356eb3eb357d95647fa930de62582e61c
|
File details
Details for the file stone_site-0.1a1.dev3-py2.py3-none-any.whl.
File metadata
- Download URL: stone_site-0.1a1.dev3-py2.py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9db05489fc7645b4757fc1f216f716582d30bb0cd2b5d91538e880bdfc64102
|
|
| MD5 |
d45fdc8c1a4a8512d15a11948673d81e
|
|
| BLAKE2b-256 |
a652e1d6625be6f669f187a49f303a2988e2ebda344d44887c574a27f5008771
|