Craig Peterson
f28d8b8601
Adding some useful utility functions for templates
2016-03-28 20:53:51 -06:00
buddhamagnet
c981b08b23
correct unused assignments
2016-03-26 21:05:19 +00:00
Matthew Holt
90c24d2f32
Included files in Markdown templates have access to document vars ( fixes #660 )
...
Refactor how middleware.Context includes files
2016-03-16 13:42:16 -06:00
Matthew Holt
2ecc837020
templates: .Truncate can truncate from end of string if length is negative
2016-02-24 20:32:26 -07:00
Miek Gieben
86f36bdb61
Add .Markdown directive
...
This allows any template to use:
{{.Markdown "filename"}} which will convert the markdown contents
of filename to HTML and then include the HTML in the template.
2016-02-04 20:54:19 +00:00
Matthew Holt
b9244cdf2e
templates: Another context fix when host header is missing port
2015-11-17 14:35:18 -07:00
Matthew Holt
cc229aefae
templates: Parse host successfully when port is implicit ( fixes #292 )
2015-10-27 23:20:05 -06:00
Matthew Holt
9e2bef146e
middleware: Added StripHTML to Context type
2015-09-17 16:23:30 -06:00
Matthew Holt
8c843ceefd
middleware: Add StripExt to Context type for stripping extensions from paths
2015-09-16 21:31:58 -06:00
Matthew Holt
b62de4c521
New template action NowDate to get the time.Time of Now()
2015-08-05 08:27:13 -06:00
Matthew Holt
0b01489f7d
templates: Date -> Now, add Replace and Truncate
2015-07-29 17:43:00 -06:00
Maxime
f536bc94b2
Added the Context to the browse directive
...
Moved the Context type to middleware and exported it.
Users can use .Include and others in browse directive templating
Created test for the templates directive.
2015-07-17 20:07:24 +02:00