econ-ark / econ-ark.org

Econ-ARK website
https://econ-ark.org/
0 stars 4 forks source link

ENH: Case Insensitive Materials Redirects #36

Closed camriddell closed 1 month ago

camriddell commented 1 year ago

Addresses the case-sensitivity in the materials urls via the github-pages supported jekyll-redirect-from plugin.

Longer term solutions will require a larger rewrite of the site infrastructure (incorporating a custom jekyll build and a new github action, or using our own web server). In the meantime, this will solve most case sensitivity issues for the materials pages.

camriddell commented 1 year ago

@DrDrij since I made changes to the yaml frontmatter to add in the redirects_from values, do you know if these will be overwritten by the copycat github action?

DrDrij commented 1 year ago

@DrDrij since I made changes to the yaml frontmatter to add in the redirects_from values, do you know if these will be overwritten by the copycat github action?

@camriddell Correct, if the github action notices that a Markdown file has been updated it will sync it across to the website repository. If the most up to date version now exists on this website repo, then perhaps we should copy these Markdown files into their respective repositories?

eg. copy this: https://raw.githubusercontent.com/econ-ark/econ-ark.org/d4f024f7fe86d26f44a49141d44a45c56a86e69e/_materials/Aiyagari.md

into: https://raw.githubusercontent.com/econ-ark/REMARK/master/REMARKs/Aiyagari.md

llorracc commented 1 year ago

@camriddell @DrDrij

I see that this has conflicts, so presumably it is not ready to merge. Should it have a [WIP] (work in progress) label until ready to merge? And, @DrDrij, I presume you have the permissions necessary to merge it when it is no longer WIP? If so, please go ahead and merge without consulting me when it is working.

llorracc commented 1 year ago

@camriddell: Pinging you on this. I'd love to get case insensitivity fixed. Let me know when it's ready to merge!

camriddell commented 1 year ago

This PR was more of a one time patch, in order to consider future updates to metadata, we'll need a separate build step- meaning we'll need to utilize an orphan branch to publish from (typically gh-pages).

I'll need to converse with @DrDrij to make sure I don't interfere with anything else, but the envisioned change would be:

  1. copycat pulls the markdown files
  2. case insensitive script runs, adding in the redirects programmatically
  3. when intermediate step(s) are complete, push contents to gh-pages branch to trigger build

The reason for relying on an orphan branch like gh-pages is that we don't want to trigger builds during those intermediate steps.

alanlujan91 commented 9 months ago

@camriddell is this still active?

llorracc commented 2 months ago

So I guess this was never merged, and now has conflicts.

camriddell commented 1 month ago

@alanlujan91 we can probably close issue as this should be a step in the build process of the website. I need to meet with @DrDrij to discuss what this will look like, but if we can have a GitHub Actions build step before the site is deployed we can do a lot of neat things— like I have set up in #75