Bjørn Erik Pedersen
241b21b0fd
Create a struct with all of Hugo's config options
...
Primary motivation is documentation, but it will also hopefully simplify the code.
Also,
* Lower case the default output format names; this is in line with the custom ones (map keys) and how
it's treated all the places. This avoids doing `stringds.EqualFold` everywhere.
Closes #10896
Closes #10620
2023-05-16 18:01:29 +02:00
Bjørn Erik Pedersen
ce524d0b5e
Add a page template func
...
Fixes #9339
2023-02-25 19:53:18 +01:00
Bjørn Erik Pedersen
b80853de90
all: gofmt -w -r 'interface{} -> any' .
...
Updates #9687
2022-03-17 22:03:27 +01:00
Bjørn Erik Pedersen
6c70e1f22f
Fix error handling for the time func alias
...
Fixes #8835
2021-08-01 13:39:30 +02:00
Bjørn Erik Pedersen
7907d24ba1
tpl/lang: Add new localized versions of lang.FormatNumber etc.
...
Fixes #8820
2021-07-29 16:40:06 +02:00
Bjørn Erik Pedersen
d90e37e0c6
all: Format code with gofumpt
...
See https://github.com/mvdan/gofumpt
2020-12-03 13:12:58 +01:00
Bjørn Erik Pedersen
d8717cd4c7
all: Update import paths to gohugoio/hugo
2017-06-13 18:42:45 +02:00
Bjørn Erik Pedersen
1f9e8dcc60
tpl: Make the Namespace func signature explicit
...
This makes it cleaner and avoids breaking client code, such as the docs helper JSON generator.
2017-05-20 11:34:38 +03:00
Cameron Moore
93b3b13867
tpl/lang: Add NumFmt function
...
NumFmt formats a number with a given precision using the requested
decimal, grouping, and negative characters.
Fixes #1444
2017-05-18 09:49:20 +03:00
Bjørn Erik Pedersen
690b0f8ff5
tpl: Add docshelper for template funcs
...
And fix some other minor related issues.
Updates #3418
2017-05-01 21:44:15 +02:00
Bjørn Erik Pedersen
c5373efcf0
tpl: Add TemplateFuncsNamespaceRegistry
...
As a first step to remove the hard ties between `tplimpl` and the different namespace packages.
The `lang` package is used as the first example use case.
See #3042
2017-05-01 15:13:41 +02:00