summaryrefslogtreecommitdiff
path: root/doc/ikiwiki/directive
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-05-19 13:07:47 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-05-19 13:07:47 -0400
commitef003f48f4a3fe8fb67fda62c70a299b07d75976 (patch)
treecb5972026e6beed91b5eca2fa4962790244062bd /doc/ikiwiki/directive
parent53b1c6f559c1d09fbdbc28c8e4d5090dd455cd26 (diff)
parent4c5987d150b26f638494638f7861fb7646542a37 (diff)
Merge branch 'master' into po
Conflicts: debian/changelog
Diffstat (limited to 'doc/ikiwiki/directive')
-rw-r--r--doc/ikiwiki/directive/map/discussion.mdwn61
-rw-r--r--doc/ikiwiki/directive/teximg.mdwn2
2 files changed, 62 insertions, 1 deletions
diff --git a/doc/ikiwiki/directive/map/discussion.mdwn b/doc/ikiwiki/directive/map/discussion.mdwn
index 808930fa4..062b4267a 100644
--- a/doc/ikiwiki/directive/map/discussion.mdwn
+++ b/doc/ikiwiki/directive/map/discussion.mdwn
@@ -11,3 +11,64 @@ Question: Is there a way to generate a listing that shows *both* title and descr
Is that possible?
--Peter
+
+----
+
+The site I'm trying to set up right now (not really a wiki - no public editing) is divided into topics. Topics are pages that have `\[[!meta link="/topic"]]`. Topic pages contain an index of their subpages (done with `\[[!inline]]`); the subpages are the real content. I want a map in the sidebar that lists:
+
+ * all of the topics;
+ * all of the first-level subpages of the *current topic only*.
+
+That is, if the current page is "Topic A" or "Topic A/Page 1", then the map should look like
+
+ Topic A
+ Page 1
+ Page 2
+ Page 3
+ Topic B
+ Topic C
+
+but if the current page is "Topic B" or one of its subpages, then the map should look like
+
+ Topic A
+ Topic B
+ Page 1
+ Page 2
+ Page 3
+ Topic C
+
+On the top-level index page, or on any other page that is neither a topic nor a subpage of a topic, the map should list only the topics.
+
+Is there any way to do that? I don't mind mucking around with `\[[!meta]]` on every page if that's what it takes.
+
+-- Zack
+
+> I think that you're looking for this:
+>
+> `pages="((Topic*/* or Topic*) and ./*) or (Topic* and ! Topic*/*)"`
+>
+> Let's pull that [[PageSpec]] apart.
+>
+> * `(Topic*/* or Topic*)` matches all pages that are underneath a Topic
+> page or are a topic page themselves.
+> * `and ./*` further adds the limitation that the pages have to be
+> in the same directory as the page that is displaying the map. So,
+> for `Topic_A/Page_1`, it will match `Topic_A/*`; for `Topic_A`,
+> it will match `Topic_*` but not subpages.
+> * Finally, `Topic* and ! Topic*/*` matches all the toplevel topic pages,
+> since we always want those to show up.
+>
+> I haven't tested that this works or displays, but I hope it gets you
+> on the right track. PS, be aware of
+> [[this_sidebar_issue|todo/Post-compilation_inclusion_of_the_sidebar]]!
+> --[[Joey]]
+
+>> Thanks, but this assumes that topic pages are named `Topic<something>`.
+>> They aren't. They are tagged with `\[[!meta link="/topic"]]`, and as
+>> far as I can tell there is no [[PageSpec]] notation for "subpages of a
+>> page that satisfies link(foo)"...
+>> -- Zack
+
+>>> I think that the ideas and code in
+>>> [[todo/tracking_bugs_with_dependencies]] might also handle this case.
+>>> --[[Joey]]
diff --git a/doc/ikiwiki/directive/teximg.mdwn b/doc/ikiwiki/directive/teximg.mdwn
index e13d1ed65..992a3f68d 100644
--- a/doc/ikiwiki/directive/teximg.mdwn
+++ b/doc/ikiwiki/directive/teximg.mdwn
@@ -12,7 +12,7 @@ To scale the image, use height=x:
\[[!teximg code="\frac{1}{2}" height="17"]]
\[[!teximg code="\frac{1}{2}" height="8"]]
-If no height is choosen the default height 12 is used. Valid heights are: 8, 9,
+If no height is chosen the default height 12 is used. Valid heights are: 8, 9,
10, 11, 12, 14, 17, 20. If another height is entered, the closest available
height is used.