In reworking this docdock-theme,
I wanted to document the reasons for my changes and how I have done it. But I didn’t know how to write comments in markdown.
Yes, one could use a normal HTML-comment, but you still can see the comment in the source code.
<!--
This is a comment.
Multiline comments are allowed as well
-->
Look at the source code, and you will see the text example below this line.
Searching in Stack Overflow
I came finally up with the following solution:
[comment]: # (This text is a comment!)
[comment]: # (This text is a comment! Multiline comments are allowed as far as long there is no line break. This text is a comment! Multiline comments are allowed as long as there is no line break. This text is a comment! Multiline comments are allowed as long as there is no line break. )
You can’t see the result of this last code example not even in the source code. The comment is hidden by definition 😉 But you can inspect my original text file on my GitHub
repository. Just click on the Edit page
link in the top right corner of this page.
There are also other possibilities, but the above solution with comment:
written in square brackets and the #
- sign followed by the comment written inside round brackets is the most portable version.
This work by Peter Baumgartner is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Permissions beyond the scope of this license may be available at http://notes.peter-baumgartner.net/contact.
Powered by the docdock theme for Hugo.
Privacy | Disclaimer