From 99626615ff41a257090414bf500a83674e8fdc27 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 25 Aug 2009 13:39:33 -0400 Subject: Fix example blog's tags/life to not have a broken PageSpec. Closes: #543510 --- doc/examples/blog/tags/life.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/examples/blog') diff --git a/doc/examples/blog/tags/life.mdwn b/doc/examples/blog/tags/life.mdwn index ddc2e646c..719f2b192 100644 --- a/doc/examples/blog/tags/life.mdwn +++ b/doc/examples/blog/tags/life.mdwn @@ -1,4 +1,4 @@ This feed contains pages in the "life" category. -[[!inline pages="link(tags/life) and ./posts/* and !*/Discussion" +[[!inline pages="link(tags/life) and !*/Discussion" show="10" actions=yes]] -- cgit v1.2.3 From 9d96253d2b10f5bf56b7bd64635754508d969cb6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 25 Sep 2009 15:41:13 -0400 Subject: add comments page to example blog, listing all comments --- doc/examples/blog/comments.mdwn | 3 +++ doc/examples/blog/index.mdwn | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 doc/examples/blog/comments.mdwn (limited to 'doc/examples/blog') diff --git a/doc/examples/blog/comments.mdwn b/doc/examples/blog/comments.mdwn new file mode 100644 index 000000000..c46f95df7 --- /dev/null +++ b/doc/examples/blog/comments.mdwn @@ -0,0 +1,3 @@ +This page will show all comments made to posts in my [[blog|index]]. + +[[!inline pages="*/Discussion or internal(./posts/*/comment_*)"]] diff --git a/doc/examples/blog/index.mdwn b/doc/examples/blog/index.mdwn index 84c732dd1..aef46eb68 100644 --- a/doc/examples/blog/index.mdwn +++ b/doc/examples/blog/index.mdwn @@ -3,7 +3,7 @@ Welcome to my blog. Have a look at the most recent posts below, or browse the tag cloud on the -right. An archive of all [[posts]] is also available. +right. Archives of all [[posts]] and all [[comments]] are also available. [[!inline pages="./posts/* and !*/Discussion" show="10" actions=yes rootpage="posts"]] -- cgit v1.2.3 From 0cb9e588e4253d317945399120a1ef5780b59d7a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2009 20:54:38 -0400 Subject: add among limit to pagestats --- doc/examples/blog/index.mdwn | 2 +- doc/examples/blog/tags.mdwn | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/examples/blog') diff --git a/doc/examples/blog/index.mdwn b/doc/examples/blog/index.mdwn index aef46eb68..01b714fcd 100644 --- a/doc/examples/blog/index.mdwn +++ b/doc/examples/blog/index.mdwn @@ -1,4 +1,4 @@ -[[!pagestats pages="./tags/*"]] +[[!pagestats pages="./tags/*" among="./posts/*"]] Welcome to my blog. diff --git a/doc/examples/blog/tags.mdwn b/doc/examples/blog/tags.mdwn index 53cc8d368..b5eca5b71 100644 --- a/doc/examples/blog/tags.mdwn +++ b/doc/examples/blog/tags.mdwn @@ -1,3 +1,3 @@ -[[!pagestats pages="./tags/*"]] +[[!pagestats pages="./tags/*" among="./posts/*"]] On the right you can see the tag cloud for this blog. -- cgit v1.2.3 From 0fb4474cf82ffe0ccd2b206843ba4f61160e4cf8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 7 Oct 2009 13:55:02 -0400 Subject: limit to discussion pages of blog posts, not whole wiki --- doc/examples/blog/comments.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/examples/blog') diff --git a/doc/examples/blog/comments.mdwn b/doc/examples/blog/comments.mdwn index c46f95df7..4735dea08 100644 --- a/doc/examples/blog/comments.mdwn +++ b/doc/examples/blog/comments.mdwn @@ -1,3 +1,3 @@ This page will show all comments made to posts in my [[blog|index]]. -[[!inline pages="*/Discussion or internal(./posts/*/comment_*)"]] +[[!inline pages="./posts/*/Discussion or internal(./posts/*/comment_*)"]] -- cgit v1.2.3 From 6e7bfbe7bb8ba4b94d0e8c203b2117477b217384 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 28 Mar 2010 19:23:34 -0400 Subject: auto-blog.setup: Set tagbase by default, since most bloggers will want it. Also modified first_post page to use a tag format that will work whether or not tagbase is set. --- auto-blog.setup | 1 + debian/changelog | 1 + doc/examples/blog/posts/first_post.mdwn | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'doc/examples/blog') diff --git a/auto-blog.setup b/auto-blog.setup index 7ff413187..95347167f 100644 --- a/auto-blog.setup +++ b/auto-blog.setup @@ -48,4 +48,5 @@ IkiWiki::Setup::Automator->import( blogspam_pagespec => "postcomment(*)", discussion => 0, locked_pages => "*", + tagbase => "tags", ) diff --git a/debian/changelog b/debian/changelog index 57406c6d3..2d82c4dba 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,7 @@ ikiwiki (3.20100324) UNRELEASED; urgency=low that could lead to bad dependency handling in certian situations. * Add preprocessed 'use lib' line to ikiwiki-transition and ikiwiki-calendar if necessary for unusual install. + * auto-blog.setup: Set tagbase by default, since most bloggers will want it. -- Joey Hess Sat, 13 Mar 2010 14:48:10 -0500 diff --git a/doc/examples/blog/posts/first_post.mdwn b/doc/examples/blog/posts/first_post.mdwn index d49432341..7f814fbb1 100644 --- a/doc/examples/blog/posts/first_post.mdwn +++ b/doc/examples/blog/posts/first_post.mdwn @@ -1,4 +1,4 @@ This is the first post to this example blog. To add new posts, just add files to the posts/ subdirectory, or use the web form. -[[!tag tags/tech]] +[[!tag ./tags/tech]] -- cgit v1.2.3 From b6666f5ac81ef4c8646a6290cf5c885adf0e385f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 28 Mar 2010 19:28:48 -0400 Subject: fix tag Actually, tags can't be made to work with and w/o tagbase, so just make it assume tagbase is set. Better example anyway. (It'll be a broken link on ikiwiki.info though.) --- doc/examples/blog/posts/first_post.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/examples/blog') diff --git a/doc/examples/blog/posts/first_post.mdwn b/doc/examples/blog/posts/first_post.mdwn index 7f814fbb1..f2729fcef 100644 --- a/doc/examples/blog/posts/first_post.mdwn +++ b/doc/examples/blog/posts/first_post.mdwn @@ -1,4 +1,4 @@ This is the first post to this example blog. To add new posts, just add files to the posts/ subdirectory, or use the web form. -[[!tag ./tags/tech]] +[[!tag tech]] -- cgit v1.2.3 From fe733e2a424f50227e4a501c3efbf1ce43e07352 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 15 Apr 2010 14:29:14 -0400 Subject: enhance pagestats and rework example blog front page * pagestats: Class parameter can be used to override default class for custom styling. * pagestats: Use style=list to get a list of tags, scaled by use like in a tag cloud. This is useful to put in a sidebar. * Rework example blog front page. --- IkiWiki/Plugin/pagestats.pm | 21 ++++++++++++++++++--- debian/changelog | 5 +++++ doc/examples/blog/archives.mdwn | 7 +++++++ doc/examples/blog/comments.mdwn | 2 +- doc/examples/blog/index.mdwn | 12 ++++++++---- doc/ikiwiki/directive/pagestats.mdwn | 11 ++++++++++- 6 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 doc/examples/blog/archives.mdwn (limited to 'doc/examples/blog') diff --git a/IkiWiki/Plugin/pagestats.pm b/IkiWiki/Plugin/pagestats.pm index 1c0b46830..48715bd3e 100644 --- a/IkiWiki/Plugin/pagestats.pm +++ b/IkiWiki/Plugin/pagestats.pm @@ -75,7 +75,7 @@ sub preprocess (@) { } if ($style eq 'table') { - return "\n". + return "
\n". join("\n", map { "
". htmllink($params{page}, $params{destpage}, $_, noimageinline => 1). @@ -87,16 +87,31 @@ sub preprocess (@) { else { # In case of misspelling, default to a page cloud - my $res = "
\n"; + my $res; + if ($style eq 'list') { + $res = "
    \n"; + } + else { + $res = "
    \n"; + } foreach my $page (sort keys %counts) { next unless $counts{$page} > 0; my $class = $classes[$counts{$page} * scalar(@classes) / ($max + 1)]; + + $res.="
  • " if $style eq 'list'; $res .= "". htmllink($params{page}, $params{destpage}, $page). "\n"; + $res.="
  • " if $style eq 'list'; + + } + if ($style eq 'list') { + $res = "
\n"; + } + else { + $res .= "
\n"; } - $res .= "\n"; return $res; } diff --git a/debian/changelog b/debian/changelog index 7c607b2a5..c2b0c3c23 100644 --- a/debian/changelog +++ b/debian/changelog @@ -31,6 +31,11 @@ ikiwiki (3.20100410) UNRELEASED; urgency=low specify which pages to include on the calendar archive pages. (The pagespec can still also be specified on the ikiwiki-calendar command line.) + * pagestats: Class parameter can be used to override default class for + custom styling. + * pagestats: Use style=list to get a list of tags, scaled by use like + in a tag cloud. This is useful to put in a sidebar. + * Rework example blog front page. -- Joey Hess Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/doc/examples/blog/archives.mdwn b/doc/examples/blog/archives.mdwn new file mode 100644 index 000000000..14686cdfe --- /dev/null +++ b/doc/examples/blog/archives.mdwn @@ -0,0 +1,7 @@ +[[!if test="enabled(calendar)" then=""" +Browse through blog archives by year: +[[!map pages="./archives/* and !./archives/*/* and !*/Discussion"]] +""" +else=""" +Calendar based archives are not enabled. See [[posts]] for a full list of posts. +"""]] diff --git a/doc/examples/blog/comments.mdwn b/doc/examples/blog/comments.mdwn index 4735dea08..0b503ba01 100644 --- a/doc/examples/blog/comments.mdwn +++ b/doc/examples/blog/comments.mdwn @@ -1,3 +1,3 @@ -This page will show all comments made to posts in my [[blog|index]]. +This page will show recent comments made to posts in the [[blog|index]]. [[!inline pages="./posts/*/Discussion or internal(./posts/*/comment_*)"]] diff --git a/doc/examples/blog/index.mdwn b/doc/examples/blog/index.mdwn index 01b714fcd..b273ba1a9 100644 --- a/doc/examples/blog/index.mdwn +++ b/doc/examples/blog/index.mdwn @@ -1,9 +1,13 @@ -[[!pagestats pages="./tags/*" among="./posts/*"]] +[[!template id=note text=""" -Welcome to my blog. +* [[Tags]]: [[!pagestats style="list" pages="./tags/*" among="./posts/*"]] +* [[Recent_Comments|comments]] +* [[Archives]] -Have a look at the most recent posts below, or browse the tag cloud on the -right. Archives of all [[posts]] and all [[comments]] are also available. +[[!if test="enabled(calendar)" then=""" +[[!calendar pages="./posts/* and !*/Discussion"]] + +"""]] [[!inline pages="./posts/* and !*/Discussion" show="10" actions=yes rootpage="posts"]] diff --git a/doc/ikiwiki/directive/pagestats.mdwn b/doc/ikiwiki/directive/pagestats.mdwn index 68f4d2734..d0e0e7be7 100644 --- a/doc/ikiwiki/directive/pagestats.mdwn +++ b/doc/ikiwiki/directive/pagestats.mdwn @@ -4,10 +4,16 @@ This directive can generate stats about how pages link to each other. It can produce either a tag cloud, or a table counting the number of links to each page. -Here's how to use it to create a [[tag]] cloud: +Here's how to use it to create a [[tag]] cloud, with tags sized based +on frequency of use: \[[!pagestats pages="tags/*"]] +Here's how to create a list of tags, sized by use as they would be in a +cloud. + + \[[!pagestats style="list" pages="tags/*"]] + And here's how to create a table of all the pages on the wiki: \[[!pagestats style="table"]] @@ -28,4 +34,7 @@ links: \[[!pagestats style="table" show="10"]] +The optional `class` parameter can be used to control the class +of the generated tag cloud `div` or page stats `table`. + [[!meta robots="noindex, follow"]] -- cgit v1.2.3 From baaa848f6c06b0b3a59677d3551e130c65e5fde7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 15 Apr 2010 15:04:17 -0400 Subject: CSS and templates for sidebar changed to use a class, not an id. Multiple sidebars should be possible; also, I want to add a sidebar template. --- debian/changelog | 3 ++- doc/examples/blog.mdwn | 2 +- doc/examples/blog/index.mdwn | 1 - doc/examples/blog/sidebar.mdwn | 7 ------- doc/style.css | 2 +- templates/page.tmpl | 2 +- 6 files changed, 5 insertions(+), 12 deletions(-) delete mode 100644 doc/examples/blog/sidebar.mdwn (limited to 'doc/examples/blog') diff --git a/debian/changelog b/debian/changelog index c2b0c3c23..03361e6a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ikiwiki (3.20100410) UNRELEASED; urgency=low +ikiwiki (3.20100415) UNRELEASED; urgency=low [ Joey Hess ] * bzr: Fix bzr log parsing to work with bzr 2.0. (liw) @@ -36,6 +36,7 @@ ikiwiki (3.20100410) UNRELEASED; urgency=low * pagestats: Use style=list to get a list of tags, scaled by use like in a tag cloud. This is useful to put in a sidebar. * Rework example blog front page. + * CSS and templates for sidebar changed to use a class, not an id. -- Joey Hess Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/doc/examples/blog.mdwn b/doc/examples/blog.mdwn index b9b57b944..33637e57d 100644 --- a/doc/examples/blog.mdwn +++ b/doc/examples/blog.mdwn @@ -14,7 +14,7 @@ Some additional configuration you might want to do: \[[!tag tags/life]] * Enable the [[sidebar|plugins/sidebar]] plugin to get a sidebar listing all - the categories you've tagged posts with. + the categories you've tagged posts with, and other navigation links. * Enable the [[pagestats|plugins/pagestats]] plugin to get a tag cloud to display on the [[index]]. diff --git a/doc/examples/blog/index.mdwn b/doc/examples/blog/index.mdwn index b273ba1a9..da95e7660 100644 --- a/doc/examples/blog/index.mdwn +++ b/doc/examples/blog/index.mdwn @@ -4,7 +4,6 @@ * [[Recent_Comments|comments]] * [[Archives]] -[[!if test="enabled(calendar)" then=""" [[!calendar pages="./posts/* and !*/Discussion"]] """]] diff --git a/doc/examples/blog/sidebar.mdwn b/doc/examples/blog/sidebar.mdwn deleted file mode 100644 index a9fac388e..000000000 --- a/doc/examples/blog/sidebar.mdwn +++ /dev/null @@ -1,7 +0,0 @@ -Example sidebar - -* [[Blog|index]] -* [[Archive|posts]] - -Categories: -[[!map pages="./tags/* and !*/Discussion"]] diff --git a/doc/style.css b/doc/style.css index 317d4c7aa..af0fc230c 100644 --- a/doc/style.css +++ b/doc/style.css @@ -228,7 +228,7 @@ div.recentchanges { .bigPC { font-size: 115%; } .biggestPC { font-size: 130%; } -#sidebar { +.sidebar { line-height: 3ex; width: 20ex; float: right; diff --git a/templates/page.tmpl b/templates/page.tmpl index c24f88823..7e850a56b 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -92,7 +92,7 @@ -