Skip to content

Migrate site to Zola (fixes #7) #42

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

Merged
merged 6 commits into from
Nov 29, 2019
Merged

Migrate site to Zola (fixes #7) #42

merged 6 commits into from
Nov 29, 2019

Conversation

17cupsofcoffee
Copy link
Collaborator

look upon ye and despair, at the largest PR diff mankind has ever seen

While I was initially not a fan of the idea of migrating the site across to a different generator, a few things have swayed me the other way recently:

  • 99% of the site's maintainance is being done by @ozkriff, and their preference was Zola.
  • My personal site is also using Zola, and I'm missing a few of its features when I'm using Jekyll (anchor links, colocated assets, etc).
  • The WG has just taken maintainership of AreWeGameYet, which is also a Zola site.
  • ...and most importantly, I was bored and wanted to do some webdev 😛

So I've gone through and ported the existing theme and content across - as far as I can tell, it looks and behaves identically.

The main user-facing changes are:

  • Zola doesn't support /YYYY/MM/DD/slug URLs, so the posts have been moved to /posts/slug. All existing posts have aliases defined, so existing links won't break.
  • The Zola URL for an RSS feed is rss.xml, not feed.xml - again, I've added a redirect.

There's a live preview at https://mystifying-keller-336452.netlify.com - please feel free to snoop around for things that are broken :)

The main thing that would still need doing to get this ready to merge would be setting up the CI config - @ozkriff's expertise would be appreciated there 😄

Copy link
Member

@Lokathor Lokathor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good from as much as I can tell, but I've got no real experience with blog engines.

@17cupsofcoffee 17cupsofcoffee mentioned this pull request Nov 27, 2019
Copy link
Member

@AlexEne AlexEne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best pr ever :D

@17cupsofcoffee 17cupsofcoffee marked this pull request as ready for review November 28, 2019 20:08
Copy link
Member

@ozkriff ozkriff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've posted a few nitpick comments, but overall this is a great PR, thank you so much! 👏

Copy link
Member

@ozkriff ozkriff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@ozkriff ozkriff requested a review from Lokathor November 29, 2019 10:41
@ozkriff
Copy link
Member

ozkriff commented Nov 29, 2019

So, let's merge this PR in a few hours if no one objects? :)

@ozkriff ozkriff merged commit fc2aa61 into rust-gamedev:master Nov 29, 2019
@zicklag
Copy link
Contributor

zicklag commented Nov 29, 2019

This is great!

But...now the GitHub pages site just shows the README. If you guys want I can setup a Drone CI script for building the site and pushing it to GitHub pages.

@ozkriff
Copy link
Member

ozkriff commented Nov 29, 2019

image

For some reason, the source branch is still master (and not gh-pages) and I can't change it.

UPD: https://stackoverflow.com/questions/25559292/github-page-shows-master-branch-not-gh-pages ugh

@17cupsofcoffee
Copy link
Collaborator Author

17cupsofcoffee commented Nov 30, 2019

So apparently this is working as intended - user/organisation page repos will only let you publish from master, unlike normal repos. This is silly, and I hate it.

That leaves us with three options:

  1. Revert the PR, either temporarily or permanently.
  2. Rename the repo to make it not be an organisation site (I think this is a non-starter, as it'd change the base URL of the site and break all the links that are already out there)
  3. Rename our current master branch to something like source, and get the job to publish to master instead.

I think 3 would be an okay solution (as long as we switch the repo's default branch to source so that people don't see the static content when they look at https://github.com/rust-gamedev/rust-gamedev.github.io). How would people feel about that?

(Also, it figures I'd break the site the one night I'm away from my computer... Sorry 😅)

@Lokathor
Copy link
Member

Option 3 sounds slightly goofy but very simple. Let's do that.

@kpp
Copy link

kpp commented Nov 30, 2019

How would people feel about that?

It's fine because you can set source as a default branch and every PR will be targeted to source branch by default.

@Lokathor
Copy link
Member

My one concern is if the github pages branch is actually "the default branch", and it will change when we change the default branch. I don't know how that works exactly.

@zicklag
Copy link
Contributor

zicklag commented Nov 30, 2019

Another option, if the different branch doesn't work, would be to track the source in another repo and have CI push the built result to the organization repo's master branch.

@ozkriff
Copy link
Member

ozkriff commented Nov 30, 2019

  1. Rename our current master branch to something like source, and get the job to publish to master instead.

Ok, I'll try this.

@ozkriff
Copy link
Member

ozkriff commented Nov 30, 2019

Aaand done. Set source as the default branch and enabled branch protection.

https://rust-gamedev.github.io/ seems to work fine again.

@17cupsofcoffee
Copy link
Collaborator Author

Excellent, thanks for sorting that out :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants