You put so much work into your website, so it deserves some ASCII art on the <head>
of every page.
However, Hugo removes all HTML comments by default. Here’s a recipe how to get them back in.
.1. Convert some (or type, if you’re hardcore hax0r):
L33t: http://www.robertecker.com/hp/research/leet-converter.php?lang=en
ASCII: http://patorjk.com/software/taag/#p=display&f=Graffiti&t=Type%20Something%20
.2. Once done, wrap your ASCII with HTML comments <!--
and -->>
(that’s how you want it to be in the final HTML code).
.3. Paste everything into Unicode coverter: https://www.branah.com/unicode-converter
.4. Copy paste result into Sublime etc, then replace every line break with \n (I use Sublime Text multiple cursors and Home/End keys)
.5. Add your comment as a custom variable in global config.toml or config.yaml in Hugo:
For example, config.toml:
[params]
headercommentblock = "PASTEHEREYOURASCII"
Double-check that it’s a single line. If not, replace line breaks with \n
.
.6. Call comments: in head using safeHtml
:
{{ .Site.Params.headercommentblock | safeHtml }}
.7. Voilà!