Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // LinkRegex is the regex of links in posts LinkRegex = regexp.MustCompile(`\[\[.+\]\]`) )
Functions ¶
func ConvertMarkdownToHTML ¶
ConvertMarkdownToHTML converts post's body into HTML
func ReplaceLinks ¶
ReplaceLinks replaces all the `[[]]` links in the body with the link to the HTML page.
Types ¶
type Metadata ¶
type Metadata struct { Date time.Time `yaml:"date"` Tags []string `yaml:"tags"` Title string `yaml:"title"` }
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.