Permalink
Browse files

add files directory settings

  • Loading branch information...
1 parent 9178ffd commit 1b10ab9fa85eb86f2945792625da2ef7a1896ad2 Henri Bourcereau committed Jul 8, 2011
@@ -64,6 +64,9 @@ def find_project
Grit::Repo.init_bare(git_path)
end
- @wiki = Gollum::Wiki.new(git_path, :base_path => gollum_index_path(:project_id => @project.identifier))
+ wiki_dir = @project.gollum_wiki.directory
+
+ @wiki = Gollum::Wiki.new(git_path, :base_path => gollum_index_path(:project_id => @project.identifier), :page_file_dir => wiki_dir)
@Vanuan

Vanuan Jul 31, 2011

Collaborator

Can you describe this change? There is no explanation on gollum site. And seems like this will work only for new created wikis.
I mean, that if you created a wiki before, you'll need manually move all files to specified directory. Otherwise you'll end up with duplicated paths in gollum.

+
end
end
@@ -9,6 +9,10 @@
<%= label(:gollum_wiki, :markup_language) %>
<%= select_tag(:markup_language, options_for_select(Gollum::Page::FORMAT_NAMES.keys)) %></p>
</p>
+ <p>
+ <%= label(:gollum_wiki, :gollum_directory) %>
+ <%= f.text_field :directory %>
+ </p>
</div>
<p><%= f.submit %></p>
@@ -0,0 +1,9 @@
+class AddDirectoryToGollumWikis < ActiveRecord::Migration
+ def self.up
+ add_column :gollum_wikis, :directory, :string, :default => 'doc'
+ end
+
+ def self.down
+ remove_column :gollum_wikis, :directory
+ end
+end

0 comments on commit 1b10ab9

Please sign in to comment.