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

Template functions inside README file #278

Closed
ruflin opened this issue Mar 18, 2020 · 0 comments · Fixed by #313
Closed

Template functions inside README file #278

ruflin opened this issue Mar 18, 2020 · 0 comments · Fixed by #313
Assignees

Comments

@ruflin
Copy link
Contributor

ruflin commented Mar 18, 2020

Today the README.md file is a pure markdown file. All the data has to be added manually to it. As can be seen in #276 also the fields.yml are part of it to document the fields. My idea here is that allowing to use some templates / functions inside the README. These are executed during the build stage, so static files are served.

An example could look as following:

Below are the described fields:

{{fields dataset=nginx.access}}

The above would create the table for the nginx.access dataset with all the fields inside. The template code is just an example.

Which template language we should use here? Golang templates would be easy to use as the language already comes with it but it is specific to Golang. That the build process is written in Golang is an implementation detail. I would rather use something generic like moustache or handlebars. In our pipelines and config files we already use handlebars, so this would be the most obvious one. We should only use 1 template language in all our package files to keep the mental overhead for package creators low.

@mtojek mtojek mentioned this issue Mar 31, 2020
@mtojek mtojek self-assigned this Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants