Repurposing Hugo as a wiki
justinmiller.io
justinmiller.io
My main website[1] doesn't use a lot of internal linking. There are a few links but not a lot. I have a separate private website full of family stories that I've written down for my kids, and it's very heavily cross-linked. From the authoring end of it, I'm just writing a bunch of Markdown in Writer and then it magically shows up online later.
I like it. Each piece of that process is simple and self-contained, and once up and running it Just Works.
[0]: https://en.wikipedia.org/wiki/Personal_knowledge_management
[1]: https://honeypot.net
The essence of a wiki is to be a collaborative website while author is expressly mentionning he doesn't want to use a wiki software because he doen't need collaborative functions.
[1]: https://sagar.se/notes/computers/hugo/digital-garden/publish...
[2]: https://sagar.se/notes/computers/hugo/digital-garden/publish...
I assume you did the same?
Backstory: I've been using Joplin as my primary note taking system / personal information manager for a few years. While I'm generally happy with it, I do wish I could just use the filesystem itself rather than an abstraction layer on top of it, as I'd love to be able to perform bulk operations using standard *nix tools, and perform versioning with git. Since I'm using Hugo for my personal homepage and looking to use it with a few other projects, I find myself doing a lot of copypasta between when an idea becomes enough of a "thing" to warrant becoming a post or page. I think something like this could help me bridge that gap.
It would really be hard to convince me to use any proprietary format for notes now.
It's basically Obsidian Publish but free.
(not made by me)
I went with Astro in the end, but I loved reading this series.
Regarding Astro, that was the original build tool I was using, early in the astro project's development. I received a community award in 2020. It didn't work for something, frankly I forget what, but it's entirely possible that it's gotten a whole lot better now.
One little edit I made was to add this after class="missing":
title="Nothing here, yet."
If I were to try again I would try to wire up a Jekyll `document` `pre_render` hook to Hexapdf:
- https://jekyllrb.com/docs/plugins/hooks/
- https://hexapdf.gettalong.org/documentation/document-creatio...
1. Having these documentation as webpages, with proper print CSS
2. SSG them into a bunch of HTML files
3. Serve them quickly with a web server (e.g., python -m http.server)
4. Run a headless Chrome, iterate, and print as PDF
It's more of a SSG kit and it's dead easy to write a rule + filter that, for example, takes every markdown doc in a directory and builds a pdf with Pandoc.
Quick guide here: https://ryan-schachte.com/blog/docs_with_mkdocs/
[1] Tinasaurus:
I thought it'd be okay to use the community-maintained Obsidian git plugin, but as fate would have it, my original fears actually came to pass. I lost over a month of notes due to how badly behaved its git merge heuristics are. It force pushes and rewrites history and will step on other machines with different updates. It took me a little while to catch on to the fact my notes were disappearing, and there was nothing I could do to recover.
I ultimately threw up my hands and abandoned Obsidian outright.
If the use case is single user wiki and the user is technical enough, MediaWiki requires more resources and is also more work than Git + Markdown + a static site generator if you are already comfortable with static site generators. No specific web server config, no tricky configuration files, no database to maintain, not difficulties to upgrade the server…
Now, one could argue that "single user wiki" just means "regular website" because the essence of the wiki is gone. Wiki means "quick" (friction-less?) edits by multiple users, possibly anonymous [1]). What the author of the post did is convenient handling of internal links. Which is still a good idea, but I would do it differently: I would not create a <a href="..."> tag for missing pages, that not very nice to users. If you do this, you are intentionally creating broken links that can only be distinguished with styling, which is not very accessible. Red links are useful in an actual wiki where users can actually create the page, but on a regular website, I'd use something like <span class="missing" title="Dedicated page coming"> or so (+ whatever is needed for the title text to be accessible).
[1] https://en.wikipedia.org/wiki/Wiki
> A wiki is a form of online hypertext publication, collaboratively edited and managed by its own audience, using a web browser
And from that webster’s definition, roughly any site with user comments can be called a wiki. If you change the OR to an AND, the only thing stopping HN from being a wiki is the “corrections” component — which definitely does not correctly capture the difference between the two.
Wikipedia’s definition is also awkwardly constrained — hypertext and web browsers are obviously just an artifact of current implementations; if you managed it through markdown files and an app, does it seize to be a wiki? Is an offline read-only dump of Wikipedia passed around on a USB by bicycle no longer a wiki?
It's neither awkward nor overly constrained. It's just defining what a wiki actually is.
I find the questions at the end of your comment strange; they have correct answers that you'd probably find surprising, given the fact that you're asking in a way that suggests you think constitutes a sound argument for your side. For example, your last one:
> Is an offline read-only dump of Wikipedia passed around on a USB by bicycle no longer a wiki?
Uh, yes? Wikipedia remains a wiki, certainly. Your offline dump of it is not. What you have there is an encyclopedia. And that exemplifies what's really at issue.
The word "wiki" being thrown around inappropriately is the product of shallow thinking about wikis, encyclopedias, and the relationship between the two. People who are in the audience for the tools described here and that you are talking about are simply not talking about wikis.
These people are not building a personal wiki—they're building a personal encyclopedia. That's what they're doing. An "encyclopedia of me". But because of a failure to grok how portmanteaus work and likely their only exposure to wikis being through Wikipedia, they have a debased understanding of what the "wiki" part of Wikipedia denotes. (Or perhaps they just think "wiki" sounds cooler than the far less hip suffix -pedia, and so they have contorted their thinking and their arguments around trying to defend saying one instead of the other at the expense of the rest of the world—the "I missed my turn, but that's okay, I'll just make everyone around me pay for it"-style of thinking.)
It's like if you lived your whole life in a part of the world where iced coffee isn't consumed (and other types of coffee only rarely), then when it's introduced to your people it's to great fanfare, and for no good reason a subset of your countrymen start calling all sorts of unrelated things "ice", whether ice is involved or not. Their sole motivation? The thing they're referring to is a coffee product. So someone asks, "Have you checked out the ice?" — at a diner where the only type of coffee comes poured from a pot of the hot stuff. "We're really getting into icemaking" — after having just bought a new countertop espresso machine. "I got some ice candies from Barter Jack's" — referring to chocolate-covered coffee beans.
> does it seize to be [...]?
The correct word is "cease", but I suppose you'd argue that that's overly prescriptive and a constraint that needs changing, too.
It's open, grows organically by design, and much more.
A website that anyone can update. "Wikiwiki" is Hawaiian for quick.