Skip to main content

Static site generator

Project description

# Stone

Yet another static website generator.

Used by (www|blog).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
# Add a new page
stone example_site newpage --name "About Us"


## Folder Structure

Stone is designed to generate the subdomains of half.systems. The following is
the layout of the sites:


.
├── blog
│   └── ...
├── main
│   └── ...
├── site.json
└── templates
└── ...


[`site.json` is very flexiable](docs/site-json.md) about the location of
templates and files. As such your not constrained to any particular layout for
your site. You could have separate template folders inside each site or have
one giant mess in your project root.


## Pages

Pages are Markdown files with some optional YAML metadata
that describe the attributes of the generated page including the page title and
the template it uses. For example:


```
---
template: base.html
title: Hello, World

# This is a header

Here is some lovely content.
```

Stone makes all metadata available to page templates. Any data templates may use
can be embedded into a page. For exampled the data, an authors name and email,
etc.


## Templates

Templates are HTML pages with **[jinja2](http://jinja.pocoo.org)** markup.

`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


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.1a5.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stone_site-0.1a5-py2.py3-none-any.whl (11.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file stone-site-0.1a5.tar.gz.

File metadata

  • Download URL: stone-site-0.1a5.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for stone-site-0.1a5.tar.gz
Algorithm Hash digest
SHA256 bbda4dd3d737cb526a03b36e637379902d78b2728f3a141861fafe192bd4f0c1
MD5 792ef7c3ad74c7c93ca34fd3a9f8c77e
BLAKE2b-256 37e7b49d8ba2ebdace56173a11a81fc4e82509f1c2b8ba32cbf2ef9455db59dd

See more details on using hashes here.

File details

Details for the file stone_site-0.1a5-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for stone_site-0.1a5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8dc8c272cf0a0002e3697a9e882f35ab1304c35fe16d5040fd7eef567f7769ab
MD5 f97cdd792c0c6540793e22d5c1dc90b1
BLAKE2b-256 20dc9bf51331250dd52b8dc83fdc2fbba847161e456a7488ae92b08c22b7cff4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page