Documentation
¶
Overview ¶
Package markdown provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.6.0 DO NOT EDIT.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LoadMarkdownWriter = sync.OnceValue(func() goldmark.Markdown { return goldmark.New( goldmark.WithExtensions( extension.GFM, extension.Typographer, &frontmatter.Extender{}, ), goldmark.WithParserOptions( parser.WithAutoHeadingID(), ), goldmark.WithRendererOptions( html.WithUnsafe(), ), ) })
Functions ¶
Types ¶
type File ¶ added in v0.181.4
type File struct {
Content []byte `json:"content"`
// Frontmatter contains metadata about a markdown file that allows mapping it to a path under a documentation directory.
Frontmatter FrontMatter `json:"frontmatter" toml:"doc_metadata"`
// JsonLD is the JSON-LD format for the file.
JsonLD *json.RawMessage `json:"jsonLD,omitempty"`
}
File contains the raw markdown file data and its frontmatter.
type FrontMatter ¶ added in v0.181.4
type FrontMatter struct {
// Author the person who wrote or is responsible for the document.
Author *string `json:"author,omitempty" toml:"author"`
// CreatedAt is when the post was created.
CreatedAt string `json:"created_at" toml:"created_at" validate:"required,datetime=2006-01-02"`
// Description is a description of the document, used in metadata headers of the page.
Description string `json:"description" toml:"description" validate:"required"`
// Image is a URL to an image to represent the file.
Image *string `json:"image,omitempty" toml:"image" validate:"omitempty,url"`
// PageTitle is the title rendered in the page header (i.e., <title/>).
PageTitle string `json:"page_title" toml:"page_title" validate:"required"`
// Slug is a URL safe slug to indicate the path to the file.
Slug string `json:"slug" toml:"slug" validate:"required"`
// Title is the in-page title of the document.
Title string `json:"title" toml:"title" validate:"required"`
// UpdatedAt is when the post was updated.
UpdatedAt *string `json:"updated_at,omitempty" toml:"updated_at" validate:"omitempty,datetime=2006-01-02"`
}
FrontMatter contains metadata about a markdown file that allows mapping it to a path under a documentation directory.
func (*FrontMatter) GetCreatedDate ¶ added in v0.181.4
func (fm *FrontMatter) GetCreatedDate() time.Time
func (*FrontMatter) GetUpdatedDate ¶ added in v0.181.4
func (fm *FrontMatter) GetUpdatedDate() time.Time
Click to show internal directories.
Click to hide internal directories.