That's it, I have begun migrating my wiki to a static site.

· · Web · 4 · 2 · 19

@neauoire Good luck! What did you use for it until now?

@neauoire you probably mentioned this already, but what are your build times like with your C site generator?

@eel I haven't taken the time to look into how to print build times in C99 yet, could you add it and make a PR to?

@neauoire in bash you can just

$ time foo

(foo being your executable)

@eel For the 300 pages of grimgrains:

0.26user 0.04system 0:00.31elapsed 98%CPU

@neauoire thanks. that's blazing fast! not even a second :)

@eel for the 80 pages of hundred rabbits.

0.26user 0.03system 0:00.16elapsed 98%CPU

@eel it's a bit different each time I run it but I haven't seen it go above .20 for this one.

@eel I think it might be faster if I use tcc with some of the debug flags off

@neauoire i wouldn't necessarily think so. as i understand it, tcc compiles faster, but gcc builds faster executables.
removing debug flags, and adding -O2 or -O3 for more compile-time optimizations could make them even faster

@eel gotcha, well, at this point I think it's plenty fast anyways~

@neauoire do you have ideas how to handle search without client-side JS? Something server side? Or just no search? I’ve been noodling on a similar move, and the best I can come up with without client-side JS or server-something is a static page with all content displayed and a prompt to use cmd+f or something.

@eli_oat I think I'll just make a very straightforward index, I'm not sure.

My thought for mine was to have an index with a tagging character. The idea being to make it easier to use inbrowser search to find the word in the index (as opposed to content.)

@dualhammers @neauoire @eli_oat This may be something you could use to search with. Seems pretty small and no deps.
you'd preload the information into it and you can search based off of that.

@ciel @dualhammers @neauoire I'd like to avoid JS at all in my solution, but like the look of fusejs -- I currently use which I like very much, which also doesn't have any deps. (at least I don't think it does)

@eli_oat @dualhammers @neauoire Yeah, I saw that one as well. I recommended fuse just based on the demo seeming to work a bit better compared to the lunrjs demo. I haven't implemented either yet. I didn't really connect the dots that this could be a decent option.

Since this is client side, I'd try to reduce the amount of searchable information though. Maybe have searchable titles and tags, but don't actually search on the content of your posts.

@eli_oat @dualhammers @neauoire removing unnecessary dynamic stuff is still a good goal. Though in a wiki setting, having some amount of search is nice. Think there's reasonable ways to provide this to users and still be way below the overhead of any common js SPA framework.

Do y'all have sizing goals for your webpages? like don't exceed XXX KB?

@ciel @eli_oat @dualhammers for the 100r site and grimgrains, we went for ~40kb of html per page. I will probably get to something around that as well for XXIIVV.

@neauoire @eli_oat @dualhammers just doing some very rough maths. Could generate a js index object that has about 800 120-character long strings (with some overhead) for ~100kb. fuse seems to be about 4kb. And there's responsible ways to ensure to only download when needed and to have it cache.

Not sure if I'm going to implement this, but looking at the numbers it maybe possible to do it 'responsibly'. Which is not something I expected.

@ciel @dualhammers @neauoire my goal is really just to have an easier deploy cycle, and support a larger array of browsers/devices. I currently have a simple js front-end for json data sourced from a couchdb instance that I'd like to shut down.

@ciel @neauoire @eli_oat No JS for me for now. I'll add some if absolutely needed, but I'd like to avoid it

@neauoire @eli_oat This was the solution to no-JS search I had in an old version of my wiki

Sign in to participate in the conversation

Merveilles is a community project aimed at the establishment of new ways of speaking, seeing and organizing information — A culture that seeks augmentation through the arts of engineering and design. A warm welcome to any like-minded people who feel these ideals resonate with them.