
Margo Authoring Guide
The practical workflow for building, styling, and sharing decks from Markdown.

Workflow

- Getting a deck running
- Structuring slides and front matter
- Reusing assets, shortcodes, and includes
- Choosing and customizing themes
- Understanding the render pipeline
- Knowing the current limits

Getting Started

Build and Start
go build -o ./bin/margo ./cmd/margo./bin/margo new my-deckcd my-deck../bin/margo serve
Generated Structure
margo.yamlslides/themes/default/archetypes/assets/shortcodes/

One file sets the deck contract
- deck metadata defines title, logo, language, and footer
- theme selection activates the visual system
- outputs control which artifacts are built
- snippets inject approved shell-level HTML when needed
Treat margo.yaml as the deck's operating contract. It is the first file to read when you are orienting yourself in a new project.
theme:
name: default
color_mode: dark
typography: executive
accent_color: "#4db6ac"

The loop is intentionally short
margo servepreviews at127.0.0.1:1313margo buildwrites the configured outputs--porthandles conflicts cleanly--include-draftsis useful during editingmargo cleanremoves generated output

Slides And Archetypes

New slides are bundles
- each slide lives at
slides/<id>/index.md - slide-local assets can sit beside
index.md - front matter selects order, section, layout, and visibility
- archetypes help create the initial shape, but rendering uses layouts


Structural layers
- layouts control shell and slide structure
- shortcodes add reusable content blocks inside Markdown
- includes keep repeated Markdown in one place
Stay in Markdown for content. Let layouts and shortcodes carry the visual weight.
Why this split works
- authors stay mostly in Markdown
- shared fragments reduce repetition
- shortcodes carry richer content blocks
- layouts keep the visual system consistent
Rule of thumb
Keep content in Markdown and let layouts, shortcodes, and includes do the repetitive structural work.

Current Override Model
- deck-local shortcodes override theme shortcodes
- deck-local partials override theme partials
- one active theme per deck
- layouts choose structure, shortcodes choose content blocks
Authoring
- front matter
- body Markdown
- shared fragments
Rendering
- shortcodes expand
- Markdown becomes HTML
- layouts wrap the result

Shared assets can stay elegant
- deck-level assets live under
assets/ - slide-level assets live beside slide Markdown
figuregives you semantic image markup with caption supportvideohandles poster assets and remote video sources


Themes

A theme can provide
layouts/deck.htmllayouts/print-deck.htmllayouts/slide-*.htmlpartials/*.htmlshortcodes/*.html
A deck can override locally
partials/*.htmlshortcodes/*.htmlthemeoptions inmargo.yaml
This keeps project-specific variation explicit rather than magical.

The pieces operate in sequence
- archetypes create the initial slide files
- slide Markdown and front matter are loaded
- shortcodes expand inside the body
- Markdown is converted to HTML
- slide layouts wrap the content
- deck and print layouts wrap the slide collection
- partials provide reusable layout fragments
The Go code should stay generic: parsing, validation, asset resolution, and model shaping. Markup shape belongs in templates.

Wrap-up

Current realities
PDF still depends on a local browser path and needs ongoing QA PPTX export is not implemented yet Presenter mode is not implemented yet Theme APIs can still evolve
Good files to study
examples/reference-deck/
examples/benchmark-deck/
docs/AUTHORING_GUIDE.md
Get Margo
Margo Repo on Github