cben/mathdown

Pretty URLs: mathdown.net/foobar

Closed this issue · 1 comments

cben commented

This requires a server, which is needed for crawlable docs anyway.
(Pretty URLs could also work on static hosting with smarter routing, e.g. divshot.com

I'd like to keep the option of running from static files with ?doc=foobar or #doc=foobar without a server, at least for local development.

A central question is whether I still care about ability to run from Github Pages?

  • It IS very good that any fork can be used directly off Github! [limited to gh-pages branch, as long as rawgit doesn't support submodules...]!
  • Turns out github does correctly sign HTTPS now for USER.github.io/mathdown URLs. So that's wonderful — people can test their forks without compromising security :-)
    • There is still a question of ? URLs needlessly(?) sending the secret doc id to Github. Perhaps I do need to switch to # or #! URLs? OTOH, if you're running from Github Pages, you're trusting Github to not inject evil spyware JS anyway. Although URLs are an easier target for evil employees, they probable linger in various access logs.
  • I once thought I can abuse GH Pages' 404 support to return the same html for any /foobar URL but while the html would be visible, it would be returned with 404 status, which is absolutely wrong. (Besides, that only works for org & user pages, so useless for forks)
cben commented

This is possible on Netlify which supports SPA routing (I think via 404.html)?
But it's not a priority, ?doc= support is better across alternate ways somebody might run it, and I'm not gonna bother.