From 6d87cd028b32570973450424db164e5405a0ee13 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sat, 17 Mar 2012 08:32:49 -0700 Subject: moves the guides up to the root directory --- guides/source/kindle/KINDLE.md | 26 +++++++++++++ guides/source/kindle/copyright.html.erb | 1 + guides/source/kindle/layout.html.erb | 27 +++++++++++++ guides/source/kindle/rails_guides.opf.erb | 52 +++++++++++++++++++++++++ guides/source/kindle/toc.html.erb | 24 ++++++++++++ guides/source/kindle/toc.ncx.erb | 64 +++++++++++++++++++++++++++++++ guides/source/kindle/welcome.html.erb | 5 +++ 7 files changed, 199 insertions(+) create mode 100644 guides/source/kindle/KINDLE.md create mode 100644 guides/source/kindle/copyright.html.erb create mode 100644 guides/source/kindle/layout.html.erb create mode 100644 guides/source/kindle/rails_guides.opf.erb create mode 100644 guides/source/kindle/toc.html.erb create mode 100644 guides/source/kindle/toc.ncx.erb create mode 100644 guides/source/kindle/welcome.html.erb (limited to 'guides/source/kindle') diff --git a/guides/source/kindle/KINDLE.md b/guides/source/kindle/KINDLE.md new file mode 100644 index 0000000000..a7d9a4e4cf --- /dev/null +++ b/guides/source/kindle/KINDLE.md @@ -0,0 +1,26 @@ +# Rails Guides on the Kindle + + +## Synopsis + + 1. Obtain `kindlegen` from the link below and put the binary in your path + 2. Run `KINDLE=1 rake generate_guides` to generate the guides and compile the `.mobi` file + 3. Copy `output/kindle/rails_guides.mobi` to your Kindle + +## Resources + + * [StackOverflow: Kindle Periodical Format](http://stackoverflow.com/questions/5379565/kindle-periodical-format) + * Example Periodical [.ncx](https://gist.github.com/808c971ed087b839d462) and [.opf](https://gist.github.com/d6349aa8488eca2ee6d0) + * [Kindle Publishing guidelines](http://kindlegen.s3.amazonaws.com/AmazonKindlePublishingGuidelines.pdf) + * [KindleGen & Kindle Previewer](http://www.amazon.com/gp/feature.html?ie=UTF8&docId=1000234621) + +## TODO + +### Post release + + * Integrate generated Kindle document in to published HTML guides + * Tweak heading styles (most docs use h3/h4/h5, which end up being smaller than the text under it) + * Tweak table styles (smaller text? Many of the tables are unusable on a Kindle in portrait mode) + * Have the HTML/XML TOC 'drill down' into the TOCs of the individual guides + * `.epub` generation. + diff --git a/guides/source/kindle/copyright.html.erb b/guides/source/kindle/copyright.html.erb new file mode 100644 index 0000000000..bd51d87383 --- /dev/null +++ b/guides/source/kindle/copyright.html.erb @@ -0,0 +1 @@ +<%= render 'license' %> \ No newline at end of file diff --git a/guides/source/kindle/layout.html.erb b/guides/source/kindle/layout.html.erb new file mode 100644 index 0000000000..f0a286210b --- /dev/null +++ b/guides/source/kindle/layout.html.erb @@ -0,0 +1,27 @@ + + + + + + +<%= yield(:page_title) || 'Ruby on Rails Guides' %> + + + + + + + <% if content_for? :header_section %> + <%= yield :header_section %> +
+ <% end %> + + <% if content_for? :index_section %> + <%= yield :index_section %> +
+ <% end %> + + <%= yield.html_safe %> + + diff --git a/guides/source/kindle/rails_guides.opf.erb b/guides/source/kindle/rails_guides.opf.erb new file mode 100644 index 0000000000..4e07664fd0 --- /dev/null +++ b/guides/source/kindle/rails_guides.opf.erb @@ -0,0 +1,52 @@ + + + + + + + + Ruby on Rails Guides (<%= @version %>) + + en-us + Ruby on Rails + Ruby on Rails + Reference + <%= Time.now.strftime('%Y-%m-%d') %> + + These guides are designed to make you immediately productive with Rails, and to help you understand how all of the pieces fit together. + + + + + + + + + <% documents_flat.each do |document| %> + + <% end %> + + <% %w{toc.html credits.html welcome.html copyright.html}.each do |url| %> + + <% end %> + + + + + + + + + + + + <% documents_flat.each do |document| %> + + <% end %> + + + + + + + diff --git a/guides/source/kindle/toc.html.erb b/guides/source/kindle/toc.html.erb new file mode 100644 index 0000000000..e013797dee --- /dev/null +++ b/guides/source/kindle/toc.html.erb @@ -0,0 +1,24 @@ +<% content_for :page_title do %> +Ruby on Rails Guides +<% end %> + +

Table of Contents

+
+ +<% documents_by_section.each_with_index do |section, i| %> +

<%= "#{i + 1}." %> <%= section['name'] %>

+
    + <% section['documents'].each do |document| %> +
  • + <%= document['name'] %> + <% if document['work_in_progress']%>(WIP)<% end %> +
  • + <% end %> +
+<% end %> +
+
diff --git a/guides/source/kindle/toc.ncx.erb b/guides/source/kindle/toc.ncx.erb new file mode 100644 index 0000000000..2c6d8e3bdf --- /dev/null +++ b/guides/source/kindle/toc.ncx.erb @@ -0,0 +1,64 @@ + + + + + + + + + + +Ruby on Rails Guides +docrails + + + + Table of Contents + + + + + + Introduction + + + + + + Welcome + + + + + Credits + + + + Copyright & License + + + + + <% play_order = 4 %> + <% documents_by_section.each_with_index do |section, section_no| %> + + + <%= section['name'] %> + + + + <% section['documents'].each_with_index do |document, document_no| %> + + + <%= document['name'] %> + + + + <% end %> + + <% end %> + + + + diff --git a/guides/source/kindle/welcome.html.erb b/guides/source/kindle/welcome.html.erb new file mode 100644 index 0000000000..e30704c4e6 --- /dev/null +++ b/guides/source/kindle/welcome.html.erb @@ -0,0 +1,5 @@ +<%= render 'welcome' %> + +

Kindle Edition

+ +The Kindle Edition of the Rails Guides should be considered a work in progress. Feedback is really welcome, please see the "Feedback" section at the end of each guide for instructions. -- cgit v1.2.3