mdcoach

package module
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 8 Imported by: 0

README

Markdown Coach

Markdown to HTML slide compiler. Supports multiple displays with optional extended notes.

go install github.com/dkotik/mdcoach/cmd/mdcoach@latest

Slide Rendering

Headings of the first and second level and horizontal rules cut the content into slides. Headings of the first level also change the slide background to action color.

Synchronization

Browser windows containing presentations with the same document title will all synchronize their current slide position using window.localStorage events. Open multiple windows to present the same presentation on different monitors.

Use different viewing modes to give yourself convenient access to notes. Put two windows side by side in order to see notes next to the replica of the slides shown to the audience. Press C button to clone the current presentation window.

Markdown Behavior

Mdcoach departs from normal Markdown grammar in the following cases.

Included Files

An image element in a root-level paragraph that points to a Markdown file causes the entire paragraph to be replaced with the rendered content of that file. Relative links and images are all updated according to the relative file path of the included file.

Aside Elements
> > Nested double block-quote is rendered as an `<aside>` element instead of a block-quote, which then transforms the slide in the following ways.
  1. If found at the end of slide content, they float to the right. First image of the <aside> block fills the right side.
  2. If found after the title of the slide, they float to the left. First image of the <aside> block fills the left side.
  3. If found after the title of the slide, but there is nothing else in the slide, they become a splash element. First image of the <aside> block fills the entire screen as a background element.
  4. An empty aside element > > confines all the following slide elements to notes.
Double Horizontal Rule
- - -
- - -

Two horizontal rule elements are rendered as one horizontal rule <hr class="double" />. It will force a page break in books or handout notes.

PDF Utilities

Running mdcoach <path-to-pdf.pdf> will print the extracted text from each page of the chosen PDF file. Giving multiple PDF files as arguments will result in a single merged PDF file.

Documentation

Overview

Package mdcoach renders Markdown files into HTML presentations with separate presentation slides and notes.

Index

Constants

View Source
const (
	SlideCutPlacementSkipNode = iota
	SlideCutPlacementBeforeNode
	SlideCutPlacementAfterNode
)

Variables

View Source
var EndWalk = errors.New("iteration interrupted")

Functions

func Compile

func Compile(w io.Writer, tree ast.Node, markdown []byte, r renderer.Renderer) error

func Walk

func Walk(tree ast.Node, source []byte, renderer renderer.Renderer, walk WalkFunc) (err error)

Types

type SlideCutPlacement

type SlideCutPlacement uint

type WalkFunc

type WalkFunc func(slide, notes, footnotes []byte) error

Directories

Path Synopsis
cmd
mdcoach command
Package main provides command line interface to mdcoach.Iterator.
Package main provides command line interface to mdcoach.Iterator.
Package document writes Markdown slides into a portable HTML bundle.
Package document writes Markdown slides into a portable HTML bundle.
review
Package review presents a printable test constructed using a set of questions extracted from Markdown list items.
Package review presents a printable test constructed using a set of questions extracted from Markdown list items.
templates
Package templates embeds HTML, Javascript, and CSS presentation components.
Package templates embeds HTML, Javascript, and CSS presentation components.
mdextension
aside
Package aside provides Goldmark Markdown extension for parsing and rending <aside> blocks marked with semicolons.
Package aside provides Goldmark Markdown extension for parsing and rending <aside> blocks marked with semicolons.
figure
Package figure renders Goldmark Markdown paragraphs with only one child, which is an image, as HTML figure tag with caption set to image title.
Package figure renders Goldmark Markdown paragraphs with only one child, which is an image, as HTML figure tag with caption set to image title.
notesbreak
Package notesbreak provides Goldmark Markdown extension for detecting and rendering document end notes.
Package notesbreak provides Goldmark Markdown extension for detecting and rendering document end notes.
Package parser extends default Goldmark Markdown parser with additional functionality, necessary for building slide presentations.
Package parser extends default Goldmark Markdown parser with additional functionality, necessary for building slide presentations.
Package picture loads, modifies, and saves images.
Package picture loads, modifies, and saves images.
Package renderer converts parsed ast.Node Markdown to HTML.
Package renderer converts parsed ast.Node Markdown to HTML.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL