Ready-to-use template to use around Task yaml files
Download the template:
curl -o task-to-md-mermaid.gomplate \
https://raw.githubusercontent.com/adriens/task-gomplates/main/tmpl/task-to-md-mermaid.gomplateGenerate the Markdown report
Use gomplate to transform the Taskfile into Markdown:
gomplate -f task-to-md-mermaid.gomplate -d tasks=Taskfile.yml > Taskfile.md-f: specifies the template file to use-d tasks=Taskfile.yml: loadsTaskfile.ymlas a datasource namedtasks> Taskfile.md: writes the output to the Markdown file
You can then open Taskfile.md in a Markdown editor that supports Mermaid to view the diagram and the task table.
Let's generate the documentaton of the build of Task website :
I gave it a try on your taskfile (website) :
- Download the Taskfile and the template file
# Download the Taskfile
curl -L https://github.com/go-task/task/raw/main/website/Taskfile.yml \
-o Taskfile.yml
# Download the gomplate template
curl -L \
https://github.com/adriens/task-gomplates/raw/main/tmpl/task-to-md-mermaid.gomplate \
-o task-to-md-mermaid.gomplate- Generate the Markdown Documentation
gomplate -f task-to-md-mermaid.gomplate -d tasks=Taskfile.yml > Taskfile.md- 🙌 Enjoy
Open the markdown in a GH issue.