Merge commit 'remotes/smcv/ready/harishcm-map-fix' into staging
authorJoey Hess <joey@gnu.kitenet.net>
Fri, 31 Jul 2009 08:23:06 +0000 (10:23 +0200)
committerJoey Hess <joey@gnu.kitenet.net>
Fri, 31 Jul 2009 08:23:06 +0000 (10:23 +0200)
32 files changed:
.gitignore
IkiWiki/Plugin/img.pm
IkiWiki/Plugin/pagestats.pm
IkiWiki/Render.pm
debian/changelog
doc/bugs/entirely_negated_pagespec_matches_internal_pages.mdwn
doc/bugs/html5_support.mdwn
doc/bugs/map_fails_to_close_ul_element_for_empty_list.mdwn
doc/git.mdwn
doc/ikiwiki/directive/pagestats.mdwn
doc/pagehistory.mdwn
doc/plugins/write.mdwn
doc/post-commit/discussion.mdwn
doc/todo/Add_space_before_slash_in_parent_links.mdwn
doc/todo/Raw_view_link.mdwn
doc/todo/Suggested_location_should_be_subpage_if_siblings_exist.mdwn
doc/todo/allow_creation_of_non-existent_pages.mdwn
doc/todo/attachments.mdwn
doc/todo/backlinks_result_is_lossy.mdwn
doc/todo/dynamic_rootpage.mdwn
doc/todo/generated_po_stuff_not_ignored_by_git.mdwn [new file with mode: 0644]
doc/todo/geotagging.mdwn
doc/todo/inline_plugin:_specifying_ordered_page_names.mdwn
doc/todo/inline_postform_autotitles.mdwn
doc/todo/more_customisable_titlepage_function.mdwn
doc/todo/more_flexible_inline_postform.mdwn
doc/todo/pagestats_among_a_subset_of_pages.mdwn
doc/todo/should_optimise_pagespecs.mdwn
doc/todo/source_link.mdwn
doc/todo/tracking_bugs_with_dependencies.mdwn
doc/todo/unaccent_url_instead_of_encoding.mdwn
doc/users/simonraven.mdwn

index 57991a732d698238d8af3ac0e6094d7c445974a9..8de36e2c8df25ab30f7fadeffbcdf25f189863f3 100644 (file)
@@ -8,3 +8,10 @@ ikiwiki.out
 pm_to_blib
 *.man
 build-stamp
+po/po2wiki_stamp
+po/underlays/*/*.mdwn
+po/underlays/basewiki/*/*.mdwn
+po/underlays/basewiki/*/*/*.mdwn
+po/underlays/directives/ikiwiki/directive/*.mdwn
+po/underlays_copy_stamp
+underlays/locale
index 44d67bd8375057e77d5853ee93cdd7943108ed14..68b001671653000b4907ababf1d63782d834381c 100644 (file)
@@ -44,6 +44,7 @@ sub preprocess (@) {
        }
 
        add_link($params{page}, $image);
+
        # optimisation: detect scan mode, and avoid generating the image
        if (! defined wantarray) {
                return;
@@ -65,6 +66,8 @@ sub preprocess (@) {
        my $r;
 
        if ($params{size} ne 'full') {
+               add_depends($params{page}, $image);
+
                my ($w, $h) = ($params{size} =~ /^(\d*)x(\d*)$/);
                error sprintf(gettext('wrong size format "%s" (should be WxH)'), $params{size})
                        unless (defined $w && defined $h &&
@@ -102,8 +105,6 @@ sub preprocess (@) {
                $imglink = $file;
        }
 
-       add_depends($imglink, $params{page});
-
        my ($fileurl, $imgurl);
        if (! $params{preview}) {
                $fileurl=urlto($file, $params{destpage});
index 8ab5d36662ce71716a1733e1a4b5de223c92602b..874ead7e6de669c1d33c66b74984ef90504f9b8e 100644 (file)
@@ -38,13 +38,22 @@ sub preprocess (@) {
        # Needs to update whenever a page is added or removed, so
        # register a dependency.
        add_depends($params{page}, $params{pages});
+       add_depends($params{page}, $params{among}) if exists $params{among};
        
        my %counts;
        my $max = 0;
        foreach my $page (pagespec_match_list([keys %links],
                        $params{pages}, location => $params{page})) {
                use IkiWiki::Render;
-               $counts{$page} = scalar(IkiWiki::backlinks($page));
+
+               my @backlinks = IkiWiki::backlink_pages($page);
+
+               if (exists $params{among}) {
+                       @backlinks = pagespec_match_list(\@backlinks,
+                               $params{among}, location => $params{page});
+               }
+
+               $counts{$page} = scalar(@backlinks);
                $max = $counts{$page} if $counts{$page} > $max;
        }
 
@@ -63,6 +72,8 @@ sub preprocess (@) {
 
                my $res = "<div class='pagecloud'>\n";
                foreach my $page (sort keys %counts) {
+                       next unless $counts{$page} > 0;
+
                        my $class = $classes[$counts{$page} * scalar(@classes) / ($max + 1)];
                        $res .= "<span class=\"$class\">".
                                htmllink($params{page}, $params{destpage}, $page).
index bed9cb777c6505195218d00d09842d29a85785bd..5cb67ea07ec34a4f1eb7b6a3176179fa2d5f182a 100644 (file)
@@ -24,13 +24,19 @@ sub calculate_backlinks () {
        $backlinks_calculated=1;
 }
 
-sub backlinks ($) {
+sub backlink_pages ($) {
        my $page=shift;
 
        calculate_backlinks();
 
+       return keys %{$backlinks{$page}};
+}
+
+sub backlinks ($) {
+       my $page=shift;
+
        my @links;
-       foreach my $p (keys %{$backlinks{$page}}) {
+       foreach my $p (backlink_pages($page)) {
                my $href=urlto($p, $page);
                 
                # Trim common dir prefixes from both pages.
index 565f19c7c73bd6ce26e1dbeca16ab15bdf39cd0e..11a03c993dc147c72bf79ccc3f0325760403a904 100644 (file)
@@ -8,6 +8,11 @@ ikiwiki (3.15) UNRELEASED; urgency=low
   * Add further build machinery to generate translated underlays from
     the po file, for use by wikis whose primary language is not English.
   * Add Danish basewiki translation by Jonas Smedegaard.
+  * img: Fix adding of dependency from page to the image.
+  * pagestats: add `among` parameter, which only counts links from specified
+    pages (smcv)
+  * pagestats: when making a tag cloud, don't emit links where the tag is
+    unused (smcv)
 
  -- Joey Hess <joeyh@debian.org>  Tue, 02 Jun 2009 17:03:41 -0400
 
index 02ce4e221093b33bf0d9e82bd32f758c49799186..a9b223a465cabbc5cc9b3820f6ea4d43ec9345fd 100644 (file)
@@ -21,3 +21,10 @@ pagespec, and implicitly add "and !internal()" to it.
 
 Either approach would require fully parsing the pagespec. And consider cases
 like "!(foo and !bar)". Doesn't seem at all easy to solve. --[[Joey]]
+
+> It occurs to me that at least one place in ikiwiki optimizes by assuming
+> that pagespecs not mentioning the word "internal" never match internal
+> pages. I wonder whether this bug could be solved by making that part of
+> the definition of a pagespec, rather than a risky optimization
+> like it is now? That seems strange, though - having this special case
+> would make pagespecs significantly harder to understand. --[[smcv]]
index e15f4341dc0364f024ab3b7c37d2571c269b2a78..783f5e47c3f5a4d85dbc9d58bd86564e801dbeec 100644 (file)
@@ -3,6 +3,8 @@ Some elements of
 safely supported by ikiwiki. There are [several differences between HTML4 and
 HTML5](http://www.w3.org/TR/html5-diff/).
 
+[[!template id=gitbranch branch=hendry/html5 author="[[Kai_Hendry|hendry]]"]]
+
 * [HTML5 branch](http://git.webconverger.org/?p=ikiwiki;h=refs/heads/html5)
 * [ikiwiki instance with HTML5 templates](http://natalian.org)
 * [HTML5 outliner tool](http://gsnedders.html5.org/outliner/) -- to check you have the structure of your markup correct
index e565b8035dad0ee543bab89fd74c402d16f0925b..0a67934aa454404e9820bc463af76c8f3e708146 100644 (file)
@@ -55,6 +55,19 @@ Patch:
 >>>> Thanks for pointing out the problem. I guess this patch should solve it.
 >>>> --[[harishcm]]
 
+>>>>> Well, I suppose that's certainly a minimal patch for this bug :-)
+>>>>> I'm not the IkiWiki maintainer, but if I was, I'd apply it, so I've put
+>>>>> it in a git branch for Joey's convenience. Joey, Jon: any opinion?
+>>>>>
+>>>>> If you want to be credited for this patch under a name other than
+>>>>> "harishcm" (e.g. your real name), let me know and I'll amend the branch.
+>>>>> (Or, make a git branch of your own and replace the reference just below,
+>>>>> if you prefer.) --[[smcv]]
+
+>>>>>> The current arrangement looks fine to me. Thanks. --[[harishcm]]
+
+[[!template id=gitbranch author="[[harishcm]]" branch=smcv/ready/harishcm-map-fix]]
+
 Patch:
 
     --- /usr/local/share/perl/5.8.8/IkiWiki/Plugin/map.pm
index b4288bc98ba41a59e7f6581c27b85e9fd5975d2b..18fbd238b27e65868d6f73506cd50b0737927c42 100644 (file)
@@ -45,7 +45,7 @@ into [[Joey]]'s working tree. This is recommended. :-)
 * [[jonas|JonasSmedegaard]] `git://source.jones.dk/ikiwiki-upstream`
 * [[arpitjain]] `git://github.com/arpitjain11/ikiwiki.git`
 * [[chrysn]] `git://github.com/github076986099/ikiwiki.git`
-* [[kjikaqawej]] `git://github.com/kjikaqawej/ikiwiki-simon.git`
+* [[simonraven]] `git://github.com/kjikaqawej/ikiwiki-simon.git`
 
 ## branches
 
index cfb5737a565898bbb31babcfbee8155df38c7ead..426f3e4afdf6aeda4fb782812555ead457b3a3e1 100644 (file)
@@ -12,4 +12,14 @@ And here's how to create a table of all the pages on the wiki:
 
        \[[!pagestats style="table"]]
 
+The optional `among` parameter limits counting to pages that match a
+[[ikiwiki/PageSpec]]. For instance, to display a cloud of tags used on blog
+entries, you could use:
+
+       \[[!pagestats pages="tags/*" among="blog/posts/*"]]
+
+or to display a cloud of tags related to Linux, you could use:
+
+       \[[!pagestats pages="tags/* and not tags/linux" among="tagged(linux)"]]
+
 [[!meta robots="noindex, follow"]]
index 4650627366f5118e8c2eb5518cae8512a46e59c3..5c3b4a8d06b5224aebf6bea2b499069310f60f5f 100644 (file)
@@ -1,8 +1,8 @@
 ikiwiki supports adding "History" links to the top of pages to browse the
-revison history of a page. This is enabled by the `historyurl` setting,
+revision history of a page. This is enabled by the `historyurl` setting,
 which is used to specify the URL to a web interface such as [[ViewVC]]
 (for Subversion) or [[Gitweb]]. In that url, "\[[file]]" is replaced with
 the name of the file to view.
 
-The [[plugins/repolist]] plugin can suppliment this information with
+The [[plugins/repolist]] plugin can supplement this information with
 urls to the underlying repository of the wiki.
index ac093577322a79d67356e8724b7723d6c7a024b1..3976f9adf5a74b504b66efa8478e4d0acc2ebd6e 100644 (file)
@@ -641,7 +641,7 @@ pages, as described in [[ikiwiki/SubPage/LinkingRules]].
 
 Many plugins need to generate html links and add them to a page. This is
 done by using the `htmllink` function. The usual way to call
-`htmlllink` is:
+`htmllink` is:
 
        htmllink($page, $page, $link)
 
@@ -850,7 +850,7 @@ of the page with the rcs's conflict markers on failure.
 Passed a message, user, and ip address. Should commit all staged changes.
 Returns undef on success, and an error message on failure.
 
-Changes can be staged by calls to `rcs_add, `rcs_remove`, and
+Changes can be staged by calls to `rcs_add`, `rcs_remove`, and
 `rcs_rename`.
 
 #### `rcs_add($)`
index 31347a614b9e52f3dcaa8fc0c69b72d5d82183d5..bbe52910693c1bb4379ee2ac3bc7fa3bded2f41f 100644 (file)
@@ -45,3 +45,18 @@ Thanks
 > Yes, ikiwiki does expect you to use your revision control system to check
 > in changes. Otherwise, recentchanges cannot work right, since it uses the
 > commit history from your revision control system. --[[Joey]]
+
+-----
+
+I'm working on an [[rcs]] plugin for CVS, adapted from `svn.pm`, in order to integrate ikiwiki at sites where that's all they've got. What's working so far: web commit (post-commit hook and all), diff, add (under certain conditions), and remove. What's not working: with rcs_add(), iff any of the new page's parent dirs aren't already under CVS control and the post-commit hook is enabled, the browser and ikiwiki stall for several seconds trying to add it, then time out. (If I kill ikiwiki when this is happening, it cvs adds the topmost parent that needed adding; if I wait for timeout, it doesn't. I think.) If I disable the post-commit hook and do the same kind of thing, the page is created and saved.
+
+In case you're lucky enough not to know, cvs adds on directories are weird -- they operate immediately against the repository, unlike file adds:
+
+    $ cvs add randomdir
+    Directory /Users/schmonz/Documents/cvswiki/repository/ikiwiki/randomdir added to the repository
+
+I was able to work out that when I'm seeing this page save misbehavior, my plugin is somewhere inside `system("cvs", "-Q", "add", "$file")`, which was never returning. If I changed it to anything other than cvs it iterated correctly over all the parent dirs which needed to be added to CVS, in the proper order. (cvs add isn't recursive, sadly.)
+
+Can you offer an educated guess what's going wrong here? --[[Schmonz]]
+
+> Got `rcs_recentchanges` working, believe it or not, thanks to [cvsps](http://www.cobite.com/cvsps/). If I can figure out this interaction between the post-commit hook and `cvs add` on directories, the CVS plugin is mostly done. Could it be a locking issue? Where should I be looking? Any suggestions appreciated. --[[Schmonz]]
index 79044ccc66f8ac44efab6cf485929c02a674f1f7..536980ea8e9cd4e44e5e8ad6b98f50473d91c56b 100644 (file)
@@ -72,3 +72,12 @@ It's almost implicit in some of the discussion above but this can be achieved lo
         </TMPL_LOOP><TMPL_VAR TITLE></h1>
 
 This is what I do on my site for example. -- [[Jon]]
+
+> You don't actually need to fork the whole directory, "only" `page.tmpl` -
+> put `templatedir => "/foo/templates"` in your setup file, copy `page.tmpl`
+> to that directory, and modify it there. IkiWiki will look in `templatedir`
+> first, then fall back to its default templates if any are missing from
+> `templatedir`.
+>
+> (Admittedly, `page.tmpl` is the hardest to maintain a fork of, because it
+> tends to change whenever a new plugin is added...) --[[smcv]]
index e4f94174392a0513c6d66a14fd04ad29aa5143b5..fd64074c2a1bda8c924a361aa8c532d7f5af93a8 100644 (file)
@@ -10,4 +10,8 @@ The configuration setting for Mercurial could be something like this:
 > Not that I'm opposed to the idea of a plugin that adds a Raw link
 > --[[Joey]]
 
+>> In [[todo/source_link]], Will does this via the CGI instead of delegating
+>> to gitweb/etc. I think Will's patch is a good approach, and have improved
+>> on it a bit in a git branch.
+
 [[!tag wishlist]]
index c651b0a457ca99e739ef0ae79381d0f40666c165..0fb14bafeae7f2537cfa78a07dd8d373df09a551 100644 (file)
@@ -21,4 +21,6 @@ that we're at the root of a (sub-)hierarchy.
 > 
 > IMHO, what you really want is [[Moving_pages]]. :-) --[[Joey]]
 
+>> This sounds like WONTFIX to me? --[[smcv]]
+
 [[!tag wishlist]]
index 9055c8a13e7fd6812ad32e7c2861e85a3d0f7775..61f311b8c5218e5e7247784d39c3fcc3e10a7865 100644 (file)
@@ -8,4 +8,6 @@ From the [apache documentation](http://httpd.apache.org/docs/2.2/custom-error.ht
 
 > Nice idea, I'll try to find time to add a plugin doing this. --[[Joey]]
 
+>> [[done]] some time ago, as the [[plugins/404]] plugin --[[smcv]]
+
 [[wishlist]]
index 56b2249ea4a892d9e8dcbe63ec365d41c8acb78d..600c6cf7be58c043361d2d62c22222b9b07986e2 100644 (file)
@@ -11,4 +11,12 @@ nice to add:
   srcdir. This would allow the admin to review them, and manually
   add/delete them before they bloat history.
 
+> I'd be inclined to implement that one by writing them to a nominated
+> underlay, I think, rather than having them in the srcdir but not in
+> the VCS. My [[plugins/contrib/album]] plugin could benefit from this
+> functionality, although in that case the photos should probably just
+> stay in the underlay forever (I already use an underlay on my own
+> websites for photos and software releases, which are too big to want
+> them in the VCS permanently.) --[[smcv]]
+
 [[!tag wishlist]]
index 7306b15468c4d0664723c67fa7a9945be476371a..11b5fbcaeb8e41db3ebebf049366b3076c033e66 100644 (file)
@@ -1,5 +1,5 @@
 [[!tag patch patch/core]]
-[[!template id=gitbranch branch=smcv/among author="[[smcv]]"]]
+[[!template id=gitbranch branch=smcv/ready/among author="[[smcv]]"]]
 
 IkiWiki::backlinks returns a form of $backlinks{$page} that has undergone a
 lossy transformation (to get it in the form that page templates want), making
@@ -9,3 +9,5 @@ A commit on my `among` branch splits it into IkiWiki::backlink_pages
 (which returns the keys of $backlinks{$page}, and might be suitable for
 exporting) and IkiWiki::backlinks (which calls backlink_pages, then performs
 the same lossy transformation as before on the result).
+
+[[done]] --[[Joey]]
index 5cf80b0a8ea397248531978a2f11b844ff3f068d..3c39484bc477da6cb9e45e70c2bec24606c8f8a4 100644 (file)
@@ -30,3 +30,6 @@ What's your opinion, Joey? I hope it's also useful for another ikiwiki lovers :)
 > like to have traditional `inline` functionality too.  This would work great if there were a way to change the `do`
 > parameter in the `blogpost` template's form; if I could change it to `datedblog` instead of `blog` then I could hook
 > my datedblog module in nicely, without having to override anything.  What would be the right way to do that? --[[neale]]
+
+> This is basically the same request as
+> [[todo/inline_postform_autotitles]]. --[[smcv]]
diff --git a/doc/todo/generated_po_stuff_not_ignored_by_git.mdwn b/doc/todo/generated_po_stuff_not_ignored_by_git.mdwn
new file mode 100644 (file)
index 0000000..1d24fd3
--- /dev/null
@@ -0,0 +1,7 @@
+[[!template id=gitbranch branch=smcv/gitignore author="[[smcv]]"]]
+[[!tag patch]]
+
+The recent merge of the po branch didn't come with a .gitignore.
+It eventually annoyed me enough to fix it :-) --[[smcv]]
+
+[[done]]
index cb07e5e0c48349e9588a31435e3c3a2053e5d386..65658d7c4291d9a0a8e450d6fcb483ce016e1162 100644 (file)
@@ -3,3 +3,5 @@ and search/sort pages by distance to a given location, as well as
 showing page locations on a map (Google Map, OpenStreetMap, etc). -- [[users/vibrog]]
 
 [[!tag wishlist]]
+
+> [[!cpan Geo::Coordinates::UTM]] would probably be useful. --[[smcv]]
index 336ae38d6c773e16c5264e83c3f8c547c79923bb..457b4788437673e7e7a934f797389c1f9c6914a5 100644 (file)
@@ -1,3 +1,5 @@
+[[!template id=gitbranch branch=smcv/ready/inline-pagenames author="[[smcv]]"]]
+
 A [[!taglink patch]] in my git repository (the inline-pagenames branch) adds
 the following parameter to the [[ikiwiki/directive/inline]] directive:
 
index bdafd0b90f3313a3be9668eaf98eaf9d1118f7de..39713eb5f473a6d4bdffe7bb00e8d820e74c5a06 100644 (file)
@@ -17,6 +17,21 @@ resulting in ascending numeric page titles to be created.
 
 the second patch is actually a one-liner, filtering the title through strftime.
 
+> Something similar was requested in [[todo/more_customisable_titlepage_function]],
+> in which [[Joey]] outlined a similar solution.
+>
+> What's your use-case for not prompting for the title at all? I can see
+> [[madduck]]'s requirement for the title he typed in (say, "foo")
+> being transformed into 2009/07/26/foo or something (I name blog posts
+> like that myself), but I can't quite see the use for *entirely* automatic
+> titles.
+>
+> However, if that's really what you want, I suspect your code could be
+> extended so it also solves madduck's second request on
+> [[todo/more_customisable_titlepage_function]].
+>
+> --[[smcv]]
+
 ### potential user interaction issues
 
 this has two side effects which have to be considered: first, the empty page
index 51b5607465f0c74f1306ca8592ebb49b0988f36f..97fefbafc761ae7b9e163eddd7520c60b67ec223 100644 (file)
@@ -2,7 +2,9 @@ I understand the `IkiWiki::titlepage` function is used to generate filenames fro
 
 I imagine two things: a lookup hash and a template.
 
-Since `IkiWiki::titlepage` basically translates characters, it would be cool to be able to define a lookup hash in the configuration, which would be consulted before falling back to the generic `__xx__` `ord()` representation of a letter. For instance, in German, I might prefer to have 'Ã\83¤' become 'ae' instead of something illegible.
+Since `IkiWiki::titlepage` basically translates characters, it would be cool to be able to define a lookup hash in the configuration, which would be consulted before falling back to the generic `__xx__` `ord()` representation of a letter. For instance, in German, I might prefer to have 'ä' become 'ae' instead of something illegible.
+
+> This is [[todo/unaccent_url_instead_of_encoding]]. --[[smcv]]
 
 Second, maybe a template could be honoured. The template could have a slot `%s` where the calculated title goes, and it could contain `strftime` symbols as well as variables, which get interpolated on use.
 
@@ -10,6 +12,11 @@ Another option would be a function I could define in the setup file, or an exter
 
 -- [[madduck]]
 
+> This somewhat resembles [[todo/inline_postform_autotitles]].
+> Another way to do this, suggested in that todo, would be to
+> pre-fill the title field with YYYY/MM/DD/ using Javascript.
+> --[[smcv]]
+
 I don't think that changing titlepage is a good idea, there are
 compatability problems.
 
@@ -28,4 +35,8 @@ is that having the directive appear in the edit box for a new page could
 confuse the user. The title could be passed on in a hidden field, and
 prepended to the page when it's saved..
 
+--[[Joey]]
+
+> I'll pass on these comments to the two similar todo items. --[[smcv]]
+
 [[wishlist]]
index 1122203944f5542406271cf526cf535f0cee5ee0..bc8bc08097591380e0b5256a27d8c8afb3541f3a 100644 (file)
@@ -12,3 +12,7 @@ the post form and stuck it inside a [[plugins/toggle]].
 logical first step towards doing comment-like things with inlined pages).
 
 -- [[Jon]]
+
+> Perhaps what we need is a `postform` plugin/directive that inline depends
+> on (automatically enables); its preprocess method could automatically be
+> invoked from preprocess_inline when needed. --[[smcv]]
index 099d26665a282e2ab96d0b6837bd548ec501f98f..fd15d6a4224b869a6af4fc325486f42cc9050d65 100644 (file)
@@ -1,5 +1,5 @@
 [[!tag patch plugins/pagestats]]
-[[!template id=gitbranch branch=smcv/among author="[[smcv]]"]]
+[[!template id=gitbranch branch=smcv/ready/among author="[[smcv]]"]]
 
 My `among` branch fixes [[todo/backlinks_result_is_lossy]], then uses that
 to provide pagestats for links from a subset of pages. From the docs included
@@ -25,3 +25,5 @@ I use this on my tag pages on one site, with the following template:
       archive="yes" quick="yes" reverse="yes" timeformat="%x"]]
 
 --[[smcv]]
+
+> [[merged|done]] thanks --[[Joey]] 
index ebe0b50555b591107e8441ed7e0711a2d89c165f..3ccef62fe57542e3603f64ac479c0cbf1e63d759 100644 (file)
@@ -79,7 +79,7 @@ I can think about reducung the size of my wiki source and making it available on
 > 
 > --[[Joey]]
 
-[[!template id=gitbranch branch=smcv/optimize-depends author="[[smcv]]"]]
+[[!template id=gitbranch branch=smcv/ready/optimize-depends author="[[smcv]]"]]
 
 >> I've been looking at optimizing ikiwiki for a site using
 >> [[plugins/contrib/album]] (which produces a lot of pages) and it seems
@@ -98,4 +98,11 @@ I can think about reducung the size of my wiki source and making it available on
 >>>> I haven't actually deleted it), because the "or" operation is now done in
 >>>> the Perl code, rather than by merging pagespecs and translating. --[[smcv]]
 
+[[!template id=gitbranch branch=smcv/ready/remove-pagespec-merge author="[[smcv]]"]]
+
+>>>>> I've now added a patch to the end of that branch that deletes
+>>>>> `pagespec_merge` almost entirely (we do need to keep a copy around, in
+>>>>> ikiwiki-transition, but that copy doesn't have to be optimal or support
+>>>>> future features like [[tracking_bugs_with_dependencies]]). --[[smcv]]
+
 [[!tag wishlist patch patch/core]]
index 9d9ec969713b3778b0581ca5a343471d9efee6c9..ce8c9d1719b74bce453cbad2d1cbaddb4357edc2 100644 (file)
@@ -9,6 +9,29 @@ I just implemented this.  There is one [[patch]] to the default page template, a
 > by loading the index with IkiWiki::loadindex, like [[plugins/goto]] does?
 > --[[smcv]]
 
+[[!template id=gitbranch branch=smcv/ready/getsource
+  author="[[Will]]/[[smcv]]"]]
+
+>> I've applied the patch below in a git branch, fixed my earlier criticism,
+>> and also fixed a couple of other issues I noticed:
+>>
+>> * missing pages could be presented better as a real 404 page
+>> * the default Content-type should probably be UTF-8 since the rest of
+>>   IkiWiki tends to assume that
+>> * emitting attachments (images, etc.) as text/plain isn't going to work :-)
+>>
+>> Any opinions on my branch? I think it's ready for merge, if Joey approves.
+>>
+>> --[[smcv]]
+
+>>> I need a copyright&license statement, so debian/copyright can be updated for
+>>> the plugin, before I can merge this. Otherwise ready. --[[Joey]]
+
+>>> That looks like a nice set of fixes.  One more that might be worthwhile: instead of reading the page source into a var, and then writing it out later, it might be nice to just
+>>>  `print readfile(srcfile(pagesources{$page}));` at the appropriate point. -- [[Will]]
+
+>>>> OK, I've committed that. --[[smcv]]
+
 ----
 
     diff --git a/templates/page.tmpl b/templates/page.tmpl
index 80aaf3c39e2d78ffd6b2f46636251b8b25ccfb8c..a198530fcd03ad8189fd77244cecc841e6291d1c 100644 (file)
@@ -410,6 +410,9 @@ account all comments above (which doesn't mean it is above reproach :) ).  --[[W
 >>>>> then the last definition (baz) takes precedence.
 >>>>> In the process of writing this I think I've come up with a way to change this back the way it was, still using closures. -- [[Will]]
 
+>>> Alternatively, my [[remove-pagespec-merge|should_optimise_pagespecs]]
+>>> branch solves this, in a Gordian knot sort of way :-) --[[smcv]]
+
 >>  Secondly, it seems that there are two types of dependency, and ikiwiki
 >>  currently only handles one of them.  The first type is "Rebuild this
 >>  page when any of these other pages changes" - ikiwiki handles this.
index d74b632bd1c9e6e56362ca0e61cd31c9ddc85e8e..e5ad34335b630f6dbc4d0c65cb2443e28b68b832 100644 (file)
@@ -4,6 +4,21 @@ This works right from a technical point of view, but the URLs will become ugly.
 So I made a patch which unaccent chars: <http://users.itk.ppke.hu/~cstamas/code/ikiwiki/unaccentpagetitlenames/>
 This is a one liner change, but requires a bit of reordering in the code.
 
-[[cstamas]]
+--[[cstamas]]
+
+> This was previously requested in [[todo/more_customisable_titlepage_function]],
+> in which [[Joey]] said "I don't think that changing titlepage is a good idea,
+> there are compatability problems".
+>
+> The problem is that altering titlepage changes the meaning of your wiki,
+> by resolving all wiki links to different page names. That means that:
+>
+> * unaccenting can't be automatic, it has to be a configuration option
+>   (so you don't accidentally get different behaviour by installing
+>   Text::Unaccent)
+> * upgrading Text::Unaccent becomes risky, as I doubt it guarantees to
+>   have stable rules for how to transliterate into ASCII!
+>
+> --[[smcv]]
 
 [[!tag wishlist patch patch/core]]
index 0706859aa526a249b3cbddf1b5337d5458a1075c..5fc24711e4bc7e19f5c09a7e58b4769ce3dd488f 100644 (file)
@@ -1,3 +1,8 @@
-New ikiwiki site at my personal site under /ikiwiki/ . This might move to /wiki/ or be on wiki.k.o depending on if I can import my MediaWiki stuff to it.
+## personal/site info
+
+New ikiwiki site at my web site, blog, kisikew.org home site, for indigenews, and our indigenous-centric wiki (mostly East Coast/Woodlands area). Mediawiki stuff was imported successfully (as noted on this web site).
+
+## ikiwiki branch at github
+
+Maintain my own branch, partly to learn about VCS, git, ikiwiki, Debian packaging, and Perl. I don't recommend anyone pull from it, as I use third-party plugins included on this site that people may not want in a default installation of ikiwiki. This is why I don't push to Joey's -- so it's nothing personal, I just don't want to mess things up for other people, from my mistakes and stumbles.
 
-Thought I'd try it out again and it grew on me.