Giter Club home page Giter Club logo

Comments (2)

princjef avatar princjef commented on July 22, 2024

This is an interesting suggestion. The ability to customize the level feels particularly useful for embedding scenarios, especially since the levels are mostly hardcoded right now and would have to be changed in multiple places.

A couple questions:

  • Do you need the ability to use different levels for each embed or is a CLI parameter sufficient if it applies the same to all levels?
  • Any reason not to simply omit the header and import by customizing the template(s)? I can potentially split the header into its own template like the import is now, but the behavior you're asking for feels more appropriate for the template than as a bespoke parameter. If you want to run embedded and non-embedded scenarios through the same configuration, the tool could provide some sort of isEmbedded function so you can vary the behavior

from gomarkdoc.

shakefu avatar shakefu commented on July 22, 2024
  • Do you need the ability to use different levels for each embed or is a CLI parameter sufficient if it applies the same to all levels?

My primary use case is embedding in the repo root readme, so really only one level is sufficient. Including the docs in pkg/blah/ readmes would probably warrant multiple levels if they were rendered out simultaneously.

  • Any reason not to simply omit the header and import by customizing the template(s)? I can potentially split the header into its own template like the import is now, but the behavior you're asking for feels more appropriate for the template than as a bespoke parameter. If you want to run embedded and non-embedded scenarios through the same configuration, the tool could provide some sort of isEmbedded function so you can vary the behavior

I think I looked at this and decided it wouldn't be trivial, but it's been long enough that I don't recall. Our use case is targeting a pre-commit hook to ensure the docs are always up to date in the codebase across many Go repos, so we were hoping for a standard/cli solution that didn't involve external resources, e.g. a customized template.

from gomarkdoc.

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.