Closed mbland closed 9 years ago
cc: @adelevie, since Aidan's mostly out this week.
LGTM, merging in 30 minutes.
@adelevie Just added a "Developing" section to the README. If it looks sufficient, I'll add a similar section to 18F/jekyll_pages_api_search#2.
Not sure why I was so nitpicky on this one, sorry! Looks really good overall. A few overall comments:
pages.json
(cc #2)...thoughts?something.nil?
rather than something == nil
. Not sure why.Thanks!
OK @afeld, just push a commit addressing all your comments from above. I updated the README to mention that all Pages, Posts, Documents and StaticFiles are processed. It's possible we may want to leave out StaticFiles, but if they happen to contain HTML, why not include them? Also, I like the .nil?
notation; very convenient and compact. As always, I learn all these little idioms that make me a better Rubyist from your reviews. :-)
This is really two PRs in one, motivated by my work to build 18F/jekyll_pages_api_search. First, it adds Posts, Documents, and StaticFiles to the pages corpus. Second, it prevents the resulting
pages.json
corpus from being rendered by Liquid.I noticed the need for these features when experimenting with interating the jekyll_pages_api_search plugin into 18F/18f.gsa.gov. The absence of Posts from the corpus made the search less useful; then the presence of example Liquid markup in the Jekyll and webhooks post caused the
pages.json
file to be invalid JSON due to rendering the corpus with Liquid, rather than just assigning the JSON output directly topage.output
.With these changes, I'm able to build and integrate search indexes both into 18f.gsa.gov and the 18F/hub.
cc: @afeld