Skip to content

Commit

Permalink
docs: Add docs for the default template values (#152)
Browse files Browse the repository at this point in the history
Signed-off-by: AlexNg <[email protected]>
  • Loading branch information
caffeine-addictt authored Oct 3, 2024
1 parent a00d459 commit 38e86a4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
7 changes: 2 additions & 5 deletions www/docs/configuration/fields/prompts.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ Prompts are additionally `asks` for templating.

!!! TIP

Waku uses Go's [`text/template`](https://pkg.go.dev/text/template)
library for templating, with 3 brackets `{{{ }}}` instead of 2.

See the [documentation](https://pkg.go.dev/text/template#hdr-Text_and_spaces)
for how you can leverage Go's strong templating engine.
Waku provides some default template values for you.
See the docs [here](../templates.md).

## template.json

Expand Down
20 changes: 20 additions & 0 deletions www/docs/configuration/templates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Templates

!!! TIP

Waku uses Go's [`text/template`](https://pkg.go.dev/text/template)
library for templating, with 3 brackets `{{{ }}}` instead of 2.

See the [documentation](https://pkg.go.dev/text/template#hdr-Text_and_spaces)
for how you can leverage Go's strong templating engine.

## Fields

You can use them in your styles by having `{{{ .Key }}}`
in your files.

| Key | Description |
| --- | ------------------------------------------------ |
| `.Name` | the project name |
| `.License` | the project license text (i.e. MIT License) |
| `.Spdx` | the project license SPDX identifier (i.e. MIT) |
1 change: 1 addition & 0 deletions www/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ nav:
- Configuration:
- Introduction: configuration/introduction.md
- Quick Start: configuration/quick-start.md
- Templates: configuration/templates.md
- Fields:
- Setup: configuration/fields/setup.md
- Ignore: configuration/fields/ignore.md
Expand Down

0 comments on commit 38e86a4

Please sign in to comment.