summaryrefslogtreecommitdiff
path: root/src/post
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2024-05-26 21:43:49 +0200
committerBrian Picciano <mediocregopher@gmail.com>2024-05-26 21:43:49 +0200
commit006c0028106425abb3f718b2e86349dee5b7a2ea (patch)
tree47381f28793d97010fe60938eb7684a886dc885b /src/post
parent43d8951296ce2f232ca94f0577e2e726291bf783 (diff)
Refactor how preprocess functions work a bit
Diffstat (limited to 'src/post')
-rw-r--r--src/post/preprocess.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/post/preprocess.go b/src/post/preprocess.go
index 7aceee2..2f3e091 100644
--- a/src/post/preprocess.go
+++ b/src/post/preprocess.go
@@ -1,14 +1,13 @@
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 {
+// interleave dynamic content into their bodies.
+type PreprocessFunctions interface {
// Image returns a string which should be inlined into the post body in
- // order to display an.
+ // order to render an image.
//
// 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)
+ Image(args ...string) (string, error)
}