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:
aliases: [newScratch]
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.

View File

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

View File

@ -3,10 +3,11 @@ title: resources.Babel
description: Compiles the given JavaScript resource with Babel.
categories: []
keywords: []
action:
related: []
returnType: resource.Resource
signatures: ['resources.Babel [OPTIONS] RESOURCE']
params:
functions_and_methods:
aliases: []
returnType: resource.Resource
signatures: ['resources.Babel [OPTIONS] RESOURCE']
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.
categories: []
keywords: []
action:
aliases: []
related:
- functions/resources/Get
- functions/resources/GetMatch
- functions/resources/GetRemote
- functions/resources/Match
- methods/page/Resources
returnType: resource.Resources
signatures: [resources.ByType MEDIATYPE]
params:
functions_and_methods:
aliases: []
returnType: resource.Resources
signatures: [resources.ByType MEDIATYPE]
---
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.
categories: []
keywords: []
action:
aliases: []
related: []
returnType: resource.Resource
signatures: ['resources.Concat TARGETPATH [RESOURCE...]']
params:
functions_and_methods:
aliases: []
returnType: resource.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].

View File

@ -2,11 +2,11 @@
title: resources.Copy
description: Copies the given resource to the target path.
categories: []
action:
aliases: []
related: []
returnType: resource.Resource
signatures: [resources.Copy TARGETPATH RESOURCE]
params:
functions_and_methods:
aliases: []
returnType: resource.Resource
signatures: [resources.Copy TARGETPATH RESOURCE]
---
```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.
categories: []
keywords: []
action:
aliases: []
related:
- functions/resources/FromString
returnType: resource.Resource
signatures: [resources.ExecuteAsTemplate TARGETPATH CONTEXT RESOURCE]
params:
functions_and_methods:
aliases: []
returnType: resource.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.

View File

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

View File

@ -3,12 +3,11 @@ title: resources.FromString
description: Returns a resource created from a string.
categories: []
keywords: []
action:
aliases: []
related:
- functions/resources/ExecuteAsTemplate
returnType: resource.Resource
signatures: [resources.FromString TARGETPATH STRING]
params:
functions_and_methods:
aliases: []
returnType: resource.Resource
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.

View File

@ -3,16 +3,11 @@ title: resources.Get
description: Returns a global resource from the given path, or nil if none found.
categories: []
keywords: []
action:
aliases: []
related:
- functions/resources/ByType
- functions/resources/GetMatch
- functions/resources/GetRemote
- functions/resources/Match
- methods/page/Resources
returnType: resource.Resource
signatures: [resources.Get PATH]
params:
functions_and_methods:
aliases: []
returnType: resource.Resource
signatures: [resources.Get PATH]
---
```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.
categories: []
keywords: []
action:
aliases: []
related:
- functions/resources/ByType
- functions/resources/Get
- functions/resources/GetRemote
- functions/resources/Match
- methods/page/Resources
returnType: resource.Resource
signatures: [resources.GetMatch PATTERN]
params:
functions_and_methods:
aliases: []
returnType: resource.Resource
signatures: [resources.GetMatch PATTERN]
---
```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.
categories: []
keywords: []
action:
aliases: []
related:
- functions/data/GetCSV
- functions/data/GetJSON
- functions/resources/ByType
- functions/resources/Get
- functions/resources/GetMatch
- functions/resources/Match
- methods/page/Resources
returnType: resource.Resource
signatures: ['resources.GetRemote URL [OPTIONS]']
params:
functions_and_methods:
aliases: []
returnType: resource.Resource
signatures: ['resources.GetRemote URL [OPTIONS]']
---
{{< 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.
categories: []
keywords: []
action:
aliases: []
related:
- functions/resources/ByType
- functions/resources/Get
- functions/resources/GetMatch
- functions/resources/GetRemote
- methods/page/Resources
returnType: resource.Resources
signatures: [resources.Match PATTERN]
params:
functions_and_methods:
aliases: []
returnType: resource.Resources
signatures: [resources.Match PATTERN]
---
```go-html-template

View File

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

View File

@ -3,10 +3,11 @@ title: resources.PostCSS
description: Processes the given resource with PostCSS using any PostCSS plugin.
categories: []
keywords: []
action:
related: []
returnType: resource.Resource
signatures: ['resources.PostCSS [OPTIONS] RESOURCE']
params:
functions_and_methods:
aliases: []
returnType: resource.Resource
signatures: ['resources.PostCSS [OPTIONS] RESOURCE']
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.
categories: []
keywords: []
action:
aliases: []
related:
- functions/css/PostCSS
- functions/css/Sass
returnType: postpub.PostPublishedResource
signatures: [resources.PostProcess RESOURCE]
params:
functions_and_methods:
aliases: []
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.

View File

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