New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Prevent Manually Added Content in CLI Docs to be Overwritten #9125
fix: Prevent Manually Added Content in CLI Docs to be Overwritten #9125
Conversation
Signed-off-by: Aboobaker Siddiq R <aboobakersiddiq63@gmail.com>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #9125 +/- ##
==========================================
+ Coverage 10.11% 10.18% +0.07%
==========================================
Files 136 136
Lines 21193 21201 +8
==========================================
+ Hits 2143 2160 +17
+ Misses 18729 18717 -12
- Partials 321 324 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Aboobaker Siddiq R <aboobakersiddiq63@gmail.com>
Signed-off-by: Aboobaker Siddiq R <aboobakersiddiq63@gmail.com>
Signed-off-by: Aboobaker Siddiq R <aboobakersiddiq63@gmail.com>
🚀 Preview for commit 73d569d at: https://652e0e5a9bb75234d233d311--meshery-docs-preview.netlify.app |
Signed-off-by: Aboobaker Siddiq R <aboobakersiddiq63@gmail.com>
🚀 Preview for commit 3977467 at: https://652e1350165c1d3b995e5577--meshery-docs-preview.netlify.app |
Thanks for raising the PR, let's Discuss this in the Meshery Development Call today, |
Signed-off-by: Aboobaker Siddiq R <aboobakersiddiq63@gmail.com>
🚀 Preview for commit d88c6dc at: https://652fbe74e46c95112af055f2--meshery-docs-preview.netlify.app |
Signed-off-by: Aboobaker Siddiq R <aboobakersiddiq63@gmail.com>
🚀 Preview for commit b43c313 at: https://652fc5e21989fd1b7600dc93--meshery-docs-preview.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great effort. Curious though. So to invoke this user would be applying them on the markdown page or in go program?
Thanks @alphaX86. The user just needs to add the comment on the md file |
Signed-off-by: Aboobaker Siddiq R <aboobakersiddiq63@gmail.com>
🚀 Preview for commit 997e5eb at: https://6533be2256d42a1ab87ea689--meshery-docs-preview.netlify.app |
Signed-off-by: Aboobaker Siddiq R <aboobakersiddiq63@gmail.com>
🚀 Preview for commit 1322fda at: https://6533d503e7d324284f546288--meshery-docs-preview.netlify.app |
## Preserving Manually Added Documentation with Cobra CLI | ||
|
||
We use Cobra CLI and GitHub Actions to automate the generation of command documentation. To protect any manually added content and ensure it remains intact after regeneration, follow this format: {% raw %}{% include folder-name/file-name %}{% endraw %}. This format should reference an external file where your manual changes are stored. Any content added using this format will not be altered during the documentation generation process. When making new changes or additions, be sure to place them at the end of the documentation to keep it organized and consistent. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Preserving Manually Added Documentation with Cobra CLI | |
We use Cobra CLI and GitHub Actions to automate the generation of command documentation. To protect any manually added content and ensure it remains intact after regeneration, follow this format: {% raw %}{% include folder-name/file-name %}{% endraw %}. This format should reference an external file where your manual changes are stored. Any content added using this format will not be altered during the documentation generation process. When making new changes or additions, be sure to place them at the end of the documentation to keep it organized and consistent. | |
## Preserving Manually Added Documentation | |
`mesheryctl` uses Cobra CLI and GitHub Actions to automate the generation of command documentation. On occasion, additional documentation beyond that included in the `mesheryctl` Golang files is ideal to capture and include in the CLI reference pages. Contributors are encouraged to add more usage examples, screenshots, video explainers and so forth to any of the CLI reference pages. To protect any manually added content and ensure it remains intact after regeneration, create a separate Jekyll `include` file. Follow file naming scheme outlined below: | |
{% raw %}{% include mesheryctl/ %}{% endraw %}
This format should reference an external file where your manual changes are stored. Any content added using this method will not be altered during the documentation generation process, but instead will be included post-auto doc generation. When making new changes or additions, understand that these additional details are positioned at the end their given CLI reference page, so bear this in mind as you organize and present your additional command details.
mesheryctl/doc/doc.go
Outdated
@@ -206,9 +215,10 @@ func GenMarkdownCustom(cmd *cobra.Command, w io.Writer) error { | |||
} | |||
}) | |||
} | |||
buf.WriteString("Go back to [command reference index](/reference/mesheryctl/) ") | |||
buf.WriteString("Go back to [command reference index](/reference/mesheryctl/), if you want to add content manually to the CLI documentation, please refer to the [instruction](/project/contributing/contributing-cli#preserving-manually-added-documentation-with-cobra-cli) for guidance.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buf.WriteString("Go back to [command reference index](/reference/mesheryctl/), if you want to add content manually to the CLI documentation, please refer to the [instruction](/project/contributing/contributing-cli#preserving-manually-added-documentation-with-cobra-cli) for guidance.") | |
buf.WriteString("Go back to [command reference index](/reference/mesheryctl/), if you want to add content manually to the CLI documentation, please refer to the [instruction](/project/contributing/contributing-cli#preserving-manually-added-documentation) for guidance.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. 👍
I think this new include
method is a bit cleaner. Nice work.
Let's discuss this on the Meshery dev call tomorrow at 7:30 pm IST / 9:00 am CT, |
@aboobakersiddiqr63 will you send word when you have added an include file example to the Contributing portion of this PR? |
Signed-off-by: Aboobaker Siddiq R <aboobakersiddiq63@gmail.com>
@alphaX86 I have added the example to contributing-cli.md file on how to proceed |
@aboobakersiddiqr63 noted. I'll try this and get back to you then 👍 |
Gents, do we have an example for the docs? Good to merge after this, yes? |
Hey @aboobakersiddiqr63 Let's discuss this on Meshery Development Meeting tomorrow at 8:30 PM IST / 9 AM Central time. Please add this as an agenda item in the meeting minutes. |
@alphaX86 Can you finish this off. // @aboobakersiddiqr63 |
I'll wrap this up @MUzairS15 |
🚀 Preview for commit 979747d at: https://655a10c9040c8637e4340e96--meshery-docs-preview.netlify.app |
@alphaX86 good to go? |
I'm testing the changes @leecalcote. Once they are good, we're good to merge this by EOD. |
🚀 Preview for commit bfb8611 at: https://655e27ef2a036247e6b1d648--meshery-docs-preview.netlify.app |
58bcf3b
to
c398859
Compare
Signed-off-by: Aadhitya A <aadhitya864@gmail.com>
c398859
to
3c38c86
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the changes 🟢. Made changes in doc page as well. LGTM 👍
Hold... one bug found in docs. Fixing it quick... |
🚀 Preview for commit 32a9aa9 at: https://655e333de2e9a44fe798016e--meshery-docs-preview.netlify.app |
32a9aa9
to
13a9e0a
Compare
🚀 Preview for commit 13a9e0a at: https://655e34cf2a03625285b1d70e--meshery-docs-preview.netlify.app |
13a9e0a
to
2e37e32
Compare
🚀 Preview for commit 2e37e32 at: https://655e365ce3d8f2562c9cf96e--meshery-docs-preview.netlify.app |
Signed-off-by: Aadhitya A <aadhitya864@gmail.com>
2e37e32
to
b623613
Compare
🚀 Preview for commit b623613 at: https://655e37c4b2a3c44dee74d4fe--meshery-docs-preview.netlify.app |
Fixed. We're good now // @leecalcote |
Roger, Roger. Thank you, @alphaX86 |
Notes for Reviewers
This PR fixes #9104
Signed commits