]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
authorJoey Hess <joey@gnu.kitenet.net>
Sun, 22 Nov 2009 20:08:29 +0000 (15:08 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Sun, 22 Nov 2009 20:08:29 +0000 (15:08 -0500)
doc/bugs/Building_a_sidebar_does_not_regenerate_the_subpages.mdwn
doc/sandbox.mdwn
doc/todo/Mailing_list.mdwn
doc/users/KathrynAndersen.mdwn [new file with mode: 0644]
doc/users/harishcm.mdwn

index 596719a8b13aa243e8148234ee092568d90a43b8..93aafc2c00a961a45d7815f07ee9f06f01d46b79 100644 (file)
@@ -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));
index 8aedcbb9e6beafb9dfff37d14161acb47e34fbb9..2a02d41ce21323b1cdc228c78cec2f81c054bd34 100644 (file)
@@ -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
index b6a207420f5171bee5f4b2b0dba225bdf244cc52..67cbbb00b200fab80b8baf1ea45aacec69229838 100644 (file)
@@ -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 (file)
index 0000000..c26a912
--- /dev/null
@@ -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>
index 47f28c83cc580c0d08cb04a7c581a3cfa2b12dd6..1647110220d604e5a69b178740086f459669690e 100644 (file)
@@ -1 +1 @@
-Using ikiwiki for my yet to be publish personal website :)
+Using ikiwiki for my yet to be published personal website :)