8 Commits

Author SHA1 Message Date
Alex Schroeder
ad1732f57f Fix all gocritic and golint issues 2025-12-06 14:10:20 +01:00
Alex Schroeder
67120af7cc Run goimports and rearrange imports 2025-12-06 13:38:46 +01:00
Alex Schroeder
8385bc424a Improving path vs filepath code
Rename the "path" argument to "name" if it refers to a page name (i.e.
a path) or "fp" if it refers to a filepath.

Don't escape Page.Name when ready to render a HTML template because in
some case this means unescaping in functions.

New method isHiddenName to replace ad-hoc checks for "." prefixes and
the like.
2025-03-14 00:56:40 +01:00
Alex Schroeder
ae9698aae3 Rename internal variable from buff to buf 2024-07-21 14:11:40 +02:00
Alex Schroeder
6a4d1e5ca9 Better distinction between path and filepath
Make sure to serve the page foo if both foo.md and the directory foo/
exist.
2024-02-13 15:06:01 +01:00
Alex Schroeder
7e5d8b768c Pages in subdirectories prefer local templates
When rendering templates, pass along the directory of the page or data
being rendered and if the required template is found in that
directory, prefer using that.
2024-02-06 23:42:36 +01:00
Alex Schroeder
098fc1ba19 Unescape the page name for diff
Diff needs to read the files after renderHtml has already escaped the
page name. Perhaps a different solution would be better: two
attributes for Page and changing all the templates to use the new
EscapedName attribute?
2023-10-28 00:56:32 +02:00
Alex Schroeder
f2276a969b Add diff 2023-10-09 18:41:37 +02:00