diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-11-22 15:08:29 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-11-22 15:08:29 -0500 |
commit | aeaaeecd515748dfc044a5a5853426a35de70c94 (patch) | |
tree | e38b1044d126a0eb1bc1e0795f702a771a3cdb3d /doc | |
parent | 6fe2ec0f5c3d9fe5780385c17aaf7370fe8efc24 (diff) | |
parent | ff5ae256b9dd0554a881388d88788366049babf1 (diff) |
Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
Diffstat (limited to 'doc')
-rw-r--r-- | doc/bugs/Building_a_sidebar_does_not_regenerate_the_subpages.mdwn | 51 | ||||
-rw-r--r-- | doc/sandbox.mdwn | 62 | ||||
-rw-r--r-- | doc/todo/Mailing_list.mdwn | 16 | ||||
-rw-r--r-- | doc/users/KathrynAndersen.mdwn | 2 | ||||
-rw-r--r-- | doc/users/harishcm.mdwn | 2 |
5 files changed, 71 insertions, 62 deletions
diff --git a/doc/bugs/Building_a_sidebar_does_not_regenerate_the_subpages.mdwn b/doc/bugs/Building_a_sidebar_does_not_regenerate_the_subpages.mdwn index 596719a8b..93aafc2c0 100644 --- a/doc/bugs/Building_a_sidebar_does_not_regenerate_the_subpages.mdwn +++ b/doc/bugs/Building_a_sidebar_does_not_regenerate_the_subpages.mdwn @@ -7,3 +7,54 @@ If sandbox/page.mdwn has been generated and sandbox/sidebar.mdwn is created, the # currently requires a wiki rebuild. add_depends($page, $sidebar_page); +---- +Below is a patch for the bug. It's inspired by trying to solve [[todo/Post-compilation inclusion of the sidebar]]. +What do you think about it? I have a concern though. If a sidebar is removed, it takes two refreshes to update +the affected pages. Is this a feature or a bug? --[[harishcm]] + + --- sidebar.pm.orig 2009-11-21 17:40:02.000000000 +0800 + +++ sidebar_bugfix.pm 2009-11-21 18:16:11.000000000 +0800 + @@ -10,6 +10,7 @@ + + sub import { + hook(type => "getsetup", id => "sidebar", call => \&getsetup); + + hook(type => "needsbuild", id => "sidebar", call => \&needsbuild); + hook(type => "pagetemplate", id => "sidebar", call => \&pagetemplate); + } + + @@ -21,6 +22,22 @@ + }, + } + + +sub needsbuild (@) { + + my $needsbuild=shift; + + + + # Determine every pages' sidebar page + + foreach my $page (keys %pagesources) { + + my $sidebar_page=''; + + $sidebar_page=bestlink($page, "sidebar"); + + + + # If a page's sidebar has changed, force rebuild + + if (!exists $pagestate{$page}{sidebar}{sidebar_page} || $pagestate{$page}{sidebar}{sidebar_page} ne $sidebar_page) { + + $pagestate{$page}{sidebar}{sidebar_page} = $sidebar_page; + + push @$needsbuild, $pagesources{$page}; + + } + + } + +} + + + sub sidebar_content ($) { + my $page=shift; + + @@ -29,9 +46,9 @@ + my $sidebar_type=pagetype($sidebar_file); + + if (defined $sidebar_type) { + - # FIXME: This isn't quite right; it won't take into account + - # adding a new sidebar page. So adding such a page + - # currently requires a wiki rebuild. + + # Record current sidebar page for rechecking bestlink + + # during wiki refresh. Also add depends on the sidebar page. + + $pagestate{$page}{sidebar}{sidebar_page}=$sidebar_page; + add_depends($page, $sidebar_page); + + my $content=readfile(srcfile($sidebar_file)); diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 8aedcbb9e..2a02d41ce 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -1,61 +1 @@ -This is the [[SandBox]], a page anyone can edit to try out ikiwiki (version [[!version ]]). - - -# Header - -## Subheader - -> This is a blockquote. -> -> This is the first level of quoting. -> -> > This is nested blockquote. -> ->> Without a space works too. ->>> to three levels -> -> Back to the first level. - -Numbered list - -1. First item. - 1. Sub item. -1. Another. -1. And another.. - 1. foo - 2. bar - -Bulleted list - -* item -* *item* -* item -* one - * two - ----- - -[[!template id=note text="this is generated by the [[plugins/haiku]] plugin"]] -[[!haiku hint="sandbox play"]] - ----- - -## Different sorts of links: - -* [[Features]] -* <http://ikiwiki.info/ikiwiki/formatting/> -* [[different_name_for_a_WikiLink|ikiwiki/WikiLink]] -* <http://www.gnu.org/> -* [GNU](http://www.gnu.org/) - ------ - -[[!progress percent=27]] - -[[!progress percent=78]] - ------ - -This **SandBox** is also a [[blog]]! - -[[!inline pages="sandbox/* and !*/Discussion" rootpage="sandbox" show="4" archive="yes"]] +TEST diff --git a/doc/todo/Mailing_list.mdwn b/doc/todo/Mailing_list.mdwn index b6a207420..67cbbb00b 100644 --- a/doc/todo/Mailing_list.mdwn +++ b/doc/todo/Mailing_list.mdwn @@ -18,3 +18,19 @@ Does this sound okay? > todo/bugs/forum feeds, or to some other feed they create on their user page. > And there's work on making the discussion pages more structured, on > accepting comments sent via mail, etc. --[[Joey]] + +>>I was going to make the very same request, so I'm glad to know I'm not the only one who felt the need for it. + +>>I can see your reasoning, though I don't think ikiwiki has reached the level (yet) of facilitating discussion as well as a mailing list does. +>>You've already pointed out the need for (a) more structured discussion pages, (b) comments sent via mail, but I'm not sure whether that will be enough. This is because the nature of a wiki means that discussions are scattered all over the site, as people discuss in discussion pages about the given topic - and so they should. The consequence of this, however, is that one has a choice (in regard to RSS feeds) of having too much or too little. Too little, if one only feeds on news/todo/bugs/forum, since one misses out on discussions elsewhere. Too much, because the only other option appears to be subscribing to recentchanges, which will give one *everything*, whether it is relevant or not. +>>Unfortunately, I'm not really sure what the best solution is for this problem. + +>> For those who might be interested, I've added the following RSS feeds to <http://www.dreamwidth.org>: +*ikiwiki_bugs_feed, +ikiwiki_forum_feed, +ikiwiki_news_feed, +ikiwiki_recent_feed, +ikiwiki_todo_feed, +ikiwiki_wishlist_feed* + +>>--[[KathrynAndersen]] diff --git a/doc/users/KathrynAndersen.mdwn b/doc/users/KathrynAndersen.mdwn new file mode 100644 index 000000000..c26a91223 --- /dev/null +++ b/doc/users/KathrynAndersen.mdwn @@ -0,0 +1,2 @@ +* Currently an active [PmWiki](http://www.pmwiki.org) user, but investigating changing over to ikiwiki (if I can write the plugins I need). +* <http://kerravonsen.dreamwidth.org> diff --git a/doc/users/harishcm.mdwn b/doc/users/harishcm.mdwn index 47f28c83c..164711022 100644 --- a/doc/users/harishcm.mdwn +++ b/doc/users/harishcm.mdwn @@ -1 +1 @@ -Using ikiwiki for my yet to be publish personal website :) +Using ikiwiki for my yet to be published personal website :) |