summaryrefslogtreecommitdiff
path: root/doc/plugins
diff options
context:
space:
mode:
authorAnonymous <anonymous@none>2010-10-26 17:57:58 +0200
committerAnonymous <anonymous@none>2010-10-26 17:57:58 +0200
commitc2f01e320df8a27c0ac16fb38fba099925dbd010 (patch)
tree8c104ecb3ff2b4f4c3b60832c2a3e46194beaa73 /doc/plugins
parent577e185b63c6703df1045a7109882e5c3548ab4d (diff)
parent5c6eb167b8e69e0607330f06c893a73dfe1c675a (diff)
Merge remote branch 'remotes/origin/master'
Diffstat (limited to 'doc/plugins')
-rw-r--r--doc/plugins/aggregate/discussion.mdwn27
-rw-r--r--doc/plugins/theme.mdwn3
2 files changed, 30 insertions, 0 deletions
diff --git a/doc/plugins/aggregate/discussion.mdwn b/doc/plugins/aggregate/discussion.mdwn
index 1a9844577..77005a6a1 100644
--- a/doc/plugins/aggregate/discussion.mdwn
+++ b/doc/plugins/aggregate/discussion.mdwn
@@ -89,3 +89,30 @@ New bug: new posts aren't getting displayed (or cached for aggregation). After f
>>> mind having a copy to investigate. --[[Joey]]
>>>> Didn't think of that, will keep a copy if there's a next time. -- [[schmonz]]
+
+-----
+
+In a corporate environment where feeds are generally behind
+authentication, I need to prime the aggregator's `LWP::UserAgent`
+with some cookies. What I've done is write a custom plugin to populate
+`$config{cookies}` with an `HTTP::Cookies` object, plus this diff:
+
+ --- /var/tmp/pkg/lib/perl5/vendor_perl/5.10.0/IkiWiki/Plugin/aggregate.pm 2010-06-24 13:03:33.000000000 -0400
+ +++ aggregate.pm 2010-06-24 13:04:09.000000000 -0400
+ @@ -488,7 +488,11 @@
+ }
+ $feed->{feedurl}=pop @urls;
+ }
+ - my $res=URI::Fetch->fetch($feed->{feedurl});
+ + my $res=URI::Fetch->fetch($feed->{feedurl},
+ + UserAgent => LWP::UserAgent->new(
+ + cookie_jar => $config{cookies},
+ + ),
+ + );
+ if (! $res) {
+ $feed->{message}=URI::Fetch->errstr;
+ $feed->{error}=1;
+
+It works, but I have to remember to apply the diff whenever I update
+ikiwiki. Can you provide a more elegant means of allowing cookies and/or
+the user agent to be programmatically manipulated? --[[schmonz]]
diff --git a/doc/plugins/theme.mdwn b/doc/plugins/theme.mdwn
index 7149cc163..2622abc88 100644
--- a/doc/plugins/theme.mdwn
+++ b/doc/plugins/theme.mdwn
@@ -9,3 +9,6 @@ inside `/usr/share/ikiwiki/themes/`.
A theme provides, via the underlay, an enhanced version of the regular
[[style.css]]. This leaves [[local.css]] free for you to further
customise. Themes can also provide header and background images.
+
+You can set the theme via the **theme** option in your config file (after
+enabling the plugin). Refresh the wiki after changing it to see the changes.