Posted on ::

Note

Here is an example of the note component:

This one is static!

Note!

This blog assumes basic terminal maturity

This one is clickable!

Syntax:

{% <note header="Note!"> %}This blog assumes basic terminal maturity{% </note> %}
{% <note clickable={true} hidden={true} header="Quiz!"> %}The answer to the quiz!{% </note> %}

You can also use some HTML in the text:

Note!

This blog assumes basic terminal maturity

Literal component:

{% <note header="Note!"> %}<h1>This blog assumes basic terminal maturity</h1>{% </note> %}

Pretty cool, right?

Finally, you can do something like this (hopefully):

Hello this is markdown inside a note component

fn main() {
    println!("Hello World");
}

We can't call another component inside a component, but this is good enough.

Here is the raw markdown:

{% <note clickable={true} header="Quiz!"> %}

# Hello this is markdown inside a note component

\`\`\`rust
fn main() {
    println!("Hello World");
}
\`\`\`

We can't call another component inside a component, but this is good enough.

{% </note> %}

Finally, we have center

Centered Text

This is centered text

{% <note center={true} header="Centered Text"> %}This is centered text{% </note> %}

It works good enough for me!

Table of Contents