Documentation
¶
Index ¶
Constants ¶
const Asciidoc = "ASCIIDOC"
Asciidoc is a const for identifying Asciidoc Documents
const Markdown = "MARKDOWN"
Markdown is a const for identifying Markdown Documents
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { BaseURL string `yaml:"baseURL"` Title string `yaml:"title"` Origins []Origin `yaml:"origins"` Logo string `yaml:"logo"` FileWhitelist []string `yaml:"whitelist"` // HugoWorkingDir is the working dir for the Composition HugoWorkingDir string // ContentWorkingDir is the main working dir and where all the content is stored in ContentWorkingDir string }
Config is the root of the Monako config
func LoadConfig ¶
LoadConfig returns the Monako config from the given configfilepath
type Origin ¶
type Origin struct { URL string `yaml:"src"` Branch string `yaml:"branch,omitempty"` EnvUsername string `yaml:"envusername,omitempty"` EnvPassword string `yaml:"envpassword,omitempty"` SourceDir string `yaml:"docdir,omitempty"` TargetDir string `yaml:"targetdir,omitempty"` FileWhitelist []string `yaml:"whitelist,omitempty"` Files []OriginFile // contains filtered or unexported fields }
Origin contains all information for a document origin
func (*Origin) CloneDir ¶
func (origin *Origin) CloneDir()
CloneDir clones a HTTPS or lokal Git repository with the given branch and optional username and password. A virtual filesystem is returned containing the cloned files.
func (Origin) ComposeDir ¶
func (origin Origin) ComposeDir()
ComposeDir copies a subdir of a virtual filesystem to a target in the local relative filesystem. The copied files can be limited by a whitelist. The Git repository is used to obtain Git commit information
type OriginFile ¶
type OriginFile struct { // Commit is the commit info about this file Commit *object.Commit // RemotePath is the path in the origin repository RemotePath string // LocalPath is the absolute path on the local disk LocalPath string // contains filtered or unexported fields }
OriginFile represents a single file of an origin
func (OriginFile) GetFormat ¶
func (file OriginFile) GetFormat() string
GetFormat determines the markup format of a file by it's filename. Results can be Markdown and Asciidoc