Documentation ¶
Index ¶
- Constants
- Variables
- type ContentConvertProvider
- type ContentHub
- type ContentProvider
- type Converter
- type ConverterProvider
- type ConverterRegistry
- type File
- type FileProvider
- type FileWithoutOverlap
- type Fs
- type Page
- type PageInfo
- type PageMetaProvider
- type PageWithoutContent
- type ProviderProvider
- type Result
- type TemplateDescriptor
- type TemplateExecutor
- type Title
Constants ¶
View Source
const ( KindPage = "page" KindHome = "home" KindSection = "section" )
Variables ¶
View Source
var AllKindsInPages = []string{KindPage, KindHome, KindSection}
Functions ¶
This section is empty.
Types ¶
type ContentConvertProvider ¶
type ContentConvertProvider interface {
GetContentConvertProvider(name string) ConverterProvider
}
type ContentHub ¶
type ContentProvider ¶
ContentProvider provides the content related values for a Page.
type Converter ¶
type Converter interface {
Convert(ctx markdown.RenderContext) (Result, error)
}
Converter wraps the Convert method that converts some markup into another format, e.g. Markdown to HTML.
type ConverterProvider ¶
type ConverterProvider interface { New(ctx markdown.DocumentContext) (Converter, error) Name() string }
ConverterProvider creates converters.
type ConverterRegistry ¶
type ConverterRegistry interface {
Get(name string) ConverterProvider
}
type File ¶
type File interface { FileWithoutOverlap // contains filtered or unexported methods }
File represents a source file. This is a temporary construct until we resolve page.Page conflicts.
type FileProvider ¶
type FileProvider interface {
File() File
}
FileProvider provides the source file.
type FileWithoutOverlap ¶
type FileWithoutOverlap interface { // Filename gets the full path and filename to the file. Filename() string // Dir gets the name of the directory that contains this file. // The directory is relative to the content root. Dir() string // Extension is an alias to Ext(). // Deprecated: Use Ext instead. Extension() string // Ext gets the file extension, i.e "myblogpost.md" will return "md". Ext() string // LogicalName is filename and extension of the file. LogicalName() string // BaseFileName is a filename without extension. BaseFileName() string // TranslationBaseName is a filename with no extension, // not even the optional language extension part. TranslationBaseName() string // ContentBaseName is a either TranslationBaseName or name of containing folder // if file is a leaf bundle. ContentBaseName() string // UniqueID is the MD5 hash of the file's path and is for most practical applications, // Hugo content files being one of them, considered to be unique. UniqueID() string FileInfo() fsVO.FileMetaInfo }
type Page ¶
type Page interface { ContentProvider PageWithoutContent }
Page is the core interface in Hugo.
type PageMetaProvider ¶
type PageMetaProvider interface { // Kind The Page Kind. One of page, home, section, taxonomy, term. Kind() string // SectionsEntries Returns a slice of sections (directories if it's a file) to this // Page. SectionsEntries() []string // Layout The configured layout to use to render this page. Typically set in front matter. Layout() string // Type is a discriminator used to select layouts etc. It is typically set // in front matter, but will fall back to the root section. Type() string }
PageMetaProvider provides page metadata, typically provided via front matter.
type PageWithoutContent ¶
type PageWithoutContent interface { // FileProvider For pages backed by a file. FileProvider PageMetaProvider }
PageWithoutContent is the Page without any of the content methods.
type ProviderProvider ¶
type ProviderProvider interface {
New() (ConverterProvider, error)
}
ProviderProvider creates converter providers.
type Result ¶
type Result interface {
Bytes() []byte
}
Result represents the minimum returned from Convert.
type TemplateDescriptor ¶
type TemplateExecutor ¶
Click to show internal directories.
Click to hide internal directories.