Skip to main content

Another SSG

Project description

htsg - another SSG

"htsg" is a minimal SSG (Static Site Generator).
This helps creating PURE HTML sites.

Requirements

  • Python3 (3.6+)

Install

pip install htsg

Usage

Here is a brief explanation. Also read the source.

Example

visit example

Generate site

Run in shell:

htsg

Run htsg -h to show more options.

Or, you can use in Python script:

import htsg

astdir = "./assets"
tpldir = "./templates"
distdir = "./dist"
cfgfile = "./config.toml"

htsg.generate(astdir, tpldir, distdir, cfgfile)

Run development server

For developping, htsg has HTTP server. It watches files and regenerates site when sources changed.
Run in shell:

htsg -s

Run htsg -h to show more options.

Or, in Python script:

import htsg

host = "0.0.0.0"
port = 8000
astdir = "./assets"
tpldir = "./templates"
distdir = "./dist"
cfgfile = "./config.toml"

htsg.serve(host, port, astdir, tpldir, distdir, cfgfile)

Release note

v1.0.0 (2022/05/13)

Initial release

License

This project is under the MIT-License.
See also LICENSE.

Author

Laddge

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

htsg-1.0.0.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distribution

htsg-1.0.0-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

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