Skip to content

Commit

Permalink
Migrated puppet docs to Jekyll build - so much simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
jamtur01 committed Oct 28, 2010
1 parent 8728a1b commit da26d6b
Show file tree
Hide file tree
Showing 1,057 changed files with 1,077 additions and 812 deletions.
1 change: 1 addition & 0 deletions Gemfile
@@ -1,6 +1,7 @@
source "http://gems.rubyforge.org" source "http://gems.rubyforge.org"
source "http://gemcutter.org" source "http://gemcutter.org"


gem 'jekyll'
gem 'maruku' gem 'maruku'
gem 'actionpack' gem 'actionpack'
gem 'nokogiri' gem 'nokogiri'
Expand Down
11 changes: 5 additions & 6 deletions Rakefile
Expand Up @@ -13,7 +13,7 @@ end


$LOAD_PATH.unshift File.expand_path('lib') $LOAD_PATH.unshift File.expand_path('lib')


dependencies = %w(maruku nokogiri erubis rack blockenspiel versionomy) dependencies = %w(jekyll maruku nokogiri erubis rack blockenspiel versionomy)
references = %w(configuration function indirection metaparameter network report type) references = %w(configuration function indirection metaparameter network report type)


namespace :install do namespace :install do
Expand All @@ -31,22 +31,21 @@ task :install => dependencies.map { |d| "install:#{d}" }
desc "Generate the documentation" desc "Generate the documentation"
task :generate do task :generate do
ENV.delete("PDF") ENV.delete("PDF")
sh "bin/generate" system("jekyll output")
Rake::Task['references:symlink'].invoke Rake::Task['references:symlink'].invoke
end end


task :generate_pdf do task :generate_pdf do
ENV["PDF"]="1" ENV["PDF"]="1"
sh "bin/generate" system("jekyll output")
Rake::Task['references:symlink'].invoke Rake::Task['references:symlink'].invoke
what_files = Scanner.new('output','output/index.html').run() what_files = Scanner.new('output','output/index.html').run()
sh "htmldoc --book --title --no-toc --titlefile images/PuppetLabshorizontal.png -f puppet.pdf #{what_files}" system("htmldoc --book --title --no-toc --titlefile images/PuppetLabshorizontal.png -f puppet.pdf #{what_files}")
sh "rm -fr output"
end end


desc "Serve generated output on port 9292" desc "Serve generated output on port 9292"
task :serve do task :serve do
sh "rackup" system("rackup")
end end


desc "Generate docs and serve locally" desc "Generate docs and serve locally"
Expand Down
7 changes: 0 additions & 7 deletions bin/generate

This file was deleted.

6 changes: 0 additions & 6 deletions bin/generate_reference

This file was deleted.

13 changes: 1 addition & 12 deletions lib/puppet_docs.rb
Expand Up @@ -3,7 +3,7 @@
require 'set' require 'set'
require 'pathname' require 'pathname'


%w(maruku nokogiri erubis versionomy).each do |dep| %w(jekyll maruku nokogiri erubis versionomy).each do |dep|
begin begin
require dep require dep
rescue LoadError rescue LoadError
Expand All @@ -17,18 +17,7 @@ def self.root
@root ||= Pathname.new(File.expand_path(__FILE__)).parent + '..' @root ||= Pathname.new(File.expand_path(__FILE__)).parent + '..'
end end


autoload :Generator, "puppet_docs/generator"
autoload :Reference, "puppet_docs/reference" autoload :Reference, "puppet_docs/reference"
autoload :Helpers, "puppet_docs/helpers"
autoload :Levenshtein, "puppet_docs/levenshtein"
autoload :Snippet, "puppet_docs/snippet"
autoload :View, "puppet_docs/view"
autoload :StringExt, "puppet_docs/string_ext"


end end


class String
include PuppetDocs::StringExt
end


312 changes: 0 additions & 312 deletions lib/puppet_docs/generator.rb

This file was deleted.

0 comments on commit da26d6b

Please sign in to comment.