From 8fa9f255a06d9bc8cff8b501b395326733ee6bd2 Mon Sep 17 00:00:00 2001 From: albertony <12441419+albertony@users.noreply.github.com> Date: Sat, 4 Oct 2025 08:41:40 +0200 Subject: [PATCH] docs: improve formatting of http serve template parameters --- lib/http/template.go | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/lib/http/template.go b/lib/http/template.go index 584e69c3d..72ee72c4b 100644 --- a/lib/http/template.go +++ b/lib/http/template.go @@ -23,24 +23,22 @@ func TemplateHelp(prefix string) string { and WebDAV serve functions. The server exports the following markup to be used within the template to server pages: -| Parameter | Description | -| :---------- | :---------- | -| .Name | The full path of a file/directory. | -| .Title | Directory listing of .Name | -| .Sort | The current sort used. This is changeable via ?sort= parameter | -| | Sort Options: namedirfirst,name,size,time (default namedirfirst) | -| .Order | The current ordering used. This is changeable via ?order= parameter | -| | Order Options: asc,desc (default asc) | -| .Query | Currently unused. | -| .Breadcrumb | Allows for creating a relative navigation | -|-- .Link | The relative to the root link of the Text. | -|-- .Text | The Name of the directory. | -| .Entries | Information about a specific file/directory. | -|-- .URL | The 'url' of an entry. | -|-- .Leaf | Currently same as 'URL' but intended to be 'just' the name. | -|-- .IsDir | Boolean for if an entry is a directory or not. | -|-- .Size | Size in Bytes of the entry. | -|-- .ModTime | The UTC timestamp of an entry. | +| Parameter | Subparameter | Description | +| :---------- | :----------- | :---------- | +| .Name | | The full path of a file/directory. | +| .Title | | Directory listing of '.Name'. | +| .Sort | | The current sort used. This is changeable via '?sort=' parameter. Possible values: namedirfirst, name, size, time (default namedirfirst). | +| .Order | | The current ordering used. This is changeable via '?order=' parameter. Possible values: asc, desc (default asc). | +| .Query | | Currently unused. | +| .Breadcrumb | | Allows for creating a relative navigation. | +| | .Link | The link of the Text relative to the root. | +| | .Text | The Name of the directory. | +| .Entries | | Information about a specific file/directory. | +| | .URL | The url of an entry. | +| | .Leaf | Currently same as '.URL' but intended to be just the name. | +| | .IsDir | Boolean for if an entry is a directory or not. | +| | .Size | Size in bytes of the entry. | +| | .ModTime | The UTC timestamp of an entry. | The server also makes the following functions available so that they can be used within the template. These functions help extend the options for dynamic