THE GITHTML FIELD GUIDE
Use Markdown comments for author notes, never for secrets
Use HTML comments for short editorial notes when your Markdown processor supports them, but treat those comments as public source content. Hidden from the rendered page does not mean confidential. Keep credentials, personal information, and private discussion out of comments, and check the final export before sharing documents outside their original audience.
Distinguish editorial visibility from access control
A comment can remind a maintainer to update a screenshot without interrupting readers. It cannot protect the reminder from someone who can read the file. Repository source, downloaded documents, generated HTML, and review diffs may expose content that the rendered page does not display. Decide whether the note belongs in the public artifact at all. If it contains an internal decision, unresolved security detail, or customer-specific example, use the organization's approved private tracking system instead. Do not rely on a publishing theme to remove sensitive material that should never have entered the public source.
Write useful notes with a clear removal condition
The example uses a non-sensitive author note that names the section and the verification still needed. Avoid vague comments such as fix later, which survive indefinitely because nobody knows what completion means. Give the note an owner or associated task reference when the project's process supports that. Keep it near the content it qualifies, but do not split a sentence with a large invisible block. A future editor reading the raw file should see the intended action immediately. When the work is complete, remove the temporary note rather than preserving a misleading history inside the current document.
<!-- Author note: verify the sample output for version 2 before publishing this section. -->Inspect all publication surfaces before sharing
Preview the Markdown to check that the comment is hidden in the intended surface, then inspect the generated output as text to understand whether the comment remains present. Search for a distinctive harmless phrase from the note. This is a visibility test, not a security audit. Review code blocks and examples too, because a comment marker inside a fenced example is displayed literally. If sensitive content was previously committed or published, merely removing a comment from the latest page does not establish that every copy is gone. Follow the relevant incident or credential-rotation process instead of treating a cosmetic edit as complete remediation. For long-lived editorial work, prefer an explicit task over an invisible reminder. A task can carry status and responsibility, while a comment is easily overlooked by people reviewing only the rendered page.
- Use only non-sensitive author notes and give each one a concrete completion condition.
- Search the generated artifact for a harmless marker to learn whether comments survive conversion.
- Remove completed notes and move private coordination to an appropriate system.
- Check displayed code examples separately because their literal comment syntax is part of the lesson.
Sources and further reading
AI-assisted writing with source-linked guidance and illustrative examples. Read our editorial approach or report a correction.