Commit Graph

66 Commits (13c466728c72379cc30551c75e882e2dcabbf38c)

Author SHA1 Message Date
joey dea23a1031 * Switch pagetemplate hooks to using named parameters.
* Pass a "destpage" parameter to preprocessor and pagetemplate hooks.
  This will be the page that a source page will be part of, which is
  different than the source page for inlined pages.
* Audited all plugins to endure they pass page, destpage to htmllink
  appropriatly. This means inlining of various plugins will not work
  properly, with correct links generated.
2006-07-27 23:41:58 +00:00
joey 5017ffd8a5 * Patch from Enrico that
- allows preprocessor directives to have parameters with no specified
    value
  - fixes preprocessor directive parameter parsing so that
    foo=bar baz now means "foo=bar" and a "baz" with no value
  - Add a tag plugin that allows more easily tagging pages.
    The meta plugin can also still be used for this.
2006-07-27 21:38:02 +00:00
joey d9c118dbf1 * Run page through any relevant filters when generating a page preview.
* Noticed a bug in the wikitext markup plugin -- it made CamelCase links the
  default throughout the wiki, not only on wikitext pages. Decided to call
  this a feature, and split the camelcase support out into a separate plugin
  that is independant of wikitext.
2006-07-26 21:54:44 +00:00
joey 56378a14e2 Encode:: cleanup from Recai 2006-07-05 18:20:25 +00:00
joey 01fc6c0a4e * Improve display of parentlinks and page title of toplevel index page. 2006-07-04 20:04:33 +00:00
joey ebc6120f99 * Work around very innefficient behavior in File::Spec::abs2rel. Result
is a savings of 2 pointless fork/execs per link calculation, which
    results in ~25% speedup of ikiwiki building its own doc wiki, and
    about 35% speedup displaying RecentChanges!
2006-07-04 03:42:19 +00:00
joey af029154d6 use "use open" pragma to avoid manually needing to specify utf8 everywhere
and also to set default stdio mode

change filetype to return undef, not "unknown"
2006-07-03 22:14:52 +00:00
joey 6551c1e560 * Support htmlize plugins and make mdwn one such plugin, which is enabled by
default (of course!). Based on a patch by Faidon Liambotis.
2006-07-03 22:08:04 +00:00
joey 7ea8df24b3 * Introduce add_plugins and disable_plugins config options in setup files.
This allows adding or removing plugins w/o overriding the whole list of
  default plugins, which makes it easier to upgrade when new default plugins
  are added.
2006-07-03 21:29:56 +00:00
joey 929b9de9c2 Encode is used in nearly all code paths so stop loading it on demand 2006-07-03 20:18:16 +00:00
joey fa9517e5bb * Support pages with utf8 filenames. Patch by Faidon Liambotis. 2006-07-03 20:12:27 +00:00
joey d1d212203c * Centralised all calls to HTML::Template and force all the templates
to be read as utf8.
2006-07-02 19:06:08 +00:00
joey b74ddf69ce perl bugnum and refix 2006-07-02 17:46:23 +00:00
joey 1452b3adf3 so make sure to let perl know it should be handled as utf8. Also,
* Improve layout of edit page so formatting help link is always visible w/o
  getting in the way of the preview.
2006-07-02 17:44:43 +00:00
joey ac7b1c32b1 * POSIX::strftime doesn't know about encodings and doesn't return a utf8
flagged string even if the locale causes it to generate utf8 output,
  so make sure to let perl know it should be handled as utf8. Also, 
  the optimised version used for standard time formats won't work if the
  user has changed locale, so drop it. Thanks, Faidon Liambotis.
* Fix re-encoding of the comments field to utf8 if a commit fails
  due to a conflict. Thanks, Faidon Liambotis.
* Let svn know that commits have utf8 commit messages. Thanks, Faidon
  Liambotis.
* Add insane double encode/decode to utf8 around call to markdown.
  This works around a truely strange bug, which is apparently a bug in
  perl, which I lack space to describe here (see t/crazy-badass-perl-bug.t)
2006-07-02 04:02:08 +00:00
joey 25b35c3c74 * Honor LC_CTIME when formatting a time for display. Thanks, Faidon
Liambotis.
2006-07-02 00:32:12 +00:00
joey 0cd2cfb039 * Put back the encode_utf8 in the input to markdown; it's really not utf-8
safe.
2006-06-16 04:42:06 +00:00
joey 2ce6d15b8b * Patch from Recai Oktaş to improve utf-8 support, it should now use proper
utf-8 for edit and other fields, and for recentchanges. There may still
  be utf-8 issues with the preferences page though.
2006-06-11 18:51:49 +00:00
joey d534483b9b * Reorganised the doc wiki's todo/* pages, using a link/tag to flag
* Allow pagetemplate plugins to override *anything* in the template.
* Add a meta plugin, which allows specifying various metadata about pages,
  like license and author. It also allows for inserting html link and meta
  tags into html, overriding the title, and adding hidden WikiLinks, which
  can be useful when using link-based globbing for page categorisation.
* Remove preprocessor directives from inlined pages.
* Allow simple preprocessor directive values to be specified w/o quotes.
2006-06-02 04:49:12 +00:00
joey 140658bc51 * More security review. 2006-06-01 20:44:12 +00:00
joey 7a1e12675e * Add --timeformat config option to allow changing how dates are displayed.
Note that as a side effect, dates will now be displayed using the local
  timezone, not as GMT.
2006-05-29 05:09:43 +00:00
joey 65d0aee407 * --getctime had bitrotted (well I only ever used it the once so far..),
* When inlining a page in another one, links from the inlined page are now
  expanded the same as they are when rendering the inlined page as a
  standalone page. So rather than being expanded from the POV of the
  inlining page, they are expanded from the POV of the inlined page.
  For example, a link from blog/foo to "bar" will now link to blog/bar
  if it exists. Previously this needed to be a link explicitly to 
  "blog/bar"; such links will also continue to work.
  (This was slightly complex to do as the link still has to be constructed
  relative to the inlining page.)
2006-05-26 16:11:53 +00:00
joey 29507e94a4 utf-8 support seems to be working now 2006-05-26 15:33:14 +00:00
joey 526044e1da better fix for empty actions list issue 2006-05-26 15:18:12 +00:00
joey 2e95062df8 fix call to getctime 2006-05-26 14:54:47 +00:00
joey 282893be81 * Rebuilding on upgrade to this version is recommended.
* Add a html validity check to the test suite, using the wdg-html-validator,
  if available.
* Make the html valid when there is nothing in the actions list by adding an
  empty <li> to the end of it.
* Reordered some function call parameters for consistency.
2006-05-26 08:24:36 +00:00
joey 5466a1daf9 * The page name and parent links has switched from using a <h1> to a styled
<span>, so pages can use <h1> internally instead of needing to use <h2>.
* Updated all of ikiwiki's own wiki pages for that.
* Add pagetemplate hook, which can be used by plugins that want to mess
  around with adding new stuff to the page template.
* Remove headercontent; the search plugin now adds the search box to the
  header by registering a pagetemplate hook, and other plugins should do
  similarly.
2006-05-26 01:10:58 +00:00
joey b2bd444f31 * Allow discussion links on pages to be turned off with --no-discussion. 2006-05-05 18:20:52 +00:00
joey 6652de5e1a * Removed --sanitize and --no-sanitize, replaced with --plugin htmlscrubber
and --disable-plugin htmlscrubber.
2006-05-05 05:41:11 +00:00
joey 157df8591f rename the "render" hook to "change", which is clearer 2006-05-05 05:10:00 +00:00
joey be56970d05 * Added smiley plugin, nicely controlled and documented by the smileys page.
* Copied in some smileys from Moin Moin.
2006-05-04 04:29:37 +00:00
joey af9566ff1a rather a lot of changes to make hyperestraier search be a plugin, allowing
for other types of search engine plugins if wanted, and also opening up a
lot of new possibilities for other kinds of plugins later

some notable changes along the way:

- lots of new hook types: cgi, render, delete
- wrapper files fixed to support config strings with newlines in them
- HEADERCONTENT in page template useful for plugins. Probably needs to be
  expanded to more such for other places plugins might want to add content.
- remove unnecessary wrappers field from config info stored in wrappers
2006-05-03 21:50:39 +00:00
joey a44bfb158d change plugin interface to use named parameters for flexability 2006-05-03 19:58:58 +00:00
joey 47cec07e44 ah, the joys of test-based development..
think I have smart glob list matching working ok
2006-05-02 15:22:49 +00:00
joey 3b0fce93e4 * Split off an IkiWiki.pm out of ikiwiki and have all the other modules use
it, this will allow for adding a unit test suite.
2006-05-02 06:53:33 +00:00
joey fe6b271501 deep copy/untaint arrays in setup 2006-05-02 04:18:44 +00:00
joey 54d5308cd8 * Added plugin system, currently only supporting for PreProcessorDirectives.
* Added a pagecount plugin, enabled by default.
* Support PreProcessorDirectives with no parameters, ie "[[pagecount ]]".
* Fixed/optimised backlinks code, to avoid rebuilding pages to update
  backlinks when the backlinks hadn't really changed.
* Moved inline page support, rss generation etc into the inline plugin,
  enabled by default.
* Added brokenlinks plugin, not enabled by default, but rather handy.
* Fix several broken links in the doc wiki.
2006-05-02 02:34:33 +00:00
joey 457d6bbbbf change calling convention for preprocessor functions 2006-05-01 23:18:09 +00:00
joey 819a31ed24 * Rename inlinepage to depends, so that it can be used to refer to more
dependency relationships than just inlining. This will require a rebuild
  on upgrade to this version.
* Move the rss link, put it in the blogpost form if there is one and at the
  top if not. This is both nicer because easier to find, and it cleans up
  the code which had used inlinepage as a flag for adding the link later.
* Allow the depends GlobList to be built up from multiple sources (such as
  plugins) during a page render.
* Which means that more than one blog is now supported to appear on a
  single page. (With some limitations.)
2006-05-01 22:27:37 +00:00
joey d7aecf6ddc implemented html sanitisation 2006-04-25 03:18:21 +00:00
joey 13e3bf8671 commit changes for email subscriptions 2006-04-24 23:09:26 +00:00
joey 7a5ae22e5a Convert postprocessordirectives into preprocessordirectives, so they are
expanded before markdown. Consequences:

 - No need to worry about markdown messing with parameters of
   preprocessordirectives. (If you had to escape stuff in one before, you'll
   need to undo that escaping now.)
 - No need for ugly </p> hacks before inlined subpages. Instead, subpages
   are wrapped in a <div>, and this prevents markdown from touching them.
   (This can also be used to add style to subpages.)
 - rss generation is less of a hack.
2006-04-04 20:57:46 +00:00
joey f50bd57bce proper binmode settings so that with -CSD, ikiwiki will support unicode
however, due to robustness, that's not enabled by default yet
2006-04-04 19:34:50 +00:00
joey 5f1e794045 fixes 2006-03-29 22:36:23 +00:00
joey 0d9539d577 added --hyperestraier switch, which turns on search support
(ok, the way I run estseek.cgi is admittedly pretty nasty, but it works..)
2006-03-29 22:21:23 +00:00
joey efe91335c6 improve fix for symlink attacks to check subdirectories for symlinks too
before writing
2006-03-29 18:50:36 +00:00
joey 975ae0944c Implemented --underlaydir, and moved files provided by underlay out of doc
so I don't need to maintain two copies anymore.

You might also want to remove the files provided in the basewiki underlay
from your wiki, if you have not created custom local versions of them, so
that these pages will be automatically updated in future ikiwiki upgrades.
2006-03-29 18:21:01 +00:00
joey 5591d621b9 css support 2006-03-29 07:24:03 +00:00
joey e41dd1e24e html validation fixes:
- escape & in urls (also clean up cgi url generation)
 - since markdown wraps inlined pages in <p></p>, close and re-open
   the paragraph tags when generating the embedded html
 - added XHTML 1.0 doctypes to templates
 - fixed <hr /> and <br /> in templates
 - add an alt attribute to inline images, based on the WikiLink to the
   image. Allows things like [[my_image|img.png]] to customise alt text.
2006-03-29 03:18:21 +00:00
joey 0a95ac2144 Improved handling of wikilinks containing characters that are not allowed
in filenames. Now converts to valid filenames automatically.

Note, need to --refresh your wiki after updating to this version, if you
use any pages with __nn__ in their names.
2006-03-29 02:14:55 +00:00