Sobeston / zig.guide

Repo for https://zig.guide content. Get up to speed with Zig quickly.
https://zig.guide
MIT License
652 stars 170 forks source link

Migrate website to docusaurus #197

Closed Sobeston closed 8 months ago

Sobeston commented 10 months ago

This PR should fix a lot of issues people have been having with the front-end for a long time, introduce the machinery needed for internationalisation, and open the door for further improvements.

Visual comparison (before/after)

image

image

TODO

Currently known problems

Sobeston commented 10 months ago

Got this branch live at https://zig.guide at the moment

expikr commented 10 months ago

Are content PRs on hold until this is complete?

Sobeston commented 10 months ago

Are content PRs on hold until this is complete?

Yes for now, I may get back to content PRs if this is ongoing for a while

Atomk commented 10 months ago

It looks like contributing will be a little more complicated but the UX seems much better, so thanks for working on these improvements.

Some notes:

expikr commented 10 months ago

Btw the site is defaulting the light theme no matter your device preference.

Sobeston commented 10 months ago

To test Zig code, what's the advantage of moving the code blocks to separate files?

I just felt that this is easier at this time, could go back on this later.

Some file names contain the pipe character |, that's not allowed on Windows and will result in errors when trying to clone the repo.

Thanks, just pushed a fix to replace that character

For the filename prefix consider using the numbering 01 02 03 [...] instead of 1 2 3 [...] like Ziglings does, so the files are sorted by name correctly.

Didn't notice this problem because I was viewing the files in vscode, which orders them nicely either way. Updated.

Sobeston commented 10 months ago

Btw the site is defaulting the light theme no matter your device preference.

Pushed a small fix for this, it should now respect prefers-color-scheme. This weirdly doesn't seem to work with javascript disabled, will have to look into that at another time. (I'm fine with a few small regressions for people who disable javascript for the time being)