Skip to content

Commit d1bfd3e

Browse files
committed
docs: move yaml templating functions to the correct section
1 parent fc17343 commit d1bfd3e

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

website/docs/reference/templating.mdx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,15 @@ description here for completeness. For detailed usage, please refer to the
264264
| `toJson`\* | Encodes an object as a JSON string. |
265265
| `toPrettyJson`\* | Encodes an object as a JSON string with new lines and indentation. |
266266
| `toRawJson`\* | Encodes an object as a JSON string with HTML characters unescaped. |
267-
| `fromYaml`\* | Decodes a YAML string into an object. |
268-
| `toYaml`\* | Encodes an object as a YAML string. |
269267
| `b64enc` | Encodes a string into base 64. |
270268
| `b64dec` | Decodes a string from base 64. |
271269
| `b32enc` | Encodes a string into base 32. |
272270
| `b32dec` | Decodes a string from base 32. |
273271

272+
:::note
273+
YAML encoding functions are [provided directly by Task](#task-functions).
274+
:::
275+
274276
#### [List Functions][list-functions]
275277

276278
| Function | Description |
@@ -338,6 +340,10 @@ description here for completeness. For detailed usage, please refer to the
338340
| `osExt` | Returns the file extension of a filepath. |
339341
| `osIsAbs` | Checks if a filepath is absolute. |
340342

343+
:::note
344+
More filepath encoding functions are [provided directly by Task](#task-functions).
345+
:::
346+
341347
#### [Flow Control Functions][flow-control-functions]
342348

343349
| Function | Description |
@@ -377,7 +383,7 @@ Lastly, Task itself provides a few functions:
377383
| Function | Description |
378384
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
379385
| `OS` | Returns the operating system. Possible values are `windows`, `linux`, `darwin` (macOS) and `freebsd`. |
380-
| `ARCH` | Returns the architecture Task was compiled to: `386`, `amd64`, `arm` or `s390x`. |
386+
| `ARCH` | Returns the architecture Task was compiled to: `386`, `amd64`, `arm` or `s390x`. |
381387
| `numCPU` | Returns the number of logical CPU's usable by the current process. |
382388
| `splitLines` | Splits Unix (`\n`) and Windows (`\r\n`) styled newlines. |
383389
| `catLines` | Replaces Unix (`\n`) and Windows (`\r\n`) styled newlines with a space. |
@@ -390,6 +396,8 @@ Lastly, Task itself provides a few functions:
390396
| `relPath` | Converts an absolute path (second argument) into a relative path, based on a base path (first argument). The same as Go's [filepath.Rel](https://pkg.go.dev/path/filepath#Rel). |
391397
| `merge` | Creates a new map that is a copy of the first map with the keys of each subsequent map merged into it. If there is a duplicate key, the value of the last map with that key is used. |
392398
| `spew` | Returns the Go representation of a specific variable. Useful for debugging. Uses the [davecgh/go-spew](https://github.com/davecgh/go-spew) package. |
399+
| `fromYaml`\* | Decodes a YAML string into an object. |
400+
| `toYaml`\* | Encodes an object as a YAML string. |
393401

394402
{/* prettier-ignore-start */}
395403
[text/template]: https://pkg.go.dev/text/template

0 commit comments

Comments
 (0)