Commit Graph

154 Commits (515f3ef60046312bc170572d9af90518f40d50ca)

Author SHA1 Message Date
Joey Hess 5e52bfb2e7 inline: Only the last feed link was put on the page, fix this to include all feed links. So rss will be included along with atom, and pages with multiple feeds will get links added for all feeds. 2008-10-20 15:25:45 -04:00
Joey Hess 2b569f99d9 fix relativedate timezone inclusion
The machine parseable date needs to include a timezone.

Also, simplified the interface for date display.
2008-10-19 19:21:44 -04:00
Joey Hess 7390a7a072 relativedate: New javascript-alicious plugin that makes all dates display relative, in a very nice way, if I say so myself. 2008-10-17 20:47:32 -04:00
Joey Hess b8f4b9c799 inline: Use the feed's description in the rss and atom links. Closes: #502113 2008-10-15 14:45:28 -04:00
Joey Hess 02e39bf704 fix prototype 2008-10-14 15:47:19 -04:00
Joey Hess c39112e6ef inline: Allow MTIME to be used in inlinepage.tmpl. 2008-10-14 15:00:46 -04:00
Joey Hess bf386e22f5 inline: Fix handling of rootpage that doesn't exist.
It makes sense to use bestlink to determine which page rootpage refers to,
but if no page matches, just use the raw value.
2008-10-01 17:29:03 -04:00
Joey Hess 9ec9d6901d Export pagetitle, titlepage, linkpage. 2008-09-27 14:27:42 -04:00
Joey Hess ee94407891 rootpage is not a pagespec
So ./posts won't be interpreted right. Just "posts" should do, I think.
2008-09-14 13:50:34 -04:00
Joey Hess f888ceafee minor optimisation 2008-09-08 12:28:56 -04:00
Joey Hess 0f67e7d969 editpage: New core plugin factoring out page editing to allow disabling it if desired. 2008-09-05 13:57:25 -04:00
Joey Hess 88e389ef1e error if ping fails, rather than printing debug 2008-08-11 13:03:30 -04:00
Joey Hess 581381e335 inline: Ignore parent dirs when sorting pages by title. 2008-08-07 15:47:59 -04:00
Joey Hess 903213e63f add plugin safe/rebuild info (part 1 of 2)
too many plugins.. brain exploding..
2008-08-03 16:40:12 -04:00
Joey Hess 73af360e99 fix cgiurl check 2008-07-27 19:21:56 -04:00
Joey Hess 42ac4ec009 remove default values in getsetup
They were a bit confusing, since they did not actually set the default, and
example values are sufficient.
2008-07-26 21:07:15 -04:00
Joey Hess 79f637a436 typo 2008-07-26 14:44:49 -04:00
Joey Hess 49e86d2562 turn booleans into questions 2008-07-26 14:43:47 -04:00
Joey Hess 1ba84c3a6b predefine pingurl 2008-07-26 14:38:58 -04:00
Joey Hess bf6198baf3 add getconfig for inline
Also, moved the pingurl getopt parsing to inline.
2008-07-25 17:24:52 -04:00
Joey Hess a71b9a1cf1 fix feed urls
The fix for colons involved adding "./" to some urls. Due to the weird way
inline called urlto, these snuck into feed urls and permalinks. Fix it by
adding an optional third parameter to urlto.
2008-07-25 16:16:44 -04:00
Joey Hess ffc99f5904 switch preprocess hooks to use error function 2008-07-13 15:05:34 -04:00
Simon McVittie 415c8e0cb5 Rename [[!inline atomid="..."]] to [[!inline guid="..."]] to be consistent with [[!meta guid="..."]], which also outputs an Atom <id> 2008-07-12 17:12:37 +01:00
Simon McVittie 2bd8ada5a6 Accept [[!inline ... atomid="..."]] and use it to populate the feed's Atom <id>.
This is often the same as the feed's <link> (in which case it can be omitted) but sometimes it's a urn:uuid: URN instead.
2008-07-12 17:09:41 +01:00
Joey Hess d101269bde Move yesno function out of inline and into IkiWiki core, not exported. 2008-07-12 12:01:22 -04:00
Joey Hess ca30d95a78 rename uuid to guid 2008-07-12 10:59:45 -04:00
Joey Hess 37471e92d9 elide temp var 2008-07-12 10:49:12 -04:00
Simon McVittie e767f18867 inline plugin: if meta plugin is also enabled, and has collected a uuid for a page, then pass it into the rssitem/atomitem templates 2008-07-11 23:44:12 +01:00
Joey Hess 05124f9a86 editpage escaping fixes
* The editpage form now uses the raw page name, not the page title, in its
  'page' cgi parameter. Using the title was ambiguous and made it
  impossible to tell between some pages, like "foo/bar" and "foo__47__bar",
  sometimes causing the wrong page to be edited.
* This change means that some edit links need to be updated.
  Force a rebuild on upgrade to this version.
* Above change also allowed really fixing escaped slashes from the blogpost
  form.
2008-07-06 15:52:04 -04:00
Joey Hess 1dddec0ba9 Pass a destpage parameter to the sanitize hook.
Because the search plugin needed it, also because it's one of the few
plugins that didn't already have it.

I also considered adding it to htmlize, but I really cannot imagine caring
what the destpage is when htmlizing. (I'll probably be poven wrong later.)
2008-06-04 01:24:23 -04:00
Joey Hess 99e5e6dd08 inline: The optimisation in 2.41 broke nested inlines. Detect those and avoid overoptimising. 2008-05-31 15:10:23 -04:00
Joey Hess 8a888a8fed inline: Display a message if the 'pages' parameter is missing, before it just expanded to nothing. 2008-05-15 17:22:54 -04:00
Joey Hess ec866f8370 Optimised file statting code when scanning for modified pages; cut the number of system calls in half. (Still room for improvement.) 2008-05-07 14:11:56 -04:00
Joey Hess 457de90f5f POSIX::setsid is not exported per default 2008-05-06 18:41:56 -04:00
Joey Hess 04e7467807 need to handle urls to images the same
Also, simplified finding the url to the top of the site.
2008-04-03 16:37:05 -04:00
Manoj Srivastava c207086282 Bug#473987: [PATCH] Links relative to baseurl mangled in atom/rss feeds
tag 473987 +patch
thanks
Hi,

The issue is that we need to convert relative links to absolute
ones for atom and rss feeds -- but there are two types of
relative links. The first kind, relative to the current
document ( href="some/path") is handled correctly. The second
kind of relative url is is relative to the http server
base (href="/semi-abs/path"), and that broke.

It broke because we just prepended the url of the current
document to the href (http://host/path/to/this-doc/ + link),
which gave us, in the first place:
 http://host/path/to/this-doc/some/path        [correct], and
 http://host/path/to/this-doc//semi-abs/path   [wrong]

The fix is to calculate the base for the http server (the base of
the wiki does not help, since the base of the wiki can be
different from the base of the http server -- I have, for example,
"url => http://host.name.mine/blog/manoj/"), and prepend that to
the relative references that start with a /.

This has been tested.

Signed-off-by: Manoj Srivastava <srivasta@debian.org>
2008-04-03 16:27:29 -04:00
Joey Hess d2911a20a6 inline: Allow the "feedshow" parameter to take values greater than the value for "show". 2008-03-23 17:39:03 -04:00
Joey Hess 14b3e645a8 work around perl warning 2008-03-21 05:08:04 -04:00
Joey Hess 42b6a6178c delete inline data after it's used 2008-03-21 04:51:14 -04:00
Joey Hess f937c1fb80 crazy optimisation to work around slow markdown
Markdown is slow. Especially if it has to process an enormous page. The
most common enormous page is currently the recentchanges page, which gets
processed a lot, and contains very little actual markdown. Most of it is a
big <div>, which markdown skips ... slowly.

This is a rather sick optimisation to work around markdown's speed issues.
Now inline inserts a small, dummy div, allows markdown to quickly render
the actual page content, then replaces the dummy with the actual inlined
pages later.

Results: Rendering just a recentchanges page, with diffs included, dropped
from 4.5 seconds to 2.7 seconds on my laptop. Building the entire wiki
dropped from 46.6 seconds to 39.5 seconds.

(It would be better if inline were a *post*-processor directive.)
2008-03-21 04:48:26 -04:00
Joey Hess 99c65a4c0e * Use absolute url for feedurl when filling out the feed templates.
Closes: #470530
2008-03-12 18:49:41 -04:00
Joey Hess 4eabb3cb7a * inline: When forcing urls absolute for rss feeds, skip mailto and other
such urls.
2008-02-24 17:07:56 -05:00
Joey Hess f7303db5a1 * Fix another preview will_render bug. This one involved inline,
which forced a scan of the page to make available metadata that
  appeared after the inline directive. Problem is that scan made it forget
  about any other files rendered due to the page. The scan also turns out
  to be unnecessary now, since meta persistently stores state and it's
  always available. So it was just removed.
2008-02-24 15:36:25 -05:00
Joey Hess f64ef7deb6 proper fix for the preview/will_render issue 2008-02-04 18:46:34 -05:00
Joey Hess b37dc9c926 preview shouldn't show the feed buttons or post form 2008-02-04 18:44:54 -05:00
Joey Hess bf522a347f * inline: Add new `allowrss` and `allowatom` config options. These can be
used if you want a wiki that doesn't default to generating rss or atom
  feeds, but that does allow them to be turned on for specific blogs.
2008-02-04 18:36:50 -05:00
Joey Hess d1c4899a22 * inline: When previewing, still call will_render on rss/atom files,
just avoid actually writing the files. This is necessary because ikiwiki
  saves state after a preview (in case it actually *did* write files),
  and if will_render isn't called its security checks will get upset
  when the page is saved. Thanks to Edward Betts for his help tracking this
  tricky bug down.
2008-02-04 17:58:23 -05:00
Joey Hess 3436fed081 * inline: The template can check for FIRST and LAST, which will be
set for the first and last inlined page. Useful for templates that build
    tables and the like.
2008-01-28 21:22:04 -05:00
Joey Hess deb39a1f14 * meta: Run in scan mode again (more intelligently) and re-add support for
meta link.
* Fix support for the case where metadata appears after an inline directive.
  This was broken in version 2.16.
2008-01-09 02:38:43 -05:00
Joey Hess 4ac5685744 fix some bad copy and pasted plugin ids 2008-01-07 15:28:53 -05:00