Menu

Iceberg Website

This website is designed something like an iceberg. There is a visible part, which you’re reading now, above the water. There is also a large invisible part that only I can see locally on my computers. This sometimes leads to links not working, but it affords me a great deal of flexibility in writing here.

The logic of the hidden pages is controlled by keeping them as drafts in Hugo. To do so, I add draft: true to the frontmatter of a page. This makes a whole page get rendered locally, but not publish to the actual website. I can also have private material inside a public pages using shortcode private which works like this:

 {{ if eq hugo.Environment "development" }}
 		 <div style="border: dotted; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px;">
 		 ✒️ 
 		 {{ .Inner | markdownify }}
 		 </div>
 {{ end }}
 
 {{ if eq hugo.Environment "production" }}
 	<!-- gobble -->
 {{ end }}

This allows me to include private content in a public page. On my end, viewing the page locally, it looks something like this.

✒️ And this is some private material! You usually can't see this stuff.

Published: Feb 22, 2025 @ 15:29.
Last Modified: Apr 23, 2025 @ 14:34.

Tags:

#meta #Hugo

Backlinks:

Navigation Menu:

Home / Now / Blog / Notes / Reading / Office Camera / Tags / RSS Feeds / Top of Page

Thanks for reading! If you have any comments or questions about the content, please let me know. Anyone can contact me by email.