Markdown code guide
Markdown route showing Pure-style Astro/Shiki code blocks, callouts, tables, diagrams, and media.
This route is a compact rendering reference for Markdown-heavy posts. It shows how callouts, code fences, tables, diagrams, media, and fallback artifact links look inside the same article layout used by regular Papyrus posts.
Inline samples such as inline code, strikethrough, and
https://github.com/marcelofpfelix/papyrus keep the prose checks close to the
code checks.
Obsidian callout syntax
Notes render as theme-aware callouts while keeping the original Markdown readable in source form.
Tips use the same callout component shape with a different token mix.
Important callouts use their own icon and color so they are distinct from tips.
Warning variants use warning tokens instead of hardcoded colors.
Caution callouts stay readable in light and dark modes.
Collapsed warning
Collapsed callouts keep long warnings available without dominating the page.
Expanded tip
Expanded callouts can stay open when the content is immediately useful.
Code title
fn main() {
println!("papyrus");
}rustDiff fence
.papyrus-card {
background: var(--papyrus-panel);
background: transparent;
color: var(--papyrus-accent);
}cssHighlighted lines
#include <stdio.h>
int main(void) {
puts("papyrus");
return 0;
}cConsole fences
site$ pnpm install
site# pnpm build
site> pnpm previewconsoleCollapsible code
use std::net::TcpListener;
fn main() -> std::io::Result<()> {
let listener = TcpListener::bind("127.0.0.1:4321")?;
for stream in listener.incoming() {
let stream = stream?;
handle(stream);
}
Ok(())
}
fn handle<T>(_stream: T) {
println!("papyrus");
}rustKamailio fences
#!KAMAILIO
listen=udp:127.0.0.2:5060
loadmodule "sl.so"
modparam("sl", "bind_tm", 0)
request_route {
if (is_method("INVITE")) {
xlog("L_INFO", "call from $si to $ru\n");
sl_send_reply("100", "Trying");
}
}kamailioTask list
- Keep feature walkthroughs explicit
- Document the source files beside rendered artifacts
- Choose a renderer before embedding external diagram formats
Table
| Feature | Expected behavior |
|---|---|
| Code title | Render a compact title bar |
| Diff | Style added and removed lines |
| Table | Stay readable without heavy borders |
Mermaid fence
Image zoom
Artifact links
- Mermaid sourceHydrated Mermaid source
- PlantUML sourcePlantUML source
- Excalidraw sourceExcalidraw source
Fallback rendering
Some GitHub-style or diagram-adjacent formats need a site-owned plugin or renderer. Papyrus keeps the source visible so authors can choose the right integration for their site.
| Feature | Expected fallback |
|---|---|
| PlantUML inline rendering | Keep as a file link |
| Excalidraw inline rendering | Keep as a file link |
Wiki links like [[topic]] | Keep as plain text |
Footnotes like [^1] | Render when a consuming site adds a plugin |
/posts/code-demo/
Part of Papyrus docs.