data.doctree.pointer #
fn pointer_new #
fn pointer_new(args NewPointerArgs) !Pointer
will return a clean pointer to a page, image or file
input is e.g. mycollection:filename.jpg
or filename.jpg
or mypage.md
enum PointerCat #
enum PointerCat {
page
image
video
file
html
}
struct NewPointerArgs #
@[params]
struct NewPointerArgs {
pub:
// pointer string (e.g. col:page.md)
text string
// used if text does not have collection information
collection string
}
struct Pointer #
struct Pointer {
pub mut:
collection string // is the key of a collection
name string // is name without extension, all namefixed (lowercase...)
cat PointerCat
extension string // e.g. jpg
}
links to a page, image or file
fn (Pointer) is_image #
fn (p Pointer) is_image() bool
fn (Pointer) is_file_video_html #
fn (p Pointer) is_file_video_html() bool
fn (Pointer) str #
fn (p Pointer) str() string