Skip to content

Commit 09d271d

Browse files
author
Amitava
committed
Added a config file to set repository, extension and homepage
1 parent 12c208e commit 09d271d

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*.log
22
*.swp
3+
config.yml

config.ru

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ Bundler.require
55

66
require File.dirname(__FILE__) + "/git-wiki"
77

8-
run GitWiki.new(File.expand_path(ARGV[1] || "~/wiki"),
9-
ARGV[2] || ".markdown", ARGV[3] || "Home")
8+
config = YAML::load(File.read('config.yml'))
9+
10+
run GitWiki.new(config['repository'], config['extension'], config['homepage'])

config.sample.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
repository: ~/wiki
3+
extension: .md
4+
homepage: Home

config.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)