aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
Commit message (Collapse)AuthorAge
* clarify description of verboseJoey Hess2009-01-24
| | | | It enables debug prints, so not just during building, but at runtime.
* add human-readable error when unknown pagespec function is calledJoey Hess2009-01-20
| | | | | | | | | | It used to replace unknown functions with "0" when translating a pagespec. Instead, replace it with a FailReason object. This way, the pagespec will still evaluate as before (possibly successfully if other terminals exist), but a human-readable error will be shown if the result is displayed. Also, an empty pagespec used to be replaced with "0", to avoid a eval error. Also use a FailReason here.
* export installdirJoey Hess2009-01-12
| | | | For use by Setup/Automator
* Consistently allow use of relative paths in all PageSpecs that take a page ↵Joey Hess2009-01-10
| | | | name parameter. Previously, match_created_before(), match_created_after(), match_sourcepage(), and match_destpage() did not support that, and the docs were not clear.
* refactor pagespec derelevitisation codeJoey Hess2009-01-10
|
* yesno: Always accept English even when localised.Joey Hess2009-01-03
| | | | | | | | | | | | | | It seems to be a failing of i18n in unix that the translation stops at the commands and the parameters to them, and ikiwiki is no exception with its currently untranslated directives. So the little bit that's translated sticks out like a sore thumb. It also breaks building of wikis if a different locale happens to be set. I suppose the best thing to do is either give up on the localisation of this part completly, or make it recognise English in addition to the locale. I've tenatively chosen the latter. (Also accept 1 and 0 as input.)
* Merge branch 'master' into nextJoey Hess2008-12-26
|\
| * inline: Run format hook firstJoey Hess2008-12-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.)
| * hack to avoid globlist deprecaton message false positiveJoey Hess2008-12-23
| |
| * Add deprecation warning for GlobLists, which will stop working in 3.0.Joey Hess2008-12-23
| |
* | remove globlist supportJoey Hess2008-12-23
| | | | | | | | | | No transition code implemented, but I will probably make a 2.x release that warns about found globlists.
* | finalise version 3.00 of the plugin apiJoey Hess2008-12-23
| |
* | enable prefix_directives by defaultJoey Hess2008-12-23
|/
* beautify_urlpath: if path already starts with ./, don't add another ./Simon McVittie2008-12-21
|
* beautify_urlpath: add ./ before checking for /index.htmlSimon McVittie2008-12-21
| | | | | This fixes a bug: when a page links to its own #comments anchor you would get a link like "index.html#comments" rather than "./#comments".
* clarifyJoey Hess2008-12-18
|
* don't rely on $@Joey Hess2008-12-17
| | | | | | A malformed pagespec will cause $@ to be set when translated, but if it is used a second time, the memoization will defeat that check. Better to check for the result not being defined.
* Coding style change: Remove explcit vim folding markers.Joey Hess2008-12-17
|
* inline: Support feedfile option to change the filename of the feed generated.Joey Hess2008-12-11
|
* fix handling of wrappergroup optionJoey Hess2008-11-26
| | | | Had forgot to include it in the option list.
* avoid adding ./ to urls unnecessarilyJoey Hess2008-11-20
| | | | | | | | | This avoids constructing urls like "./../foo/". The leading "../" avoids any colon confusion already. I noticed in my logs that certain badly written web spiders (hello again, Yahoo!) fail to follow urls like ikiwiki was constructing to the right place (instead ending up at "./foo/")
* check for invalid utf-8, and toss it back to avoid crashesJoey Hess2008-11-12
| | | | | | | | | | | | | | | | | | | | | | Since ikiwiki uses open :utf8, perl assumes that files contain valid utf-8. If it turns out to be malformed it may later crash while processing strings read from them, with 'Malformed UTF-8 character (fatal)'. As at least a quick fix, use utf8::valid as soon as data is read, and if it's not valid, call encode_utf8 on the string, thus clearing the utf-8 flag. This may cause follow-on encoding problems, but will avoid this crash, and the input file was broken anyway, so GIGO is a reasonable response. (I looked at calling decode_utf8 after, but it seemed to cause more trouble than it was worth. BTW, use open ':encoding(utf8)' avaoids this problem, but the corrupted data later causes Storable to crash when writing the index.) This is a quick fix, clearly imperfect: - It might be better to explicitly call decode_utf8 when reading files, rather than using the IO layer. - Data read other than by readfile() can still sneak in bad utf-8. While ikiwiki does very little file input not using it, stdin for the CGI would be one way.
* make unlockwiki drop the cgilockJoey Hess2008-11-11
| | | | | | | | This is necessary so that things that fork to the background, like pinger, and inline ping, don't block other cgis from running. Note that websetup also calls unlockwiki, before refreshing / rebuilding the wiki. It makes perfect sense for that not to block other cgis.
* lockwiki changesJoey Hess2008-11-11
| | | | | | * Stop busy-waiting in lockwiki, as this could delay ikiwiki from waking up for up to one second. The bailout code is no longer needed. * Remove support for unused optional wait parameter from lockwiki.
* Fix the link() pagespec to match links that are internally recorded as absolute.Joey Hess2008-11-09
| | | | | | | | | | | | | | This fixes a problem exposed by the recent change to tags (a2839de9362187b67b0e3a564461e272e64fd9b4). That recorded tag links as absolute by including a leading slash in the link. The same could also be done with an absolute wikilink. In either case, link() would not match such links, unless the leading slash was included in the link to match. But that's not right, because pagespecs match absolute by default. So strip the leading slash. Note that to keep any existing `link(/foo)` pagespecs working after this change, the leading slash is removed from there, too.
* document wikistatedir, though it's still internalJoey Hess2008-11-07
|
* meta: Plugin is now enabled by default since the basewiki uses it.Joey Hess2008-11-06
|
* allow_symlinks_before_srcdir is a booleanJoey Hess2008-10-29
|
* untrusted committers code seems to be fully workingJoey Hess2008-10-23
| | | | Still need to investigate possible races, and test some more.
* more work on untrusted committersJoey Hess2008-10-23
| | | | | Wired up check_canedit and check_canremove, still need to deal with check_canattach, and test.
* initial support for git repos with untrusted committersJoey Hess2008-10-22
| | | | | Still need to wire up the calls to check_* , but it's cold out here and my hands are going numb, so enough for now.
* function injection overhaulJoey Hess2008-10-21
| | | | | | | | | | | Add an inject function, that can be used by plugins that want to replace one of ikiwiki's functions with their own version. (This is a scary thing that grubs through the symbol table, and replaces all exported occurances of a function with the injected version.) external: RPC functions can be injected to replace exported functions. Removed the stupid displaytime hook, and use injection instead.
* add displaytime hookJoey Hess2008-10-19
| | | | | | | | Need to use a hook because an exported function cannot be reliably overridden. The replacement verstion was actually only affecting plugins loaded after it. formattime doesn't need a hook, since there's no reason to export it.
* fix relativedate timezone inclusionJoey Hess2008-10-19
| | | | | | The machine parseable date needs to include a timezone. Also, simplified the interface for date display.
* add_underlay: avoid adding the same underlay twiceJoey Hess2008-10-17
|
* lockedit: Support specifying which users (and IP addresses) a page is locked ↵Joey Hess2008-10-08
| | | | for. This supports most of the ACL type things users have been wanting to be done. Closes: #443346 (It does not control who can read a page, but that's out of scope for ikiwiki.)
* typoJoey Hess2008-10-01
|
* add newpagefile functionJoey Hess2008-09-29
|
* Add indexpages optionJoey Hess2008-09-29
| | | | | | | | | | This is the easy part of supporting foo/index.mdwn sources for page foo. Note that if foo.mdwn exists too, there will be a warning about multiple sources for the same page, and which is used is indeterminate. indexpages should also cause web based editing to create index source pages by default; this and other fallout of the option not yet implemented.
* editpage: Be more aggressive (and less buggy) about cleaning up temporary ↵Joey Hess2008-09-27
| | | | files rendered during page preview.
* Add %wikistate, which is like %pagestate except not specific to a given ↵Joey Hess2008-09-27
| | | | page, and is preserved across rebuilds.
* Reorganize index file, add a format version field.Joey Hess2008-09-27
| | | | | | | | | | Upgrades to the new index format should be transparent. The version field is 3, because 1 was the old textual index, 2 was the pre-versioned format. This also includes some efficiency improvements to index loading, by not copying a hash and using a reference.
* Export pagetitle, titlepage, linkpage.Joey Hess2008-09-27
|
* Add keepextension parameter to htmlize hook. (Willu)Joey Hess2008-09-23
|
* Improve error message if external plugin fails to load. Closes: #498458Joey Hess2008-09-11
|
* Add allow_symlinks_before_srcdir to config so websetup doesn't eat it.Joey Hess2008-09-09
|
* editpage: New core plugin factoring out page editing to allow disabling it ↵Joey Hess2008-09-05
| | | | if desired.
* For fine control over what characters are allowed, unescaped in source ↵Joey Hess2008-09-04
| | | | filenames, the wiki_file_chars setting is added. For example, set to "-[:alnum:]+/._" to disable colons from being used in source files (which can cause trouble om Windows).
* Work around perl $_ scoping nonsense that caused breakage when loading ↵Joey Hess2008-08-29
| | | | external plugins.
* Options set in the setup file are now immediatly loaded by ikiwiki -setup. ↵Joey Hess2008-08-06
| | | | This allows later switches to override them. Previously, setup file options overrode most command line options.