Comments (3)
Thanks for the suggestion @jdpedrie! I think this would be a great addition to the tool. Based on what I've seen in other tools I would think a comment marker like this would be reasonable:
<!-- gomarkdoc:embed -->
Then when the documentation gets inserted, that would get replaced with:
<!-- gomarkdoc:embed:start -->
The generated documentation...
<!-- gomarkdoc:embed:end -->
The tool would be designed to work with either the individual comment or the pair, replacing any text in between the start and end markers in variation 2.
Thoughts?
from gomarkdoc.
Hey @princjef, thanks for the reply!
I think your suggestion makes sense in cases where a file which would be modified already exists. For instance, a package with a README.md file should probably specify the embed location. Perhaps that, combined with creating new files when an existing one does not exist, would be a good solution?
In my project (a fairly large monorepo), for instance, we have a number of packages which do not have READMEs.
from gomarkdoc.
This has been released in https://github.com/princjef/gomarkdoc/releases/tag/v0.3.1
Take it for a spin and let me know if you run into any issues or have any additional thoughts!
from gomarkdoc.
Related Issues (20)
- Command-line install of gomarkdoc no longer compliant post 1.17 HOT 1
- Formatting problems using Go 1.18 HOT 6
- Add examples to the README HOT 3
- Feature request: Allow overriding base header levels for embedded HOT 2
- [Feature Request] Add support for Go 1.18 HOT 1
- Generates import statements for binaries HOT 3
- Bug in generating markdown files with "," HOT 4
- 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
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.