diff --git a/.markdownlint.yaml b/.markdownlint.yaml index 58f84dc67a..d9c2c5a674 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -1,5 +1,6 @@ # https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md +MD001: false MD002: false MD003: false MD004: false diff --git a/content/en/methods/page/File.md b/content/en/methods/page/File.md index c39d1a64d5..44b752215e 100644 --- a/content/en/methods/page/File.md +++ b/content/en/methods/page/File.md @@ -30,8 +30,9 @@ Code defensively by verifying file existence as shown in each of the examples be The path separators (slash or backslash) in `Path`, `Dir`, and `Filename` depend on the operating system. {{% /note %}} -BaseFileName -: (`string`) The file name, excluding the extension. +###### BaseFileName + +(`string`) The file name, excluding the extension. ```go-html-template {{ with .File }} @@ -39,8 +40,9 @@ BaseFileName {{ end }} ``` -ContentBaseName -: (`string`) If the page is a branch or leaf bundle, the name of the containing directory, else the `TranslationBaseName`. +###### ContentBaseName + +(`string`) If the page is a branch or leaf bundle, the name of the containing directory, else the `TranslationBaseName`. ```go-html-template {{ with .File }} @@ -48,8 +50,9 @@ ContentBaseName {{ end }} ``` -Dir -: (`string`) The file path, excluding the file name, relative to the `content` directory. +###### Dir + +(`string`) The file path, excluding the file name, relative to the `content` directory. ```go-html-template {{ with .File }} @@ -57,8 +60,9 @@ Dir {{ end }} ``` -Ext -: (`string`) The file extension. +###### Ext + +(`string`) The file extension. ```go-html-template {{ with .File }} @@ -66,8 +70,9 @@ Ext {{ end }} ``` -Filename -: (`string`) The absolute file path. +###### Filename + +(`string`) The absolute file path. ```go-html-template {{ with .File }} @@ -75,8 +80,9 @@ Filename {{ end }} ``` -Lang -: (`string`) The language associated with the given file. +###### Lang + +(`string`) The language associated with the given file. ```go-html-template {{ with .File }} @@ -84,8 +90,9 @@ Lang {{ end }} ``` -LogicalName -: (`string`) The file name. +###### LogicalName + +(`string`) The file name. ```go-html-template {{ with .File }} @@ -93,8 +100,9 @@ LogicalName {{ end }} ``` -Path -: (`string`) The file path, relative to the `content` directory. +###### Path + +(`string`) The file path, relative to the `content` directory. ```go-html-template {{ with .File }} @@ -102,8 +110,9 @@ Path {{ end }} ``` -TranslationBaseName -: (`string`) The file name, excluding the extension and language identifier. +###### TranslationBaseName + +(`string`) The file name, excluding the extension and language identifier. ```go-html-template {{ with .File }} @@ -111,8 +120,9 @@ TranslationBaseName {{ end }} ``` -UniqueID -: (`string`) The MD5 hash of `.File.Path`. +###### UniqueID + +(`string`) The MD5 hash of `.File.Path`. ```go-html-template {{ with .File }} diff --git a/content/en/methods/page/GitInfo.md b/content/en/methods/page/GitInfo.md index d4545ab0c4..c5974ef0d8 100644 --- a/content/en/methods/page/GitInfo.md +++ b/content/en/methods/page/GitInfo.md @@ -43,8 +43,9 @@ This is configurable. See [details]. ## Methods -AbbreviatedHash -: (`string`) The abbreviated commit hash. +###### AbbreviatedHash + +(`string`) The abbreviated commit hash. ```go-html-template {{ with .GitInfo }} @@ -52,8 +53,9 @@ AbbreviatedHash {{ end }} ``` -AuthorDate -: (`time.Time`) The author date. +###### AuthorDate + +(`time.Time`) The author date. ```go-html-template {{ with .GitInfo }} @@ -61,35 +63,39 @@ AuthorDate {{ end }} ``` -CommitDate -: (`time.Time`) The commit date. +###### AuthorEmail + +(`string`) The author's email address, respecting [gitmailmap]. ```go-html-template {{ with .GitInfo }} - {{ .CommitDate.Format "2006-01-02" }} → 2023-10-09 + {{ .AuthorEmail }} → jsmith@example.org {{ end }} ``` -AuthorEmail -: (`string`) The author's email address, respecting [gitmailmap]. +###### AuthorName + +(`string`) The author's name, respecting [gitmailmap]. ```go-html-template {{ with .GitInfo }} - {{ .AuthorEmail }} → jsmith@example.org + {{ .AuthorName }} → John Smith {{ end }} ``` -AuthorName -: (`string`) The author's name, respecting [gitmailmap]. +###### CommitDate + +(`time.Time`) The commit date. ```go-html-template {{ with .GitInfo }} - {{ .AuthorName }} → John Smith + {{ .CommitDate.Format "2006-01-02" }} → 2023-10-09 {{ end }} ``` -Hash -: (`string`) The commit hash. +###### Hash + +(`string`) The commit hash. ```go-html-template {{ with .GitInfo }} @@ -97,8 +103,9 @@ Hash {{ end }} ``` -Subject -: (`string`) The commit message subject. +###### Subject + +(`string`) The commit message subject. ```go-html-template {{ with .GitInfo }} diff --git a/content/en/methods/page/Resources.md b/content/en/methods/page/Resources.md index a9fa3dab2f..140b50020e 100644 --- a/content/en/methods/page/Resources.md +++ b/content/en/methods/page/Resources.md @@ -21,8 +21,9 @@ To work with global or remote resources, see the [`resources`] functions. ## Methods -ByType -: (`resource.Resources`) Returns a collection of page resources of the given [media type], or nil if none found. The media type is typically one of `image`, `text`, `audio`, `video`, or `application`. +###### ByType + +(`resource.Resources`) Returns a collection of page resources of the given [media type], or nil if none found. The media type is typically one of `image`, `text`, `audio`, `video`, or `application`. ```go-html-template {{ range .Resources.ByType "image" }} @@ -32,8 +33,9 @@ ByType When working with global resources instead of page resources, use the [`resources.ByType`] function. -Get -: (`resource.Resource`) Returns a page resource from the given path, or nil if none found. +###### Get + +(`resource.Resource`) Returns a page resource from the given path, or nil if none found. ```go-html-template {{ with .Resources.Get "images/a.jpg" }} @@ -43,8 +45,9 @@ Get When working with global resources instead of page resources, use the [`resources.Get`] function. -GetMatch -: (`resource.Resource`) Returns the first page resource from paths matching the given [glob pattern], or nil if none found. +###### GetMatch + +(`resource.Resource`) Returns the first page resource from paths matching the given [glob pattern], or nil if none found. ```go-html-template {{ with .Resources.GetMatch "images/*.jpg" }} @@ -54,8 +57,9 @@ GetMatch When working with global resources instead of page resources, use the [`resources.GetMatch`] function. -Match -: (`resource.Resources`) Returns a collection of page resources from paths matching the given [glob pattern], or nil if none found. +###### Match + +(`resource.Resources`) Returns a collection of page resources from paths matching the given [glob pattern], or nil if none found. ```go-html-template {{ range .Resources.Match "images/*.jpg" }}