# Antwerp
[Antwerp](https://crates.io/crates/antwerp) is an open-source framework ported from JavaScript to Rust for GitHub pages and built with the Marcus HTML to MarkDown parser.
It outputs static web pages in `dist/` using HTML and MarkDown templates in `public/`, which are converted to HTML using the [Marcus](https://crates.io/crates/marcus) MarkDown to HTML parser.
## Demonstration:
**Cargo.toml** (`Cargo.toml`):
```toml
[package]
name = ""
version = ""
edition = "2021"
description = ""
license = "MIT"
readme = "README.md"
[dependencies]
antwerp = "0.3.1"
```
**main.rs** (`src/main.rs`):
```rust
use antwerp;
fn main() {
antwerp::build();
}
```
## Input:
**base.html** (`public/base.html`):
```html
{% block title | text | trim %}{% endblock title %}
{% block body %}
This paragraph serves as the default content for the body block.
{% endblock body %}
```
**index.md** (`public/index.md`):
```markdown
{% extends "base.html" %}
{% block title %}Homepage{% endblock title %}
{% block body %}
# Hello World!
This is the template, it contains a link to [a file](/section/chapter/file.html) in the first chapter of a random section and the default footer (below).
{% endblock body %}
```
**file.md** (`public/section/chapter/file.md`):
```markdown
{% extends "base.html" %}
{% block title %}Section / Chapter / File{% endblock title %}
{% block body %}
# Hello World!
This is the template, it takes you to [the homepage](/).
This page also includes CSS styles, which are ignored by the [Marcus](https://crates.io/crates/marcus) MarkDown to HTML converter.
{% endblock body %}
{% block footer %}
{% endblock footer %}
```
## Output:
**index.html** (`dist/index.html`):
```html
Homepage
Hello World!
This is the template, it contains a link to a file in the first chapter of a random section and the default footer (below).
This is the template, it takes you to the homepage.
This page also includes CSS styles, which are ignored by the Marcus MarkDown to HTML converter.
```
## References:
**Antwerp**:
-
-
-
**Marcus**:
-
-
-
**MarkDown/HTML**:
-
-
## Licence:
The source code included in this repository is distributed, for free, under the [MIT Licence](https://choosealicense.com/licenses/mit/), for the full license, see [LICENSE.md](https://github.com/Malekaia/Antwerp/blob/master/LICENSE.md).