Metadata-Version: 2.4
Name: wt
Version: 3.0.0
Summary: Static site generator
Project-URL: Source code, https://codeberg.org/ysegorov/wt/
Project-URL: Documentation, https://codeberg.org/ysegorov/wt/src/branch/main/docs/
Author-email: Yuri Egorov <ysegorov@gmail.com>
License-File: LICENSE.txt
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Documentation
Classifier: Topic :: Text Processing
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: attrs>=26.1.0
Requires-Dist: cython>=3.2.5
Requires-Dist: httptools>=0.8.0
Requires-Dist: jinja2>=3.1.6
Requires-Dist: markdown-it-py[linkify,plugins]>=4.2.0
Requires-Dist: starlette==1.1.0
Requires-Dist: tomli-w>=1.2.0
Requires-Dist: uvicorn>=0.49.0
Requires-Dist: uvloop>=0.22.1
Requires-Dist: websockets>=16.0
Description-Content-Type: text/markdown

# wt - static site generator

![Logo](misc/logo96.png)

[![Current Version](https://img.shields.io/pypi/v/wt.svg?style=flat-square)][wt-pypi]
[![PyPI - License](https://img.shields.io/pypi/l/wt)][wt-pypi]
[![Python versions](https://img.shields.io/pypi/pyversions/wt)][wt-pypi]


## What

Yet another static site generator with following features:

- [markdown] for content
- [toml] for configuration
- [toml] for content [front-matter]
- [atom] for feed
- content pages pagination

Under the hood this project uses following python libraries:

- [attrs] for models
- [markdown-it] for markdown-to-html conversion
- [jinja] for templating
- [starlette] for development web-server


## Why

It was curiosity - "how would I do it?" and good intentions - "let's create
something easy to work with".


## Documentation

`wt` documentation is not available online yet but you can check
`docs/pages/` folder for it.


## How

### Requirements

Hard dependency is **Python>=3.12**.

### Installation

Install from [PyPI][wt-pypi] with `pip`:

```console
$ pip install wt
```

Or `pipx`:
```console
$ pipx install wt
```

Or `uv`:
```console
$ uv tool install wt
```


### Bootstrapping

To initialize new project with some example content use `wt init` command:
```console
$ wt init .
```

### Configuration

Your site must have configuration file written in [toml][toml].
By default `wt` will look for the file named **wt.toml** in current dir.

To dump default configuration example to console use `wt config` command:
```console
$ wt config
```

### Usage

To start development server use `wt develop` command:
```console
$ wt develop
```

Bt default the server will be listening at 127.0.0.1:9000.

To use multiple configuration files and custom port:
```console
$ wt develop -c wt.toml -c wt-extra.toml --port 3000
```

When content is ready you will need to build it using `wt build` command:

```console
$ wt build
```

By default generated site will be placed to `output/` folder
(can be changed in configuration file).

To see command-line help use `wt help` command:

```console
$ wt help
```


## Roadmap

- [x] ~~documentation~~
- [x] ~~support for pagination~~
- [x] ~~support for multiple configuration files~~
- [ ] support for tags


## License

MIT


[wt-pypi]: https://pypi.org/project/wt/
[wt-docs]: https://codeberg.org/ysegorov/wt/src/branch/main/docs
[markdown]: http://daringfireball.net/projects/markdown/
[toml]: http://toml.io/
[front-matter]: https://jekyllrb.com/docs/front-matter/
[atom]: https://en.wikipedia.org/wiki/Atom_(standard)
[attrs]: https://attrs.org/
[markdown-it]: https://github.com/executablebooks/markdown-it-py
[jinja]: https://jinja.palletsprojects.com/
[starlette]: https://starlette.dev/
