summaryrefslogtreecommitdiff
path: root/IkiWiki.pm
AgeCommit message (Collapse)Author
2011-01-07Add add_literal_underlay and use it for the transient underlaySimon McVittie
This means we don't need to import Cwd and use abs_path.
2011-01-05use cgitemplate, remove misctemplateJoey Hess
2011-01-05make urlabs a noop if base url is not providedJoey Hess
This allows urlabs($foo, $config{url}) to be used safely, even if no url is configured.
2011-01-05factored out an urlabs from aggregate and cgiJoey Hess
2011-01-05oopsJoey Hess
2011-01-05Temporarily revert one part of the multiple url support in the last release. ↵Joey Hess
Non-edit pages are now back to having `<base>` set to the site's main url.
2010-12-29Add a second parameter to the rcs_diff hook, and avoid bloating memory ↵Joey Hess
reading in enormous commits.
2010-12-25urlto: simplify the to='' special case to allow it to be made absoluteSimon McVittie
2010-12-25checkconfig: don't warn if $config{url} is undefSimon McVittie
The warning was "Use of uninitialized value $IkiWiki::config{"url"} in length" when running a modified t/tag.t.
2010-12-22Enable HTML::Template's parent_global_vars option.intrigeri
Else setting parameters that do not appear in the template (such as title_overridden) fails horribly.
2010-11-29second parameter of urlto is optionalJoey Hess
2010-11-29Merge remote branch 'smcv/ready/localurl'Joey Hess
2010-11-28Merge remote branch 'blipvert/fixes'Joey Hess
2010-11-28check that user is defined before regexp compareCraig Lennox
2010-11-23If cgiurl is set, but url isn't, use an absolute $local_cgiurlSimon McVittie
2010-11-22urlto(): if $from is undef, return a local path, not an absolute URLSimon McVittie
2010-11-22baseurl(): return local path, not absolute URL, if the argument is undefSimon McVittie
2010-11-22cgiurl(): return a locally-valid path by defaultSimon McVittie
To get an absolute version you can use cgiurl(cgiurl => $config{cgiurl}). The only place in IkiWiki that seems to actually need an absolute URL is the openid plugin, and that already uses the named parameter.
2010-11-22cgiurl: don't append "?" if there are no parametersSimon McVittie
This means we can use cgiurl() instead of $config{cgiurl} if an absolute URL isn't desired.
2010-11-22Compute local paths to the top of the wikiSimon McVittie
"local" here is short for "locally valid" - the idea is that we can use URLs that are relative in the sense of only having the path part, but absolute in the sense that they start from '/', such as '/~smcv/ikiwiki.cgi'. There's no particularly good name that I can find for these between-relative-and-absolute URLs. They're useful because in the common case where the pages and the CGI script have the same scheme and authority component, each page is identified by the same locally-valid URL when linking from any page or from the CGI, without hard-coding a choice between HTTP and HTTPS, or between multiple virtual hostnames with the same path layout. As such, we can use them in many situations that previously used an absolute URL. If there's no suitable semi-absolute value for local_url (for instance, if your pages and your CGI reside on different servers), we can just fall back to using the absolute URL. I append '/' because $config{url} doesn't end with '/', but the common case for local_url (on all branchable.com sites, for instance) is that it's just '/'.
2010-11-20avoid an unnecessary hash lookupJoey Hess
2010-11-20make use of precompiled regex objectsSimon McVittie
2010-11-19glob2re: return a precompiled, anchored case-insensitive regexSimon McVittie
In practice every use of glob2re uses it like that.
2010-11-19match_glob: streamline glob cache slightlySimon McVittie
2010-11-19Improve the speed of match_globKathryn Andersen
2010-10-23bugfixJoey Hess
2010-10-20add a hint that creation_month takes a number, not a month nameJoey Hess
2010-10-20avoid perl warning when passed bad non-numeric year/month/dayJoey Hess
2010-10-08refactor check_canchange into IkiWiki libraryJoey Hess
2010-10-08make revert hooks optionalJoey Hess
I removed the IkiWiki::rcs_ stubs for the revert hooks. Instead recentchanges tests to see if the hooks are available and calls them directly.
2010-10-06convert rcs_revert to only stage the reversionJoey Hess
2010-10-06remove rcs_showpatchJoey Hess
2010-10-04indentationJoey Hess
2010-10-01Complete rcs_preprevert and lightly test.Peter Gammie
2010-09-29First cut at the revert plugin.Peter Gammie
2010-09-27template_depends: throw nice error message when template cannot be foundJoey Hess
plovs reported a crash when templates were not installed properly, with a non-useful error about the template object not being defined. I've audited all uses of template_depends(), and template(), and it makes sense for them to throw an error if the template cannot be found. All code with a user-supplied template catches errors already, to handle template parse failures. It did not make sense for template_file to throw errors, as some code uses it to probe if a template file is available.
2010-08-30revert check_canedit nosubs thingJoey Hess
Abstraction violation. I now think the problem should be treated as a bug in httpauth.
2010-08-30Receive: avoid hiding check_canedit error messagesJoey Hess
Avoid the generic "you are not allowed to change" message, and instead allow check_canedit to propigate out useful error messages. Went back to calling check_canedit in fatal mode, but added a parameter to avoid calling the troublesome subs that might cause a login attempt.
2010-08-30optimise single dot detectionJoey Hess
Since it already looks for things starting with a dot, I was able to avoid matching against the string twice. This also fixes a minor bug; $from may not be defined. Avoid uninitialized value warnings in this case.
2010-08-30Single dot in pagespec translates to 'current page'Giuseppe Bilotta
2010-08-04Fixes a bug that prevented matching deleted pages when using the page() ↵Joey Hess
PageSpec.
2010-07-26Add new disable hook, allowing plugins to perform cleanup after they have ↵Joey Hess
been disabled.
2010-07-23template: Fix dependency tracking. Broken in version 3.20100427.Joey Hess
template_depends was adding a dependency on the source filename, instead of on the page name when a template is a page. Such a dependency doesn't work.
2010-07-18Merge remote branch 'intrigeri/po'Joey Hess
2010-07-18remove dead caseJoey Hess
2010-07-18fix other 2 cases of conflicting destdir filesJoey Hess
Cleanly fixed case where destdir file failed to be written because there was a directory with the same name. This can be detected with no extra system calls, and dealt with by finding all pages that wrote files inside the directory, and removing them and the directory. The other, inverse case would be expensive to detect in will_render, since it would need to check each parent directory of the file to see if the directory is really a conflicting file. But prep_writefile already does a similar scan for symlinks in the path, so I added code there to remove the conflicting file. This fix assumes that the file is written using writefile, and not some other means (but using other means would be a security hole too, so hopefully nothing does).
2010-07-18check oldrenderedfiles tooJoey Hess
Handles the case where foo.mdwn is moved too foo/index.html
2010-07-18avoid error if two source files render the same destination fileJoey Hess
There are two sub-caces. If both source files still exist, the winner that renders the destination file is undefined. If one source file is deleted and the other added, in a refresh, the new file will take over the destination file.
2010-07-11Make the rationale clearer.intrigeri
2010-07-11Revert po vs. template kludges.intrigeri
This reverts commits dcd57dd5c9f3265bb7a78a5696b90976698c43aa, d4136aea8aa8968d2cd87b40e8d85301a3549323 and d877b9644bcfbbfc5eaf3f7fc13cb96ecda946c9.