Commit 6ee30af4 authored by André Kerkhoff's avatar André Kerkhoff
Browse files

Manage any topic with attributes

parent 34ffb987
......@@ -60,6 +60,28 @@ foswiki_web name do
end
```
## Topics
The default can create topics and thereby remove their existing history.
### System.SitePreferences
You can configure site preferences with attributes under `['foswiki']['site_preferences']`.
For custom installations you declare a Chef template using `SitePreferences.txt.erb` as source.
### WEB.WebPreferences
Web preferences can be configured under `['foswiki']['web_preferences'][web]`. The `System` web is predefined.
For custom installations you decare Chef templates using `WebPreferences.txt.erb` as source.
### Other topics
You can declare raw topics under `['foswiki']['topics'][topic] = 'content'`. Topic names can use slashes or dots as seperators between webs and topics.
For custom installations just use Chef's file resource.
## Plugins
Every plugin in the list `['foswiki']['plugins']` will be added to the default wiki installation.
......
......@@ -40,3 +40,6 @@ default['foswiki']['config']['Store']['SearchAlgorithm'] =
default['foswiki']['config']['TemplateDir'] = '{install}/templates'
default['foswiki']['config']['ToolsDir'] = '{install}/tools'
default['foswiki']['config']['WorkingDir'] = '{install}/working'
# Contents of topics
default['foswiki']['topics'] = {}
......@@ -3,7 +3,7 @@ maintainer 'HPC'
maintainer_email 'hpc@gsi.de'
license 'All rights reserved'
description 'Installs/Configures Foswiki'
version '2.0.6'
version '2.1.0'
depends 'apache2', '< 6.0'
supports 'debian'
supports 'ubuntu'
......@@ -103,6 +103,20 @@ end
end
end
# Manage other topics
(node['foswiki']['topics'] || {}).each do |topic, tcontent|
base = "#{foswiki_dir('data')}/#{topic.gsub(/\./, '/')}"
file "#{base}.txt" do
content tcontent
user node['apache']['user']
group node['apache']['group']
end
directory "#{base},pfv" do
recursive true
action :delete
end
end
# Install plugins
(node['foswiki']['plugins'] || []).each do |plugin|
foswiki_plugin plugin do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment