Documentation
¶
Overview ¶
Package content provides a system for making content-focused apps and websites consisting of Markdown, HTML, and Cogent Core.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Content ¶
type Content struct {
core.Splits
// Source is the source filesystem for the content.
// It should be set using [Content.SetSource] or [Content.SetContent].
Source fs.FS `set:"-"`
// Context is the [htmlcore.Context] used to render the content,
// which can be modified for things such as adding wikilink handlers.
Context *htmlcore.Context `set:"-"`
// contains filtered or unexported fields
}
Content manages and displays the content of a set of pages.
func NewContent ¶
NewContent returns a new Content with the given optional parent: Content manages and displays the content of a set of pages.
func (*Content) MakeToolbar ¶
func (*Content) MenuSearch ¶
func (ct *Content) MenuSearch(items *[]core.ChooserItem)
func (*Content) Open ¶
Open opens the page with the given URL and updates the display. If no pages correspond to the URL, it is opened in the default browser.
func (*Content) SetContent ¶
SetContent is a helper function that calls Content.SetSource with the "content" subdirectory of the given filesystem.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package bcontent ("base content") provides base types and functions shared by both content and the core build tool for content.
|
Package bcontent ("base content") provides base types and functions shared by both content and the core build tool for content. |
|
examples
|
|
|
basic
command
|
Click to show internal directories.
Click to hide internal directories.