cmd

package
v0.0.0-...-1d84f56 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run() error

Run is the main entrypoint for the binary. It takes various options and then works through the process

Types

type CommandOptions

type CommandOptions struct {
	ConfigFile                   string `json:"config" yaml:"config"` // if this is provided, it is set first THEN the rest will be used
	D2Theme                      int64  `json:"d2_theme" yaml:"d2_theme"`
	D2Layout                     string `json:"d2_layout" yaml:"d2_layout"`
	InputDirectory               string `json:"input_directory" yaml:"input_directory"`
	OutputDirectory              string `json:"output_directory" yaml:"output_directory"`
	PageTemplateFile             string `json:"page_template" yaml:"page_template"`
	DiagramIndexPageTemplateFile string `json:"index_template" yaml:"index_template"`
	TagPageTemplateFile          string `json:"tag_template" yaml:"tag_template"`
	CleanOutputDirectoryFirst    bool   `json:"clean" yaml:"clean"`
	ContinueOnCompileErrors      bool   `json:"continue_errors" yaml:"continue_errors"`

	// the below are needed post-processing
	PageTemplate             *template.Template
	DiagramIndexPageTemplate *template.Template
	TagPageTemplate          *template.Template
}

CommandOptions holds all of the options to pass in to the processors

type SiteData

type SiteData struct {
	Title       string
	Content     template.HTML
	Links       []d2s.LeafData
	Tags        []string
	SiteTags    map[string][]d2s.LeafData
	AllDiagrams map[string]*d2s.LeafData
}

SiteData is the main store of the site data

Jump to

Keyboard shortcuts

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