constants

package
v0.0.0-...-bc49051 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultConfigPath is the default config file name.
	DefaultConfigPath = "./config.yml"
	// DefaultOutputPath is the default output path.
	DefaultOutputPath = "./dist"
	// DefaultPostsPath is the default source path for post images.
	DefaultPostsPath = "./posts"
	// DefaultStaticsPath is the default source path static files.
	DefaultStaticsPath = "./static"
	// DefaultLayoutPath is the default layout path.
	DefaultLayoutPath = "./layout"
	// DefaultThumbnailCachePath is the default thumbnail cache path.
	DefaultThumbnailCachePath = "./thumbnails"
	// DefaultPagesPath is the default partials path.
	DefaultPagesPath = "./layout/pages"
	// DefaultPartialsPath is the default partials path.
	DefaultPartialsPath = "./layout/partials"
	// DefaultImagePostTemplatePath is the default image post template path.
	DefaultImagePostTemplatePath = "./layout/image.html"
	// DefaultTextPostTemplatePath is the default text post template path.
	DefaultTextPostTemplatePath = "./layout/text.html"
	// DefaultTagTemplatePath is the default tag template path.
	DefaultTagTemplatePath = "./layout/tag.html"
)
View Source
const (
	FileIndex         = "index.html"
	FileMeta          = "meta.yml"
	FileData          = "data.json"
	FileImageOriginal = "original.jpg"
)

OutputFiles are known output file names.

View Source
const (
	SizeLarge  = 2048
	SizeMedium = 1024
	SizeSmall  = 512
)

Sizes are the default sizes for the resized images.

View Source
const (
	ExtensionJPG  = ".jpg"
	ExtensionJPEG = ".jpeg"
	ExtensionHTML = ".html"
)

Extensions are file suffixes that indicate file type.

View Source
const (
	DefaultSlugTemplate = `{{ .Meta.Posted | time_format "2006/01/02" }}/{{ .Meta.Title | slugify }}`
)

DefaultSlugTemplate is the default slug format.

View Source
const (
	ImageSizeFormat = "%d.jpg"
)

ImageSizeFormat is the format for the thumbnail images..

Variables

View Source
var (
	ImageExtensions = []string{
		ExtensionJPG,
		ExtensionJPEG,
	}
	TemplateExtensions = []string{
		ExtensionHTML,
	}
)

Known Extensions

View Source
var (
	PostSortKeyCapture = "capture"
	PostSortKeyPosted  = "posted"
	PostSortKeyIndex   = "index"
	PostSortKeyTitle   = "title"
)

PostSortKeys

View Source
var (
	DefaultImageSizes = []int{
		SizeLarge,
		SizeMedium,
		SizeSmall,
	}
)

DefaultImageSizes are the default resize dimensions. The size given will be the largest dimension of the final image. If the image is landscape, it will be the width. If the image is portrait, it will be the height.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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