Next: Markdown Extensions

Markdown

Zaui uses Markdoc which supports the Commonmark markdown specification.

See below for an example of rendered content. The source for this page can be viewed on GitHub.

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5

Image

Images stored together with the markdown can be referenced using relative links.

Bullet list

  • level 1
  • level 1
    • level 2
      • level 3
      • level 3
    • level 2
  • level 1

Numbered list

  1. item 1
  2. item 2
  3. item 3

Inline formatting

Paragraph

Things were not too simple in this safari because things had changed very much in East Africa. The white hunter had been a close friend of mine for many years. I respected him as I had never respected my father and he trusted me, which was more than I deserved.

Quoted text

The table below documents all UMI message types. CMD[4:0] is the UMI opcode defining the type of message being sent. CMD[31:5] are used for message specific options.

Simple table

TermMeaning
CMDCommand (type + options)
DADestination address of message
SASource address (where to return a response)
DATAData payload
OPCODECommand opcode

Wide table

MessageDATASADA31:2726:2524:2221:2019:1615:819:1615:819:1615:819:1615:819:1615:819:1615:8
INVALID--------------------------------
REQ_RDYYHOSTIDUEX,EOF,EOMPROTQOSLENQOSLENQOSLENQOSLENQOSLENQOSLEN
REQ_WRYYYHOSTIDUEX,EOF,EOMPROTQOSLENQOSLENQOSLENQOSLENQOSLENQOSLEN

Javascript code block

let defaultTheme = require('tailwindcss/defaultTheme');

let content = ['./src/**/*.{html,js,svelte,ts}'];

/** @type {import('tailwindcss').Config} */
let config = {
  content,
  theme: {
    extend: {
      fontFamily: {
        sans: ['Inter', ...defaultTheme.fontFamily.sans],
        display: ['Lexend', ...defaultTheme.fontFamily.sans],
        logo: ['Oxanium', ...defaultTheme.fontFamily.sans],
      },
      maxWidth: {
        '8xl': '88rem',
      },
    },
  },
  plugins: [require('@tailwindcss/typography')],
};

Typescript code block

import { writable } from 'svelte/store';
import type { LoadData } from '$lib/loader';

export interface MarkdownFile extends LoadData {
  filepath?: string;
}

export type MarkdownFiles = {
  files: Array<string>;
  mdHash: { [key: string]: MarkdownFile };
  status: string;
};
export const model = writable<MarkdownFiles>();

Python code block

import sys

def main():
    if len(sys.argv) >= 2 and (sys.argv[1] == '-h' or sys.argv[1] == '--help'):
        print('''\
Usage:
ui [--dev]  Runs server and browse to port 7777.
             '--dev' opens dev server port 5173
ui md       Lists markdown files in the current directory.
''')
        sys.exit(0)
Terms | Privacy