icssc / fellowship

https://fellowship.icssc.club
MIT License
5 stars 13 forks source link

Fixing Redirect unable to build #22

Closed ramanxg closed 2 years ago

ramanxg commented 2 years ago

When running npm run build, it would break since we are using window variable. More on this here: https://docusaurus.io/docs/advanced/ssg

Added support for 'window' variable using BrowserOnly, so it will only render in the client-side render and not the server-side render.

There is another issue with redirects, since /apply is considered a broken link. Not sure if it is at all possible to only ignore this case, or we must ignore all of them in the config.

Test Plan

Retry the redirect links. Run npm run build to test the build.

Future Followup

I've added a test for building for github workflows in e8e37b6d7c7c7c9ca7e60e64f2ce7da446f6f18e, so this doesn't have to be checked manually.