How to remove comments from generated HTML
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 22.2k
- Forks
- 1.9k
- PR merge metrics
- PR metrics pending
Description
Question
I have some comments in md files like this <!-- some content -->,this comments will output to generated HTML, If someone looks at the source code of the webpage they will see the comments too.
Is there a way to ignore comments completely while generating the html pages?
addtional, hugo use --minify to support this
https://discourse.gohugo.io/t/adding-comments-in-a-blog-post-in-a-way-that-it-is-not-added-to-the-generated-html/52677
Version
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how Markdown comments are transformed into generated HTML in mdBook. Compare the current output with the requested behavior and determine what existing generation or minification path would need to change; done means comments are omitted from generated pages without removing other intended content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100