Metadata-Version: 2.4
Name: bass
Version: 1.4.0
Summary: Static site generator
Author-email: Nico Poppelier <n.poppelier@xs4all.nl>
License: Bass is a static website generator.
        Copyright (C) 2015-2024 Nico Poppelier
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of
        this software and associated documentation files (the "Software"), to deal in
        the Software without restriction, including without limitation the rights to
        use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
        of the Software, and to permit persons to whom the Software is furnished to do
        so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        The software is provided "as is", without warranty of any kind, express or
        implied, including but not limited to the warranties of merchantability,
        fitness for a particular purpose and noninfringement. In no event shall the
        authors or copyright holders be liable for any claim, damages or other
        liability, whether in an action of contract, tort or otherwise, arising from,
        out of or in connection with the software or the use or other dealings in the
        software.
        
Project-URL: Homepage, http://www.fransevoorouders.nl/bass
Project-URL: Repository, https://github.com/npoppeli/bass
Project-URL: Issues, https://github.com/npoppeli/bass/issues
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: chameleon>=3.0
Requires-Dist: markdown>=3.4
Requires-Dist: pyyaml>=5.1
Dynamic: license-file

Bass
====

Bass is a static website generator (Bass=Build A Static Site), written in
Python 3. It turns a collection of content pages, assets (PNG, CSS, JS etc.)
and templates into a static website, i.e. a website consisting only of
directories, HTML pages and the same assets. Bass is distributed under the MIT
license (see the LICENSE file for more details).

The idea behind a static site generator is that you don't need a
content-management system on the server to generate pages dynamically: you
generate the content, upload it to the server, and repeat this process when
something has changed. That way, there is no need to install complex software
on the server, with the associated maintenance effort (software upgrade,
backup) and security issues.

The design of Bass borrows ideas from [Wok][wok] and other static site
generators (see [overview][static]). Before I created Bass, I used Wok for
about a year, created two websites with it, and also looked at alternatives.
During that year I noticed several drawbacks, which led to the development of
Bass.

The most important feature of Bass is that it gives the user complete freedom
in organizing the input directory, considers this organization as meaningful,
and therefore preserves it in the site tree.  With organization of the input
directory I mean: (1) the structure of the tree of files and sub-directories in
the input directory, and (2) the names of files and sub-directories. This
concept was borrowed from [Wintersmith][wintersmith]. Other static site
generators are designed primarily for blog sites, and use an input directory
with a fixed structure, or completely ignore the structure of the input
directory, creating the structure of the site tree from metadata (Wok for
example).

Other features that were added: extension through generic event mechanism
(inspired by [Pelican][pelican] and Wok); use of template engines other than
Jinja; ignoring specified files in the content directory (e.g. Emacs backup
files); flexible pagination.

[wok]: https://github.com/mythmon/wok
[static]: https://www.staticgen.com/
[wintersmith]: https://github.com/jnordberg/wintersmith
[pelican]: https://github.com/getpelican/pelican

Documentation
-------------

Documentation is in the `doc` directory.
An example site is in the `test` directory.

Installation
------------

The recommended way to install Bass is from the [Python Package Index][pypi]
with this command: `sudo pip install bass`.

[pypi]: http://pypi.python.org/pypi

### Dependencies

All dependencies are available through pip. Although optional, you should at
least install one of the following three tools:

- *Markdown* (*Markdown2* is an alternative)
- *Docutils*
- *Textile*

If you install with pip, *Markdown2* will be installed automatically.

#### Required

- *pyyaml*
- *Chameleon*

#### Optional

- *Markdown* or *Markdown2*, for rendering Markdown documents.
- *Docutils*, for rendering ReStructuredText documents.
- *Textile*, for rendering Textile documents.
- *WebOb*, for a more advanced web server.
- *Waitress*, for a faster web server.

Usage
-----

To use Bass, go to the project directory (the directory where the input files
and generated site will be located), and run the command `bass -c` or `bass
--create`. This will create a basic directory structure and corresponding
configuration file. You can change the names of the directories, provided you
apply the changes in the configuration file as well.

Put your content in the input directory (default: `input`). Build the site with
`bass -b` or `bass --build`. If you want to see debugging information, use
`bass -b -d` or `bass --build --debug`.

If you add the option `-s` or `--serve`, Bass will generate the site as usual,
and then start a simple web server on port 8080. This web server is intended
solely for local testing of the site during the development phase.

If the Python package *WebOb* is available, a slightly more advanced server
(WSGI) is made available. This server checks for changes in the `input` and
`layout` directories (see the manual) whenever a page is requested. If it
detects a change in either of these directories, the site is regenerated before
the page is returned. If the Python package *Waitress* is also installed, this
WSGI-based server is replaced with a faster one.

About
-----

Bass is written by Nico Poppelier and licensed under the MIT license.

The name is just another acronym. Several other site generators (e.g. Wok,
Wintersmith, Jekyll, Pelican, StrangeCase) inspired this project.
