3 ms·
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
by hales 4y ago
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/ 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.
- mro_name 4y agothanks, indexes indeed may provide most what's expected from tags. At a way lower cost. Wicked. (In my microblog engine I go lengths to automatically maintain redundant entries in directories e.g. https://l.mro.name/o/t/CGI/ https://l.mro.name/o/t/CGI/. But a microblog is a different story)
- hales 4y ago> thanks, indexes indeed may provide most what's expected from tags. At a way lower cost. Wicked. Sorry, I'm a bit lost. Aren't they parts of the same thing? When you put tags on pages you also need an index of all the pages with that tag?
- mro_name 4y ago> parts of the same thing yes, from opposite angles. Adding a page to an index may be more obvious than adding a keyword to a page. Both UX-wise and technical.