Simple SSG
This is a very simple static site generator. It was made for one purpose alone: to decouple a static sites content from its document structure.
Install
To install the package run the following command:
pip install sssg
Use
Before running, you should create a pages.json file, and all template and content files references in it. Below is an example of how a directory structure might look.
├── pages.json
├── templates
| ├── home.html
| ├── ...
└── content
├── title.txt
├── ...
By default the path of the pages.json is named as such and located in the root directory. The base template and content directory are also as above, but all three can be configured with command line arguments. To see the list of arguments run the following command.
python -m sssg -h
Your pages.json file contents may look something like this:
[
{
"template": "./home.html",
"target": "./index.html",
"content": {
"title": "./title.txt"
}
}
]
For the example lets say your /templates/home.html file contents looks like this:
<!DOCTYPE html>
<html>
<head>
<title>{title}</title>
</head>
<body>
<h1>{title}</h1>
</body>
</html>
And lets say your /content/title.txt looks like this:
Test Title
Now run the following command:
python -m sssg
This will generate your static files, which will look like this:
...
└── static
├── index.html
├── ...
Where the contents of index.html is:
<!DOCTYPE html>
<html>
<head>
<title>Test Title</title>
</head>
<body>
<h1>Test Title</h1>
</body>
</html>
I hope this explains the basics of how to use sssg.
Metadata
Release files for sssg 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sssg-0.0.4.tar.gz | 15.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sssg-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.2 kB
Release files / sssg-0.0.4.tar.gz
| Download URL | sssg-0.0.4.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd7501c8a082d4632609250c9a8c28a62ab17515126216e24d6a673ac47b7fd3
|
|
BLAKE2b-256 checksum How to use checksums |
a383f877692ddea036736ff03904dcb5acc5f37b66ebe707dc13c6133c584bcb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / sssg-0.0.4-py3-none-any.whl
| Download URL | sssg-0.0.4-py3-none-any.whl |
|---|---|
| Size | 16.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9834fadfe4a61b70644854d34b5734ae2558f581a989e99bb61de8042a59400e
|
|
BLAKE2b-256 checksum How to use checksums |
1e23afc8176b39bd1be2276f0bcf4bd21ee3e42f570c702a06cd1074054a2485
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Security for sssg 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.