HNHacker News
TopNewBestAskShowJobs

hales

146 karma · joined April 19, 2022

submissionscomments
hales··on Minisleep – A Tiny Wiki Engine
I love the idea of tags/categories on sites. They're an alternative navigation strategy that I particularly like using when reading people's blogs.

I have not implemented tags in Minisleep's releases because, whilst doable, they are a bit messy and complex for this codebase. I want people to be able to fully understand what's going on in Minisleep so they can feel confident extending build_page.sh and adding custom script-pages themselves, not be worried they might be breaking some feature somewhere else that they don't know about yet.

Currently Minisleep's philosophy is "editing one page only modifies that one page". There are no central indexes. You are free to re-arrange, delete and create folders and files yourself, the worst you will have to do is re-run build_page.sh afterwards to update hyperlinks on a page.

Adding tags requires you to generate and update centralised pages regularly (eg every time a page has its tags changed or is deleted). If anyone modifies pages in a way that does not trigger these updates: things break.

Another (but more minor) issue: Minisleep's page relationships are hierarchical (folders) not relational (ala SQL). Tags are a bit more relational, ie different pages are arbitrarily related. For the pages themselves this is not a problem (tags are just a list of links somewhere on the page, no need to reference external materials when generating them) but it means the central tag pages (listing other pages with x tag) need to be made by trawling through _every_ page on the site manually with no optimisation.

In reality this is mostly fine, it's not really that performance demanding unless you have a wiki with thousands of pages or more (at which point you probably are not using Minisleep). I do it this way on my personal website https://halestrom.net/ for generating the front page index of articles and comments, with some hacked-up half indexes. It's a mess but it works, and that's exactly the sort of thing I want users to hack up and add to their Minisleep sites themselves, rather than accept as a mess from me.

hales··on Minisleep – A Tiny Wiki Engine
Ooh I like the idea of using SQlite. That would make backing up the site and moving it to other hosts much easier.

I'm going to have a look at Fossil if I need something more than Minisleep :)

hales··on Minisleep – A Tiny Wiki Engine
Sorry I've never used OpenBSD.

It looks like OpenBSD's httpd does not support CGI, instead it only does FastCGI:

https://man.openbsd.org/httpd.8

You then have to use a wrapper to convert FastCGI into CGI:

https://man.openbsd.org/slowcgi.8

I wouldn't bother with all of this. Use a http server that has your back from the start, don't layer more protocols and add daemons where you don't have to

https://halestrom.net/darksleep/blog/046_cgi/

I wonder: if CGI isn't enough for a project then wouldn't it be better to talk HTTP natively yourself and go through a HTTP<->HTTPS proxy rather than talking FCGI yourself and going through a FCGI<->HTTPS proxy? I'm not sure, I have not tested both routes, CGI is more than enough for my uses.

hales··on Minisleep – A Tiny Wiki Engine
Tiddlywiki seems (from a technical perspective) a little bit closer to what you're imagining:

https://tiddlywiki.com/

Sadly it doesn't let you edit WYSIWYG, ie when you click "Edit" it still transforms the section back into monospaced markup script in a textarea.

Theoretically it should be possible to change that, but I have not looked at the codebase.

If you were to do this from the ground up you would probably:

* Enable .contentEditable on the whole page (or at least sections like <main>)

* Add a floating toolbar for formatting controls (and a save button)

* Do the submit in javascript, so the page doesn't have to fully reload.

* Possibly add a toggle edit button? Or would people be comfy being able to accidentally edit pages whilst reading (as long as they realise they have to hit "save" to make a change). This might ruin some people's navigation key shortcuts in their browser (eg users of Vimium).

For personal or small-team use I could see this being good. For larger teams it would be a nightmare, as accidental edits would be common. The formal 3/4 step editing process has its problems, but it's a useful barrier against the tides.

Alternatively you could stick to using MS Office/Libreoffice, set the view mode to "web" and hyperlink to subheadings as your navigation (instead of "pages"). If we wash our minds of the historical uses of word processors versus web browsers: this could be a very successful implementation for 1 user or a few users (on a network share).

hales··on Minisleep – A Tiny Wiki Engine
I'm Hales, the author of Minisleep. I'm open to any and all questions, critique and tangential stories.

I made Minisleep to solve the problems I had with other wiki engines and it's been doing this well. It runs my personal blog website, a few websites of clients/employers and a home wiki that gets touched once every two years when I organise a LAN party. I'm not sure if anyone else on the internet uses it outside of that (Minisleep doesn't contain any install tracking or unique IDs).

EDIT: Although I did discover a russian linux forum mentioning it last year. The world has changed quite a bit. https://www.linux.org.ru/forum/general/16473170/page1?lastmo...

hales··on Minisleep – A Tiny Wiki Engine
I really liked Zim many years ago and used it quite a bit for personal note taking, but its lack of tables really annoyed me. I love tables with a passion.

(On that note: when you add table support to a markup language PLEASE support newlines and paragraphs inside table cells. Don't assume that all tables are spreadsheets with only a small amount of text per cell. Some of us live in tables like high-rise apartments, eg bug tracking, school note taking & image stacking in cells.)

hales··on Minisleep – A Tiny Wiki Engine
(I'm the author of Minisleep)

It's been many years, so my memory is a bit rusty. I think I recall it being fiddly to upload images for a page and possibly the themes were complex to modify (?) (I didn't like the default and wanted to make something simpler).

I can't be certain, I have not tried Doku in years. It looks like a lot of places use it now and its seeing success.

hales··on Minisleep – A Tiny Wiki Engine
What version of WSL and what webserver, if I may ask?
← PreviousPage 2 of 2