Documentation
¶
Index ¶
- type Format
- func (Format) DeckTitle(d format.Deck) string
- func (Format) DefaultFile() string
- func (Format) ExtractTitle(s format.Slide) string
- func (Format) NewSlide(title string) format.Slide
- func (Format) Parse(data []byte) format.Deck
- func (Format) PostScaffoldCmd() []string
- func (Format) RenameDeck(d format.Deck, name string) format.Deck
- func (Format) RenameSlide(s format.Slide, name string) format.Slide
- func (Format) Render(d format.Deck) []byte
- func (Format) RenderSlide(s format.Slide) string
- func (Format) Scaffold(title, slug string) []format.ScaffoldFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Format ¶
type Format struct{}
Format implements format.Format for reveal.js HTML presentations.
func (Format) DeckTitle ¶ added in v0.3.0
DeckTitle returns the contents of the HTML <title> element, or "" if the deck has no title.
func (Format) DefaultFile ¶
DefaultFile returns the default presentation filename for reveal.js.
func (Format) ExtractTitle ¶
ExtractTitle returns the title from slide content. It tries, in order: <h1>, <h2>, the section's data-menu-title (reveal.js menu plugin convention), aria-label, and the global title attribute. <br> tags inside headings are treated as spaces.
func (Format) Parse ¶
Parse splits a reveal.js HTML file into its deck metadata (the full HTML shell with a sentinel where slides go) and individual slides.
func (Format) PostScaffoldCmd ¶
PostScaffoldCmd returns nil since the CDN-based template needs no install step.
func (Format) RenameDeck ¶
RenameDeck returns a copy of the deck with the <title> element updated.
func (Format) RenameSlide ¶
RenameSlide returns a copy of the slide with its title changed to name.
func (Format) RenderSlide ¶
RenderSlide outputs a single slide as a reveal.js <section>.