summaryrefslogtreecommitdiff
path: root/doc/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'doc/plugins')
-rw-r--r--doc/plugins/404.mdwn20
-rw-r--r--doc/plugins/contrib/default_content_for___42__copyright__42___and___42__license__42__.mdwn2
-rw-r--r--doc/plugins/contrib/gallery.mdwn2
-rw-r--r--doc/plugins/contrib/po.mdwn60
-rw-r--r--doc/plugins/contrib/sourcehighlight.mdwn15
-rw-r--r--doc/plugins/contrib/underlay.mdwn58
-rw-r--r--doc/plugins/creole.mdwn8
-rw-r--r--doc/plugins/creole/discussion.mdwn4
-rw-r--r--doc/plugins/google/discussion.mdwn6
-rw-r--r--doc/plugins/goto.mdwn10
-rw-r--r--doc/plugins/mdwn/discussion.mdwn7
-rw-r--r--doc/plugins/passwordauth/discussion.mdwn56
-rw-r--r--doc/plugins/shortcut/discussion.mdwn11
-rw-r--r--doc/plugins/tag.mdwn3
-rw-r--r--doc/plugins/tag/discussion.mdwn6
-rw-r--r--doc/plugins/textile/discussion.mdwn1
-rw-r--r--doc/plugins/underlay.mdwn14
-rw-r--r--doc/plugins/write.mdwn29
18 files changed, 226 insertions, 86 deletions
diff --git a/doc/plugins/404.mdwn b/doc/plugins/404.mdwn
new file mode 100644
index 000000000..ad332ee04
--- /dev/null
+++ b/doc/plugins/404.mdwn
@@ -0,0 +1,20 @@
+[[!template id=plugin name=404 author="[[Simon_McVittie|smcv]]"]]
+[[!tag type/useful]]
+
+This plugin lets you use the IkiWiki CGI script as an Apache 404 handler,
+to give the behaviour of various other wiki engines where visiting a
+nonexistent page provides you with a link to create it.
+
+To achieve this, put something like this in the wiki's Apache configuration
+file:
+
+ ErrorDocument 404 /ikiwiki.cgi
+
+(The path here needs to be whatever the path is to the ikiwiki.cgi from
+the root of your web server.)
+
+Or put something like this in the wiki's Lighttpd (>=1.4.17) configuration file:
+
+ server.error-handler-404 = "/ikiwiki.cgi"
+
+
diff --git a/doc/plugins/contrib/default_content_for___42__copyright__42___and___42__license__42__.mdwn b/doc/plugins/contrib/default_content_for___42__copyright__42___and___42__license__42__.mdwn
index 3efc68418..adb414ffb 100644
--- a/doc/plugins/contrib/default_content_for___42__copyright__42___and___42__license__42__.mdwn
+++ b/doc/plugins/contrib/default_content_for___42__copyright__42___and___42__license__42__.mdwn
@@ -20,7 +20,7 @@ template variable somebody wants to use.
--[[bma]]
Copyright and license values are not "template values", they are values
-tracked by the meta plugin, and that various code compares and uses to fill
+tracked by the [[meta]] plugin, and that various code compares and uses to fill
out the templates. Something like varioki cannot do that. --[[Joey]]
Somewhat more detailed usage documentation would be appreciated. I tried to setup
diff --git a/doc/plugins/contrib/gallery.mdwn b/doc/plugins/contrib/gallery.mdwn
index 7148de3ef..72df13bd0 100644
--- a/doc/plugins/contrib/gallery.mdwn
+++ b/doc/plugins/contrib/gallery.mdwn
@@ -2,7 +2,7 @@
This plugin would create a nice looking gallery of the images. It has been build over the img plugin in Ikiwiki
-SVN repository of plugin is located at <http://ned.snow-crash.org:8080/svn/ikiwiki-gallery>
+GIT repo of the plugin is located at <http://github.com/joeyh/ikiwiki/tree/gallery>
USAGE :
diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn
index 8b8bccb5a..8b19afae6 100644
--- a/doc/plugins/contrib/po.mdwn
+++ b/doc/plugins/contrib/po.mdwn
@@ -202,6 +202,8 @@ finish it at some point in the first quarter of 2009. --[[intrigeri]]
> I've looked it over and updated my branch with some (untested)
> changes.
>
+>> I've merged your changes into my branch. Only one was buggy.
+>
> Sorry, I'd forgotten about your cansave hook.. sorry for the duplicate
> work there.
>
@@ -212,10 +214,8 @@ finish it at some point in the first quarter of 2009. --[[intrigeri]]
> 3.x API, which I've promised not to do, so needs to be avoided
> somehow. (Sorry, I guess I dropped the ball on not getting this
> API change in before cutting 3.0..)
->
->> I'm discussing the solutions we now have on
->> [[todo/need_global_renamepage_hook]], as the solution I implemented
->> was initially agreed on there.
+>>
+>> Fixed, see [[todo/need_global_renamepage_hook]].
>>
> * I don't understand the parentlinks code change and need to figure it
> out. Can you explain what is going on there?
@@ -235,7 +235,7 @@ finish it at some point in the first quarter of 2009. --[[intrigeri]]
> * `skeleton.pm.example`'s canrename needs fixing to use either
> the current or my suggested parameters.
>>
->> I'll do both.
+>> Done.
>>
> * I don't like the exporting of `%backlinks` and `$backlinks_calculated`
> (the latter is exported but not used).
@@ -245,7 +245,25 @@ finish it at some point in the first quarter of 2009. --[[intrigeri]]
>> the subtleties of `our` use, and perldoc does not help me a lot.
>> IIRC, I actually did not use `our` to "export" these variables, but
>> rather to have them shared between `Render.pm` uses.
->>
+>>
+>>> My wording was unclear, I meant exposing. --[[Joey]]
+>>>
+>>>> I guess I still don't know Perl's `our` enough to understand clearly.
+>>>> No matter whether these variables are declared with `my` or `our`,
+>>>> any plugin can `use IkiWiki::Render` and then access
+>>>> `$IkiWiki::backlinks`, as already does e.g. the pagestat plugin.
+>>>> So I guess your problem is not with letting plugins use these
+>>>> variables, but with them being visible for every piece of
+>>>> (possibly external) code called from `Render.pm`. Am I right?
+>>>> If I understand clearly, using a brace block to lexically enclose
+>>>> these two `our` declarations, alongside with the `calculate_backlinks`
+>>>> and `backlinks` subs definitions, would be a proper solution, wouldn't
+>>>> it? --[[intrigeri]]
+>>>>
+>>>>> No, %backlinks and the backlinks() function are not the same thing.
+>>>>> The variable is lexically scoped; only accessible from inside
+>>>>> `Render.pm` --[[Joey]]
+>>>>
> * What is this `IkiWiki::nicepagetitle` and why are you
> injecting it into that namespace when only your module uses it?
> Actually, I can't even find a caller of it in your module.
@@ -253,7 +271,25 @@ finish it at some point in the first quarter of 2009. --[[intrigeri]]
>> I guess you should have a look to my `meta` branch and to
>> [[bugs/pagetitle_function_does_not_respect_meta_titles]] in order
>> to understand this :)
->>
+>>
+>>> It would probably be good if I could merge this branch without
+>>> having to worry about also immediatly merging that one. --[[Joey]]
+>>>
+>>>> I removed all dependencies on my `meta` branch from the `po` one.
+>>>> This implied removing the `po_translation_status_in_links` and
+>>>> `po_strictly_refresh_backlinks` features, and every link text is now
+>>>> displayed in the master language. I believe the removed features really
+>>>> enhance user experience of a translatable wiki, that's why I was
+>>>> initially supposing the `meta` branch would be merged first.
+>>>> IMHO, we'll need to come back to this quite soon after `po` is merged.
+>>>> --[[intrigeri]]
+>>>>
+>>>> Maybe you should keep those features in a meta-po branch?
+>>>> I did a cursory review of your meta last night, have some issues with it,
+>>>> but this page isn't the place for a detailed review. --[[Joey]]
+>>>>
+>>>>> Done. --[[intrigeri]]
+>>>
> * I'm very fearful of the `add_depends` in `postscan`.
> Does this make every page depend on every page that links
> to it? Won't this absurdly bloat the dependency pagespecs
@@ -269,15 +305,17 @@ finish it at some point in the first quarter of 2009. --[[intrigeri]]
>> enabled the option to display translation status in links, this
>> maintains the translation status up-to-date in backlinks. Same when
>> using meta title to make the pages titles translatable. It does
->> help having a nice and consistent translated wiki, but as it hurts
->> performance, I'm proposing to turn it into an option.
+>> help having a nice and consistent translated wiki, but as it can
+>> also involve problems, I just turned it into an option.
+>>
+>>> This has been completely removed for now due to the removal of
+>>> the dependency on my `meta` branch. --[[intrigeri]]
>>
> * The po4a Suggests should be versioned to the first version
> that can be used safely, and that version documented in
> `plugins/po.mdwn`.
>>
->> Sure. I was waiting for the necessary version to be actually
->> released, but we can guess it will be 0.35.
+>> Done.
>>
>> --[[intrigeri]]
>
diff --git a/doc/plugins/contrib/sourcehighlight.mdwn b/doc/plugins/contrib/sourcehighlight.mdwn
index fb368945b..07ac2086f 100644
--- a/doc/plugins/contrib/sourcehighlight.mdwn
+++ b/doc/plugins/contrib/sourcehighlight.mdwn
@@ -10,12 +10,9 @@ where foo and bar are the (source-supported) languages you want to
highlight
### Issues
-- I would like to have a link to the raw source; using will_render() and then copying the file should work.
+- I would like to have a link to the raw source; using will_render() and then copying the file should work.
-- the common case of foo.c and foo.h breaks
-because they both generate page working/dir/foo.
-It looks to me like ikiwiki is hardcoded to strip the extension in `pagename()` (IkiWiki.pm).
-This problem with sourcehighlight needs to be fixed before it is very useful.
+> You might also like to look at the [[todo/source_link]] todo. -- [[Will]]
- Is there a way to configure the colors used by source-highlight (other than editing the globally installed "default.style" file)? It would help if I could pass the command arbitrary command-line arguments; then I could configure which config file it's supposed to use. For instance, I'm not a fan of hard-coding the colors into the HTML output. IMHO, css-style formatting should be preferred. All that can be set via the command line ... --Peter
@@ -23,5 +20,11 @@ This problem with sourcehighlight needs to be fixed before it is very useful.
Note that [[Will]] wrote a plugin that uses source-highlight also. It's
available
-[here|todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion]].
+[[here|todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion]].
--[[Joey]]
+
+To be honest, [[Will]]'s version of this looks more polished. I will try his
+plugin and see if it can just replace mine. --[[DavidBremner]]
+
+
+*Updated* Now uses keepextension so multiple extensions should be OK
diff --git a/doc/plugins/contrib/underlay.mdwn b/doc/plugins/contrib/underlay.mdwn
deleted file mode 100644
index 72893c992..000000000
--- a/doc/plugins/contrib/underlay.mdwn
+++ /dev/null
@@ -1,58 +0,0 @@
-[[!template id=plugin name=underlay author="[[Simon_McVittie|smcv]]"]]
-[[!tag type/useful]]
-
-This plugin adds an `add_underlays` option to the `.setup` file.
-Its value is a list of underlay directories whose content is added to the wiki.
-
-Multiple underlays are normally set up automatically by other plugins (for
-instance, the images used by the [[plugins/smiley]] plugin), but they can also be
-used as a way to pull in external files that you don't want in revision control,
-like photos or software releases.
-
-Directories in `add_underlays` should usually be absolute. If relative, they're
-interpreted as relative to the parent directory of the basewiki underlay, which
-is probably not particularly useful in this context.
-
-Please feel free to add this plugin to ikiwiki if it seems like a good
-thing to have. See the 'underlay' branch in my git repository.
-
- #!/usr/bin/perl
- package IkiWiki::Plugin::underlay;
- # Copyright © 2008 Simon McVittie <http://smcv.pseudorandom.co.uk/>
- # Licensed under the GNU GPL, version 2, or any later version published by the
- # Free Software Foundation
-
- use warnings;
- use strict;
- use IkiWiki 2.00;
-
- sub import {
- hook(type => "getsetup", id => "underlay", call => \&getsetup);
- hook(type => "checkconfig", id => "underlay", call => \&checkconfig);
- }
-
- sub getsetup () {
- return
- plugin => {
- safe => 0,
- rebuild => undef,
- },
- add_underlays => {
- type => "string",
- default => [],
- description => "extra underlay directories to add",
- advanced => 1,
- safe => 0,
- rebuild => 1,
- },
- }
-
- sub checkconfig () {
- return unless exists $config{add_underlays};
-
- foreach my $dir (@{$config{add_underlays}}) {
- add_underlay($dir);
- }
- }
-
- 1;
diff --git a/doc/plugins/creole.mdwn b/doc/plugins/creole.mdwn
index c6491f754..6961e8d1d 100644
--- a/doc/plugins/creole.mdwn
+++ b/doc/plugins/creole.mdwn
@@ -13,4 +13,10 @@ wiki markup formats, so should be fairly easy to guess at. There is also a
Links are standard [[WikiLinks|ikiwiki/WikiLink]]. Links and
[[directives|ikiwiki/directive]] inside `{{{ }}}` blocks are still expanded,
-since this happens before the creole format is processed.
+since this happens before the creole format is processed. (You need to escape
+them manually, via \\\[[directives]], the ~ escaping of creole doesn't work on
+this.)
+
+The standard ikiwiki [[WikiLinks|ikiwiki/WikiLink]] is almost the same as Creole link, except that creole uses \[[pagename|description]] while ikiwiki uses \[[description|pagename]].
+
+
diff --git a/doc/plugins/creole/discussion.mdwn b/doc/plugins/creole/discussion.mdwn
index 36b7ba869..38ee2bd78 100644
--- a/doc/plugins/creole/discussion.mdwn
+++ b/doc/plugins/creole/discussion.mdwn
@@ -8,4 +8,8 @@ I've installed Text::WikiCreole 0.05 and enabled the plugin, but I get an error
>> I've added the patch to pkgsrc as well. Thanks. --[[schmonz]]
+>> Currently the creole plugin is included in ikiwiki but the ikiwiki deb (3.0.3) doesn't suggests libtext-wikicreole-perl. Why? --[[weakish]]
+
+>>> forgot, done now --[[Joey]]
+
I'm moving over a really stinkingly old UseMod and creole seems the nearest match. I've worked out that Bare /Subpage links need to become \[\[Subpage\]\], and Top/Sub links need to be \[\[Top/Sub\]\] (or \[\[Top/Sub|Top/Sub\]\], to display in exactly the same way), but I'm stuck on generic hyperlinks. The creole cheat sheet says I should be able to do \[\[http://url.path/foo|LinkText\]\], but that comes out as a link to create the "linktext" page, and Markdown-style \[Link Text\](http://url.path/foo) just gets rendered as is. Any suggestions? --[[schmonz]]
diff --git a/doc/plugins/google/discussion.mdwn b/doc/plugins/google/discussion.mdwn
new file mode 100644
index 000000000..babc919d2
--- /dev/null
+++ b/doc/plugins/google/discussion.mdwn
@@ -0,0 +1,6 @@
+This plugin uses the googleform.tmpl
+which produces valid HTML but invalid XHTML.
+This is not very good since the default ikiwiki
+templates produce XHTML instead of HTML.
+
+> Fixed, thanks for the patch! --[[Joey]]
diff --git a/doc/plugins/goto.mdwn b/doc/plugins/goto.mdwn
new file mode 100644
index 000000000..9c401c5d2
--- /dev/null
+++ b/doc/plugins/goto.mdwn
@@ -0,0 +1,10 @@
+[[!template id=plugin name=goto author="[[Simon_McVittie|smcv]]"]]
+[[!tag type/useful]]
+
+This plugin adds a `do=goto` mode for the IkiWiki CGI script. It's mainly
+for internal use by the [[404]], [[comments]] and [[recentchanges]]
+plugins, which enable it automatically.
+
+With this plugin enabled you can link to `ikiwiki.cgi?do=goto&page=some/where`
+to make a link that will redirect to the page `/some/where` if it exists, or
+offer a link to create it if it doesn't.
diff --git a/doc/plugins/mdwn/discussion.mdwn b/doc/plugins/mdwn/discussion.mdwn
new file mode 100644
index 000000000..4b05e7f4e
--- /dev/null
+++ b/doc/plugins/mdwn/discussion.mdwn
@@ -0,0 +1,7 @@
+Unlike other format, ikiwiki is somehow depends
+on mdwn, since the underlay dir
+is written in mdwn. If you want to disable mdwn,
+you need to overwrite the underlay
+dir (set underlaydir in ikiwiki.setup
+to your own underlay dir or replace underlay pages
+in your $SRC).
diff --git a/doc/plugins/passwordauth/discussion.mdwn b/doc/plugins/passwordauth/discussion.mdwn
index f4e7ae7a1..3362ae7d2 100644
--- a/doc/plugins/passwordauth/discussion.mdwn
+++ b/doc/plugins/passwordauth/discussion.mdwn
@@ -9,3 +9,59 @@ the *Preferences -- Subscriptions*. --[[tschwinge]]
>> Aha, then the problem is Firefox, which is automatically filling the
>> *Password* field with its previous value, but not filling the
>> *Confirm Password* one. --[[tschwinge]]
+
+## easy access to the userdb for apache auth?
+
+My use case is:
+
+* restricted ikiwiki
+* read/edit only allowed from the local network (done with apache restrictions)
+* edit only for people authenticated (done with vanilla ikiwiki passwordauth)
+
+I would like to allow people to read/edit the wiki from outside of the
+local network, if and only if they already have an ikiwiki account.
+
+[[httpauth]] doesn't fit since it doesn't allow anonymous local users
+to create their own account. I want a single, local, simple auth
+database.
+
+My (naïve?) idea would be:
+
+* keep the [[passwordauth]] system
+* provide a way for Apache to use the userdb for authentication if
+people want to connect from outside
+
+I looked at the various auth modules for apache2. It seems that none
+can use a "perl Storable data" file. So, I think some solutions could
+be:
+
+* use a sqlite database instead of a perl Storable file
+ * can be used with
+ [mod_auth_dbd](http://httpd.apache.org/docs/2.2/mod/mod_authn_dbd.html)
+ * requires a change in ikiwiki module [[passwordauth]]
+* use an external program to read the userdb and talk with
+ [mod_auth_external](http://unixpapa.com/mod_auth_external.html)
+ * requires the maintainance of this external auth proxy over ikiwiki
+ userdb format changes
+ * (I don't know perl)
+* include this wrapper in ikiwiki
+ * something like `ikiwiki --auth user:pass:userdb` check the
+ `user:pass` pair in `userdb` and returns an Accept/Reject flag to
+ Apache
+ * requires a change in ikiwiki core
+ * still requires
+ [mod_auth_external](http://unixpapa.com/mod_auth_external.html)
+* do it with Apache perl sections
+ * (I don't know perl)
+
+Any opinion/suggestion/solution to this is welcome and appreciated.
+
+--
+[[NicolasLimare]]
+
+For a similar use case, I've been intending to implement
+[[todo/httpauth_feature_parity_with_passwordauth]], but your idea may
+actually be the way to go. IMHO, the Perl sections idea is the
+easiest to setup, but on the long run, I'd prefer ikiwiki to optionnally
+use a userdb storage backend supported at least by Apache and lighttpd.
+--[[intrigeri]]
diff --git a/doc/plugins/shortcut/discussion.mdwn b/doc/plugins/shortcut/discussion.mdwn
index 8b1378917..4e11ce08c 100644
--- a/doc/plugins/shortcut/discussion.mdwn
+++ b/doc/plugins/shortcut/discussion.mdwn
@@ -1 +1,12 @@
+The plugin depends on [[mdwn]]. If you have
+disabled [[mdwn]], to get [[shortcut]] work, you need
+commit in a shortcuts.ext (ext is `rcs|creole|html|txt|etc`),
+and edit/patch [[shortcut]].
+
+Maybe use the `default_pageext` is better than hardcode .mdwn?
+
+--[[weakish]]
+
+> done, it will use `default_pageext` now --[[Joey]]
+
diff --git a/doc/plugins/tag.mdwn b/doc/plugins/tag.mdwn
index 17bb086a1..8ff70a069 100644
--- a/doc/plugins/tag.mdwn
+++ b/doc/plugins/tag.mdwn
@@ -5,6 +5,9 @@ This plugin provides the [[ikiwiki/directive/tag]] and
[[ikiwiki/directive/taglink]] [[directives|ikiwiki/directive]].
These directives allow tagging pages.
+It also provides the `tagged()` [[ikiwiki/PageSpec]], which can be used to
+match pages that are tagged with a specific tag.
+
[[!if test="enabled(tag)" then="""
This wiki has the tag plugin enabled, so you'll see a note below that this
page is tagged with the "tags" tag.
diff --git a/doc/plugins/tag/discussion.mdwn b/doc/plugins/tag/discussion.mdwn
index 7e7b88bc5..b6dab5358 100644
--- a/doc/plugins/tag/discussion.mdwn
+++ b/doc/plugins/tag/discussion.mdwn
@@ -22,3 +22,9 @@ AOLMODE=true echo "I too would really like this feature, which would make cgi fr
better" --[[DavidBremner]]
Please make the actual text used a template some way or another. I may want `map` instead of `inline`. --[[madduck]]
+
+
+See [[todo/auto-create tag pages according to a template]]
+
+-- Jeremy Schultz <jeremy.schultz@uleth.ca>
+
diff --git a/doc/plugins/textile/discussion.mdwn b/doc/plugins/textile/discussion.mdwn
deleted file mode 100644
index 945c9b46d..000000000
--- a/doc/plugins/textile/discussion.mdwn
+++ /dev/null
@@ -1 +0,0 @@
-. \ No newline at end of file
diff --git a/doc/plugins/underlay.mdwn b/doc/plugins/underlay.mdwn
new file mode 100644
index 000000000..09d096a6e
--- /dev/null
+++ b/doc/plugins/underlay.mdwn
@@ -0,0 +1,14 @@
+[[!template id=plugin name=underlay author="[[Simon_McVittie|smcv]]"]]
+[[!tag type/useful]]
+
+This plugin adds an `add_underlays` option to the `.setup` file.
+Its value is a list of underlay directories whose content is added to the wiki.
+
+Multiple underlays are normally set up automatically by other plugins (for
+instance, the images used by the [[plugins/smiley]] plugin), but they can also be
+used as a way to pull in external files that you don't want in revision control,
+like photos or software releases.
+
+Directories in `add_underlays` should usually be absolute. If relative, they're
+interpreted as relative to the parent directory of the basewiki underlay, which
+is probably not particularly useful in this context.
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn
index 0c5ad4540..be01605e8 100644
--- a/doc/plugins/write.mdwn
+++ b/doc/plugins/write.mdwn
@@ -107,7 +107,7 @@ adding or removing files from it.
This hook is called early in the process of building the wiki, and is used
as a first pass scan of the page, to collect metadata about the page. It's
-mostly used to scan the page for WikiLinks, and add them to `%links`.
+mostly used to scan the page for [[WikiLinks|ikiwiki/WikiLink]], and add them to `%links`.
Present in IkiWiki 2.40 and later.
The function is passed named parameters "page" and "content". Its return
@@ -168,7 +168,7 @@ htmlize the page) along with the rest of the page.
hook(type => "linkify", id => "foo", call => \&linkify);
-This hook is called to convert [[WikiLinks|WikiLink]] on the page into html
+This hook is called to convert [[WikiLinks|ikiwiki/WikiLink]] on the page into html
links. The function is passed named parameters "page", "destpage", and
"content". It should return the linkified content. Present in IkiWiki 2.40
and later.
@@ -189,9 +189,14 @@ The function is passed named parameters: "page" and "content" and should
return the htmlized content.
If `hook` is passed an optional "keepextension" parameter, set to a true
-value, then this extension will not be stripped from the source filename when
+value, then the extension will not be stripped from the source filename when
generating the page.
+If `hook` is passed an optional "noextension" parameter, set to a true
+value, then the id parameter specifies not a filename extension, but
+a whole filename that can be htmlized. This is useful for files
+like `Makefile` that have no extension.
+
### pagetemplate
hook(type => "pagetemplate", id => "foo", call => \&pagetemplate);
@@ -470,7 +475,7 @@ describes the plugin as a whole. For example:
* `example` can be set to an example value.
* `description` is a short description of the option.
* `link` is a link to further information about the option. This can either
- be a wikilink, or an url.
+ be a [[ikiwiki/WikiLink]], or an url.
* `advanced` can be set to true if the option is more suitable for advanced
users.
* `safe` should be false if the option should not be displayed in unsafe
@@ -665,6 +670,16 @@ A failure to write the file will result in it dying with an error.
If the destination directory doesn't exist, it will first be created.
+The filename and directory are separate parameters because of
+some security checks done to avoid symlink attacks. Before writing a file,
+it checks to make sure there's not a symlink with its name, to avoid
+following the symlink. If the filename parameter includes a subdirectory
+to put the file in, it also checks if that subdirectory is a symlink, etc.
+The directory parameter, however, is not checked for symlinks. So,
+generally the directory parameter is a trusted toplevel directory like
+the srcdir or destdir, and any subdirectories of this are included in the
+filename parameter.
+
#### `will_render($$)`
Given a page name and a destination file name (not including the base
@@ -706,7 +721,7 @@ a wiki page name.
#### `linkpage($)`
This converts text that could have been entered by the user as a
-[[WikiLink]] into a wiki page name.
+[[ikiwiki/WikiLink]] into a wiki page name.
#### `srcfile($;$)`
@@ -771,7 +786,7 @@ are collected together to form the RecentChanges page, for example.
To make an internal use page, register a filename extension that starts
with "_". Internal use pages cannot be edited with the web interface,
-generally shouldn't contain wikilinks or preprocessor directives (use
+generally shouldn't contain [[WikiLinks|ikiwiki/WikiLink]] or preprocessor directives (use
either on them with extreme caution), and are not matched by regular
PageSpecs glob patterns, but instead only by a special `internal()`
[[ikiwiki/PageSpec]].
@@ -940,7 +955,7 @@ or wrap one of the functions.
For example, your plugin might want to override `displaytime`, to change
the html markup used when displaying a date. Or it might want to override
`IkiWiki::formattime`, to change how a date is formatted. Or perhaps you
-want to override `bestlink` and change how ikiwiki deals with WikiLinks.
+want to override `bestlink` and change how ikiwiki deals with [[WikiLinks|ikiwiki/WikiLink]].
By venturing into this territory, your plugin is becoming tightly tied to
ikiwiki's internals. And it might break if those internals change. But