4 ms·
Don't need a SPA for that. Local HTML based documentation was a thing long before SPA was even a term.
by ogre_codes 6y ago
Don't need a SPA for that. Local HTML based documentation was a thing long before SPA was even a term.
- paxys 6y agoHow does that work exactly?
- duskwuff 6y agoIt's literally just a folder full of perfectly normal HTML files. You don't need Javascript or a SPA to double-click one of those and look at it in a browser. Even better, if your operating system has full-text file indexing, it'll be able to search them normally.
- paxys 6y agoSure, but you also have to manually redownload the entire site whenever there is a change.
- leephillips 6y agoThat’s what rsync is for.
- jolmg 6y agoor wget, since rsync doesn't work with HTTP.
- leephillips 6y agoI was thinking (assuming this is one's own stuff), use rsync to download the files to avoid transferring lots of unchanged stuff. But if this is for an end user, yes, there would only be html access.
- frenchyatwork 6y agoYou would with a SPA as well. Edit: incidentally, a common way for this to work is that the documentation just comes with the software itself, so it's just sitting there on you computer. If the software updates, the documentation updates.
- TheGoodBarn 6y agoTo a degree though, thats where PWAs come in. Websites like https://devdocs.io/ https://devdocs.io/ do this exact thing through desktop Progressive Web Apps. Basically you keep your markup & source as static as possible, and allow a serviceWorker to cache those files locally. This can also be done with a SPA, but if we're talking docs, you get the benefit of only having to update a specific page if its raw html.
- imtringued 6y agoDocumentation doesn't change in real time.
- ogre_codes 6y ago> Documentation doesn't change in real time. If you are a javascript developer chasing the bleeding edge of web dev, it's pretty close to real time!
- RNCTX 6y agoOr better yet, one HTML file. Anchor tags are still a thing, last I checked. CTRL-F, does anyone still speak it?
- jand 6y agoNo advertisment, just an example: https://en.wikipedia.org/wiki/Doxygen https://en.wikipedia.org/wiki/Doxygen
- ogre_codes 6y agoIt's HTML, it's designed to link between URLs. Whether the URL is a file on your filesystem or on the web is irrelevant. If you keep all your resources in the same set of subfolders you can use the same html/ images/ CSS as the web and use relative links.
- purerandomness 6y agoHave a look in your /usr/share/doc folder. Run this: find /usr/share/doc -name '*.htm*' You'll be surprised. Your system's package manager is installing the HTML documentation right along with the software you install. When you update your system, new package versions along with their corresponding documentation are downlaoded.
- collyw 6y agoIt amazes me that anyone asks this question. I have trouble seeing why you would want put documentaion in a SPA. Search result perhaps, but the rest of it?
- ogre_codes 6y agoI think it's a part of modern web developer culture. Where I work I started on a project which was already 3-4 months down the road and they were fully dedicated to react frontend and Koa on the backend. The whole stack was based on a react boilerplate the company built, as far as I can tell the idea of doing something other than JS on the server was never tabled. Likewise, the idea of rendering HTML on the server was never brought up. Everything is pure client side JS SPA even in places where it might make sense to just render things on the server or load a separate page.