Documentation ¶
Overview ¶
Copyright (C) 2024 early (LGPL)
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SourcePreview = part.New("source-preview", "source-preview.html", part.OnLoad(func(data render.Data) error { opener, ok := data.Get("source").(include.Opener) if !ok || opener == nil { return errors.New("source-preview requires include.Opener source") } file, err := opener.Open() if err != nil { return err } buf := new(strings.Builder) io.Copy(buf, file) data.Set("source_raw", buf.String()) return nil }), )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.