utils

package
v0.0.0-...-3eee703 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

package utils contains utility functions for static and dynamic builds

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(serverBasePath string)

Init initializes the functions needed for rendering templates

func ProcessHTMLContent

func ProcessHTMLContent(html *template.HTML) (*template.HTML, error)

ProcessHTMLContent takes a html template which could contain some template pipelines and passes them through template.Execute. This makes it possible to have e.g. Assemble in the content configs.

func RenderTemplate

func RenderTemplate(
	tplName string,
	data interface{},
	templates ...string,
) ([]byte, error)

RenderTemplate renders the baseTemplate containing an optional childTemplate with the data passed. (name) is passed to ExecuteTemplate

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL