-
Notifications
You must be signed in to change notification settings - Fork 41
Switch back to Jekyll #591
Comments
Ben Balter wrote up a nice guide to using Jekyll collections that's worth reading. |
Here's another guide to using Jekyll without plugins. |
As a step in this direction, I threw together a Node module last night for reading a Jekyll |
So, last week I created a repo to test Jekyll with various configurations of pages and data. The master branch of that repo employs a Node script to build up part of the "resources" directory structure with empty HTML files with YAML front matter that describes each page's "context", all from data files in the
This hierarchy (which is not quite right, because some data types don't apply to some geographies) produces 1261 HTML files. However, this does not include all of the county-specific URLs, which would increase the total number of pages significantly. Already, though, this set of pages takes Jekyll 2.5.3 around 30-35 seconds to build, which means that you need to wait that long when running the server. Also, most changes to the In the collections branch, I tried to represent the repeating directory structures (resources, data types, states, and offshore ares) as collections and create symlinks for each unique instance then describe those in the config, but that didn't work so well: build times were much faster, but I couldn't figure out how to get each "instance" of a collection to get its own metadata in the config. Another avenue to consider is to see what Jekyll 3.0 can do with its incremental builds, but I'm not sure how to get that set up for testing. (@gemfarmer, maybe you could help me out with this?) Anyway, right now I'm leaning toward turning the resources URL hierarchy into a client-side thing driven by data that's structured in the same way (more in #597). This would mean that we would just have one page for Jekyll,
and the data would be broken down similarly:
The year (for the slider) would be passed along as a query string parameter in the hash, e.g.:
We might also want to encode the map/chart tab selection in the URL, which could look like:
If anyone has any further thoughts at this point, I'm all ears! |
@shawnbot I just installed the jekyll 3 beta and time tested it in your jekyll-stress-test with good results – 1.559 seconds. Along with the incremental regeneration, this might be the way to go. |
Whoa, nice @gemfarmer! Should we set do this with bundled then and set up a Gemfile? |
@shawnbot were you imagining that we would add jekyll to the existing project, or start a new jekyll project and add the existing site in piecemeal? |
@gemfarmer I think we should migrate everything over in place. Here's my plan:
|
Okay, so I think we've done most of this. What do you think, @meiqimichelle? Should we wait to close this until we have the site running on Federalist in #604? |
@shawnbot I don't think we need to wait until its running on Federalist since we have a separate issue for that, but are these changes reviewed/merged? I may have missed a PR. |
@meiqimichelle nope, I'll file a PR. Or should we just push (rename, effectively) this branch to |
From conversation in standup: we decided to file a PR against |
Closed with #613 . |
The whole Node server thing we've got going on is incurring an amount of technical debt that I'm not entirely comfortable with. I'd like to explore the idea of moving back to Jekyll so that we can leverage Federalist for deployment, and make the site easier to work with, especially for those of us without much Node experience. This involves:
/resources/:resource/:datatype/onshore/:state/:county
hierarchy.One thing we'd get out of this would be a Sass stack that just works, rather than the troublingly broken
node-sass-middleware
package. Another would be static output, so we could host it on S3. And I think the advantage of creating a file structure that's more familiar would benefit everyone, since Jekyll is a well-documented thing that lots of people use and understand.The text was updated successfully, but these errors were encountered: