summaryrefslogtreecommitdiff
path: root/doc/plugins/write.mdwn
AgeCommit message (Collapse)Author
2009-10-09pagespec_match_list: change limit to filterJoey Hess
2009-10-09pagespec_match_list allow additional pagespec limit parameters againJoey Hess
2009-10-08rename use_pagespec to pagespec_match_listJoey Hess
To avoid breaking plugins, also support the old pagespec_match_list calling convention, with a deprecation warning.
2009-10-08inline: switch to use_pagespecJoey Hess
Taking advantage of every single one of its features, of course. Even had to add one more..
2009-10-08add use_pagespec and deptype functionsJoey Hess
2009-10-07add type info to influence informationJoey Hess
2009-10-07add influence info to match_*Joey Hess
Also update docs, test suite.
2009-10-07mention that pagespec_match returns an overloaded valueJoey Hess
2009-09-10Add genwrapper hook, that can be used to add code into the C wrapper.Joey Hess
2009-07-29add missing backquotehttp://schmonz.livejournal.com/
2009-07-26fix typohttp://schmonz.livejournal.com/
2009-05-19Merge branch 'master' into poJoey Hess
Conflicts: debian/changelog
2009-05-16document longname parameterJon Dowland
2009-05-06Avoid %links accumulating duplicates. (For TOVA)Joey Hess
This is sorta an optimisation, and sorta a bug fix. In one test case I have available, it can speed a page build up from 3 minutes to 3 seconds. The root of the problem is that $links{$page} contains arrays of links, rather than hashes of links. And when a link is found, it is just pushed onto the array, without checking for dups. Now, the array is emptied before scanning a page, so there should not be a lot of opportunity for lots of duplicate links to pile up in it. But, in some cases, they can, and if there are hundreds of duplicate links in the array, then scanning it for matching links, as match_link and some other code does, becomes much more expensive than it needs to be. Perhaps the real right fix would be to change the data structure to a hash. But, the list of links is never accessed like that, you always want to iterate through it. I also looked at deduping the list in saveindex, but that does a lot of unnecessary work, and doesn't completly solve the problem. So, finally, I decided to add an add_link function that handles deduping, and make ikiwiki-transition remove the old dup links.
2009-04-23pagespec_match_list added and used in most appropriate placesJoey Hess
* pagespec_match_list: New API function, matches pages in a list and throws an error if the pagespec is bad. * inline, brokenlinks, calendar, linkmap, map, orphans, pagecount, pagestate, postsparkline: Display a handy error message if the pagespec is erronious.
2009-04-23pagespec error/failure distinction and error display by inlineJoey Hess
* Add IkiWiki::ErrorReason objects, and modify pagespecs to return them in cases where they fail to match due to a configuration or syntax error. * inline: Display a handy error message if the inline cannot display any pages due to such an error. This is perhaps somewhat incomplete, as other users of pagespecs do not display the error, and will eventually need similar modifications to inline. I should probably factor out a pagespec_match_all function and make it throw ErrorReasons.
2009-04-22clarifyJoey Hess
2009-03-08rename hook: run once per file to be renamedintrigeri
... as Joey suggested on todo/need_global_renamepage_hook This hook is applied recursively to returned additional rename hashes, so that it handles the case where two plugins use the hook: plugin A would see when plugin B adds a new file to be renamed. The full set of rename hashes can no longer be changed by hook functions, that are only allowed to return any additional rename hashes it wants to add. Rationale: the correct behavior of the recursion would be hard, if not impossible, to define, if already considered pages were changing on the run. Signed-off-by: intrigeri <intrigeri@boum.org>
2009-03-08Merge commit 'upstream/master' into prv/pointrigeri
Conflicts: IkiWiki/Plugin/editpage.pm debian/control debian/copyright doc/todo/need_global_renamepage_hook.mdwn Signed-off-by: intrigeri <intrigeri@boum.org>
2009-02-19Add noextension parameter to htmlize hooks to support, eg, Makefile.Joey Hess
2009-02-17revert addition of several blank linesJoey Hess
2009-02-16correct WikiLinks to the WikiLink pageAlexandreDupas
2009-02-09document writefile symlink checksJoey Hess
2009-01-27rename hook: instead of modifying the passed-by-name array, return a copyintrigeri
This is intended to solve Joey's concerns expressed on http://ikiwiki.info/todo/need_global_renamepage_hook/, i.e. the need to make it possible to use this hook from external plugins. A plugin using this hook still can add/modify/remove elements of the @torename array. Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-27revert renamepage's hook original nameintrigeri
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-26only pass named parameters to the canremove hookintrigeri
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-26only pass named parameters to the canrename hookintrigeri
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-26don't add new exported warning functionJoey Hess
Nothing in the po plugin actually uses this function. The benefit of adding the function in general is debatable, but I'd prefer to keep the changes involved in merging po at a minimum.
2009-01-19remove cansave plugin, now replaced by Joey's checkcontent oneintrigeri
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-19make checkcontent compatible with hooks that need the full contentintrigeri
Always pass the full (modified) content in `content` named parameter. When the user edits an existing wiki page, also pass a `diff` named parameter, which includes only the lines that they added to the page, or modified. Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-17Merge commit 'upstream/master' into prv/pointrigeri
Conflicts: IkiWiki/Plugin/editpage.pm IkiWiki/Plugin/skeleton.pm.example doc/plugins/write.mdwn t/syntax.t
2009-01-16checkcontent: New hook, can be used to implement arbitrary content filters, ↵Joey Hess
including spam filters.
2009-01-16add a warning (exported) function to the coreintrigeri
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-01editpage: added a cansave hookintrigeri
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-01Pass src, srcfile, dest and destfile to the canrename hook.intrigeri
This is not needed by the use I'm doing of it, but seems more consistent to me. Future users of this hook may need this data to make their mind. Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-01rename: pass the CGI and session to the rename hookintrigeri
The po plugin remame + canrename hook combination will need this. Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-01rename: implemented new canrename hookintrigeri
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-01remove: implemented a new canremove hook; use it in the po pluginintrigeri
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-01Merge commit 'upstream/master' into prv/pointrigeri
2008-12-30the rename hook can now change the list of pages to renameintrigeri
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-12-30renamed the renamepage hook to renamelink, added rename hookintrigeri
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-12-26Merge branch 'master' into nextJoey Hess
2008-12-26inline: Run format hook firstJoey Hess
inline has a format hook that is an optimisation hack. Until this hook runs, the inlined content is not present on the page. This can prevent other format hooks, that process that content, from acting on inlined content. In bug ##509710, we discovered this happened commonly for the embed plugin, but it could in theory happen for many other plugins (color, cutpaste, etc) that use format to fill in special html after sanitization. The ordering was essentially random (hash key order). That's kinda a good thing, because hooks should be independent of other hooks and able to run in any order. But for things like inline, that just doesn't work. To fix the immediate problem, let's make hooks able to be registered as running "first". There was already the ability to make them run "last". Now, this simple first/middle/last ordering is obviously not going to work if a lot of things need to run first, or last, since then we'll be back to being unable to specify ordering inside those sets. But before worrying about that too much, and considering dependency ordering, etc, observe how few plugins use last ordering: Exactly one needs it. And, so far, exactly one needs first ordering. So for now, KISS. Another implementation note: I could have sorted the plugins with first/last/middle as the primary key, and plugin name secondary, to get a guaranteed stable order. Instead, I chose to preserve hash order. Two opposing things pulled me toward that decision: 1. Since has order is randomish, it will ensure that no accidental ordering assumptions are made. 2. Assume for a minute that ordering matters a lot more than expected. Drastically changing the order a particular configuration uses could result in a lot of subtle bugs cropping up. (I hope this assumption is false, partly due to #1, but can't rule it out.)
2008-12-24make ikiwiki-transition prefix_directives take a setup fileJoey Hess
This is easier to remeber, and less error-prone than passing it all the pages in the wiki.
2008-12-23finalise version 3.00 of the plugin apiJoey Hess
2008-12-11inline: Support feedfile option to change the filename of the feed generated.Joey Hess
2008-10-24include temp file for attachment change tooJoey Hess
2008-10-24Typo fix.tschwinge
2008-10-23check_canattach hooked upJoey Hess
2008-10-23more work on untrusted committersJoey Hess
Wired up check_canedit and check_canremove, still need to deal with check_canattach, and test.