Closed anoadragon453 closed 5 years ago
Yeah I will setup the hosting. I think we should do the redirect part in js, so we don't need to replace every page.
Yeah that sounds good. I'll see what I can do.
First try: https://zeronet.io/docs/ Looks like the menu order is got fixed
Wonderful! Have you set up the webhooks yet? Also do you want to try to mkdocs-material
theme yet?
Alright, for the JS I'm thinking of popping up a notice that says it'll take you to the new docs page. It'll then check if the same page exists on the new docs (in case we moved a page or changed its name). If a 404 is returned, it'll just take you to https://zeronet.io/docs.
Sound good?
Sounds good for me, tomrrow I will setup the mkdocs-material theme
JS is ready, but could you enable CORS for https://zeronet.io/docs so I can check if a given page returns a 404
or not?
have added the webhooks + allowed cors, but seems like github does not really works well today, problem with PR mergning and webhooks does not seems to trigger
Other issues
@HelloZeroNet Yeah it's broken for everyone.
Regarding the images, they seem to be linking to https://zeronet.io/img/zerotalk.png instead of https://zeronet.io/docs/img/zerotalk.png. I imagine this is the problem. I suppose this is the issue of using https://zeronet.io/docs/... instead of https://docs.zeronet.io/
We could either change the documentation (which would require everyone rehosting to start their URLs with /docs/
), or you could put in a URL rewrite rule into nginx like so:
// Inside your server {} block...
location /docs/ {
rewrite ^/img/(.*)$ /docs/img/$1 last;
}
Fixed the images by using relative pats
Heh, that works too.
There are some great extensions we should look at enabling mentioned here, btw: https://squidfunk.github.io/mkdocs-material/extensions/codehilite/
I think we can safely close this one now :)
Continuation of #95
Essentially you'll want to set up a webhook for whenever master is pushed to. This will then send out a notification, which a program like https://github.com/OllieJones/git-webhook-responder/blob/master/README.md can respond to and run a command, like
mkdocs build
, on.It's not too difficult to set up and self-host. We'll also need to provide a redirect from the existing documentation URLs to the new ones. My suggestion is just replacing each page with some text that says "The documentation has moved to docs.zeronet.io. You will be redirected in 5 seconds, otherwise click [here]()".
And then we have some JS that will take them to the exact docs page they wanted to go to, but now on the new domain.
I'm fine with writing the JS and getting that working if you're ok with doing the hosting part @HelloZeroNet?