#+title: How this site works

the primary function to use is =htmlize-buffer= - the equivalent for files does not do syntax highlighting sadly. So we have to open a file in its buffer, fix all the links without saving, export that html into a _new_ buffer, and save /that/ to its final resting place. Seems simple enough right?

*wrong*

at least, the way i've been handling it as an outgrowth of my vimwiki imitation hastn't quite worked yet, at least not all the way thru. in fact, im writing this out in ordr to simplify the task and thereby solve my issues with this project.

Time to work on hyperbole!

*** just kidding it might have been important

while assembling my hyperbole stuff, i realized that my approach of just turning say =word= into =[[word.org][word]]= is pretty flawed. much better to make it into =[[/architecture/site/word/][word]]= that way when it exports you don't get name.html... and that export would then have to be like =[[word/][word]]= and that's fine but it raises the question of what to do when a sub-article references another word - that's awhat happens when i made the word "checked" in the hyperbole page a link. does it go to /checked/index.html? maybe /hyperbole/checked.html? obviously neither of those are correct. should be /hyperbole/checked/index.html !

im going to try being slightly more robust, and in the lead-up to that i figure may as well add the dreaded /export folder/...

okay we gotta rewrite a whole bunch of stuff

... and done!

code at mirwiki.el

:3

okay now i wanna use =org-indent-mode=, which basically creates wider margins on more nested headings. it's nice for visual hierarchy, but htmlize doesn't seem to support it directly... so that's a small bummer

perhaps i can add it back in somehow using the function =org-outline-level= ? infiltrating htmlize's processing loop is probably the tricky part of that.

screw this. might be easier to just uh.. mine all possible css from the htmlize of an org file with all the markups. then export the orgs more normally? like ugh but i want more actual structure than htmlize is willing to give

*** a new approach to structure

Thank you @zyd! per https://tenforward.social/@zyd/113026816328040914 im going to be adding a pass to =mirwiki-export-file= and then alongside =mir/customize-css= and =mir/fix-page-title=!

well that's done, it took a few tries to to figure out (ended up sticking tons of ~%org-level-0%~ all over everything in the meantime) but it's fine now.

this is, however, one of those things that i really wish didn't need such a hacky solution. like this was the best way to do it and consisted of looping over two different buffers making procedural line by line changes.