BASSG - Basic Agile Static Site Generator
Project description
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.
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
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 bassg-1.2.6.tar.gz.
File metadata
- Download URL: bassg-1.2.6.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3845e9cae877c7b294e33968d7d85a688c2a0d8a78b10ccefd6443bc7dcf5cff
|
|
| MD5 |
96e7cfdbea554d8587be91bc741b5724
|
|
| BLAKE2b-256 |
36cbd6930e874b5445dd8c8e6ba6ae4bf3af60642e048a0dc2270a3f456ecdbf
|
File details
Details for the file bassg-1.2.6-py3-none-any.whl.
File metadata
- Download URL: bassg-1.2.6-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
079389d97c50b22b14bdee31db2d1ffb5f400f10d3e18a8160451ed6beea984a
|
|
| MD5 |
e3d0d79da869a0cdb547783985ca4679
|
|
| BLAKE2b-256 |
ef15512414e5a079de7b30c20cecf732d3acebc4f7028b4399e665423bd438c7
|