config

package
v1.22.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataHomePath

func DataHomePath() string

DataHomePath returns the path to the data home directory.

func StateHomePath

func StateHomePath() string

Types

type Config added in v1.8.0

type Config struct {
	// Whether to display line breaks in the document as line breaks
	Breaks *bool `yaml:"breaks,omitempty" json:"breaks,omitempty"`
	// Conditions for default
	Defaults []DefaultCondition `yaml:"defaults,omitempty" json:"defaults,omitempty"`
	// command to convert code blocks to images
	CodeBlockToImageCommand string `yaml:"codeBlockToImageCommand,omitempty" json:"codeBlockToImageCommand,omitempty"`
	// folder ID to create presentations and upload temporary images to
	FolderID string `yaml:"folderID,omitempty" json:"folderID,omitempty"`
	// base presentation ID to use for new presentations
	BasePresentationID string `yaml:"basePresentationID,omitempty" json:"basePresentationID,omitempty"`
}

func Load added in v1.8.0

func Load(profile string) (*Config, error)

Load loads the configuration from the config file. It searches for config files in the following order: 1. $XDG_CONFIG_HOME/deck/config-{profile}.yml 2. $XDG_CONFIG_HOME/deck/config.yml If no config file is found, it returns an empty Config struct.

type DefaultCondition added in v1.8.0

type DefaultCondition struct {
	If     string `json:"if"`               // condition to check
	Layout string `json:"layout,omitempty"` // layout name to apply if condition is true
	Freeze *bool  `json:"freeze,omitempty"` // freeze the page
	Ignore *bool  `json:"ignore,omitempty"` // whether to ignore the page if condition is true
	Skip   *bool  `json:"skip,omitempty"`   // whether to skip the page if condition is true
}

Jump to

Keyboard shortcuts

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