revealjs

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: MIT Imports: 19 Imported by: 0

README

go-revealjs

Deribed from revealjs-docker. Work in progress.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PresetNames = []string{"default", "demo"}

Functions

func IsMarkdown added in v0.0.3

func IsMarkdown(path string) bool

Types

type Config

type Config struct {
	Slides          []string               `json:"slides"`
	Title           string                 `json:"title"`
	Theme           string                 `json:"theme"`
	BuildDirectory  string                 `json:"buildDir"`
	RevealJS        map[string]interface{} `json:"revealjs"`
	InternalPlugins []interface{}          `json:"plugins"`
}

func LoadConfigFile

func LoadConfigFile(reader io.Reader) (*Config, error)

func (*Config) OverrideWith added in v0.0.3

func (c *Config) OverrideWith(other *Config)

func (*Config) Plugins

func (c *Config) Plugins() []Plugin

func (*Config) RevealJSConfig

func (c *Config) RevealJSConfig() map[string]string

type GenerateOptions

type GenerateOptions struct {
	Force                bool
	GenerateConfig       bool
	GenerateHTMLTemplate bool
}

type HTMLGeneratorParams

type HTMLGeneratorParams struct {
	HotReload bool
	Revision  *string
}

type Markdown added in v0.0.3

type Markdown struct {
	// contains filtered or unexported fields
}

func NewMarkdown added in v0.0.3

func NewMarkdown(content string) *Markdown

func (*Markdown) WithoutYAMLHeader added in v0.0.3

func (m *Markdown) WithoutYAMLHeader() string

func (*Markdown) YAMLHeader added in v0.0.3

func (m *Markdown) YAMLHeader() (map[string]string, error)

type Plugin

type Plugin struct {
	Name string `json:"name"`
	Src  string `json:"src"`
}

type Preset

type Preset struct {
	// contains filtered or unexported fields
}

Preset is a collection of files that are used to generate an initial Reveal.js presentation.

func NewDefaultPreset

func NewDefaultPreset() *Preset

func NewPreset

func NewPreset(name string) (*Preset, error)

func (*Preset) Generate

func (f *Preset) Generate(dest string, options *GenerateOptions) error

type RevealJS

type RevealJS struct {
	EmbedHTML     bool
	EmbedMarkdown bool
	// contains filtered or unexported fields
}

func NewRevealJS

func NewRevealJS(dataDirectory string) (*RevealJS, error)

func (*RevealJS) Build

func (r *RevealJS) Build() error

func (*RevealJS) BuildDirectory

func (r *RevealJS) BuildDirectory() string

func (*RevealJS) DataDirectory

func (r *RevealJS) DataDirectory() string

func (*RevealJS) FileSystem added in v0.0.3

func (r *RevealJS) FileSystem() fs.FS

func (*RevealJS) GenerateIndexHTML added in v0.0.3

func (r *RevealJS) GenerateIndexHTML(w io.Writer, params *HTMLGeneratorParams) error

func (*RevealJS) ReloadConfig added in v0.0.3

func (r *RevealJS) ReloadConfig() error

type Revision

type Revision struct {
	Value string
}

type Server added in v0.0.3

type Server struct {
	// contains filtered or unexported fields
}

func NewServer added in v0.0.3

func NewServer(port int, revealJS *RevealJS) *Server

func (*Server) Start added in v0.0.3

func (s *Server) Start() error

type Watcher

type Watcher struct {
	Revision *Revision
	// contains filtered or unexported fields
}

func NewWatcher

func NewWatcher(dataDirectory string, onUpdate func()) (*Watcher, error)

func (*Watcher) Start

func (w *Watcher) Start()

Directories

Path Synopsis
cmd
revealcli command

Jump to

Keyboard shortcuts

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