summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/inline.pm
AgeCommit message (Collapse)Author
2009-08-28Merge commit 'intrigeri/po'Joey Hess
2009-08-28inline: if using pagenames, don't add a dependency on "page1 or page2 or..."Simon McVittie
This is unnecessary and just slows us down (by a factor of 2, in the pessimal case where every page has an inline with pagenames); it's also not possible to optimize it into add_depends_exact calls.
2009-08-28inline: moved rootpage logic to a functionintrigeri
The po plugin's injected bestlink must do something special when called by this exact part of inline's code. Signed-off-by: intrigeri <intrigeri@boum.org>
2009-08-25Revert "Allow add_depends to take an arrayref"Joey Hess
This reverts commit e4cd168ebedd95585290c97ff42234344bfed46c. There was no benefit to this change.
2009-08-25Allow add_depends to take an arrayrefSimon McVittie
2009-08-24calendar, inline, map: don't pre-join dependenciesSimon McVittie
The new dependency handling works better (eliminates more duplicates) if dependencies are split up. On the same wiki mentioned in the previous commit, this saves about a second (i.e. 4%) on the same test.
2009-08-16use pagespec_match_list for feedpagesJoey Hess
This is both faster, and propigates any error in processing the feedpages pagespec out to display on the page. Which may have been why I didn't use it before, but currently seems like a good thing to do, since it explains why your feeds are empty..
2009-08-13Add discussionpage configuration settingJoey Hess
By adding this setting, we get both more configurability, and a minor optimisation too, since gettext does not need to be called continually to get the Discussion value.
2009-08-13optimise gettext callsJoey Hess
2009-08-12inline: Avoid use of my $_ as it fails with older perls. Closes: #541215Joey Hess
2009-06-16inline: add pagenames parameterSimon McVittie
If given instead of pages, this is interpreted as a space-separated list of links to pages (with the same LinkingRules as in a WikiLink), and they are inlined in exactly the order given. The sort and pages parameters cannot be used in conjunction with this one.
2009-06-04fix further places where translated discussion case was assumedJoey Hess
Another benefit is that consistently using gettext("Discussion") eliminates the need to translate one string.
2009-05-05inline: Minor optimisation.Joey Hess
When finding the pageurl, it was calling bestlink unnecessarily. Since at this point $page contains the full name of the page that is being inlined, there is no need to do bestlink's scan for it. This is only a minor optimisation, since bestlink is only called once per displayed, inlined page.
2009-04-23formattingJoey Hess
2009-04-23pagespec_match_list added and used in most appropriate placesJoey Hess
* pagespec_match_list: New API function, matches pages in a list and throws an error if the pagespec is bad. * inline, brokenlinks, calendar, linkmap, map, orphans, pagecount, pagestate, postsparkline: Display a handy error message if the pagespec is erronious.
2009-04-23pagespec error/failure distinction and error display by inlineJoey Hess
* Add IkiWiki::ErrorReason objects, and modify pagespecs to return them in cases where they fail to match due to a configuration or syntax error. * inline: Display a handy error message if the inline cannot display any pages due to such an error. This is perhaps somewhat incomplete, as other users of pagespecs do not display the error, and will eventually need similar modifications to inline. I should probably factor out a pagespec_match_all function and make it throw ErrorReasons.
2009-03-19inline: Fix urls to feed when feedfile is used on an index page.Joey Hess
It would be better to use urlto() here, but will_render has not yet been called on the feed files at this point, so it won't work. (And reorganizing so it can be is tricky.)
2009-03-19avoid crashing if Sort::Naturally is not installedJoey Hess
2009-03-19implement sort=title_natural for inlinechrysn
adds a new sorting order, title_natural, that uses Sort::Naturally's ncmp function to provide better sorting for inlines
2009-01-18Add meta field "updated", which can alter the <updated> Atom elementSimon McVittie
Some aggregators, like Planet, sort by mtime rather than ctime. This means that posts with modified content come to the top (which seems odd to me, but is presumably what the aggregator's author or operator wants), but it also means that posts with insignificant edits (like adding tags) come to the top too. Atom defines <updated> to be the date of the last *significant* change, so it's fine that ikiwiki defaults to using the mtime, but it would be good to have a way for the author to say "that edit was insignificant, don't use that mtime".
2008-12-26typoJoey Hess
2008-12-26Merge branch 'master' into nextJoey Hess
2008-12-26inline: Run format hook firstJoey Hess
inline has a format hook that is an optimisation hack. Until this hook runs, the inlined content is not present on the page. This can prevent other format hooks, that process that content, from acting on inlined content. In bug ##509710, we discovered this happened commonly for the embed plugin, but it could in theory happen for many other plugins (color, cutpaste, etc) that use format to fill in special html after sanitization. The ordering was essentially random (hash key order). That's kinda a good thing, because hooks should be independent of other hooks and able to run in any order. But for things like inline, that just doesn't work. To fix the immediate problem, let's make hooks able to be registered as running "first". There was already the ability to make them run "last". Now, this simple first/middle/last ordering is obviously not going to work if a lot of things need to run first, or last, since then we'll be back to being unable to specify ordering inside those sets. But before worrying about that too much, and considering dependency ordering, etc, observe how few plugins use last ordering: Exactly one needs it. And, so far, exactly one needs first ordering. So for now, KISS. Another implementation note: I could have sorted the plugins with first/last/middle as the primary key, and plugin name secondary, to get a guaranteed stable order. Instead, I chose to preserve hash order. Two opposing things pulled me toward that decision: 1. Since has order is randomish, it will ensure that no accidental ordering assumptions are made. 2. Assume for a minute that ordering matters a lot more than expected. Drastically changing the order a particular configuration uses could result in a lot of subtle bugs cropping up. (I hope this assumption is false, partly due to #1, but can't rule it out.)
2008-12-23finalise version 3.00 of the plugin apiJoey Hess
2008-12-18jump to comment after postingJoey Hess
Jumping to the just posted comment was the imputus, but I killed a number of birds here. Added a INLINEPAGE template variable, which can be used to add anchors to any inline template. To keep that sufficiently general, it is the full page name, so the comment anchors and links changed form. Got rid of the FIXMEd hardcoded html anchor div. More importantly, the anchor is now to the very top of the comment, not the text below. So you can see the title, and how it attributes you. Avoid changing the permalink of pages that are not really comments, but happen to contain the _comment directive. I think that behavior was a bug, though not a likely one to occur since _comment should only really be used on comment pages.
2008-12-17Coding style change: Remove explcit vim folding markers.Joey Hess
2008-12-11simplifiy logicJoey Hess
2008-12-11inline: Support feedfile option to change the filename of the feed generated.Joey Hess
2008-12-11inline: Support emptyfeeds=no option to skip generating empty feeds.Joey Hess
2008-12-11move feedpages application upJoey Hess
I wanted this nearer to the top, but decided to put it after the add_depends. Reasoning: It's possible with a combinaton of feedpages and show options to make @list and @feedlist contain completly differing sets of pages. We want to add_depends all pages in both sets. We could combine the two lists and add_depends that, but it's slightly more efficient to defer reducing @feedlist, and add_depends whichever list is longer.
2008-11-05use error for two messagesJoey Hess
2008-10-20inline: Only the last feed link was put on the page, fix this to include all ↵Joey Hess
feed links. So rss will be included along with atom, and pages with multiple feeds will get links added for all feeds.
2008-10-19fix relativedate timezone inclusionJoey Hess
The machine parseable date needs to include a timezone. Also, simplified the interface for date display.
2008-10-17relativedate: New javascript-alicious plugin that makes all dates display ↵Joey Hess
relative, in a very nice way, if I say so myself.
2008-10-15inline: Use the feed's description in the rss and atom links. Closes: #502113Joey Hess
2008-10-14fix prototypeJoey Hess
2008-10-14inline: Allow MTIME to be used in inlinepage.tmpl.Joey Hess
2008-10-01inline: Fix handling of rootpage that doesn't exist.Joey Hess
It makes sense to use bestlink to determine which page rootpage refers to, but if no page matches, just use the raw value.
2008-09-27Export pagetitle, titlepage, linkpage.Joey Hess
2008-09-14rootpage is not a pagespecJoey Hess
So ./posts won't be interpreted right. Just "posts" should do, I think.
2008-09-08minor optimisationJoey Hess
2008-09-05editpage: New core plugin factoring out page editing to allow disabling it ↵Joey Hess
if desired.
2008-08-11error if ping fails, rather than printing debugJoey Hess
2008-08-07inline: Ignore parent dirs when sorting pages by title.Joey Hess
2008-08-03add plugin safe/rebuild info (part 1 of 2)Joey Hess
too many plugins.. brain exploding..
2008-07-27fix cgiurl checkJoey Hess
2008-07-26remove default values in getsetupJoey Hess
They were a bit confusing, since they did not actually set the default, and example values are sufficient.
2008-07-26typoJoey Hess
2008-07-26turn booleans into questionsJoey Hess
2008-07-26predefine pingurlJoey Hess