-
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
Create program page template for theme 2.0 #9839
Comments
I have been able to get a pretty decent POC for the initial stuff - it's using frontmatter in the Basically, there are just a couple places where the date and time stuff gets pulled/set; I can set those to use variables or something based upon if the element has I will try to also get #6543 addressed in this one as well (since I have to touch ignite code anyway) |
I also occurs to me that if we aren't doing any time-zone conversion stuff, we can actually turn |
I got it all working in the template! I also handled #6543; the way it works looks a little like this: "old-style" ignite block in schedule: ignite block that is custom/named: inside the
So what ends up happening (bear in mind that you would likely not mix elements with a
So if you want to go "traditional" style of one ignite block per-day, all you need to do is set a program element of type "ignite" for that date, and put a bunch of elements in If you want to have multiple ignite blocks on the same day, you use the optional |
OK, so this is a pretty big improvement! Keeping in mind that my test doesn't have a full second day in the program, here are the differences in processing for the program page:
Ignore "cumulative duration" as obviously it only processed 1 program vs 83. BUT... 7 ms vs 746 ms! That's huge, especially since the program page is the heaviest thing we do. If my math checks out, we will be processing ALL the program pages in under a second, vs taking a minute to do them now. Of course, if we end up "unarchiving", we'll have more program pages to handle, but this is a big win. UPDATE: the program template with a full day (so basically, this was with 12 talks and 10 ignites) is 11.621999ms, so it's still pretty dang efficient. |
For the Program page template, I think that the easiest thing to do (and the least impactful) is to move the YAML for program out of the data file and into the frontmatter on the
program.md
file for the event. That frontmatter will look HUGE, but it should work.If we want to make enhancements to how the program template functions (later!!), the move will be to create a new template for type
"old-program"
and then we will need to update all the existingprogram.md
files to use that type, and have new stuff use the new version.I did go back to the survey I ran years ago to see what people prefer, and data fields in a YAML file (for this purpose, TOML in frontmatter is just as fine) was the overwhelming preference.
if we migrate the YAML "as-is" to TOML, I think the frontmatter for a program page would look something like this:
and so on...the upshot of this is that we get timezone info. But we don't necessarily have that. We might have to do something where "if we don't know the timezone from another field in the main data file, we just set it to US central" because this is only for historical programs and if the time isn't right, it's probably Not the End of the World.
We could also have the following be supported:
so the template code for the program page would have to be pretty weird; it would have to check for an element that has
date
set, and if so, it works differently. This might be okay (we did this for thespeaker
page to handle the backward-compatibility with the data files; it means that in the template you have one big giant "if" statement to say "do I draw the program the new fancy way or use the old way?" and go from there.We also need to handle #6543 as long as we are here; I think it works the same way. If it detects any elements with
date
set, then it displays ignites a certain way; if not, it will do whatever magic I come up with to handle this idea of multiple ignite blocks per day (fyi, this is something that I need to solve for 2020 Chicago, so it's Kind of Important to me, lol)The text was updated successfully, but these errors were encountered: