Skip to content
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

Brings the blog, staff photos, other content into Jekyll #150

Merged
merged 6 commits into from
Sep 15, 2014

Conversation

gboone
Copy link
Contributor

@gboone gboone commented Sep 15, 2014

There are three main things going on here: the creation of templates for blog posts, moving the staff photos into a YAML file, and injecting that YAML data into the index.html template. This makes the site look ostensibly the same as the 18f.gsa.gov you see today.

For the blog: instead of using JS to pull post data out of tumblr's we're serving out the raw HTML stuffed into a jekyll template. I used jekyll-import to dump the html from the pots out of tumblr. The one caveat is that our tags list is currently linked to the respective archives on tumblr but, because Jekyll doesn't fully support tags (as far as I can tell) we can't link to those archives.

For the staff photos: I created a yaml file in the _data directory with an entry for each person. Right now the keys are just name and full_name but the super upshot in using this over copying and pasting new html is the slimmed down template code and the ability to extend out the ways we visualize our team.

The last piece that both of those above feed into is significantly simplified templates. This commit cuts more than 200 lines out of the index.html template and adds reusable templates for blog posts.

Greg Boone added 6 commits September 15, 2014 11:22
- Makes a good first stab at migrating the blog out of tumblr and into Jekyll like the rest of the site
- Single blog post page replicating the bare template (https://18f.gsa.gov/developer/)
- JS and CSS fixes to support the above
  - Ripped out tumblr API stuff
  - Modified CSS to account for blog posts already being there (not generated by JS)
- JS code that was commented in order to remove is now gone,
@leahbannon
Copy link
Contributor

The one caveat is that our tags list is currently linked to the respective archives on tumblr but, because Jekyll doesn't fully support tags (as far as I can tell) we can't link to those archives.

I think we can use "categories" for that: http://jekyllrb.com/docs/frontmatter/

@meiqimichelle
Copy link
Contributor

Copying the gist of a Slack conversation on the point of tagging in Jekyll here:

  • Yes, the tagging thing via categories can be done. The code in general to do this is {% for post in site.categories.[TAG] %} [HTML for post here] {% endfor %}
  • We should also look into Jekyll 2's new collections feature since we're running that version now (we're not sure if applies or not, but should check)
  • It would be great to be able to automate the creating pages based on tags (I believe the idea of this was to be able to add a tag on the site, and not worry about whether someone had already created a landing page for that particular tag). We are guessing that there is a way to do this, but we have not done it before.

meiqimichelle added a commit that referenced this pull request Sep 15, 2014
Brings the blog, staff photos, other content into Jekyll
@meiqimichelle meiqimichelle merged commit 3b5c3ec into staging Sep 15, 2014
@konklone konklone deleted the make-jekyll branch September 15, 2014 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants