Comments (2)
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.
- 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)
- Pre-commit support HOT 1
- String manipulation functions in template
- Potential incorrect Markdown link syntax HOT 4
- [Bug] Check mode always returns with zero exit code when embed mode is also enabled HOT 1
- Is there a way to omit certain functions? HOT 2
- Pandoc Markdown Support
- Generated files have an execution permissions on Linux
- Multiple newlines are generated during templates processing
- Bug in generating markdown files with characters *(){}[]- HOT 1
- Ability to choose codeblock language HOT 2
- Generate wrong index for go 1.18 generic code HOT 6
- support new godoc spec enforced by gofmt HOT 3
- Links in comments aren't generated correctly HOT 1
- git branch issue when running in ci environment HOT 2
- new headings syntax in go 1.19 HOT 1
- Is there a way to generate docs for all packages in a project HOT 1
- Ignoring appending into generated docs when using -e flag HOT 2
- add support for Template functions HOT 3
- Ignore vendor folder HOT 4
- Links appear broken in README files HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gomarkdoc.