Giter Club home page Giter Club logo

Comments (2)

norwoodj avatar norwoodj commented on July 26, 2024

I have extensively used terraform-docs, and I like their idea here, but I decided to implement documentation generation using gotemplates. If you want to do what you describe, you can do the following:

cp README.md README.gotmpl

Add a section to the new file wherever you'd like docs to appear:

{{ template "chart.header" . }}
{{ template "chart.deprecationWarning" . }}

{{ template "chart.badgesSection" . }}

{{ template "chart.description" . }}

{{ template "chart.homepageLine" . }}

{{ template "chart.maintainersSection" . }}

{{ template "chart.sourcesSection" . }}

{{ template "chart.requirementsSection" . }}

{{ template "chart.valuesSection" . }}

then run:

helm-docs --template-files=./REAMDME.md.gotmpl

it should print the standard template to your README.md file.

If you'd like a simpler template rather than the 12 lines I've pasted above, I'm happy to implement that, but I like the gotemplate approach here and I'm not changing that particular implementation choice.

from helm-docs.

HighWatersDev avatar HighWatersDev commented on July 26, 2024

Hi,
I'm trying to use .gotmpl file to merge the docs with the existing README but it's failing with the following error:

Error generating gotemplates for chart  chart:184: function "variables" not defined

I also looked under example-charts/custom-template and have it set up the same way but still getting the same error. I'm using helm-docs v1.8.1

from helm-docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.