Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Docs section listing all template functions available #1614

Closed
vergenzt opened this issue Apr 23, 2024 · 4 comments · Fixed by #1653
Closed

Request: Docs section listing all template functions available #1614

vergenzt opened this issue Apr 23, 2024 · 4 comments · Fixed by #1653
Labels
area: docs Changes related to documentation.

Comments

@vergenzt
Copy link
Contributor

Currently the docs for available template functions are split between three places:

  1. Some are listed directly at https://taskfile.dev/usage/#gos-template-engine
  2. Some are incorporated by reference to "All functions by the Go's slim-sprig lib" at https://go-task.github.io/slim-sprig/
  3. Some are defined natively in Go's template library https://pkg.go.dev/text/template#hdr-Functions

I've found myself having to have three tabs open to search all three pages to find the best function for what I'm trying to accomplish at times.

It would be nice if there could be a separate page in the docs (e.g. "Template Functions Reference", perhaps below "API Reference"), that lists out all individual functions that are available, with descriptions and parameter references, so that there's a "single source of truth" to look at. Similar to how dbt's docs have a section on what all Jinja functions they provide.

Screenshot 2024-04-22 at 10 44 24 PM
@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Apr 23, 2024
@vergenzt vergenzt changed the title Docs section listing all template functions available Request: Docs section listing all template functions available Apr 23, 2024
@andreynering andreynering added area: docs Changes related to documentation. and removed state: needs triage Waiting to be triaged by a maintainer. labels Apr 23, 2024
@andreynering
Copy link
Member

andreynering commented Apr 23, 2024

I liked the idea! Specially having in mind that not all Task users are Go programers (used to the Go's template engine). We could even introduce the engine better on this new page, mentioning its basics.

@vmaerten
Copy link
Member

That's a really good idea !!

@andreynering
Copy link
Member

Hi @vergenzt,

@pd93 worked on it in #1653, and a preview is available here: https://deploy-preview-1653--taskfile.netlify.app/next/reference/templating/

@vergenzt
Copy link
Contributor Author

It's beautiful! 😍 Thank you! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: docs Changes related to documentation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants