papyrus

Back

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.

Obsidian callout syntax

Note

Notes render as theme-aware callouts while keeping the original Markdown readable in source form.

Tip

Tips use the same callout component shape with a different token mix.

Important

Important callouts use their own icon and color so they are distinct from tips.

Warning

Warning variants use warning tokens instead of hardcoded colors.

Caution

Caution callouts stay readable in light and dark modes.

Code title

src/main.rs
fn main() {
    println!("papyrus");
}
rust

Diff fence

diff.css
.papyrus-card {
  background: var(--papyrus-panel); 
  background: transparent; 
  color: var(--papyrus-accent); 
}
css

Highlighted lines

highlight.c
#include <stdio.h>

int main(void) {
  puts("papyrus");
  return 0;
}
c

Console fences

site$ pnpm install
site# pnpm build
site> pnpm preview
console

Kamailio fences

kamailio.cfg
#!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");
  }
}
kamailio

Task list

  • Keep feature walkthroughs explicit
  • Document the source files beside rendered artifacts
  • Choose a renderer before embedding external diagram formats

Table

FeatureExpected behavior
Code titleRender a compact title bar
DiffStyle added and removed lines
TableStay readable without heavy borders

Mermaid fence

Image zoom

Profile fixture avatar

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.