Closed vpetersson closed 2 years ago
@salmanfarisvp Feel free to take a stab at this. Don't think it will be too complicated to be honest.
@vpetersson Right now the https://nebraltd.github.io/Helium-Guides/ page is served from the pages branch, right? So I should modify that and make it work and check the URL first right?
Thanks for the resource!
No, I changed it to 'main':
The only things we really need to do is add some redirects and some auto cache purging that is now possible with our Cloudflare enterprise account
Added cache purging https://github.com/NebraLtd/Helium-Guides/commit/06b95889604b3e1d2554f99315a8ec44f6897698
Now just need to add redirects from the old domain structure to the new one. Can probably be done with a Cloudflare page rule I think
FYI @vpetersson docsify is not a true static page generator. This is why the current setup does not work properly on pages.
What we need to do, after we have set up the page redirects, is change the setup back to hash routing: https://github.com/NebraLtd/Helium-Guides/blob/5211ebebaad4b89a4053e96e6d734188ae33fa19/docs/index.html#L57
This will allow it to work on pages
Alternative is to move to a true static site generator but that is probably one for the future IMO (unless there is a way to build docsify statically...but i don't think there is)
Looks like static is on their roadmap for v5 https://github.com/docsifyjs/docsify/issues/1061
For reference https://docsify.js.org/#/deploy?id=github-pages
i just need to add the redirects and then we should be ready to switch over
You can see it at https://nebraltd.github.io/Helium-Guides/#/ (building from pages branch for testing so we dont break the production version)
Essentially we need to:
main
branch@vpetersson actually - the one thing i am not sure of with GH Pages is serving the PDFs.
Need to check how we are currently doing this on the VPS
@vpetersson actually - the one thing i am not sure of with GH Pages is serving the PDFs.
Need to check how we are currently doing this on the VPS
This is done using this script. That should be easy enough to incorporate in GitHub Actions.
Ah ok thanks @vpetersson will try and get a github action set up for that 👍
Ah ok thanks @vpetersson will try and get a github action set up for that 👍
Let @salmanfarisvp take a stab at that instead.
For reference https://github.com/pandoc/pandoc-action-example
having trouble setting up the redirects...
Been experimenting also with cloudflare pages https://646ee11a.helium-guides.pages.dev/ (doesn't seem to work very well either with docsify)
@shawaj Did you switch the GitHub page serving to "page" branch? I'm testing the links now and I can see a few of them are broken and I'll fix it.
@salmanfarisvp Yeah I changed it to pages branch just for testing so as not to break the existing site before switchover
If you have found links that aren't working, best thing is probably to create a draft PR to main branch with the updates which we can just merge when we switch over to Github pages
In fact @salmanfarisvp maybe just add them to the PR #228 on pages branch
@shawaj Internal and external links are checked and working fine.
The setup should be fairly straight forward:
After we're done, we need to make sure that no links changed from the old vs new setup.
References