summaryrefslogtreecommitdiff
path: root/src/post/preprocess.go
blob: 7aceee2e3a2d40e004bb217372232163cd70747a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package post

// PreprocessFunctions are functions which can be used by posts themselves to
// interleave dynamic content into their bodies. Usually this is used for
// properly constructing URLs, but also for things like displaying images.
type PreprocessFunctions struct {
	// Image returns a string which should be inlined into the post body in
	// order to display an.
	//
	// The first argument to Image _must_ be the ID of an image asset. The
	// second argument _may_ be a description of the image which will be used as
	// alt text, or possibly displayed to the user with the image.
	Image func(args ...string) (string, error)
}