Skip to content

General Configuration

Declan Chidlow edited this page Jul 1, 2024 · 2 revisions

Adduce uses TOML files for configuration. The configurations here apply to both the individual, and feed functionality.

Blocks

To place content in Adduce, you need to use blocks. Blocks should be placed under [main], and formatted as such:

[[main.block]]
key = "value"

The order of the blocks in your file matters, as that is the order the content will be generated in the output file. All blocks will also be placed on a newline.

Inline Blocks

Text

Inline text will contain the content but be wrapped in the contents of the format. For example, the bellow would output <p>Hello World</p>.

[[main.block]]
format = "p"
content = "Hello World"

You can also include an id on the tag by specifying one. The bellow would output <p id="example">Hello World</p>.

[[main.block]]
format = "p"
id = "example"
content = "Hello World"

HTML

Inline HTML content will be untouched and outputted as is.

[[main.block]]
format = "html"
content = "<p>Hello World</p>"

Markdown

Inline markdown content will be parsed and outputted as HTML.

[[main.block]]
format = "md"
content = "# Hello World"

Special Cases

These are special items included for convenience.

Line Break

This will add a <br/> to your output HTML.

[[main.block]]
format = "br"
Horizontal Rule

This will add a <hr/> to your output HTML.

[[main.block]]
format = "hr"

Imported Blocks

These will import a file into your output HTML.

Imported HTML

Imported HTML files will be untouched and outputted as is.

[[main.block]]
style = "html"
content_file = "example.html"

Imported Markdown

Imported markdown files will be parsed and outputted as HTML.

[[main.block]]
style = "md"
content_file = "example.md"
Clone this wiki locally