Permalink
Browse files

First pass at the new documentation system

  • Loading branch information...
1 parent 9d56814 commit a0720216e81dcd228077df29161dc06cf1a7a6b2 @scsmith scsmith committed Mar 27, 2012
Showing with 3,046 additions and 1,059 deletions.
  1. +3 −1 .gitignore
  2. +20 −9 Gemfile
  3. +54 −27 Gemfile.lock
  4. +10 −0 Guardfile
  5. +76 −0 Rules
  6. +0 −12 config.ru
  7. +80 −0 config.yaml
  8. +2 −0 config/compass.rb
  9. BIN content/assets/images/200.png
  10. BIN content/assets/images/404.png
  11. BIN content/assets/images/canonical_id.png
  12. BIN content/assets/images/divider.png
  13. +1,208 −0 content/assets/images/divider_original2.ai
  14. BIN content/assets/images/target.png
  15. +153 −0 content/assets/stylesheets/docs.sass
  16. +3 −0 content/error.md
  17. +42 −0 content/features/callbacks.md
  18. +9 −0 content/features/delivery_status_api.md
  19. 0 content/features/delivery_status_callback.md
  20. +59 −0 content/getting_started/faqs.md
  21. +34 −0 content/getting_started/index.md
  22. +7 −0 content/getting_started/receiving_email_on_appfog.md
  23. +8 −0 content/getting_started/receiving_email_on_appharbor.md
  24. +8 −0 content/getting_started/receiving_email_on_cloudcontrol.md
  25. +57 −0 content/getting_started/receiving_email_on_heroku.md
  26. +22 −0 content/http_post_formats/index.md
  27. +175 −0 content/http_post_formats/json.md
  28. +308 −0 content/http_post_formats/multipart.md
  29. +60 −18 docs/validating_the_sender.md → content/http_post_formats/original.md
  30. +23 −0 content/http_post_formats/raw.md
  31. +25 −0 content/index.md
  32. +43 −0 content/receiving_email/attachments.md
  33. +58 −0 content/receiving_email/custom_domains.md
  34. +43 −0 content/receiving_email/email_forwarding.md
  35. +20 −0 content/receiving_email/examples/index.md
  36. +23 −0 content/receiving_email/examples/java.md
  37. +9 −0 content/receiving_email/examples/more.md
  38. +25 −0 content/receiving_email/examples/net.md
  39. +32 −0 content/receiving_email/examples/node.md
  40. +29 −0 content/receiving_email/examples/php.md
  41. +15 −0 content/receiving_email/examples/python.md
  42. +93 −0 content/receiving_email/examples/ruby.md
  43. +11 −0 content/receiving_email/forwarding_and_custom_domains.md
  44. +25 −0 content/receiving_email/http_status_codes.md
  45. +32 −0 content/receiving_email/localhost_debugger.md
  46. +9 −0 content/receiving_email/test_driven_development.md
  47. +1 −0 content/sitemap.xml
  48. +0 −78 docs.rb
  49. +0 −1 docs/_protected.md
  50. +0 −44 docs/custom_domains.md
  51. +0 −29 docs/developing_locally.md
  52. +0 −104 docs/faqs.md
  53. +0 −22 docs/forwarding.md
  54. +0 −118 docs/getting_started_on_heroku.md
  55. +0 −25 docs/http_status_codes.md
  56. +0 −182 docs/parsing_email.md
  57. +0 −58 docs/post_format.md
  58. +0 −53 docs/working_with_large_attachments.md
  59. 0 {views → layouts}/analytics.erb
  60. +85 −0 layouts/application.haml
  61. +20 −0 lib/default.rb
  62. +12 −0 lib/helpers.rb
  63. +15 −0 lib/item.rb
  64. BIN public/favicon.ico
  65. BIN public/images/canonical_id.png
  66. BIN public/images/cloudbg.png
  67. BIN public/images/logo.png
  68. +0 −36 views/doc.haml
  69. +0 −40 views/docs.sass
  70. +0 −7 views/ie.sass
  71. +0 −10 views/partials/_base.scss
  72. +0 −4 views/print.scss
  73. +0 −181 views/screen.sass
View
@@ -1,3 +1,5 @@
.DS_Store
.sass-cache
-.bundle
+.bundle
+output/
+tmp/
View
29 Gemfile
@@ -1,12 +1,23 @@
-source 'http://rubygems.org'
+source :rubygems
-gem 'sinatra'
-gem 'haml'
-gem 'compass'
-gem 'fancy-buttons'
-gem 'rdiscount'
-gem 'mail'
+# Generating
+gem "nanoc"
+gem "kramdown"
+gem "haml"
+gem "sass"
+gem "compass"
+gem "fancy-buttons"
+gem "builder"
+gem "coderay"
+
+gem 'rack'
gem 'thin'
+gem 'mime-types'
-#gem 'coderay'
-#gem 'rack-codehighlighter'
+group :developement do
+ gem 'rake'
+ gem 'guard'
+ gem 'guard-shell'
+ gem 'nokogiri'
+ gem 'fog'
+end
View
@@ -1,47 +1,74 @@
GEM
remote: http://rubygems.org/
specs:
- chunky_png (1.2.0)
- compass (0.11.5)
+ builder (3.0.0)
+ chunky_png (1.2.5)
+ coderay (1.0.5)
+ compass (0.11.7)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
- daemons (1.1.4)
+ cri (2.2.0)
+ daemons (1.1.8)
eventmachine (0.12.10)
- fancy-buttons (1.1.1)
+ excon (0.9.6)
+ fancy-buttons (1.1.2)
compass (>= 0.11)
- fssm (0.2.7)
- haml (3.1.2)
- i18n (0.6.0)
- mail (2.3.0)
- i18n (>= 0.4.0)
- mime-types (~> 1.16)
- treetop (~> 1.4.8)
- mime-types (1.16)
- polyglot (0.3.2)
- rack (1.3.2)
- rdiscount (1.6.8)
- sass (3.1.5)
- sinatra (1.2.6)
- rack (~> 1.1)
- tilt (>= 1.2.2, < 2.0)
- thin (1.2.11)
+ ffi (1.0.11)
+ fog (1.1.2)
+ builder
+ excon (~> 0.9.0)
+ formatador (~> 0.2.0)
+ mime-types
+ multi_json (~> 1.0.3)
+ net-scp (~> 1.0.4)
+ net-ssh (>= 2.1.3)
+ nokogiri (~> 1.5.0)
+ ruby-hmac
+ formatador (0.2.1)
+ fssm (0.2.8.1)
+ guard (1.0.0)
+ ffi (>= 0.5.0)
+ thor (~> 0.14.6)
+ guard-shell (0.3.0)
+ guard (>= 0.2.0)
+ haml (3.1.4)
+ kramdown (0.13.5)
+ mime-types (1.17.2)
+ multi_json (1.0.4)
+ nanoc (3.3.1)
+ cri (~> 2.1)
+ net-scp (1.0.4)
+ net-ssh (>= 1.99.1)
+ net-ssh (2.3.0)
+ nokogiri (1.5.0)
+ rack (1.4.1)
+ rake (0.9.2.2)
+ ruby-hmac (0.4.0)
+ sass (3.1.15)
+ thin (1.3.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
- tilt (1.3.2)
- treetop (1.4.10)
- polyglot
- polyglot (>= 0.3.1)
+ thor (0.14.6)
PLATFORMS
ruby
DEPENDENCIES
+ builder
+ coderay
compass
fancy-buttons
+ fog
+ guard
+ guard-shell
haml
- mail
- rdiscount
- sinatra
+ kramdown
+ mime-types
+ nanoc
+ nokogiri
+ rack
+ rake
+ sass
thin
View
@@ -0,0 +1,10 @@
+guard 'shell' do
+ watch (/(.*)(?:\.sass$|\.haml$|.md$)/) do |filename|
+ puts "Altered #{filename}"
+ system %q{osascript -e "tell application \"Google Chrome\"
+ tell active tab of first window
+ execute javascript \"window.location.reload()\"
+ end tell
+ end tell"}
+ end
+end
View
76 Rules
@@ -0,0 +1,76 @@
+#!/usr/bin/env ruby
+
+# A few helpful tips about the Rules file:
+#
+# * The string given to #compile and #route are matching patterns for
+# identifiers--not for paths. Therefore, you can’t match on extension.
+#
+# * The order of rules is important: for each item, only the first matching
+# rule is applied.
+#
+# * Item identifiers start and end with a slash (e.g. “/about/” for the file
+# “content/about.html”). To select all children, grandchildren, … of an
+# item, use the pattern “/about/*/”; “/about/*” will also select the parent,
+# because “*” matches zero or more characters.
+
+require 'compass'
+
+Compass.add_project_configuration 'config/compass.rb' # when using Compass 0.10
+
+compile '/guide/' do
+ filter :haml
+end
+
+compile '*' do
+ if item.binary?
+ item.identifier.chop + '.' + item[:extension]
+ else
+ ext = item[:extension].nil? ? nil : item[:extension].split('.').last
+ case ext
+ when 'markdown', 'md'
+ filter :erb unless item.attributes[:skip_erb]
+ filter :kramdown
+ # filter :colorize_syntax, :colorizers => { :ruby => :coderay }
+ layout 'application'
+ when 'sass'
+ filter :sass, Compass.sass_engine_options.merge!(:style => :expanded)
+ when 'coffee'
+ filter :coffeescript
+ when 'js'
+ item.identifier.chop + '.' + item[:extension]
+ when 'haml'
+ filter :haml, :format => :html5
+ layout 'application'
+ when 'xml'
+ filter :erb
+ when 'txt', 'json'
+
+ else
+ raise "Unknown filetype #{item[:extension]}"
+ item.identifier.chop + '.' + item[:extension]
+ end
+ end
+end
+
+route '*' do
+ if item.binary?
+ item.identifier.chop + '.' + item[:extension]
+ else
+ ext = item[:extension].nil? ? nil : item[:extension].split('.').last
+ case ext
+ when 'sass'
+ item.identifier.chop + '.css'
+ when 'coffee'
+ item.identifier.chop + '.js'
+ when 'js'
+ item.identifier.chop + '.' + item[:extension]
+ when 'xml'
+ item.identifier.chop + '.xml'
+ else
+ item.identifier + 'index.html'
+ end
+ end
+end
+
+layout '/application/', :haml, :format => :html5, :encoding => 'utf-8'
+layout '*', :erb
View
@@ -1,12 +0,0 @@
-begin
- # Require the preresolved locked set of gems.
- require ::File.expand_path('../.bundle/environment', __FILE__)
-rescue LoadError
- # Fallback on doing the resolve at runtime.
- require "rubygems"
- require "bundler"
- Bundler.setup
-end
-
-require ::File.expand_path('docs.rb')
-run Sinatra::Application
View
@@ -0,0 +1,80 @@
+# A list of file extensions that nanoc will consider to be textual rather than
+# binary. If an item with an extension not in this list is found, the file
+# will be considered as binary.
+text_extensions: [ 'css', 'erb', 'haml', 'htm', 'html', 'js', 'less', 'markdown', 'md', 'php', 'rb', 'sass', 'scss', 'txt', 'xhtml', 'xml', 'coffee' ]
+
+# The path to the directory where all generated files will be written to. This
+# can be an absolute path starting with a slash, but it can also be path
+# relative to the site directory.
+output_dir: output
+
+# A list of index filenames, i.e. names of files that will be served by a web
+# server when a directory is requested. Usually, index files are named
+# “index.html”, but depending on the web server, this may be something else,
+# such as “default.htm”. This list is used by nanoc to generate pretty URLs.
+index_filenames: [ 'index.html' ]
+
+# Whether or not to generate a diff of the compiled content when compiling a
+# site. The diff will contain the differences between the compiled content
+# before and after the last site compilation.
+enable_output_diff: false
+
+prune:
+ # Whether to automatically remove files not managed by nanoc from the output
+ # directory. For safety reasons, this is turned off by default.
+ auto_prune: false
+
+ # Which files and directories you want to exclude from pruning. If you version
+ # your output directory, you should probably exclude VCS directories such as
+ # .git, .svn etc.
+ exclude: [ '.git', '.hg', '.svn', 'CVS' ]
+
+# The data sources where nanoc loads its data from. This is an array of
+# hashes; each array element represents a single data source. By default,
+# there is only a single data source that reads data from the “content/” and
+# “layout/” directories in the site directory.
+data_sources:
+ -
+ # The type is the identifier of the data source. By default, this will be
+ # `filesystem_unified`.
+ type: filesystem_unified
+
+ # The path where items should be mounted (comparable to mount points in
+ # Unix-like systems). This is “/” by default, meaning that items will have
+ # “/” prefixed to their identifiers. If the items root were “/en/”
+ # instead, an item at content/about.html would have an identifier of
+ # “/en/about/” instead of just “/about/”.
+ items_root: /
+
+ # The path where layouts should be mounted. The layouts root behaves the
+ # same as the items root, but applies to layouts rather than items.
+ layouts_root: /
+
+ # Whether to allow periods in identifiers. When turned off, everything
+ # past the first period is considered to be the extension, and when
+ # turned on, only the characters past the last period are considered to
+ # be the extension. For example, a file named “content/about.html.erb”
+ # will have the identifier “/about/” when turned off, but when turned on
+ # it will become “/about.html/” instead.
+ allow_periods_in_identifiers: false
+
+# Configuration for the “watch” command, which watches a site for changes and
+# recompiles if necessary.
+watcher:
+ # A list of directories to watch for changes. When editing this, make sure
+ # that the “output/” and “tmp/” directories are _not_ included in this list,
+ # because recompiling the site will cause these directories to change, which
+ # will cause the site to be recompiled, which will cause these directories
+ # to change, which will cause the site to be recompiled again, and so on.
+ dirs_to_watch: [ 'content', 'layouts', 'lib' ]
+
+ # A list of single files to watch for changes. As mentioned above, don’t put
+ # any files from the “output/” or “tmp/” directories in here.
+ files_to_watch: [ 'config.yaml', 'Rules' ]
+
+ # When to send notifications (using Growl or notify-send).
+ notify_on_compilation_success: true
+ notify_on_compilation_failure: true
+
+# Base URL for XML sitemap generation
+base_url: http://docs.cloudmailin.com
View
@@ -1,3 +1,5 @@
+require 'fancy-buttons'
+
if defined?(Sinatra)
# This is the configuration to use when running within sinatra
project_path = Sinatra::Application.root
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.

0 comments on commit a072021

Please sign in to comment.