content: Fix front matter for several function pages

This commit is contained in:
Joe Mooring 2025-03-06 13:10:42 -08:00 committed by Joe Mooring
parent 5d3542ea69
commit 7de6dbab39
17 changed files with 78 additions and 116 deletions

View File

@ -7,7 +7,7 @@ params:
functions_and_methods: functions_and_methods:
aliases: [newScratch] aliases: [newScratch]
returnType: maps.Scratch returnType: maps.Scratch
signatures: [collections.NewScratch ] signatures: [collections.NewScratch ]
--- ---
Use the `collections.NewScratch` function to create a locally scoped [scratch pad](g) to store and manipulate data. To create a scratch pad with a different [scope](g), refer to the [scope](#scope) section below. Use the `collections.NewScratch` function to create a locally scoped [scratch pad](g) to store and manipulate data. To create a scratch pad with a different [scope](g), refer to the [scope](#scope) section below.

View File

@ -6,8 +6,8 @@ keywords: []
params: params:
functions_and_methods: functions_and_methods:
aliases: [] aliases: []
returnType: returnType:
signatures: [end] signatures: [end]
--- ---
Use with the [`if`] statement: Use with the [`if`] statement:

View File

@ -3,10 +3,11 @@ title: resources.Babel
description: Compiles the given JavaScript resource with Babel. description: Compiles the given JavaScript resource with Babel.
categories: [] categories: []
keywords: [] keywords: []
action: params:
related: [] functions_and_methods:
returnType: resource.Resource aliases: []
signatures: ['resources.Babel [OPTIONS] RESOURCE'] returnType: resource.Resource
signatures: ['resources.Babel [OPTIONS] RESOURCE']
expiryDate: 2026-06-24 # deprecated 2024-06-24 in v0.128.0 expiryDate: 2026-06-24 # deprecated 2024-06-24 in v0.128.0
--- ---

View File

@ -3,16 +3,11 @@ title: resources.ByType
description: Returns a collection of global resources of the given media type, or nil if none found. description: Returns a collection of global resources of the given media type, or nil if none found.
categories: [] categories: []
keywords: [] keywords: []
action: params:
aliases: [] functions_and_methods:
related: aliases: []
- functions/resources/Get returnType: resource.Resources
- functions/resources/GetMatch signatures: [resources.ByType MEDIATYPE]
- functions/resources/GetRemote
- functions/resources/Match
- methods/page/Resources
returnType: resource.Resources
signatures: [resources.ByType MEDIATYPE]
--- ---
The [media type] is typically one of `image`, `text`, `audio`, `video`, or `application`. The [media type] is typically one of `image`, `text`, `audio`, `video`, or `application`.

View File

@ -3,11 +3,11 @@ title: resources.Concat
description: Returns a concatenated slice of resources. description: Returns a concatenated slice of resources.
categories: [] categories: []
keywords: [] keywords: []
action: params:
aliases: [] functions_and_methods:
related: [] aliases: []
returnType: resource.Resource returnType: resource.Resource
signatures: ['resources.Concat TARGETPATH [RESOURCE...]'] signatures: ['resources.Concat TARGETPATH [RESOURCE...]']
--- ---
The `resources.Concat` function returns a concatenated slice of resources, caching the result using the target path as its cache key. Each resource must have the same [media type]. The `resources.Concat` function returns a concatenated slice of resources, caching the result using the target path as its cache key. Each resource must have the same [media type].

View File

@ -2,11 +2,11 @@
title: resources.Copy title: resources.Copy
description: Copies the given resource to the target path. description: Copies the given resource to the target path.
categories: [] categories: []
action: params:
aliases: [] functions_and_methods:
related: [] aliases: []
returnType: resource.Resource returnType: resource.Resource
signatures: [resources.Copy TARGETPATH RESOURCE] signatures: [resources.Copy TARGETPATH RESOURCE]
--- ---
```go-html-template ```go-html-template

View File

@ -3,12 +3,11 @@ title: resources.ExecuteAsTemplate
description: Returns a resource created from a Go template, parsed and executed with the given context. description: Returns a resource created from a Go template, parsed and executed with the given context.
categories: [] categories: []
keywords: [] keywords: []
action: params:
aliases: [] functions_and_methods:
related: aliases: []
- functions/resources/FromString returnType: resource.Resource
returnType: resource.Resource signatures: [resources.ExecuteAsTemplate TARGETPATH CONTEXT RESOURCE]
signatures: [resources.ExecuteAsTemplate TARGETPATH CONTEXT RESOURCE]
--- ---
The `resources.ExecuteAsTemplate` function returns a resource created from a Go template, parsed and executed with the given context, caching the result using the target path as its cache key. The `resources.ExecuteAsTemplate` function returns a resource created from a Go template, parsed and executed with the given context, caching the result using the target path as its cache key.

View File

@ -3,16 +3,11 @@ title: resources.Fingerprint
description: Cryptographically hashes the content of the given resource. description: Cryptographically hashes the content of the given resource.
categories: [] categories: []
keywords: [] keywords: []
action: params:
aliases: [fingerprint] functions_and_methods:
related: aliases: [fingerprint]
- functions/resources/Minify returnType: resource.Resource
- functions/css/Sass signatures: ['resources.Fingerprint [ALGORITHM] RESOURCE']
- functions/css/TailwindCSS
- functions/js/Build
- functions/js/Babel
returnType: resource.Resource
signatures: ['resources.Fingerprint [ALGORITHM] RESOURCE']
--- ---
```go-html-template ```go-html-template

View File

@ -3,12 +3,11 @@ title: resources.FromString
description: Returns a resource created from a string. description: Returns a resource created from a string.
categories: [] categories: []
keywords: [] keywords: []
action: params:
aliases: [] functions_and_methods:
related: aliases: []
- functions/resources/ExecuteAsTemplate returnType: resource.Resource
returnType: resource.Resource signatures: [resources.FromString TARGETPATH STRING]
signatures: [resources.FromString TARGETPATH STRING]
--- ---
The `resources.FromString` function returns a resource created from a string, caching the result using the target path as its cache key. The `resources.FromString` function returns a resource created from a string, caching the result using the target path as its cache key.

View File

@ -3,16 +3,11 @@ title: resources.Get
description: Returns a global resource from the given path, or nil if none found. description: Returns a global resource from the given path, or nil if none found.
categories: [] categories: []
keywords: [] keywords: []
action: params:
aliases: [] functions_and_methods:
related: aliases: []
- functions/resources/ByType returnType: resource.Resource
- functions/resources/GetMatch signatures: [resources.Get PATH]
- functions/resources/GetRemote
- functions/resources/Match
- methods/page/Resources
returnType: resource.Resource
signatures: [resources.Get PATH]
--- ---
```go-html-template ```go-html-template

View File

@ -3,16 +3,11 @@ title: resources.GetMatch
description: Returns the first global resource from paths matching the given glob pattern, or nil if none found. description: Returns the first global resource from paths matching the given glob pattern, or nil if none found.
categories: [] categories: []
keywords: [] keywords: []
action: params:
aliases: [] functions_and_methods:
related: aliases: []
- functions/resources/ByType returnType: resource.Resource
- functions/resources/Get signatures: [resources.GetMatch PATTERN]
- functions/resources/GetRemote
- functions/resources/Match
- methods/page/Resources
returnType: resource.Resource
signatures: [resources.GetMatch PATTERN]
--- ---
```go-html-template ```go-html-template

View File

@ -3,18 +3,11 @@ title: resources.GetRemote
description: Returns a remote resource from the given URL, or nil if none found. description: Returns a remote resource from the given URL, or nil if none found.
categories: [] categories: []
keywords: [] keywords: []
action: params:
aliases: [] functions_and_methods:
related: aliases: []
- functions/data/GetCSV returnType: resource.Resource
- functions/data/GetJSON signatures: ['resources.GetRemote URL [OPTIONS]']
- functions/resources/ByType
- functions/resources/Get
- functions/resources/GetMatch
- functions/resources/Match
- methods/page/Resources
returnType: resource.Resource
signatures: ['resources.GetRemote URL [OPTIONS]']
--- ---
{{< new-in 0.141.0 >}} {{< new-in 0.141.0 >}}

View File

@ -3,16 +3,11 @@ title: resources.Match
description: Returns a collection of global resources from paths matching the given glob pattern, or nil if none found. description: Returns a collection of global resources from paths matching the given glob pattern, or nil if none found.
categories: [] categories: []
keywords: [] keywords: []
action: params:
aliases: [] functions_and_methods:
related: aliases: []
- functions/resources/ByType returnType: resource.Resources
- functions/resources/Get signatures: [resources.Match PATTERN]
- functions/resources/GetMatch
- functions/resources/GetRemote
- methods/page/Resources
returnType: resource.Resources
signatures: [resources.Match PATTERN]
--- ---
```go-html-template ```go-html-template

View File

@ -3,16 +3,11 @@ title: resources.Minify
description: Minifies the given resource. description: Minifies the given resource.
categories: [] categories: []
keywords: [] keywords: []
action: params:
aliases: [minify] functions_and_methods:
related: aliases: [minify]
- functions/resources/Fingerprint returnType: resource.Resource
- functions/css/Sass signatures: [resources.Minify RESOURCE]
- functions/css/TailwindCSS
- functions/js/Build
- functions/js/Babel
returnType: resource.Resource
signatures: [resources.Minify RESOURCE]
--- ---
```go-html-template ```go-html-template

View File

@ -3,10 +3,11 @@ title: resources.PostCSS
description: Processes the given resource with PostCSS using any PostCSS plugin. description: Processes the given resource with PostCSS using any PostCSS plugin.
categories: [] categories: []
keywords: [] keywords: []
action: params:
related: [] functions_and_methods:
returnType: resource.Resource aliases: []
signatures: ['resources.PostCSS [OPTIONS] RESOURCE'] returnType: resource.Resource
signatures: ['resources.PostCSS [OPTIONS] RESOURCE']
expiryDate: 2026-06-24 # deprecated 2024-06-24 in v0.128.0 expiryDate: 2026-06-24 # deprecated 2024-06-24 in v0.128.0
--- ---

View File

@ -3,13 +3,11 @@ title: resources.PostProcess
description: Processes the given resource after the build. description: Processes the given resource after the build.
categories: [] categories: []
keywords: [] keywords: []
action: params:
aliases: [] functions_and_methods:
related: aliases: []
- functions/css/PostCSS returnType: postpub.PostPublishedResource
- functions/css/Sass signatures: [resources.PostProcess RESOURCE]
returnType: postpub.PostPublishedResource
signatures: [resources.PostProcess RESOURCE]
--- ---
The `resources.PostProcess` function delays resource transformation steps until the build is complete, primarily for tasks like removing unused CSS rules. The `resources.PostProcess` function delays resource transformation steps until the build is complete, primarily for tasks like removing unused CSS rules.

View File

@ -3,10 +3,11 @@ title: resources.ToCSS
description: Transpiles Sass to CSS. description: Transpiles Sass to CSS.
categories: [] categories: []
keywords: [] keywords: []
action: params:
related: [] functions_and_methods:
returnType: resource.Resource aliases: []
signatures: ['resources.ToCSS [OPTIONS] RESOURCE'] returnType: resource.Resource
signatures: ['resources.ToCSS [OPTIONS] RESOURCE']
expiryDate: 2026-06-24 # deprecated 2024-06-24 in v0.128.0 expiryDate: 2026-06-24 # deprecated 2024-06-24 in v0.128.0
--- ---