From: Joey Hess Date: Sun, 27 Jul 2008 01:07:15 +0000 (-0400) Subject: remove default values in getsetup X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/42ac4ec00959bd6162076af799023545b698bed9 remove default values in getsetup They were a bit confusing, since they did not actually set the default, and example values are sufficient. --- diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm index 0886fd753..673668c0e 100644 --- a/IkiWiki/Plugin/aggregate.pm +++ b/IkiWiki/Plugin/aggregate.pm @@ -42,14 +42,14 @@ sub getsetup () { #{{{ return aggregateinternal => { type => "boolean", - default => 0, + example => 0, description => "enable aggregation to internal pages?", safe => 0, # enabling needs manual transition rebuild => 0, }, aggregate_webtrigger => { type => "boolean", - default => 0, + example => 0, description => "allow aggregation to be triggered via the web?", safe => 1, rebuild => 0, diff --git a/IkiWiki/Plugin/amazon_s3.pm b/IkiWiki/Plugin/amazon_s3.pm index d9279b680..e181a84da 100644 --- a/IkiWiki/Plugin/amazon_s3.pm +++ b/IkiWiki/Plugin/amazon_s3.pm @@ -79,7 +79,7 @@ sub getsetup () { #{{{ }, amazon_s3_dupindex => { type => "boolean", - default => 0, + example => 0, description => "store each index file twice? (allows urls ending in \"/index.html\" and \"/\")", safe => 1, rebuild => 1, diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index 6f707832d..47e165251 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -16,7 +16,6 @@ sub getsetup () { #{{{ return virus_checker => { type => "string", - default => "", example => "clamdscan -", description => "virus checker program (reads STDIN, returns nonzero if virus found)", safe => 0, # executed diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm index dd6898c57..6f1f9bd07 100644 --- a/IkiWiki/Plugin/calendar.pm +++ b/IkiWiki/Plugin/calendar.pm @@ -39,7 +39,7 @@ sub getsetup () { #{{{ return archivebase => { type => "string", - default => "archives", + example => "archives", description => "base of the archives hierarchy", safe => 1, rebuild => 1, diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index be9526df8..cdd0ab0dc 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -49,35 +49,34 @@ sub getsetup () { #{{{ return rss => { type => "boolean", - default => 0, + example => 0, description => "enable rss feeds by default?", safe => 1, rebuild => 1, }, atom => { type => "boolean", - default => 0, + example => 0, description => "enable atom feeds by default?", safe => 1, rebuild => 1, }, allowrss => { type => "boolean", - default => 0, + example => 0, description => "allow rss feeds to be used?", safe => 1, rebuild => 1, }, allowatom => { type => "boolean", - default => 0, + example => 0, description => "allow atom feeds to be used?", safe => 1, rebuild => 1, }, pingurl => { type => "string", - default => "", example => "http://rpc.technorati.com/rpc/ping", description => "urls to ping (using XML-RPC) on feed update", safe => 1, diff --git a/IkiWiki/Plugin/mdwn.pm b/IkiWiki/Plugin/mdwn.pm index 59cb93bc4..332325adc 100644 --- a/IkiWiki/Plugin/mdwn.pm +++ b/IkiWiki/Plugin/mdwn.pm @@ -15,7 +15,7 @@ sub getsetup () { #{{{ return multimarkdown => { type => "boolean", - default => 0, + example => 0, description => "enable multimarkdown features?", safe => 1, rebuild => 1, diff --git a/IkiWiki/Plugin/mirrorlist.pm b/IkiWiki/Plugin/mirrorlist.pm index eb273561d..f7c78fdee 100644 --- a/IkiWiki/Plugin/mirrorlist.pm +++ b/IkiWiki/Plugin/mirrorlist.pm @@ -14,7 +14,7 @@ sub getsetup () { #{{{ return mirrorlist => { type => "string", - default => {}, + example => {}, description => "list of mirrors", safe => 1, rebuild => 1, diff --git a/IkiWiki/Plugin/openid.pm b/IkiWiki/Plugin/openid.pm index bc9311d9c..de7f7280e 100644 --- a/IkiWiki/Plugin/openid.pm +++ b/IkiWiki/Plugin/openid.pm @@ -25,7 +25,6 @@ sub getsetup () { #{{{ return openidsignup => { type => "string", - default => "", example => "http://myopenid.com/", description => "an url where users can signup for an OpenID", safe => 1, diff --git a/IkiWiki/Plugin/passwordauth.pm b/IkiWiki/Plugin/passwordauth.pm index 7319614f7..82afeef98 100644 --- a/IkiWiki/Plugin/passwordauth.pm +++ b/IkiWiki/Plugin/passwordauth.pm @@ -17,14 +17,14 @@ sub getsetup () { #{{{ return account_creation_password => { type => "string", - default => "", + example => "s3cr1t", description => "a password that must be entered when signing up for an account", safe => 1, rebuild => 0, }, password_cost => { type => "integer", - default => 8, + example => 8, description => "cost of generating a password using Authen::Passphrase::BlowfishCrypt", safe => 1, rebuild => 0, diff --git a/IkiWiki/Plugin/pinger.pm b/IkiWiki/Plugin/pinger.pm index 0aee17f8a..e72833b8f 100644 --- a/IkiWiki/Plugin/pinger.pm +++ b/IkiWiki/Plugin/pinger.pm @@ -20,7 +20,7 @@ sub getsetup () { #{{{ return pinger_timeout => { type => "integer", - default => 15, + example => 15, description => "how many seconds to try pinging before timing out", safe => 1, rebuild => 0, diff --git a/IkiWiki/Plugin/prettydate.pm b/IkiWiki/Plugin/prettydate.pm index 080317f06..db5a94f41 100644 --- a/IkiWiki/Plugin/prettydate.pm +++ b/IkiWiki/Plugin/prettydate.pm @@ -48,14 +48,13 @@ sub getsetup () { #{{{ return prettydateformat => { type => "string", - default => '%X, %B %o, %Y', + example => '%X, %B %o, %Y', description => "format to use to display date", safe => 1, rebuild => 1, }, timetable => { type => "internal", - default => undef, description => "array of time descriptions", safe => 1, rebuild => 1, diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm index 6ab4f9d03..d534d0cd9 100644 --- a/IkiWiki/Plugin/recentchanges.pm +++ b/IkiWiki/Plugin/recentchanges.pm @@ -18,14 +18,14 @@ sub getsetup () { #{{{ return recentchangespage => { type => "string", - default => "recentchanges", + example => "recentchanges", description => "name of the recentchanges page", safe => 1, rebuild => 1, }, recentchangesnum => { type => "integer", - default => 100, + example => 100, description => "number of changes to track", safe => 1, rebuild => 0, diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index ff18e1faf..c45e59c8e 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -19,7 +19,6 @@ sub getsetup () { #{{{ return omega_cgi => { type => "string", - default => "/usr/lib/cgi-bin/omega/omega", description => "path to the omega cgi program", safe => 0, # external program rebuild => 0, diff --git a/IkiWiki/Plugin/skeleton.pm.example b/IkiWiki/Plugin/skeleton.pm.example index 716ba63dd..49c4d88f2 100644 --- a/IkiWiki/Plugin/skeleton.pm.example +++ b/IkiWiki/Plugin/skeleton.pm.example @@ -43,7 +43,7 @@ sub getsetup () { #{{{ return skeleton => { type => "boolean", - default => 0, + example => 0, description => "example option", safe => 0, rebuild => 0, diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index d4cbb6705..36b434f67 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -27,7 +27,6 @@ sub getsetup () { #{{{ return tagbase => { type => "string", - default => "", example => "tag", description => "parent page tags are located under", safe => 1, diff --git a/IkiWiki/Plugin/typography.pm b/IkiWiki/Plugin/typography.pm index 4c486d4b4..5ba14084b 100644 --- a/IkiWiki/Plugin/typography.pm +++ b/IkiWiki/Plugin/typography.pm @@ -26,7 +26,7 @@ sub getsetup () { #{{{ return typographyattributes => { type => "string", - default => "3", + example => "3", example => "tag", description => "Text::Typography attributes value", safe => 1, diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 9a844ca06..686f7e518 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -376,7 +376,6 @@ describing the option. For example: return option_foo => { type => "boolean", - default => 0, description => "enable foo", safe => 1, rebuild => 1, @@ -392,8 +391,7 @@ describing the option. For example: * `type` can be "boolean", "string", "integer", "internal" (used for values that are not user-visible). The type is the type of the leaf values; the `%config` option may be an array or hash of these. -* `default` should be set to the default value of the option, if any. -* `example` can be set to an example value, which will not be used by default. +* `example` can be set to an example value. * `description` is a short description of the option. * `safe` should be false if the option should not be displayed in unsafe configuration methods, such as the web interface. Anything that specifies