ethereum / ethereum-org-website

Ethereum.org is a primary online resource for the Ethereum community.
https://ethereum.org/
MIT License
4.93k stars 4.7k forks source link

Lot of redirects rules on Netlify deploys #12022

Open pettinarip opened 6 months ago

pettinarip commented 6 months ago

While working on the redirects, I noticed that the project is currently generating a lot of redirect rules automatically, ~4k. Debugging it, most of these redirects (~3.5k) are coming from the files that live inside the /public folder. For each file, Next creates a redirect rule.

This brings up the discussion of whether we need to put .md files in the public folder, since we only need them at build time. Or even if we need to place images or assets that are only consumed at build time.

image

github-actions[bot] commented 4 months ago

This issue is stale because it has been open 45 days with no activity.

TylerAPfledderer commented 3 months ago

@pettinarip can view this netlify blog tutorial for possible clues on moving the files someplace else in the directory. It seems like you can put them almost anywhere. Don't think Crowdin should be impacted aside from updating configurations.

pettinarip commented 3 months ago

@TylerAPfledderer correct, we don't need the md files in the public folder. We could move those easily.

Another question has to do with the images. Are we going to have problems with the images that live next to each md file if we also move them out of the public folder? probably we need to tweak some logic around them.

TylerAPfledderer commented 3 months ago

@TylerAPfledderer correct, we don't need the md files in the public folder. We could move those easily.

Another question has to do with the images. Are we going to have problems with the images that live next to each md file if we also move them out of the public folder? probably we need to tweak some logic around them.

Hmm that shouldn't be a problem. But images as static assets should stay in the public folder.

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 30 days with no activity.

wackerow commented 1 month ago

@pettinarip Any update here?

pettinarip commented 1 month ago

@wackerow I think we will be able to simplify this with the latest upgrades of Nextjs and the Netlify runtime plugin. We should use the redirects mechanism from Next instead of Netlify. Something to test. I'll try to do this once we finish with the performance improvements/fixes.

wackerow commented 1 month ago

Okay great; assigned you here, feel free to update/close out as needed

github-actions[bot] commented 5 days ago

This issue is stale because it has been open 30 days with no activity.