aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
Commit message (Collapse)AuthorAge
* In html5 mode, generate a host- or protocol-relative <base> for the CGISimon McVittie2014-10-05
| | | | This increases the number of situations in which we do the right thing.
* Add reverse_proxy option which hard-codes cgiurl in CGI outputSimon McVittie2014-10-05
| | | | | This solves several people's issues with the CGI trying to be too clever when IkiWiki is placed behind a reverse-proxy.
* Force use of $config{url} as top URL in w3mmodeSimon McVittie2014-10-05
|
* Fix crash that can occur when only_committed_changes is set and a file is ↵Joey Hess2014-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | deleted from the underlay. srcfile_stat got called on a file from the underlay that no longer existed. I am not 100% sure of the circumstances of that; I was able to reproduce the bug but neglected to snapshot the tree, and then accidentially got it to stop crashing. I know that a transient tag page got deleted using the web interface to trigger the crash. It seems that process_changed_files must have returned the file, despite it being deleted. And since the file was not checked into git, it seems it must have not been included in @IkiWiki::underlayfiles, which would have caused process_changed_files to not return it. I do not know why a transient tag page would not be in @IkiWiki::underlayfiles. There is a bug here that I don't understand. This is just a workaround -- run srcfile_stat such that it won't crash, and if it is unable to stat a file, find_changed knows it's not changed, so it's ok to skip it. Also made find_new_files run srcfile_stat such that it won't crash, just because I was there.
* img: raise an error if we cannot find the image's sizeSimon McVittie2014-09-16
| | | | This happens for PDFs without ghostscript installed, for instance.
* Merge branch 'ready/templatebody'Simon McVittie2014-09-15
|\
| * Assume that every page has been scanned by the time the scan phase endsSimon McVittie2014-03-05
| | | | | | | | | | | | | | | | | | | | This doesn't prevent memory from being used to track what we have and haven't scanned, but it does make it temporary. The existing %rendered hash, which is filled afterwards, will be larger than %scanned in practice anyway: %scanned will contain an entry for each page that changed, plus an entry for each template used by templatebody, whereas %rendered will contain an entry for each page that changed plus an entry for each page rendered due to links or dependencies.
| * Track whether we're in the scan or render phaseSimon McVittie2014-03-05
| | | | | | | | | | | | | | | | In the scan phase, it's too early to match pagespecs or sort pages; in the render phase, both of those are OK. It would be possible to add phases later, renumbering them if necessary to maintain numerical order.
| * Add templatebody plugin and directive, and enable it by defaultSimon McVittie2014-03-05
| | | | | | | | Also add a regression test for templatebody.
| * IkiWiki::Render: make 'scan' idempotentSimon McVittie2014-03-05
| | | | | | | | | | | | If it does nothing when a page has already been scanned, we can use it at any time to force a page to be scanned. In particular, the templatebody plugin is going to need this.
* | Merge branch 'ready/autoindex-more-often'Simon McVittie2014-09-15
|\ \
| * | Allow creation of transient index pages for directories outside srcdirSimon McVittie2014-07-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After this change autoindex creates index pages also for empty directories included in underlays, but only if it isn't going to commit them to the srcdir ($config{autoindex_commit} = 0). Inspired by a patch from Tuomas Jormola. Bug-Debian: http://bugs.debian.org/611068
| * | autoindex: remove unnecessary special case for transient underlaySimon McVittie2014-07-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not clear that the transient underlay should be excluded from indexing; see [[bugs/transient autocreated tagbase is not transient autoindexed]]. In any case, the code that checks what directories might need indexes specifically checks for the srcdir anyway, so the only effect this extra check can have is negative (it could fail to notice files in the transient underlay and attempt to recreate them unnecessarily).
* | | Merge branch 'ready/more-magic'Simon McVittie2014-09-15
|\ \ \
| * | | filecheck: accept MIME types that don't contain ';'Simon McVittie2014-09-10
| | | |
* | | | Merge remote-tracking branch 'jcflack/early-env'Simon McVittie2014-09-15
|\ \ \ \
| * | | | More cautious escaping of environment values.Lafayette Chamber Singers Webmaster2014-09-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tightened the escaping per this review comment: http://source.ikiwiki.branchable.com/?p=source.git;a=commitdiff;h=f35fc6a603b5473ce2c07bb0236e28e57f718315 (I didn't introduce a $tmp, as $val was local to that block already, and each hex encoding is in its own C string literal to avoid consuming subsequent chars that are valid hex digits.)
| * | | | Installing ikiwiki on a shared-hosting server, there may be no access toLafayette Chamber Singers Webmaster2014-09-14
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | install prerequisite Perl modules in the systemwide locations. They may have to be installed under the home directory, such as by using local::lib (which is how the cPanel Perl-module installer works, on systems that use it). For that to work, the local::lib-defined value for PERL5LIB must be in the environment when Perl starts up. The former way %config{ENV} was handled was too late, depending on the Perl code to unpack it from the storable and put it into the environment. Easy solution is to build the wrapper to repopulate the environment based on %config{ENV} before ever exec'ing Perl (and then remove it from the storable as there is nothing more that the Perl code will need to do with it).
* | | | Merge branch 'ready/imgforpdf-and-more'Simon McVittie2014-09-12
|\ \ \ \
| * | | | show resized img in preview using data: urlschrysn2014-07-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in analogy to sparklines, this renders scaled imgs to data:img/...;base64,... urls in preview mode. if the image is already present on the server (eg because it was not just inserted), the already rendered image is referenced instead.
| * | | | img plugin: split resizing calculations and actual resizingchrysn2014-07-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there is now a size calculating part (which chooses a final size) and a scaling part (which triggers if the sizes calculated by the former indicate a downscaling). this solves the issue of unproportional upscalings (bugs/image_rescaling_distorts_with_small_pictures). also, "small" pdf files (or pdf files without explicit size settings), which would not be converted under the old mechanism, now get rendered to pngs. this commit affects a unit test: while svgs were previously unconditionally rendered to pngs, this now only happens on downscaling. this is intentional -- while a small version of an svg graphic is likely to be more compact when rendered (eg as a preview), a large version would not have that benefit, and why convert something that browsers basically can show and be inconsistend with how other images are handled. the new unit test simply makes the original svg larger to check for the same behaviros as before.
| * | | | add pagenumber parameterchrysn2014-04-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this allows picking a page from a pdf. also, this enhances performance greatly when rendering pdfs, as only the first page is rasterized. (otherwise, imagemagick would treat the pdf as a list of images, work with all of them, until finally only the first page gets saved). the default parameter of 0 will select the single image contained in typical image files anyway, so no specialcasing between single- and multifile containers is needed.
| * | | | add pdf support to the img directivechrysn2014-04-07
| | | | | | | | | | | | | | | | | | | | | | | | | this is trivial as pdf is supported by imagemagick, and just needs an explicit mention to enable conversion.
| * | | | set the file type parameter after reading the imagechrysn2014-04-07
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | imagemagick, when reading an image, sets its magick parameter to indicate the file type, overriding the explicitly set file type for output if it is set at creation. as a result, previously (with graphicsmagick-libmagick-dev-compat 1.3.18-1 providing Image::Magick), svg output files were not png, neither svg, but mvg (imagemagick vector graphics).
* | | | Merge branch 'ready/chrysn/linkmapenhancement'Simon McVittie2014-09-12
|\ \ \ \
| * | | | display the pagetitle() in linkmapschrysn2012-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | without this patch, linkmaps display underscores and underscore escape sequences in the rendered output. this introduces a pageescape function, which invoces pagetitle() to get rid of underscore escapes and wraps the resulting utf8 string appropriately for inclusion in a dot file (using dot's html encoding because it can represent the '\"' dyad properly, and because it doesn't need special-casing of newlines).
* | | | | Merge branch 'ready/edittemplate2'Simon McVittie2014-09-12
|\ \ \ \ \
| * | | | | edittemplate: use unambiguous RFC 3339 datestampsSimon McVittie2014-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These take into account the timezone offset (and convert it to UTC+0000) rather than being in an unspecified timezone.
| * | | | | Only provide time, not formatted_time, to edittemplate templatesSimon McVittie2014-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm not sure what the use-case is for formatted_time, and chrysn pointed out that for display in HTML, [[!date "<TMPL_VAR time>"]] would be nicer.
| * | | | | Provide the current time to edittemplate.Jonathon Anderson2014-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `time` variable contains a fixed-format time, guaranteed suitable for parsing by timedate. The `formatted_time` variable contains the same time formatted by IkiWiki::formattime.
| * | | | | Use Linux uuid facility instead of an external library if possibleSimon McVittie2014-09-01
| | | | | |
| * | | | | edittemplate: only generate a UUID on-demandSimon McVittie2014-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the template doesn't use <TMPL_VAR UUID> there's no point in incurring any cost.
| * | | | | Provide a UUID in edittemplate templates.Jonathon Anderson2014-09-01
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I want to make GUIDs for my RSS feeds that don't change when I move pages around. To that end, I've used UUID::Tiny to generate a version 4 (random) UUID that is presented in a `uuid` variable in the template. At that point, you can do something like this: [[!meta guid="urn:uuid:<TMPL_VAR uuid>"]]
* | | | | Merge branch 'ready/postform-no'Simon McVittie2014-09-12
|\ \ \ \ \
| * | | | | inline: postform=no should take precedence over rootpage existingSimon McVittie2014-07-04
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If someone has explicitly disabled the postform, it seems reasonable from a least-astonishment point of view for that to take precedence over rootpage, even though that makes rootpage useless. Also add a regression test; so far, this is all it tests.
* | | | | Merge branch 'ready/perf'Simon McVittie2014-09-12
|\ \ \ \ \
| * | | | | In all=no conditionals, depend on the influences, not the test pagespecSimon McVittie2014-03-03
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, if a page like `plugins/trail` contained a conditional like [[!if test="backlink(plugins/goodstuff)" all=no]] (which it gets via `templates/gitbranch`), then the [[plugins/conditional]] plugin would give `plugins/trail` a dependency on `(backlink(plugins/goodstuff)) and plugins/trail`. This dependency is useless: that pagespec can never match any page other than `plugins/trail`, but if `plugins/trail` has been modified or deleted, then it's going to be rendered or deleted *anyway*, so there's no point in spending time evaluating match_backlink for it. Conversely, the influences from the result were not taken into account, so `plugins/trail` did not have the `{ "plugins/goodstuff" => $DEPEND_LINKS }` dependency that it should. Invert that, depending on the influences but not on the test. Bug: http://ikiwiki.info/bugs/editing_gitbranch_template_is_really_slow/
* | | | | Merge branch 'ready/comments'Simon McVittie2014-09-12
|\ \ \ \ \
| * | | | | comments: use comments_pagespec for authorization, not just UISimon McVittie2014-07-04
| | |/ / / | |/| | |
* | | | | Merge branch 'ready/trail-sort'Simon McVittie2014-09-12
|\ \ \ \ \
| * | | | | trail: don't generate a costly dependency when forcing sort orderSimon McVittie2014-07-11
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pagespec_match_list() makes the current page depend on the pagespec being matched, so if you use [[!trailoptions sort="..."]] to force a sort order, the trail ends up depending on internal(*) and is rebuilt whenever anything changes. Add a new sort_pages() and use that instead.
* | | / / do not double-decode unicode in CGI formsAntoine Beaupré2014-09-09
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | this works around a behavior change introduced in Encode.pm 2.53 shipped with the Perl 5.20 release described here: http://ikiwiki.info/bugs/garbled_non-ascii_characters_in_body_in_web_interface/
* | | | Plugins::highlight: replace use of langdefdir with searchFileDavid Bremner2014-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In recent versions of highlight there can be more than one langdefdir. This patch fixes the ensuing hilarity when the user adds a single highlight lang definition and highlight.pm expects all definitions to be in the same place.
* | | | cope with missing getConfDir in 3.18+ of highlight.David Bremner2014-08-06
|/ / / | | | | | | | | | | | | Unfortunately we have to try a couple things since the API changed between 3.9 and 3.18
* / / only_committed_changes could fail in a git repository merged with git merge ↵Joey Hess2014-04-05
|/ / | | | | | | -s ours.
* | Merge remote-tracking branch 'remotes/smcv/ready/careful-eval'Joey Hess2014-02-23
|\ \
| * | protect $@ whenever a block using $@ is non-trivialSimon McVittie2014-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As noted in the Try::Tiny man page, eval/$@ can be quite awkward in corner cases, because $@ has the same properties and problems as C's errno. While writing a regression test for definetemplate in which it couldn't find an appropriate template, I received <span class="error">Error: failed to process template <span class="createlink">deftmpl</span> </span> instead of the intended <span class="error">Error: failed to process template <span class="createlink">deftmpl</span> template deftmpl not found</span> which turned out to be because the "catch"-analogous block called gettext before it used $@, and gettext can call define_gettext, which uses eval. This commit alters all current "catch"-like blocks that use $@, except those that just do trivial things with $@ (string interpolation, string concatenation) and call a function (die, error, print, etc.)
* | | Merge remote-tracking branch 'remotes/smcv/ready/git-push-origin-master'Joey Hess2014-02-23
|\| |
| * | git: explicitly specify the branch to push to originSimon McVittie2014-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git's behaviour when doing "git push origin" is configurable, and the default is going to change in 2.0. In particular, if you've set push.default to "nothing", the regression test will warn: fatal: You didn't specify any refspecs to push, and push.default is "nothing". 'git push origin' failed: at .../lib/IkiWiki/Plugin/git.pm line 220.
* | | Merge remote-tracking branch 'intrigeri/fix_diffurl_vs._cgit'Joey Hess2014-02-23
|\ \ \