Table of contents (generated automatically using {{ toc }}
):
- LaTeX expressions
- D2 diagram
- Mermaid Mindmap
- Pikchr diagram
- Embed YouTube videos & audio files
- Syntax highlighting
- Life Inside Fences
- Callouts
- Image figures
- Other extensions
Hello, world! This is a demo of the Trash website compiler. <-
:wastebasket:
To view it properly, you can ask Trash to serve it with live-reloading:
$ cd examples/blog
$ trash serve
Build complete in 324.5177ms.
Server starting on http://localhost:8080
Watching for changes...
All of the following elements can be compiled fully on the server side, serving zero client-side JS!
expressions ยถ
Given the radius of a circle, the area is:
And the circumference is:
The page will live-reload if you change any of this!
D2 diagram: ยถ
Mermaid Mindmap: ยถ
Pikchr diagram: ยถ
Embed YouTube videos & audio files ยถ
…with native Markdown syntax!
Syntax highlighting ยถ
Go:
func main() {
fmt.Println("ok")
}
JavaScript:
"b" + "a" + +"a" + "a"; // -> 'baNaNa'
Life Inside Fences ยถ
This paragraph is inside a fenced block.
You can nest and assign custom IDs to them.
Callouts ยถ
Trash also supports GitHub style callouts:
Highlights information that users should take into account, even when skimming.
Optional information to help a user be more successful.
Crucial information necessary for users to succeed.
Critical content demanding immediate user attention due to potential risks.
Negative potential consequences of an action.
Image figures ยถ
This is an extension of Markdown that allows you to place <figure>
elements by typing text below an image:

Rainbow Dash

Rarity
Notice how we’re appending ?w=100px
after the image URL and Trash automatically knows to make it 100px, even though the host doesn’t support it:






(you might remember this from Obsidian).
Other extensions ยถ
This is a red heading made with the CommonMark attribute syntax ยถ
Trash fully supports all extensions of GitHub Flavored Markdown (including tables, autolinks, strikethrough text, tasklists, definition lists and footnotes):
Pony Name | Species | Color Scheme | Element |
---|---|---|---|
Twilight Sparkle | Alicorn | Purple / Pink | Magic |
Rainbow Dash | Pegasus | Blue / Rainbow | Loyalty |
Pinkie Pie | Earth Pony | Pink | Laughter |
Applejack | Earth Pony | Orange / Blonde | Honesty |
Fluttershy | Pegasus | Yellow / Pink | Kindness |
Rarity | Unicorn | White / Purple | Generosity |
- foo
- bar
- baz
- bim
This is a test of the typographer extension – this should’ve been an em dash --
, «this should be in quotation marks», “this should be in quotes” and this should be an ellipsis…
This is some small subtext.
Use Ctrl + C or โ + C to copy text (<kbd>
tag).
You can highlight text by wrapping it in ==
.
Twemojis (toggled by emoji.custom
in the config):
East Asian line breaks ยถ
Soft line breaks are rendered as a newline.
ๅฐ้ฉฌๅฎ่็ๆๅไปฌ
ๅฅนไปฌไธ่ตท็ปๅๅ้ฉใ
ใใฏใคใฉใคใในใใผใฏใซใจไปฒ้ใใก
ๅฝผๅฅณใใกใฏๅๆ
ใฎ้ญๆณใไฟกใใฆใใพใใ
๋ง์ด๋ฆฌํํฌ๋ ์น๊ตฌ๋ค
๊ทธ๋ค์ ์ธ์ ๋ ์ฐ์ ์ ์์คํ ํฉ๋๋คใ
Escaped space ยถ
The backslashes before the spaces are rendered as visible spaces instead of collapsing.
ๅฐ้ฉฌๅฎ่ๆๅไปฌ
ใใฏใคใฉใคใในใใผใฏใซ
๋ง์ด๋ฆฌํํฌ๋์น๊ตฌ๋ค