stawege

Crates.iostawege
lib.rsstawege
version
sourcesrc
created_at2025-01-31 21:34:15.273791
updated_at2025-02-03 20:38:08.081619
descriptionA static website generator with a template engine that uses HTML tags.
homepage
repositoryhttps://gitlab.com/dominiksalwerowicz/stawege
max_upload_size
id1537851
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Dominik Salwerowicz (DominikSalwerowicz)

documentation

README

   ____   _____    _   __   _   __  ____    ___   ____
  |  __| |_   _|  / \  \ \_/ \_/ / |  __|  / __| |  __|
 __\ \     | |   / _ \  \   _   /  |  __| | |_-. |  __|
|____/     |_|  /_/ \_\  \_/ \_/   |____|  \___/ |____|

Static website generator

Stawege is a static website generator with a custom template engine that uses HTML tags. It is designed for static websites that work without JavaScript, and it has solutions to make it easier to make it possible to optionally load parts of the website dynamically via JavaScript if available.

Example

Source:

src/-layout.html

<SET lang?="en" title?="Default title" />

<html lang="{{ lang }}">
    <head>
        <title>{{ title }}</title>
    </head>
    <body>
        <BLOCK id="content">
            Default content
        </BLOCK>
    </body>
</html>

src/index.html

<SET title="Home" />

<EXTENDS path="-layout.html">
    <BLOCK id="content" copy-to="-/content.html">
        Greetings
    </BLOCK>
</EXTENDS>

Output:

www/index.html

<html lang="en">
    <head>
        <title>Home</title>
    </head>
    <body>
        Greetings
    </body>
</html>

www/-/content.html:

Greetings

(You can set values if they do not exist with a question mark (?) at the end of the attribute name, in the example above only the title is overwritten. )

(By default a file that starts with a dash (-) is private, which means it will not be built by itself. If it would not be private, a www/layout.html would be built.)

Installation

Via Cargo

Install cargo from here: https://www.rust-lang.org/tools/install

And then run the following command:

cargo install stawege

License

This project is licensed under the MIT License.

Commit count: 19

cargo fmt