Documentation ¶
Index ¶
- func GenerateSkeleton(distDir string) error
- func Run(args []string) int
- func Version() string
- type BuildCommand
- type BuildConfig
- type Builder
- type Config
- type FileData
- type GoldMarkConfig
- type GoldMarkHighlightConfig
- type GoldMarkRendererOptions
- type Meta
- type NewCommand
- type SelfUpdateCommand
- type SelfVersionCommand
- type ServeCommand
- type YamlFrontMatter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSkeleton ¶
Types ¶
type BuildCommand ¶
type BuildCommand struct {
Meta
}
func (*BuildCommand) Help ¶
func (c *BuildCommand) Help() string
func (*BuildCommand) Run ¶
func (c *BuildCommand) Run(args []string) int
func (*BuildCommand) Synopsis ¶
func (c *BuildCommand) Synopsis() string
type BuildConfig ¶
type BuildConfig struct { IgnoreFiles []string `toml:"ignore_files"` Goldmark GoldMarkConfig `toml:"goldmark"` }
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is a struct for building a static site.
func (Builder) GetDistPath ¶
GetDistPath returns the dist directory path.
func (*Builder) ReloadConfig ¶
ReloadConfig reloads the config file.
func (*Builder) SetBaseUrl ¶
SetBaseUrl sets the base URL.
type Config ¶
type Config struct { Build BuildConfig `toml:"build"` SiteTitle string `toml:"site_title"` SiteDescription string `toml:"site_description"` BaseUrl string `toml:"base_url"` // The following settings are not in config.toml Dist string // dist directory Static string // static directory Layouts string // layouts directory }
func LoadConfig ¶
LoadConfig loads a TOML text into a Config struct.
type FileData ¶
type FileData struct { Path string Content string FrontMatter YamlFrontMatter }
FileData is a struct for markdown file data.
type GoldMarkConfig ¶
type GoldMarkConfig struct { HighlightConfig *GoldMarkHighlightConfig `toml:"highlight"` RendererOptions *GoldMarkRendererOptions `toml:"renderer"` }
GoldMarkConfig is a struct for configuring goldmark. なぜ Pointer なのか? config file にキーを設定したかどうかを判定するため
type GoldMarkHighlightConfig ¶
type GoldMarkRendererOptions ¶ added in v0.12.0
type GoldMarkRendererOptions struct {
WithUnsafe *bool `toml:"with_unsafe"`
}
type NewCommand ¶
type NewCommand struct {
Meta
}
func (*NewCommand) Help ¶
func (c *NewCommand) Help() string
func (*NewCommand) Run ¶
func (c *NewCommand) Run(args []string) int
func (*NewCommand) Synopsis ¶
func (c *NewCommand) Synopsis() string
type SelfUpdateCommand ¶
type SelfUpdateCommand struct {
Meta
}
func (*SelfUpdateCommand) Help ¶
func (c *SelfUpdateCommand) Help() string
func (*SelfUpdateCommand) Run ¶
func (c *SelfUpdateCommand) Run(args []string) int
func (*SelfUpdateCommand) Synopsis ¶
func (c *SelfUpdateCommand) Synopsis() string
type SelfVersionCommand ¶
type SelfVersionCommand struct {
Meta
}
func (*SelfVersionCommand) Help ¶
func (c *SelfVersionCommand) Help() string
func (*SelfVersionCommand) Run ¶
func (c *SelfVersionCommand) Run(args []string) int
func (*SelfVersionCommand) Synopsis ¶
func (c *SelfVersionCommand) Synopsis() string
type ServeCommand ¶
type ServeCommand struct { Meta // contains filtered or unexported fields }
func (*ServeCommand) Help ¶
func (c *ServeCommand) Help() string
func (*ServeCommand) Run ¶
func (c *ServeCommand) Run(args []string) int
func (*ServeCommand) Synopsis ¶
func (c *ServeCommand) Synopsis() string
type YamlFrontMatter ¶
type YamlFrontMatter struct { Author string `yaml:"author"` Title string `yaml:"title"` PubDatetime string `yaml:"pub_datetime"` PostSlug string `yaml:"post_slug"` Description string `yaml:"description"` Tags []string `yaml:"tags"` Emoji string `yaml:"emoji"` OgImage string `yaml:"og_image"` }
func (*YamlFrontMatter) AsMap ¶
func (y *YamlFrontMatter) AsMap() map[string]interface{}
func (*YamlFrontMatter) SaveTwemojiPng ¶
func (y *YamlFrontMatter) SaveTwemojiPng(w io.Writer) error
func (*YamlFrontMatter) SaveTwemojiSvg ¶
func (y *YamlFrontMatter) SaveTwemojiSvg(w io.Writer) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.