Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // LinkRegex is the regex of links in posts LinkRegex = regexp.MustCompile(`(^|\s)(\[\[(\w|-)+\]\])(\s|$)`) )
Functions ¶
func ConvertMarkdownToHTML ¶
ConvertMarkdownToHTML converts post's body into HTML
Types ¶
type Metadata ¶
type Metadata struct {
Date time.Time `yaml:"date"`
Tags []string `yaml:"tags"`
Title string `yaml:"title"`
Draft bool `yaml:"draft"`
}
Metadata contains the metadata extracted from the frontmatter of the post.
type Post ¶
type Post struct {
Meta Metadata
Body string
FilePath string
// Links here only contains the links mentioned in the body.
// These are not all the links to/from this post, since we need
// to derive those from the graph.
Links []Link
Connections []Link
}
Post contains all the necessary things to render a post.
Click to show internal directories.
Click to hide internal directories.