Commit Graph

91 Commits (313e85700bb89857b89ff2538fb448185eeabcaf)

Author SHA1 Message Date
joey dae0f48e91 * Work on firming up the plugin interface:
- Plugins should not need to load IkiWiki::Render to get commonly
    used functions, so moved some functions from there to IkiWiki.
  - Picked out the set of functions and variables that most plugins
    use, documented them, and made IkiWiki export them by default,
    like a proper perl module should.
  - Use the other functions at your own risk.
  - This is not quite complete, I still have to decide whether to
    export some other things.
* Changed all plugins included in ikiwiki to not use "IkiWiki::" when
  referring to stuff now exported by the IkiWiki module.
* Anyone with a third-party ikiwiki plugin is strongly enrouraged
  to make like changes to it and avoid use of non-exported symboles from
  "IkiWiki::".
* Link debian/changelog and debian/news to NEWS and CHANGELOG.
* Support hyperestradier version 1.4.2, which adds a new required phraseform
  setting.
2006-09-09 22:50:27 +00:00
joey 575cfa085c drop the loop number to 3, 10 seems a bit much.. 2006-08-31 19:47:41 +00:00
joey 4895955cea * Change htmlize, format, and sanitize hooks to use named parameters. 2006-08-28 18:17:59 +00:00
joey 3ad4d93e33 fix reference counting oops 2006-08-27 19:58:33 +00:00
joey d4d053f0e3 re-emit unprocessed preprocessor directives in full, in case they're really
wikilinks with spaces
2006-08-27 17:07:55 +00:00
joey f4e2e8e975 added info 2006-08-26 23:37:56 +00:00
joey 609f48c93c switch to > n (currently 10) cycle loop protection since eg tumov's include
plugin preprocesses included pages using the name of the including page
2006-08-26 21:26:54 +00:00
joey 182c3b0db3 use a hash 2006-08-25 22:08:03 +00:00
joey 6fc3b624f2 * Generalised preprocesser loop protection code. 2006-08-25 19:06:37 +00:00
joey 46c33b3832 remove unused option 2006-08-23 20:49:54 +00:00
joey d4ca3b3f50 * Change order of linkify and preprocess; first preprocess and then linkify.
This allows passing a wikilink inside a parameter to a preprocessor
  directive without it being expanded to html, and leaking out of the
  parameter, which had required some non-obvious use of triple-quoting
  to avoid. Note that any preprocessor plugins that output something
  that looks like a wikilink will now have it treated as such; AFAIK
  this doesn't change any behavior though except for the template plugin.
* Enable preprocessor directives when previewing an edit.
2006-08-23 20:23:57 +00:00
joey 7c66edacd8 update 2006-08-23 06:08:12 +00:00
joey f27bf9e400 fixes 2006-08-23 05:57:07 +00:00
joey 9d7375c3b2 * Allow preprocessor directives to contain python-like triple-quoted
text blocks, for easy nesting of quotes inside.
* Add a template plugin.
* Use the template plugin to add infoboxes to each plugin page listing basic
  info about the plugin.
2006-08-23 05:41:07 +00:00
joey 78b279c3d8 * Allow preprocessor directives to span multiple lines, both to make
long ones with lots of values easier to write, and to allow for ones with
  multi-line quoted values.
2006-08-23 03:25:40 +00:00
joey 43f2ba5def revert broken parentlinks fix, which was broken, explain why
add plugins/contrib page to avoid broken link on this wiki
2006-08-22 17:54:10 +00:00
joey d0295d9dc0 * Clean up behavior with broken parentlinks. 2006-08-21 22:45:17 +00:00
joey cf3021ef3f * Fixed a bug with previews of subpages having broken links to top-level
pages.
* Change how the stylesheet url is determined in the templates: Remove
  STYLEURL and add BASEURL to all templates (some already had it). This
  new more general variable can be used to link to other things (eg, images)
  from the template, as well as stylesheets.
2006-08-21 22:27:02 +00:00
joey 4b36dee35a * The last release accidentially installed ikiwiki as ikiwiki.pl, now fixed.
* Add --version.
* Man page format fixups.
* Add a %pagecase which maps lower-case page names to the actual case
  used in the filename. Use this in bestlinks calculation instead of
  forcing the link to lowercase.
* Also use %pagecase in various other places that want to check if a page
  with a given name exists.
* This means that links to pages with mixed case names will now work,
  even if the link is in some other case mixture, and mixed case pages
  should be fully supported throughout ikiwiki.
* Recommend rebuilding wikis on upgrade to this version.
2006-08-13 02:03:43 +00:00
joey 0708bb8aec * Don't run tidy with -xml as that fails if the input is not well-formed.
Run it with -asxhtml instead, so it will output well-formed xhtml no
  matter what the input.
* Disable tidy warnings too.
* Add a new format hook, and make tidy use it, since tidy can really only
  operate on and output complete html documents, not the body chunks
  that sanitise gets.
2006-08-04 07:41:02 +00:00
joey a1c7308b7d use htmlpage a couple of places instead of hardcoding the extension 2006-08-04 02:41:08 +00:00
joey 2794d7ef5a * Renamed GlobLists to PageSpecs.
* PageSpecs can now include nested parens, "and", and "or". This remains
  backwards compatible to the old GlobList format. It's implemented by
  treating the GlobList as a very limited microlanguage that is transformed
  to perl code that does the matching.
* The old GlobList format is deprecated, and I encourage users to switch to
  using the new PageSpec format. Compatability with the old format will be
  removed at some point, possibly by 2.0.
* Wiki rebuild needed on upgrade to this version due to PageSpec change.
* Add support for creation_month and creation_year to PageSpec.
  Closes: #380680
* Changes to index file encoding.
2006-08-02 00:14:31 +00:00
joey e49ff966a3 * ikiwiki can now download and aggregate feeds with its new aggregate
plugin, so it's possible to implement a Planet using ikiwiki!
* --setup --refresh no longer rebuilds wrappers. Use --setup --refresh
  --wrappers to do that.
* Add %IkiWiki::forcerebuild to provide a way for plugins like aggregate
  to update pages that haven't changed on disk.
2006-07-30 04:31:08 +00:00
joey ab75c0323b * Add a run_hooks function for the common task of running all hooks of a
given type.
* Add a savestate hook.
* Don't put blog post forms on pages if there's no cgiurl set.
* Reformat front page.
2006-07-30 00:20:11 +00:00
joey 3a2dfb94cb * Build-depend on libtext-wikiformat-perl, so that the syntax check of
the wikiformat plugin works. Thanks, Emanuele Aina.
 * Patch from Alessandro Dotti Contra to clean up backlinks and navbar
   display, running them through pagetitle. This removes ugly underscores and
   other gunk from the display, much nicer. You may want to rebuild your wiki
   when upgrading to get the cleanup globally.
2006-07-29 19:16:55 +00:00
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