summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/blog.mdwn9
-rw-r--r--doc/examples/blog/archives.mdwn8
-rw-r--r--doc/examples/blog/comments.mdwn2
-rw-r--r--doc/examples/blog/index.mdwn9
-rw-r--r--doc/examples/blog/sidebar.mdwn12
-rw-r--r--doc/ikiwiki-calendar.mdwn8
-rw-r--r--doc/ikiwiki/directive/calendar.mdwn7
-rw-r--r--doc/ikiwiki/directive/pagestats.mdwn11
-rw-r--r--doc/ikiwiki/directive/sidebar.mdwn20
-rw-r--r--doc/plugins/sidebar.mdwn25
-rw-r--r--doc/style.css13
11 files changed, 80 insertions, 44 deletions
diff --git a/doc/examples/blog.mdwn b/doc/examples/blog.mdwn
index f542cad0c..8775c01ab 100644
--- a/doc/examples/blog.mdwn
+++ b/doc/examples/blog.mdwn
@@ -13,16 +13,11 @@ Some additional configuration you might want to do:
example of how to tag a post is:
\[[!tag tags/life]]
-* Enable the [[sidebar|plugins/sidebar]] plugin to get a sidebar listing all
- the categories you've tagged posts with.
-
* Enable the [[pagestats|plugins/pagestats]] plugin to get a tag cloud
to display on the [[index]].
-* Enable the [[comments|plugins/comments]] plugin and configure it to
- enable comments to posts to the blog:
-
- comments_pagespec => 'blog/posts/* and !*/Discussion',
+* Enable the [[comments|plugins/comments]] plugin to
+ enable comments to posts to the blog.
* Enable the [[calendar|plugins/calendar]] plugin and run the
[[ikiwiki-calendar]] command from cron daily to get an interlinked
diff --git a/doc/examples/blog/archives.mdwn b/doc/examples/blog/archives.mdwn
new file mode 100644
index 000000000..d07b73b74
--- /dev/null
+++ b/doc/examples/blog/archives.mdwn
@@ -0,0 +1,8 @@
+[[!if test="archives/*" then="""
+Browse through blog archives by year:
+[[!map pages="./archives/* and !./archives/*/* and !*/Discussion"]]
+"""
+else="""
+You need to use the `ikiwiki-calendar` program to generate calendar-based
+archive pages.
+"""]]
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..a22c40c72 100644
--- a/doc/examples/blog/index.mdwn
+++ b/doc/examples/blog/index.mdwn
@@ -1,13 +1,6 @@
-[[!pagestats pages="./tags/*" among="./posts/*"]]
-
-Welcome to my blog.
-
-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.
-
[[!inline pages="./posts/* and !*/Discussion" show="10"
actions=yes rootpage="posts"]]
-----
+[[!sidebar]]
This blog is powered by [ikiwiki](http://ikiwiki.info).
diff --git a/doc/examples/blog/sidebar.mdwn b/doc/examples/blog/sidebar.mdwn
index a9fac388e..f24a8e57a 100644
--- a/doc/examples/blog/sidebar.mdwn
+++ b/doc/examples/blog/sidebar.mdwn
@@ -1,7 +1,9 @@
-Example sidebar
+[[Tags]]: [[!pagestats style="list" pages="./tags/*" among="./posts/*"]]
-* [[Blog|index]]
-* [[Archive|posts]]
+[[Recent Comments|comments]]
-Categories:
-[[!map pages="./tags/* and !*/Discussion"]]
+[[Archives]]
+
+[[!if "enabled(calendar)" then="""
+[[!calendar pages="./posts/* and !*/Discussion"]]
+"""]]
diff --git a/doc/ikiwiki-calendar.mdwn b/doc/ikiwiki-calendar.mdwn
index 982892fca..c1f4d7267 100644
--- a/doc/ikiwiki-calendar.mdwn
+++ b/doc/ikiwiki-calendar.mdwn
@@ -16,9 +16,11 @@ You must specify the setup file for your wiki. The pages will
be created inside its `srcdir`, beneath the `archivebase`
directory used by the calendar plugin (default "archives").
-You will probably want to specify a [[ikiwiki/PageSpec]]
-to control which pages are included on the calendars. The
-default is all pages. To limit it to only posts in a blog,
+To control which pages are included on the calendars,
+a [[ikiwiki/PageSpec]] can be specified. The default is
+all pages, or the pages specified by the `comments_pagespec`
+setting in the config file. A pagespec can also be specified
+on the command line. To limit it to only posts in a blog,
use something like "posts/* and !*/Discussion".
It defaults to creating calendar pages for the current
diff --git a/doc/ikiwiki/directive/calendar.mdwn b/doc/ikiwiki/directive/calendar.mdwn
index b2ac75b11..198da9d51 100644
--- a/doc/ikiwiki/directive/calendar.mdwn
+++ b/doc/ikiwiki/directive/calendar.mdwn
@@ -40,9 +40,12 @@ An example crontab:
"month" or "year". The default is a month view calendar.
* `pages` - Specifies the [[ikiwiki/PageSpec]] of pages to link to from the
month calendar. Defaults to "*".
-* `archivebase` - Configures the base of the archives hierarchy. The
- default is "archives". Note that this default can also be overridden
+* `archivebase` - Configures the base of the archives hierarchy.
+ The default is "archives". Note that this default can also be overridden
for the whole wiki by setting `archivebase` in ikiwiki's setup file.
+ Calendars link to pages under here, with names like "2010/04" and
+ "2010". These pages can be automatically created using the
+ `ikiwiki-calendar` program.
* `year` - The year for which the calendar is requested. Defaults to the
current year.
* `month` - The numeric month for which the calendar is requested, in the
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"]]
diff --git a/doc/ikiwiki/directive/sidebar.mdwn b/doc/ikiwiki/directive/sidebar.mdwn
new file mode 100644
index 000000000..401d7c786
--- /dev/null
+++ b/doc/ikiwiki/directive/sidebar.mdwn
@@ -0,0 +1,20 @@
+The `sidebar` directive is supplied by the [[!iki plugins/sidebar desc=sidebar]] plugin.
+
+This directive can specify a custom sidebar to display on the page,
+overriding any sidebar that is displayed globally.
+
+If no custom sidebar content is specified, it forces the sidebar page to
+be used as the sidebar, even if the `global_sidebars` setting has been
+used to disable use of the sidebar page by default.
+
+## examples
+
+ \[[!sidebar """
+ This is my custom sidebar for this page.
+
+ \[[!calendar pages="posts/*"]]
+ """]]
+
+ \[[!sidebar]]
+
+[[!meta robots="noindex, follow"]]
diff --git a/doc/plugins/sidebar.mdwn b/doc/plugins/sidebar.mdwn
index 4e356d65a..012733456 100644
--- a/doc/plugins/sidebar.mdwn
+++ b/doc/plugins/sidebar.mdwn
@@ -1,24 +1,27 @@
[[!template id=plugin name=sidebar author="Tuomo Valkonen"]]
[[!tag type/chrome]]
-If this plugin is enabled, then a sidebar is added to pages in the wiki.
-The content of the sidebar is simply the content of a page named
-"sidebar" (ie, create a "sidebar.mdwn").
+This plugin allows adding a sidebar to pages in the wiki.
+
+By default, and unless the `global_sidebars` setting is turned off,
+a sidebar is added to all pages in the wiki. The content of the sidebar
+is simply the content of a page named "sidebar" (ie, create a "sidebar.mdwn").
Typically this will be a page in the root of the wiki, but it can also be a
[[ikiwiki/SubPage]]. In fact, this page,
[[plugins/sidebar|plugins/sidebar]], will be treated as a sidebar for the
[[plugins]] page, and of all of its SubPages, if the plugin is enabled.
-Note that to disable a sidebar for a [[ikiwiki/SubPage]] of a page that has
-a sidebar, you can create a sidebar page that is completely empty. This
-will turn off the sidebar altogether.
+There is also a [[ikiwiki/directive/sidebar]] directive that can be used
+to provide a custom sidebar content for a page.
+
+----
-Warning: Any change to the sidebar will cause a rebuild of the whole wiki,
-since every page includes a copy that has to be updated. This can
-especially be a problem if the sidebar includes an [[ikiwiki/directive/inline]]
-directive, since any changes to pages inlined into the sidebar
-will change the sidebar and cause a full wiki rebuild.
+Warning: Any change to the sidebar page will cause a rebuild of the whole
+wiki, since every page includes a copy that has to be updated. This can
+especially be a problem if the sidebar includes an
+[[ikiwiki/directive/inline]] directive, since any changes to pages inlined
+into the sidebar will change the sidebar and cause a full wiki rebuild.
Instead, if you include a [[ikiwiki/directive/map]] directive on the sidebar,
and it does not use the `show` parameter, only adding or removing pages
diff --git a/doc/style.css b/doc/style.css
index 317d4c7aa..bdd4bb466 100644
--- a/doc/style.css
+++ b/doc/style.css
@@ -228,14 +228,15 @@ div.recentchanges {
.bigPC { font-size: 115%; }
.biggestPC { font-size: 130%; }
-#sidebar {
- line-height: 3ex;
- width: 20ex;
+.sidebar {
+ width: 30ex;
float: right;
- margin-left: 40px;
- margin-bottom: 40px;
- padding: 2ex 2ex;
+ margin-left: 4px;
+ margin-bottom: 4px;
+ margin-top: -1px;
+ padding: 0ex 2ex;
background: white;
+ border: 2px solid black;
color: black !important;
}