Commit Graph

480 Commits (57405061f4176bfa3fdfa686101a726a439d67f9)

Author SHA1 Message Date
Joey Hess 1193759568 remove unused indexlink function and template variable 2010-05-05 20:42:56 -04:00
Joey Hess 83b907c35e remove misc.tmpl checking
Turns out that users with a modified page.tmpl need to modify it on
upgrade, at least to add the FORCEBASEURL (so edit preview works),
so there is no point in trying to retain compatability.
2010-05-05 18:46:35 -04:00
Joey Hess 5971a731e9 allow search form visibility to be controlled on the template
hide extrafooter from misctemplate display per default
2010-05-05 18:42:18 -04:00
Joey Hess 66cc23a591 no more misc.tmpl
* Removed misc.tmpl. Now to theme ikiwiki, you only need to customise
  a single template, page.tmpl.
* misc.tmpl will, however, still be read if a locally modified version
  exists. This is to avoid forcing users to update page.tmpl right now.
2010-05-05 18:22:47 -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 0ec1fe1944 set html5 option as advanced for now 2010-05-01 21:04:14 -04:00
Joey Hess a547d26858 html5 option
* Ikiwiki can be configured to generate html5 instead of the default xhtml
  1.0. The html5 output mode is experimental, not yet fully standards
  compliant, and will be subject to rapid change.
2010-05-01 20:49:18 -04:00
Joey Hess 6293c62cac no need to use HTML::Entities
That module is unused now. Long long ago, it used to be used to encode data in
the index. Checked all modules, and every module that uses it imports it.
2010-04-30 17:26:41 -04:00
Joey Hess a6e6f604bd TMPL_INCLUDE re-enabled for templates read from the templatedir. (But not in-wiki templates.) 2010-04-28 12:39:13 -04:00
Joey Hess 3ac2ae1f14 Add page() PageSpec, which is like glob() but matches only pages, not other files. 2010-04-26 18:47:17 -04:00
Joey Hess 97b0c6e455 Fix removal of rendered files in rebuild mode.
Needed to handle the move of the .js files into ikiwiki/, but also this is
a longstanding bug.

Old pagemtime is not remembered in rebuild mode, and changing that would
need a lot of changes. So instead, loop on pagectime, which is remembered.

Change to remembering old pagesources info in rebuild mode. This seems safe
enough.
2010-04-26 17:14:03 -04:00
Joey Hess ca9c17db57 reword templatedir description 2010-04-24 21:38:22 -04:00
Joey Hess ca9c6cc254 add support for mass dependencies
Registered by passing "" as page name to add_depends.
2010-04-24 20:22:20 -04:00
Joey Hess 0d8fc55d33 bugfix 2010-04-24 19:50:23 -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 7099978b72 bugfix 2010-04-24 16:00:18 -04:00
Joey Hess 96c9c8aa92 fix return of tpage 2010-04-23 16:20:02 -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 bbd7e73f64 refactor to remove template_params
template_file will be kept separate, since it needs to be memoized
2010-04-22 15:58:06 -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 23d62f42bd remove add_templates option
Templates are moving into the srcdir, and will also be searched for in
configured underlays, so this is redundant.
2010-04-22 14:35:00 -04:00
Joey Hess 8dc7f3005e only remove page from influences when influences are not static
This matches what add_depends done
2010-04-22 13:17:45 -04:00
Joey Hess 3ee571390e Merge branch 'autotag' 2010-04-22 00:34:03 -04:00
Joey Hess 2b175d7c1f improved fix for depends_simple_mixup
Avoid adding the page matched against as an influence for
currently failing pagespec matches, while still adding
any other influences.

This avoids bloating depends_simple with lots of bogus influences when
matching eg, "!link(done)". It's only necessary for the page being tested
to be an influence of that if the page matches.
2010-04-22 00:18:20 -04:00
Joey Hess 32dd388f8d indent 2010-04-21 21:38:53 -04:00
Joey Hess 789e68a8b1 Merge branch 'master' into autotag
Conflicts:
	IkiWiki/Plugin/tag.pm
2010-04-21 19:47:38 -04:00
Joey Hess 673d6c9580 add missing undef guard in derel 2010-04-21 19:45:56 -04:00
Joey Hess 0fcbcc4815 Merge branch 'master' into autotag 2010-04-21 14:21:40 -04:00
Joey Hess d6810097ce layout 2010-04-21 12:50:34 -04:00
Giuseppe Bilotta 0fa25a361c Always give createlink class to links to nonexistent pages
With this change, the <span> with class createlink is always created
around the link text, even when no CGI URL is defined. This allows
styling of these 'links' in this case too. The same class is used as when
CGI URL is defined so that e.g. clones of the same ikiwiki, one with CGI
and one without, display in the same way (modulo the missing question mark
link).
(cherry picked from commit 290d1b498f00f63e6d41218ddb76d87e68ed5081)
2010-04-21 12:49:31 -04:00
Joey Hess 34e8c78c1c Merge branch 'master' into autotag 2010-04-20 18:19:00 -04:00
Joey Hess cff3937b68 remove 2 argument form of file_pruned 2010-04-20 14:08:29 -04:00
Joey Hess a97964688b unfinished file_prune revamp
Many calls to file_prune were incorrectly calling it with 2 parameters.
In cases where the filename being checked is relative to the srcdir,
that is not needed.

Made absolute filenames be pruned. (This won't work for the 2 parameter call
style.)
2010-04-17 19:05:40 -04:00
Joey Hess b7d50abc0f refactor autofiles
Made add_autofile take a generator function, and just register the
autofile, for later possible creation. The testing is moved into Render,
which allows cleaning up some stuff.
2010-04-17 13:35:15 -04:00
Joey Hess 2269a4c74b whitespace 2010-04-17 13:05:04 -04:00
Joey Hess 54f600af14 Merge remote branch 'davrieb/autotag' into autotag
Conflicts:
	IkiWiki.pm
	IkiWiki/Plugin/tag.pm
2010-04-17 12:50:23 -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 d50bd08439 refactor sortspec translation 2010-04-12 12:41:32 -04:00
Joey Hess 0bfc364a7d optimization: pagespec_match_list with no num limit matches before sorting
This can be a lot faster, since huge numbers of pages are not sorted
only to mostly be thrown away. It sped up a build of my blog by at least
5 minutes.
2010-04-11 01:30:03 -04:00
Joey Hess 153c0ff13b minor style etc changes 2010-04-06 23:29:18 -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 f6fd7639da Merge remote branch 'smcv/ready/link-types' 2010-04-06 22:50:19 -04:00
Simon McVittie cb8b2f80b2 Use $a and $b for SortSpec cmp callbacks 2010-04-05 22:50:51 +01:00
Joey Hess f8457f9a90 fix bug that left stray </p> tags
Both markdown and tidy add paragraph tags around text, that needs to be
stripped when the text is a short, one line fragment that is being inserted
into a larger page. tidy also adds several newlines to the end, and this
broke removal of the paragraph tags.
2010-04-05 17:18:30 -04:00
Simon McVittie f80e1cb577 Remove the typedlink(tag foo) pagespec feature, which is less friendly than tagged()
Plugins that introduce a link type should also introduce pagespec syntax
for it.
2010-04-04 00:43:58 +01:00
Simon McVittie c1a42e76bc implement typed links; add tagged_is_strict config option 2010-04-04 00:43:48 +01:00
David Riebenbauer 981400177d Make sure deleted tag pages don't get recreated.
The reason to do this is basically a user interaction design decision.

It is achieved by adding an entry, associated to the creating plugin, to
%pagestate. To find out if files were deleted a new global hash %del_hash is
%introduced.
2010-04-03 22:20:48 +02:00
David Riebenbauer 628a52a6c4 Revert "Revert the effects of find_del_files() for (re)autoadded files."
This reverts commit 31680111f0062f07727d14fcf291c98978ad5a2f.
2010-04-03 22:20:48 +02:00