forrtproject / forrtproject.github.io

FORRT Website
https://forrt.org
Other
28 stars 15 forks source link

Regex patterns to standardize filter tags #19

Closed SamGuay closed 3 years ago

SamGuay commented 4 years ago

Is your feature request related to a problem? Please describe. The resources page filter tags suffer from a lack of standardization. This is a result of the Google form text entry instead of specifying choice.

Describe the solution you'd like Define some regex patterns to standardize it. I know Hugo has some built-in (such as pluralize, capitalize, etc.) but I don't know how far we can go. We could also use the substr function to change it...

Describe alternatives you've considered Changing it manually in the google sheet, but it is not sustainable...

doomlab commented 4 years ago

@SamGuay - dude we can stringr the hell out of this and other ideas I have. I teach my students this stuff. Let me play with it some after another I have to do is done.

SamGuay commented 4 years ago

Yeah, stringr is a good idea!

However, I'm wondering whether implementing a hugo-based solution would be more appropriate since the build is being done on netlify and not locally? Let's say we trigger a new build every time a resource is added through the google form, the build should not require us to intervene...

That being said, if you know how to trigger some data wrangling, then trigger the build automatically, that's good news!

Tbh, I don't think it's that complicated, but I'm not proficient in Golan/Hugo, so a bit of trial and error has become my norm :upside_down_face: