Re:Apple's DocC is excellent, but unusable for open source p...
by pilif on Wednesday June 30, 2021 @06:02AM
(#27686755)
> As far as I can tell, that’s not true. The output is completely static and just requires some very basic URL rewrites.
My understanding of static webpages is that there's zero processing happening server-side. "Basic URL rewrites" counts as processing in my book
Re:Apple's DocC is excellent, but unusable for open source p...
by djxfade on Wednesday June 30, 2021 @06:30AM
(#27686914)
I have hacked "URL rewriting" on Github, bu having a custom 404 page, that rewrites the URL as a query parameter. And then in the app just use the history api to take that query paramenter and replace history without an actual reload.
Re:Apple's DocC is excellent, but unusable for open source p...
by tombl on Wednesday June 30, 2021 @08:07AM
(#27687498)
I've deployed SPAs on GitHub Pages before, and you can just rename the index.html to 404.html and the site will function just as normal with no modifications.
Re:Apple's DocC is excellent, but unusable for open source p...
by realityking on Wednesday June 30, 2021 @06:31AM
(#27686916)
I think that’s an arbitrary line you’re drawing. Every webserver does some URL rewriting, otherwise you wouldn’t be able to to use /docs, /docs/ and /docs/index.html. The difference is just that this requires some more custom rewriting rules to facilitate being a single page app.
I personally even disagree with that architecture, I think it’d be better to pretender the content for all pages (like, e.g., Gatsby does) but I wouldn’t call it not a static page.
As far as I can tell, that’s not true. The output is completely static and just requires some very basic URL rewrites.
The Netlify config in the linked blog post (https://josephduffy.co.uk/posts/hosting-docc-archives) illustrates this quite nicely. While Netlify has some Function-as-a-service capabilities DocC uses none of that.