Highly customizable static site generator for reStructuredText markup https://nixhacks.net/rsw/
Go to file
2022-09-30 14:24:39 +03:00
docs add README and docs 2022-09-30 14:24:39 +03:00
rsw fix package data search 2022-09-30 12:05:57 +03:00
.gitignore update .gitignore 2022-09-29 23:18:21 +03:00
COPYING add license 2022-09-29 23:22:30 +03:00
Makefile update makefile 2022-09-30 12:11:04 +03:00
MANIFEST.in add build tools 2022-09-29 23:20:11 +03:00
pyproject.toml update pyproject 2022-09-30 12:07:24 +03:00
README add README and docs 2022-09-30 14:24:39 +03:00
requirements.txt update dependencies 2022-09-29 23:19:09 +03:00
setup.py add build tools 2022-09-29 23:20:11 +03:00

=====
[rSW]
=====

reStructuredWeb (rSW, reSW or rstW) -- is a highly customizable static site
generator for the reStructuredText markup language.

Docs:

* https://nixhacks.net/rsw/
* https://git.nxhs.cloud/ge/rSW/src/branch/master/docs

Installation
============

From PyPI
---------

::

    pip install reSW

From tarball
------------

::

    pip install ./reSW-0.1.2.tar.gz

Shell completion
----------------

::

    pip install infi.docopt-completion
    docopt-completion rsw

Quick start
===========

1. Initialise site with following commands::

    rsw init my_site
    cd my_site

2. Create first template and post.

   Template layouts/template.jinja2::

    <!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="utf-8">
        <title>{{ page.title }}</title>
      </head>
    <body>
       {{ html | safe }}
    </body>
    </html>

   Post content/index.rst::

    :title: Hello, World!
    :date: 1970-01-01

    =============
    Hello, World!
    =============

    Hello, there! This is my first site built with *re*\ **Structured**\ *Web*!

3. Build your site::

    rsw build

Command Line Interface
======================

::

    Usage: rsw init [--no-makefile] [<name>]
           rsw build [-c <file>]
           rsw print [-c <file>] [--default] [--json]
           rsw (-h | --help | -v | --version)

    Commands:
      init          initialise new site.
      build         build site.
      print         print configuration.

    Options:
      -c <file>, --config <file>    configuaration file.
      -j, --json                    JSON output.
      -d, --default                 print default config.
      -M, --no-makefile             do not create Makefile.
      -h, --help                    print this help message and exit.
      -v, --version                 print version and exit.

Development
===========

Build Python package
--------------------

Variant 1::

    pip install setuptools wheel twine
    python setup.py sdist bdist_wheel

Variant 2::

    pip install -U build
    python -m build

Via Makefile (`build` package needed)::

    make build