Commit Graph

238 Commits (9372a40189f5ac04cc045a476c8a3e4e791678f2)

Author SHA1 Message Date
Joey Hess ea4967f184 inline: Call indexhtml when inlining internal pages, so their text can be indexed for searching. 2010-05-06 23:20:48 -04:00
Joey Hess 121e2ffc2f Renamed postscan hook to indexhtml, to reflect its changed position.
Probably only the search plugin uses it, so this seemed safe.
2010-05-06 23:14:36 -04:00
Joey Hess 2f22ee85e5 Add ACTIONS variable to page.tmpl, which allows plugins to add arbitrary links to the action bar without modifying the template further.
(COMMENTSLINK and DISCUSSIONLINK could be folded into this, but are kept
separate for now to avoid breaking modified templates.)
2010-05-03 12:46:52 -04:00
Joey Hess 970373548f Add parameter to displaytime to specify that it is a pubdate, and in html5 mode, use time tag. 2010-05-02 13:44:13 -04:00
Joey Hess c2656f08f3 template() - return params in list context
I forgot CGI::Formbuilder's horrible interface that needs template
parameters instead of a constructed object.
2010-04-24 16:15:47 -04:00
Joey Hess 7e79da7633 template docu reorg
Remove wikitemplates page; fold its contents into templates page.
Update all backlinks. Document new ability to put templates inside srcdir.
2010-04-23 16:14:33 -04:00
Joey Hess 78fd3b35a2 allow template pages to not be under templates/ 2010-04-23 15:02:07 -04:00
Joey Hess 54898d16d4 allow a bare page name to be specified as a template 2010-04-23 14:44:37 -04:00
Joey Hess abd2339312 look for templates in srcdir and underlays, first
This entailed changing template_params; it no longer takes the template
filename as its first parameter.

Add template_depends to api and replace calls to template() with
template_depends() in appropriate places, where a dependency should be
added on the template.

Other plugins don't use template(), so will need further work.

Also, includes are disabled for security. Enabling includes only when using
templates from the templatedir would be nice, but would add a lot of
complexity to the implementation.
2010-04-22 15:55:58 -04:00
Joey Hess 584391aedd clarify 2010-04-22 14:07:45 -04:00
Joey Hess 9c8761ba49 add_autofile filename should be relative to srcdir 2010-04-21 14:37:03 -04:00
Joey Hess 59ceeb5621 improve docs 2010-04-17 17:15:07 -04:00
Joey Hess ca02c57ee4 document add_autofile 2010-04-17 14:07:12 -04:00
Joey Hess dee2940c0b automatically run --gettime, and optimise it for git
* Automatically run --gettime the first time ikiwiki is run on
  a given srcdir.
* Optimise --gettime for git, so it's appropriatly screamingly
  fast. (This could be done for other backends too.)
* However, --gettime for git no longer follows renames.
* Use above to fix up timestamps on docwiki, as well as ensure that
  timestamps on basewiki files shipped in the deb are sane.
2010-04-16 18:30:56 -04:00
Joey Hess b14f84c4ac --gettime revamp
* Rename --getctime to --gettime. (The old name still works for
  backwards compatability.)
* --gettime now also looks up last modification time.
* Add rcs_getmtime to plugin API; currently only implemented
  for git.
2010-04-16 17:02:29 -04:00
Joey Hess d58444a3e9 note about sort and dependency types
There's a gotcha where pagespec_match_list is used with a dependency type
that is not a full content dependency, and so ikiwiki does not know that
a content change to a page that sorted too low to match needs to trigger
a rebuild, since its sort order may have changed.

Inline is mostly ok re this, as it does use content dependencies. Except
for in the case of raw mode. But then, page metadata is documented to not
be loaded, so it doesn't make sense to use sortspecs that depend on
metadata. I hope. :)
2010-04-07 00:09:22 -04:00
Joey Hess bab8fec524 Merge remote branch 'smcv/ready/sort-package'
Conflicts:
	debian/NEWS
2010-04-06 23:15:33 -04:00
Joey Hess 3b1dd03c7e improve wording to not encourage explicitly passing undef 2010-04-06 22:57:02 -04:00
Simon McVittie cb8b2f80b2 Use $a and $b for SortSpec cmp callbacks 2010-04-05 22:50:51 +01:00
Simon McVittie c1a42e76bc implement typed links; add tagged_is_strict config option 2010-04-04 00:43:48 +01:00
Simon McVittie 04a59b3c65 Move sort hooks to the IkiWiki::SortSpec namespace
Also rename cmpspec_translate (internal function) to sortspec_translate
for consistency.
2010-04-03 14:28:21 +01:00
Simon McVittie 75fd080465 Remove support for check_cmp_foo (pre-sort checks) 2010-04-03 14:28:21 +01:00
Simon McVittie b86276ffed Reimplement extensible sorting mechanisms, in the same way as pagespecs 2010-03-25 23:31:53 +00:00
Simon McVittie 60edd2dc31 Allow sorting to be combined and/or reversed 2010-03-24 23:51:48 +00:00
Simon McVittie e67a9382f6 Allow hooks to add sorting functions to pagespec_match_list 2010-03-24 00:29:10 +00:00
Joey Hess f1183cbf0c add ngettext support & optimize gettext handling
As I was adding ngettext support, I realized I could optimize the gettext
functions by memoizing the creation of the gettext object. Note that
the object creation is still deferred until a gettext function is called,
to avoid unnecessary startup penalties on code paths that do not need
gettext.

A side benefit is that separate stub functions are no longer needed to
handle the C language case.
2010-02-14 18:09:12 -05:00
Joey Hess f4c517110e formatting 2010-02-12 15:53:50 -05:00
Joey Hess 7b07286a6f layout 2010-02-12 15:41:19 -05:00
Joey Hess 4a7558539c add highlevel view of when hooks are called during compile and cgi phases 2010-02-12 15:38:07 -05:00
Joey Hess 60410369da add variable value examples 2010-02-12 14:48:22 -05:00
Joey Hess ba19f940bd move note to sidebox 2010-02-12 14:44:26 -05:00
Joey Hess b1c47b4065 heading tweaks 2010-02-12 14:41:28 -05:00
Joey Hess 5d566d8b32 reorg and expand docs of some variables 2010-02-12 14:38:43 -05:00
Joey Hess 20ba12802b add section information 2010-02-12 04:22:15 -05:00
Joey Hess a63929f6cc Group related plugins into sections in the setup file, and drop unused rcs plugins from the setup file. 2010-02-11 22:24:15 -05:00
Joey Hess 1e0b724bac document that state variables are not available in the checkconfig hook 2010-01-31 14:03:19 -05:00
Joey Hess 268a2dd54c htmllink: allow a title attribute to be specified 2009-11-26 14:10:21 -05:00
Joey Hess 66b46576ec Moved the postscan hook to run on the raw html of a page, before the template is filled out. This improves the search plugin's indexing, since it will not include navigational elements from the page template or sidebar. 2009-11-08 13:48:07 -05:00
Joey Hess 74409f940d add_depends: optimise influence calculation
I made match_* functions whose influences can vary depending on the page
matched set a special "" influence to indicate this.

Then add_depends can try just one page, and if static influences are found,
stop there.
2009-10-09 17:15:40 -04:00
Joey Hess 6f2cc5ac8c pagespec_match_list: change limit to filter 2009-10-09 13:20:41 -04:00
Joey Hess 769b78df07 pagespec_match_list allow additional pagespec limit parameters again 2009-10-09 13:02:10 -04:00
Joey Hess 5e7b2dea84 rename use_pagespec to pagespec_match_list
To avoid breaking plugins, also support the old pagespec_match_list
calling convention, with a deprecation warning.
2009-10-08 23:51:06 -04:00
Joey Hess 32cd5f0b79 inline: switch to use_pagespec
Taking advantage of every single one of its features, of course.
Even had to add one more..
2009-10-08 18:30:50 -04:00
Joey Hess 5e236f5d25 add use_pagespec and deptype functions 2009-10-08 17:53:20 -04:00
Joey Hess 5f9860e65c add type info to influence information 2009-10-07 21:52:37 -04:00
Joey Hess 4002d7c1a4 add influence info to match_*
Also update docs, test suite.
2009-10-07 20:31:13 -04:00
Joey Hess 4528b95d25 mention that pagespec_match returns an overloaded value 2009-10-07 18:06:49 -04:00
Joey Hess 3ebd4e0b45 Add genwrapper hook, that can be used to add code into the C wrapper. 2009-09-10 14:04:46 -04:00
http://schmonz.livejournal.com/ d9fa13504d add missing backquote 2009-07-29 22:38:51 -04:00
http://schmonz.livejournal.com/ 6f88e3631e fix typo 2009-07-26 05:40:58 -04:00