Browse files

Added dead-simple config infrastructure

  • Loading branch information...
1 parent e10ff87 commit 7b802b66e4fcd05d1b4cf3a056d02eeec38fde7e @karmi committed Mar 2, 2011
Showing with 16 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +13 −0 config.example.rb
  3. +2 −0 lib/hide.rb
View
1 .gitignore
@@ -3,3 +3,4 @@
Gemfile.lock
pkg/*
scratch/
+config.rb
View
13 config.example.rb
@@ -0,0 +1,13 @@
+module Hide
+ extend self
+
+ DEFAULT_CONFIG = {
+ :path => '/path/to/the/cloned/website',
+ :directories => ['guide', 'community', 'tutorials', 'videos']
+ }
+
+ def config(key)
+ @config ||= DEFAULT_CONFIG
+ @config[key]
+ end
+end
View
2 lib/hide.rb
@@ -1,6 +1,8 @@
require 'jekyll'
require 'slingshot'
+require File.expand_path('../../config', __FILE__)
+
require 'hide/site'
require 'hide/page'
require 'hide/indexer'

0 comments on commit 7b802b6

Please sign in to comment.