BASSG
BASSG (Basic Agile Static Site Generator) is a simple and easy to use static site generator for quickly creating static websites using Jinja2 templating and Markdown.
Features:
- Jinja2 templating
- Markdown
- Custom assets & site folder structure
- Easy to use conventions for creating pages, templates, and markdown
Installing
$ pip install bassg
I would recommend installing BASSG in a virtual environment. This allows you to access BASSG using the "bassg" entry point:
$ bassg --help
Otherwise, BASSG can be accessed with python directly:
$ python -m bassg --help
Usage
If you need help with a command, run:
$ bassg <command> --help
to see the help menu for that command.
Create the project directory:
$ bassg create <project_name>
This will create the folder structure in the current directory (root):
📦project_name
┣ 📂build
┃ ┣ 📂assets
┃ ┣ 📂config
┃ ┣ 📂markdown
┃ ┗ 📂templates
┗ 📂site
Generating the site:
$ bassg generate <project_name>
This will compile all of the html files in the build/ directory using Jinja2 and Markdown
Creating and using templates:
Place Jinja2 templates in the templates/ directory. Any html files in the base build/ directory that include these templates will be rendered accordingly.
Using markdown:
If you want to use markdown in your site, create a file_name.md file with the same file name as the html page you want to insert it in. Place this file in the build/markdown/ directory. The parsed markdown data will be passed into the Jinja2 parser as 'markdown'. If you wish to have multiple markdown files per page, you can use the naming convention:
file_name0.md
file_name1.md
...
These can then be accesed in the file_name.html file as markdown[0], markdown[1], etc.
Per-page config (json) files:
You can create (optional) configuration files for individual pages with a similar syntax to creating markdown files. Any file_name.json files with the same file name as an html page in the build/ directory will be passed in through the Jinja2 parser.
For example:
file_name.json:
{
"title": "Documentation",
"date": "08/22/2021",
"language": "English",
"folder_struct": "docs"
}
All of these variables will be passed into the Jinja2 parser for file_name.html.
The special attribute folder_struct tells BASSG which folder to place the page in when it generates the site. In this example, the generated file_name.html file will be placed in the site/docs/ folder. This can be used to easily organize the pages of your site.
Metadata
Release files for bassg 1.2.6
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 | |
|---|---|---|---|---|
| bassg-1.2.6.tar.gz | 5.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bassg-1.2.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.8 kB
Release files / bassg-1.2.6.tar.gz
| Download URL | bassg-1.2.6.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3845e9cae877c7b294e33968d7d85a688c2a0d8a78b10ccefd6443bc7dcf5cff
|
|
BLAKE2b-256 checksum How to use checksums |
36cbd6930e874b5445dd8c8e6ba6ae4bf3af60642e048a0dc2270a3f456ecdbf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.7
|
Release files / bassg-1.2.6-py3-none-any.whl
| Download URL | bassg-1.2.6-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
079389d97c50b22b14bdee31db2d1ffb5f400f10d3e18a8160451ed6beea984a
|
|
BLAKE2b-256 checksum How to use checksums |
ef15512414e5a079de7b30c20cecf732d3acebc4f7028b4399e665423bd438c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.7
|
Security for bassg 1.2.6
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.