diff --git a/README.md b/README.md index e472dda..5b38302 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ This is a theme for the [Jekyll][] site generator which supports the following c - Post directories. Instead of naming your post `YYYY-MM-DD-Title.md`, you can make a directory named `YYYY-MM-DD-Title/` and anything inside it will be copied to the proper place. (You probably want to put an `index.markdown` or `index.textile` inside that folder.) You may want to install the [ptools][] gem so that Shadowbox can guess if a file is binary and shouldn't be processed by Liquid. -- An "everything" archive page with live (client-side) search on the content. (This probably won't scale but that's not my problem right now. \*grin\*) +- Search, via [Tapir][]. It is designed so that new users should have to edit as few files as possible: @@ -45,6 +45,7 @@ Created by Jordy Rose [htmlentities]: http://htmlentities.rubyforge.org [dependencies]: https://github.com/belkadan/jekyll [ptools]: http://rubygems.org/gems/ptools + [Tapir]: http://tapirgo.com [jdg]: https://github.com/josegonzalez/josediazgonzalez.com/tree/master/_plugins [em]: https://github.com/jqr/jqr.github.com diff --git a/_plugins/export_to_tapir.rb b/_plugins/export_to_tapir.rb index e224323..7b52e3b 100755 --- a/_plugins/export_to_tapir.rb +++ b/_plugins/export_to_tapir.rb @@ -1,5 +1,11 @@ #!/usr/bin/ruby -rubygems +# This script is for new users signing up for Tapir who want to use the Tapir's +# article push feature rather than temporarily generating a full newsfeed and +# waiting for Tapir's import to complete. See tapir.yml for details. +# +# This is NOT actually a Jekyll plugin..._plugins/ just seemed like the best place to put it. + if $0 == __FILE__ require 'net/http' require 'uri' @@ -18,6 +24,8 @@ $stdout.sync = true YAML.each_document(ARGF) do |post| raise 'Input file should be generated from tapir.yml' unless post.is_a? Hash + # Someone's going to try to feed the template in here... + raise 'Input file should be GENERATED from tapir.yml' unless post['published_on'] req = Net::HTTP::Post.new(url_path) # Tapir.yml is already CGI-escaped...possibly a stupid decision, but w/e. diff --git a/tapir.yml b/tapir.yml index fa3f60b..720ffab 100644 --- a/tapir.yml +++ b/tapir.yml @@ -1,6 +1,24 @@ --- dependencies: news -# This YAML section is NOT part of the file content, it's a header for Jekyll! +# This file is used with the export_to_tapir.rb script, found under _plugins. +# It is for new users signing up for Tapir who want to use the Tapir's article +# push feature rather than temporarily generating a full newsfeed and waiting +# for Tapir's import to complete. To do this: +# +# Step 1: Remove tapir.yml from _config.yml's excludes. +# Step 2: Generate your site. Make sure this is using your live site's baseurl. +# Step 3: Run the export_to_tapir script as follows: +# _plugins/export_to_tapir.rb path/to/generated/tapir.yml +# Step 4: Wait. There's a delay of 0.2s per post so that Tapir doesn't think we're DoSing them. +# Step 5: Put tapir.yml back in _config.yml's excludes. +# +# You should only have to do this once, since Tapir watches your newsfeed for any new posts. +# +# Note that this only causes Tapir to index /news/ posts. If you want /everything/ +# on your site indexed, not only will you have to change the for-loop below, but +# you'll have to provide another newsfeed that doesn't just show news-posts. +# +# BTW, this YAML section is NOT part of the file content, it's a header for Jekyll! --- {% for post in site.news_posts %} ---