Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to GitHub Pages #225

Closed
vpetersson opened this issue Nov 2, 2021 · 21 comments
Closed

Migrate to GitHub Pages #225

vpetersson opened this issue Nov 2, 2021 · 21 comments
Assignees
Labels
enhancement New feature or request

Comments

@vpetersson
Copy link

vpetersson commented Nov 2, 2021

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

@vpetersson
Copy link
Author

@salmanfarisvp Feel free to take a stab at this. Don't think it will be too complicated to be honest.

@salmanfarisvp
Copy link
Contributor

@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!

@vpetersson
Copy link
Author

No, I changed it to 'main':
Screen Shot 2021-11-02 at 4 06 41 PM

@salmanfarisvp salmanfarisvp added the enhancement New feature or request label Nov 2, 2021
@shawaj
Copy link
Member

shawaj commented Nov 2, 2021

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

shawaj added a commit that referenced this issue Nov 4, 2021
Auto purge guides cache

Relates to #225
@shawaj
Copy link
Member

shawaj commented Nov 4, 2021

Added cache purging 06b9588

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

@shawaj
Copy link
Member

shawaj commented Nov 4, 2021

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:

routerMode: 'history', // default: 'hash'

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)

@shawaj
Copy link
Member

shawaj commented Nov 4, 2021

Looks like static is on their roadmap for v5 docsifyjs/docsify#1061

shawaj added a commit that referenced this issue Nov 4, 2021
- update index.html for hash routing
- create .nojekyll for proper rendering

Relates-to: #225
@shawaj
Copy link
Member

shawaj commented Nov 4, 2021

@shawaj
Copy link
Member

shawaj commented Nov 4, 2021

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:

@shawaj
Copy link
Member

shawaj commented Nov 4, 2021

@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
Copy link
Author

@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.

@shawaj
Copy link
Member

shawaj commented Nov 4, 2021

Ah ok thanks @vpetersson will try and get a github action set up for that 👍

@vpetersson
Copy link
Author

Ah ok thanks @vpetersson will try and get a github action set up for that 👍

Let @salmanfarisvp take a stab at that instead.

@shawaj
Copy link
Member

shawaj commented Nov 4, 2021

shawaj added a commit that referenced this issue Nov 5, 2021
- add generate-pdfs.yml which uses pandoc to create pdfs and commit to repo

Relates-to: #225
Relates-to: #228
shawaj added a commit that referenced this issue Nov 5, 2021
- add generate-pdfs.yml which uses pandoc to create pdfs and commit to repo

Relates-to: #225
Relates-to: #228
@shawaj
Copy link
Member

shawaj commented Nov 5, 2021

having trouble setting up the redirects...

image

@shawaj
Copy link
Member

shawaj commented Nov 5, 2021

Been experimenting also with cloudflare pages https://646ee11a.helium-guides.pages.dev/ (doesn't seem to work very well either with docsify)

@salmanfarisvp
Copy link
Contributor

@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.

@shawaj
Copy link
Member

shawaj commented Nov 5, 2021

@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

@shawaj
Copy link
Member

shawaj commented Nov 5, 2021

In fact @salmanfarisvp maybe just add them to the PR #228 on pages branch

@salmanfarisvp
Copy link
Contributor

@shawaj Internal and external links are checked and working fine.

@shawaj
Copy link
Member

shawaj commented Feb 25, 2022

Fixed in 9c26c8e

@shawaj shawaj closed this as completed Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants