-
Notifications
You must be signed in to change notification settings - Fork 667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data file format won't handle Washington DC #73
Comments
Actually this happens for any events that have a space in their city name (New York, Salt Lake City, etc). Will need to add the "eventname" to the content files again, so that the files can find their datafile. Or possibly just remove all the spaces... |
We definitely need to be able to have cities with spaces and even commas in their display name. Is the issue with the event name for the URL? The URL historically hasn't matched the display name perfectly (see: New York, Denver, etc). |
It's an issue with the URL, and the problem is slightly goofy. In a previous version (i.e., before a lot of the code I wrote last night), every page in an event had in its frontmatter what was called the "event", i.e. When working on some stuff last night, I "realized" that since every page already had the Initially I was just thinking we would have to add the "event" back to the frontmatter of all the pages, but I'm wondering now if I could extract the URL and split on it. This would definitely require Washington DC to have |
OK, so the bug where the data files couldn't have spaces in them has gone away. Whew. So now I can refactor this to simply grab the event slug ( |
So it was not nearly as simple as I had thought. The solution I proposed works great in templates, but not in shortcodes. And I use shortcodes a lot in the content files. Currently the best workaround is to add the "event" parameter back to the frontmatter, and it is set to whatever the name of the datafile is (minus the yml) which would also then have to match the directory. The good part is that the bug where you couldn't use dashes in the yml file names seems to be gone, so this will be fine. I don't like the workaround because I hate having people have to create more params than necessary in frontmatter on every page (it's very non DRY) but it will work for now. Would be way nicer if we could whack as much frontmatter as possible, for migration purposes though. |
And, with more hackery and help from the esteemed |
Unless we name the city WashingtonDC, it will bail. It doesn't like the dashes.
The text was updated successfully, but these errors were encountered: