Help us shape the future of Go! Take the 2026 Go Developer Survey

project

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package project assembles a deck's build configuration the way the slides command does: the built-ins, then slides.hcl or slides.yaml found next to the deck, then what the caller asks for (the command's flags).

It reads through a vfs.FS, so that an editor can run the same assembly over the files it holds, without a disk.

Index

Constants

This section is empty.

Variables

View Source
var ConfigNames = []string{"slides.hcl", "slides.yaml", "slides.yml"}

ConfigNames are the configuration files looked up next to the deck, in order.

Functions

func ConfigPath

func ConfigPath(o Options, baseDir string) string

ConfigPath returns the configuration file Load would read for a deck in baseDir, "" if none.

func Load

func Load(deckPath string, o Options) (slides.Config, error)

Load assembles the build configuration of the deck at deckPath. The template data comes first, so that HCL kinds files can use it.

func ThemeSet

func ThemeSet(fsys vfs.FS, paths ...string) (*theme.Set, error)

ThemeSet returns the built-in themes plus the theme CSS at paths: files, or directories whose *.css files are read.

Types

type Options

type Options struct {
	// ConfigFile names the configuration file; "" looks for ConfigNames
	// next to the deck.
	ConfigFile string
	// NoConfig reads no configuration file.
	NoConfig bool
	// ThemeSets are theme CSS files or directories of them.
	ThemeSets []string
	// KindFiles are YAML or HCL kinds files.
	KindFiles []string
	// DataFiles are YAML, JSON or HCL template data files.
	DataFiles []string
	// Sets are key=value template data.
	Sets []string
	// HTML allows all raw HTML.
	HTML bool
	// Lang is the lang attribute when the deck sets none.
	Lang       string
	Bare       bool
	NoTemplate bool
	StrictYAML bool
	NoEmoji    bool
	// FS is what is read; nil means the disk.
	FS vfs.FS
}

Options are what the caller adds to the configuration file; the command fills them from its flags.

Jump to

Keyboard shortcuts

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