From e0d1e84b8db54338512ee1ca4b20817d4e338362 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 10 Apr 2009 21:44:25 -0400 Subject: better name --- doc/tips/add_chatterbox_to_blog.mdwn | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 doc/tips/add_chatterbox_to_blog.mdwn (limited to 'doc/tips/add_chatterbox_to_blog.mdwn') diff --git a/doc/tips/add_chatterbox_to_blog.mdwn b/doc/tips/add_chatterbox_to_blog.mdwn new file mode 100644 index 000000000..ee5ead64b --- /dev/null +++ b/doc/tips/add_chatterbox_to_blog.mdwn @@ -0,0 +1,20 @@ +If you use twitter or identi.ca, here's how to make a box +on the side of your blog that holds your recent status updates +from there, like I have on [my blog](http://kitenet.net/~joey/blog/) +--[[Joey]] + +* Enable the [[plugins/aggregate]] plugin, and set up a cron + job for it. +* At the top of your blog's page, add something like the following. + You'll want to change the urls of course. + + \[[!template id=note text=""" + \[[!aggregate expirecount=5 name="dents" url="http://identi.ca/joeyh" + feedurl="http://identi.ca/api/statuses/user_timeline/joeyh.atom"]] + \[[!inline pages="internal(dents/*)" archive=yes show=5 feeds=no]] + """]] + +For a cleaner look without the post dates, add `template=titlepage` +to the `inline` directive. + +Note: Works best with ikiwiki 3.10 or better. -- cgit v1.2.3 From b6eccfd3d38c95773bdfc8fdf1ecbc32094f353e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 11 Apr 2009 12:40:15 -0400 Subject: Add a microblog template that is useful for inlining microblogging posts. --- debian/changelog | 1 + doc/ikiwiki/directive/inline.mdwn | 3 ++- doc/style.css | 6 ++++-- doc/tips/add_chatterbox_to_blog.mdwn | 6 ++---- doc/wikitemplates.mdwn | 1 + templates/microblog.tmpl | 22 ++++++++++++++++++++++ 6 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 templates/microblog.tmpl (limited to 'doc/tips/add_chatterbox_to_blog.mdwn') diff --git a/debian/changelog b/debian/changelog index b7779600e..51b5121fb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ ikiwiki (3.10) UNRELEASED; urgency=low * Add missing permalink support to archivepage and titlepage templates. * debian/control: Wrap fields. * inline: Add author info to archive display. + * Add a microblog template that is useful for inlining microblogging posts. -- Joey Hess Sat, 04 Apr 2009 17:47:36 -0400 diff --git a/doc/ikiwiki/directive/inline.mdwn b/doc/ikiwiki/directive/inline.mdwn index f69d55de3..8afd65a05 100644 --- a/doc/ikiwiki/directive/inline.mdwn +++ b/doc/ikiwiki/directive/inline.mdwn @@ -79,7 +79,8 @@ Here are some less often needed parameters: page. By default the `inlinepage` template is used, while the `archivepage` template is used for archives. Set this parameter to use some other, custom template, such as the `titlepage` template that - only shows post titles. Note that you should still set `archive=yes` if + only shows post titles or the `microblog` template, optimised for + microblogging. Note that you should still set `archive=yes` if your custom template does not include the page content. * `raw` - Rather than the default behavior of creating a blog, if raw is set to "yes", the page will be included raw, without additional diff --git a/doc/style.css b/doc/style.css index 98a28f347..74d968ddf 100644 --- a/doc/style.css +++ b/doc/style.css @@ -373,11 +373,13 @@ span.color { padding: 2px; } -.comment-header { +.comment-header, +.microblog-header { font-style: italic; margin-top: .3em; } -.comment .author { +.comment .author, +.microblog .author { font-weight: bold; } .comment-subject { diff --git a/doc/tips/add_chatterbox_to_blog.mdwn b/doc/tips/add_chatterbox_to_blog.mdwn index ee5ead64b..3497da9ff 100644 --- a/doc/tips/add_chatterbox_to_blog.mdwn +++ b/doc/tips/add_chatterbox_to_blog.mdwn @@ -11,10 +11,8 @@ from there, like I have on [my blog](http://kitenet.net/~joey/blog/) \[[!template id=note text=""" \[[!aggregate expirecount=5 name="dents" url="http://identi.ca/joeyh" feedurl="http://identi.ca/api/statuses/user_timeline/joeyh.atom"]] - \[[!inline pages="internal(dents/*)" archive=yes show=5 feeds=no]] + \[[!inline pages="internal(dents/*)" template=microblog + show=5 feeds=no]] """]] -For a cleaner look without the post dates, add `template=titlepage` -to the `inline` directive. - Note: Works best with ikiwiki 3.10 or better. diff --git a/doc/wikitemplates.mdwn b/doc/wikitemplates.mdwn index fc5893677..f365cd5aa 100644 --- a/doc/wikitemplates.mdwn +++ b/doc/wikitemplates.mdwn @@ -21,6 +21,7 @@ located in /usr/share/ikiwiki/templates by default. * `inlinepage.tmpl` - Used for adding a page inline in a blog page. * `archivepage.tmpl` - Used for listing a page in a blog archive page. +* `microblog.tmpl` - Used for showing a microblogging post inline. * `blogpost.tmpl` - Used for a form to add a post to a blog (and a rss/atom links) * `feedlink.tmpl` - Used to add rss/atom links if blogpost.tmpl is not used. * `aggregatepost.tmpl` - Used by the [[plugins/aggregate]] plugin to create diff --git a/templates/microblog.tmpl b/templates/microblog.tmpl new file mode 100644 index 000000000..2e84441cc --- /dev/null +++ b/templates/microblog.tmpl @@ -0,0 +1,22 @@ +
+ +
+ +
+ +
+ + + + + + + + + + + +— + +
+
-- cgit v1.2.3 From 4e935d300ed0bda37a44e1da85aff797f0aeda8f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 19 Apr 2009 15:19:43 -0400 Subject: clarification, response --- doc/tips/add_chatterbox_to_blog.mdwn | 7 +++++-- doc/tips/add_chatterbox_to_blog/discussion.mdwn | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'doc/tips/add_chatterbox_to_blog.mdwn') diff --git a/doc/tips/add_chatterbox_to_blog.mdwn b/doc/tips/add_chatterbox_to_blog.mdwn index 3497da9ff..aa35b9331 100644 --- a/doc/tips/add_chatterbox_to_blog.mdwn +++ b/doc/tips/add_chatterbox_to_blog.mdwn @@ -6,12 +6,15 @@ from there, like I have on [my blog](http://kitenet.net/~joey/blog/) * Enable the [[plugins/aggregate]] plugin, and set up a cron job for it. * At the top of your blog's page, add something like the following. - You'll want to change the urls of course. + You'll want to change the urls of course. Be sure to also change + the inline directive's [[PageSpec]] to link to the location the + feed is aggregated to, which will be a subpage of the page + you put this on (blog in this example): \[[!template id=note text=""" \[[!aggregate expirecount=5 name="dents" url="http://identi.ca/joeyh" feedurl="http://identi.ca/api/statuses/user_timeline/joeyh.atom"]] - \[[!inline pages="internal(dents/*)" template=microblog + \[[!inline pages="internal(./blog/dents/*)" template=microblog show=5 feeds=no]] """]] diff --git a/doc/tips/add_chatterbox_to_blog/discussion.mdwn b/doc/tips/add_chatterbox_to_blog/discussion.mdwn index b448cf3b8..57e4b76ad 100644 --- a/doc/tips/add_chatterbox_to_blog/discussion.mdwn +++ b/doc/tips/add_chatterbox_to_blog/discussion.mdwn @@ -14,3 +14,9 @@ mine, live, here: I expected something like: sidebar, with a number, and displaying them in the sidebar, but they don't display (similar to what you have on your blog). On the [[/ikiwiki/pagespec]] page, it says "internal" pages aren't "first-class" wiki pages, so it's best not to directly display them, so how do you manage to display them? I'd like to display their name, and what they link to in the sidebar, or otherwise in the main body. + +> That's what the inline does, displays the internal pages. +> +> You need to fix your pagespec to refer to where the pages are aggregated +> to, under the page that contains the aggregate directive. In your example, +> it should be `internal(./blog/meta/microblog-feed/kijkaqawej/*)` --[[Joey]] -- cgit v1.2.3