1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

docs: improve formatting of http serve template parameters

This commit is contained in:
albertony
2025-10-04 08:41:40 +02:00
committed by dougal
parent e7f11af1ca
commit 8fa9f255a0

View File

@@ -23,24 +23,22 @@ func TemplateHelp(prefix string) string {
and WebDAV serve functions. The server exports the following markup and WebDAV serve functions. The server exports the following markup
to be used within the template to server pages: to be used within the template to server pages:
| Parameter | Description | | Parameter | Subparameter | Description |
| :---------- | :---------- | | :---------- | :----------- | :---------- |
| .Name | The full path of a file/directory. | | .Name | | The full path of a file/directory. |
| .Title | Directory listing of .Name | | .Title | | Directory listing of '.Name'. |
| .Sort | The current sort used. This is changeable via ?sort= parameter | | .Sort | | The current sort used. This is changeable via '?sort=' parameter. Possible values: namedirfirst, name, size, time (default namedirfirst). |
| | Sort Options: namedirfirst,name,size,time (default namedirfirst) | | .Order | | The current ordering used. This is changeable via '?order=' parameter. Possible values: asc, desc (default asc). |
| .Order | The current ordering used. This is changeable via ?order= parameter | | .Query | | Currently unused. |
| | Order Options: asc,desc (default asc) | | .Breadcrumb | | Allows for creating a relative navigation. |
| .Query | Currently unused. | | | .Link | The link of the Text relative to the root. |
| .Breadcrumb | Allows for creating a relative navigation | | | .Text | The Name of the directory. |
|-- .Link | The relative to the root link of the Text. | | .Entries | | Information about a specific file/directory. |
|-- .Text | The Name of the directory. | | | .URL | The url of an entry. |
| .Entries | Information about a specific file/directory. | | | .Leaf | Currently same as '.URL' but intended to be just the name. |
|-- .URL | The 'url' of an entry. | | | .IsDir | Boolean for if an entry is a directory or not. |
|-- .Leaf | Currently same as 'URL' but intended to be 'just' the name. | | | .Size | Size in bytes of the entry. |
|-- .IsDir | Boolean for if an entry is a directory or not. | | | .ModTime | The UTC timestamp of an entry. |
|-- .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 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 within the template. These functions help extend the options for dynamic