aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/edittemplate.pm
Commit message (Collapse)AuthorAge
* 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>"]]
* 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.)
* typoJoey Hess2012-10-14
|
* edittemplate: Fix crash if using a .tmpl file or other non-page file as a ↵Joey Hess2010-11-20
| | | | template for a new page.
* template_depends: throw nice error message when template cannot be foundJoey Hess2010-09-27
| | | | | | | | | | | | 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.
* needsbuild hook interface changed; the hooks should now return the modified ↵Joey Hess2010-09-07
| | | | array of things that need built. (Backwards compatability code keeps plugins using the old interface working.)
* edittemplate: Look for template pages under templates/ like everything else ↵Joey Hess2010-06-12
| | | | (still looks in old location for backwards compatability).
* edittemplate: Make silent mode not disable display when the template page ↵Joey Hess2010-06-12
| | | | does not exist, so it can be easily created.
* use template() rather than rolling it by handJoey Hess2010-04-23
|
* add section informationJoey Hess2010-02-12
|
* edittemplate: Work around bug #551499 in CGI::FormBuilder.Joey Hess2009-10-18
|
* edittemplate: Allow template page name to be specified using anything legal ↵Joey Hess2009-10-18
| | | | | | | | for a wikilink (including eg, leading slashes). Before, the htmllink would display the link to the template as if it were a wikilink, but what was stored was not, which could lead to confusing situations.
* change how dependency types are specified to add_dependsJoey Hess2009-10-08
| | | | Also, this fixes 2 bugs in dependency info.
* rework dependency types codeJoey Hess2009-10-04
| | | | | Simplify, change default content depends number to 1, change interface to make more sense.
* edittemplate: contentless dependencyJoey Hess2009-10-04
| | | | This one is unlikely to matter much, but yeah, it's contentless.
* finalise version 3.00 of the plugin apiJoey Hess2008-12-23
|
* Coding style change: Remove explcit vim folding markers.Joey Hess2008-12-17
|
* editpage: Be more aggressive (and less buggy) about cleaning up temporary ↵Joey Hess2008-09-27
| | | | files rendered during page preview.
* 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
|
* handle templates with special characters in nameJoey Hess2008-09-20
| | | | | The template field is really a link, so needs to be converted to a page name in stored state.
* avoid uninitialised value warningJoey Hess2008-09-20
|
* avoid duplicate template lookupJoey Hess2008-09-20
|
* revert colon part of changeJoey Hess2008-09-20
|
* edittemplate patch from WilluJoey Hess2008-09-20
| | | | | | | * edittemplate: Default new page file type to the same type as the template. (willu) * edittemplate: Add "silent" parameter. (Willu) * edittemplate: Link to template, to allow creating it. (Willu)
* edittemplate: Don't wipe out edits on preview.Joey Hess2008-08-25
|
* add plugin safe/rebuild info (part 1 of 2)Joey Hess2008-08-03
| | | | too many plugins.. brain exploding..
* switch preprocess hooks to use error functionJoey Hess2008-07-13
|
* typosJoey Hess2008-03-21
|
* add missing test to avoid uninitialised value when a page with metadata is ↵Joey Hess2008-01-29
| | | | removed
* don't duplicate code from editpage, just pull the values it sets out of theJoey Hess2007-12-12
| | | | formbuilder object
* * Change formbuilder hook to not be responsible for displaying a form,Joey Hess2007-12-12
| | | | | | so that more than one plugin can use this hook. I believe this is a safe change, since only passwordauth uses this hook. (If some other plugin already used it, it would have broken passwordauth!)
* works, but I'm not entirely happy with it yetJoey Hess2007-12-12
| | | | | | It would be better if it were a formbuilder hook. But the formbuilder hook is wacked.. I may need to change how that hook works, which would mean changing the only current user of it, passwordauth).
* incomplate edittemplate pluginJoey Hess2007-12-12