Add support of readme generation
What
- Support of README generation
- Support pluggable datasources (check how we deal with
make
&terraform
projects) - Generate readme with one command
Why
- We have standard parts in readme files.
- Different projects need different way to collect data for templates
- Unify way to generate readme independent of project type
How to use
- Create
Makefile
in repo root dir ( Example https://github.com/cloudposse/terraform-aws-elastic-beanstalk-environment/blob/feature-support-readme-generation/Makefile ) - Run
$ make readme:init
to fetch basic.README.md
- Customize
.README.md
template as you need - Run
$ make readme:build
to generateREADME.md
based on.README.md
Avaliable placeholders
{{ (datasource "git").name }}
- Repository name{{ (datasource "git").url }}
- Repository URL{{ (datasource "section").help }}
- Cloudpossecontact us
text{{ (datasource "section").contributing }}
- Cloudpossecode of conduct
rules{{ (datasource "license").apache2 }}
- Cloudposseshort license
text{{ (datasource "section").about }}
- Cloudposseabout
text{{ (datasource "section").warning }}
- WarningDO NOT EDIT README.md
{{- (datasource "contributor").erik }}
- Erik's contributor card{{- (datasource "contributor").igor }}
- Igor's contributor card{{- (datasource "contributor").andrew }}
- Andrew contributor card{{- (datasource "contributor").konstantin }}
- Konstantin's contributor card{{- (datasource "contributor").sergey }}
- Sergey's contributor card{{- (datasource "contributor").valeriy }}
- Valeriy's contributor card{{- (datasource "contributor").vladimir }}
- Vladimir's contributor card{{- (datasource "contributor")._links }}
- Links to github profiles and images to contributors (Required if at least one contributor specified in README){{ (datasource "terraform").input }}
- Terraform module input variables table{{ (datasource "terraform").output }}
- Terraform module outputs table{{ (datasource "make").help }}
- Make targets list with descriptions (based onmake help
)
Under the hood
- Gomplate as cli tool for gotempale
- Terraform docs as tool to parse terraform module and get input\output
Example
cloudposse/terraform-aws-elastic-beanstalk-environment#19
#35