From: Simon McVittie Date: Fri, 12 Sep 2014 20:45:04 +0000 (+0100) Subject: Merge branch 'ready/perf' X-Git-Tag: 3.20140916~46 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/252804628d7297f756f8587d78a07a61fc00846e?hp=24599e3cc9acf801caa0be6c2428dd86f21b53c3 Merge branch 'ready/perf' --- diff --git a/IkiWiki.pm b/IkiWiki.pm index e5da04a3b..49ac97196 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1819,7 +1819,8 @@ sub loadindex () { open ($in, "<", "$config{wikistatedir}/indexdb") || return; } else { - $config{gettime}=1; # first build + # gettime on first build + $config{gettime}=1 unless defined $config{gettime}; return; } } @@ -2459,6 +2460,19 @@ sub pagespec_match ($$;@) { return $sub->($page, @params); } +# e.g. @pages = sort_pages("title", \@pages, reverse => "yes") +# +# Not exported yet, but could be in future if it is generally useful. +# Note that this signature is not the same as IkiWiki::SortSpec::sort_pages, +# which is "more internal". +sub sort_pages ($$;@) { + my $sort = shift; + my $list = shift; + my %params = @_; + $sort = sortspec_translate($sort, $params{reverse}); + return IkiWiki::SortSpec::sort_pages($sort, @$list); +} + sub pagespec_match_list ($$;@) { my $page=shift; my $pagespec=shift; diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index c0d8f598b..cb83319e6 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -110,11 +110,23 @@ sub decode_cgi_utf8 ($) { } } +sub safe_decode_utf8 ($) { + my $octets = shift; + # call decode_utf8 on >= 5.20 only if it's not already decoded, + # otherwise it balks, on < 5.20, always call it + if ($] < 5.02 || !Encode::is_utf8($octets)) { + return decode_utf8($octets); + } + else { + return $octets; + } +} + sub decode_form_utf8 ($) { if ($] >= 5.01) { my $form = shift; foreach my $f ($form->field) { - my @value=map { decode_utf8($_) } $form->field($f); + my @value=map { safe_decode_utf8($_) } $form->field($f); $form->field(name => $f, value => \@value, force => 1, diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index a0ca9f32e..98ae13810 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -438,6 +438,16 @@ sub editcomment ($$) { $page)); } + # There's no UI to get here, but someone might construct the URL, + # leading to a comment that exists in the repository but isn't + # shown + if (!pagespec_match($page, $config{comments_pagespec}, + location => $page)) { + error(sprintf(gettext( + "comments on page '%s' are not allowed"), + $page)); + } + if (pagespec_match($page, $config{comments_closed_pagespec}, location => $page)) { error(sprintf(gettext( diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index 4b0e5a86d..75b89e476 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -467,6 +467,11 @@ sub git_commit_info ($;$) { sub rcs_find_changes ($) { my $oldrev=shift; + # Note that git log will sometimes show files being added that + # don't exist. Particularly, git merge -s ours can result in a + # merge commit where some files were not really added. + # This is why the code below verifies that the files really + # exist. my @raw_lines = run_or_die('git', 'log', '--pretty=raw', '--raw', '--abbrev=40', '--always', '-c', '--no-renames', , '--reverse', @@ -482,12 +487,16 @@ sub rcs_find_changes ($) { foreach my $i (@{$ci->{details}}) { my $file=$i->{file}; if ($i->{sha1_to} eq $nullsha) { - delete $changed{$file}; - $deleted{$file}=1; + if (! -e "$config{srcdir}/$file") { + delete $changed{$file}; + $deleted{$file}=1; + } } else { - delete $deleted{$file}; - $changed{$file}=1; + if (-e "$config{srcdir}/$file") { + delete $deleted{$file}; + $changed{$file}=1; + } } } } diff --git a/IkiWiki/Plugin/highlight.pm b/IkiWiki/Plugin/highlight.pm index fbe7ddff4..ce919748a 100644 --- a/IkiWiki/Plugin/highlight.pm +++ b/IkiWiki/Plugin/highlight.pm @@ -60,14 +60,22 @@ sub checkconfig () { } if (! exists $config{filetypes_conf}) { - $config{filetypes_conf}= - ($data_dir ? $data_dir->getConfDir() : "/etc/highlight/") - . "filetypes.conf"; + if (! $data_dir ) { + $config{filetypes_conf}= "/etc/highlight/filetypes.conf"; + } elsif ( $data_dir -> can('searchFile') ) { + # 3.18 + + $config{filetypes_conf}= + $data_dir -> searchFile("filetypes.conf"); + } else { + # 3.9 + + $config{filetypes_conf}= + $data_dir -> getConfDir() . "/filetypes.conf"; + } } + # note that this is only used for old versions of highlight + # where $data_dir will not be defined. if (! exists $config{langdefdir}) { - $config{langdefdir}= - ($data_dir ? $data_dir->getLangPath("") - : "/usr/share/highlight/langDefs"); + $config{langdefdir}= "/usr/share/highlight/langDefs"; } if (exists $config{tohighlight} && read_filetypes()) { @@ -147,17 +155,27 @@ sub read_filetypes () { } +sub searchlangdef { + my $lang=shift; + + if ($data_dir) { + return $data_dir->getLangPath($lang . ".lang"); + } else { + return "$config{langdefdir}/$lang.lang"; + } + +} # Given a filename extension, determines the language definition to # use to highlight it. sub ext2langfile ($) { my $ext=shift; - my $langfile="$config{langdefdir}/$ext.lang"; + my $langfile=searchlangdef($ext); return $langfile if exists $highlighters{$langfile}; read_filetypes() unless $filetypes_read; if (exists $ext2lang{$ext}) { - return "$config{langdefdir}/$ext2lang{$ext}.lang"; + return searchlangdef($ext2lang{$ext}); } # If a language only has one common extension, it will not # be listed in filetypes, so check the langfile. diff --git a/IkiWiki/Plugin/trail.pm b/IkiWiki/Plugin/trail.pm index d5fb2b5d6..476db4dcb 100644 --- a/IkiWiki/Plugin/trail.pm +++ b/IkiWiki/Plugin/trail.pm @@ -319,10 +319,9 @@ sub prerender { } if (defined $pagestate{$trail}{trail}{sort}) { - # re-sort - @$members = pagespec_match_list($trail, 'internal(*)', - list => $members, - sort => $pagestate{$trail}{trail}{sort}); + @$members = IkiWiki::sort_pages( + $pagestate{$trail}{trail}{sort}, + $members); } if (IkiWiki::yesno $pagestate{$trail}{trail}{reverse}) { diff --git a/Makefile.PL b/Makefile.PL index c03142aae..ad3e4623c 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -75,7 +75,7 @@ underlay_install: install -d $(DESTDIR)$(PREFIX)/share/ikiwiki for dir in `cd underlays && $(FIND) . -follow -type d`; do \ install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \ - for file in `$(FIND) underlays/$$dir -follow -maxdepth 1 -type f ! -name \\*.full.js ! -name \\*.full.css`; do \ + for file in `$(FIND) underlays/$$dir -follow -maxdepth 1 -type f ! -name jquery.js ! -name jquery-ui.css ! -name jquery-ui.js ! -name jquery.tmpl.js`; do \ cp -pRL $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir 2>/dev/null || \ install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \ done; \ diff --git a/debian/changelog b/debian/changelog index d91342595..59a9e6ba1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,38 @@ +ikiwiki (3.20140912) UNRELEASED; urgency=medium + + * Don't double-decode CGI submissions with Encode.pm >= 2.53, + fixing "Error: Cannot decode string with wide characters". + Thanks, Antoine Beaupré + + -- Simon McVittie Fri, 12 Sep 2014 21:23:58 +0100 + +ikiwiki (3.20140831) unstable; urgency=medium + + * Make --no-gettime work in initial build. Closes: #755075 + + -- Joey Hess Sun, 31 Aug 2014 14:17:24 -0700 + +ikiwiki (3.20140815) unstable; urgency=medium + + * Add google back to openid selector. Apparently this has gotten a stay + of execution until April 2015. (It may continue to work until 2017.) + * highlight: Add compatibility with highlight 3.18, while still supporting + 3.9+. Closes: #757679 + Thanks, David Bremner + * highlight: Add support for multiple language definition directories + Closes: #757680 + Thanks, David Bremner + + -- Joey Hess Fri, 15 Aug 2014 12:58:08 -0400 + +ikiwiki (3.20140613) unstable; urgency=medium + + * only_committed_changes could fail in a git repository merged + with git merge -s ours. + * Remove google from openid selector, per http://xkcd.com/1361/ + + -- Joey Hess Fri, 13 Jun 2014 10:09:10 -0400 + ikiwiki (3.20140227) unstable; urgency=medium * Added useragent config setting. Closes: #737121 diff --git a/debian/control b/debian/control index c06e8fbac..2ab6207e0 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,8 @@ Build-Depends-Indep: dpkg-dev (>= 1.9.0), libxml-simple-perl, libtimedate-perl, libhtml-template-perl, libhtml-scrubber-perl, wdg-html-validator, libhtml-parser-perl, liburi-perl (>= 1.36), perlmagick, po4a (>= 0.34), - libfile-chdir-perl, libyaml-libyaml-perl, python-support + libfile-chdir-perl, libyaml-libyaml-perl, python-support, librpc-xml-perl, + libcgi-session-perl Maintainer: Joey Hess Uploaders: Josh Triplett Standards-Version: 3.9.5 diff --git a/doc/bugs/Error:_no_text_was_copied_in_this_page_--_missing_page_dependencies.mdwn b/doc/bugs/Error:_no_text_was_copied_in_this_page_--_missing_page_dependencies.mdwn index 0082eed4d..0bbf6096f 100644 --- a/doc/bugs/Error:_no_text_was_copied_in_this_page_--_missing_page_dependencies.mdwn +++ b/doc/bugs/Error:_no_text_was_copied_in_this_page_--_missing_page_dependencies.mdwn @@ -2,7 +2,7 @@ That one has bitten me for some time; here is the minimal testcase. There is also an equivalent (I suppose) problem when using another plugin, but I hope it's enough to track it down for this one. - $ tar -xj < [bug-dep_order.tar.bz2](http://schwinge.homeip.net/~thomas/tmp/bug-dep_order.tar.bz2) + $ tar -xj < [bug-dep_order.tar.bz2](http://nic-nac-project.de/~schwinge/ikiwiki/bug-dep_order.tar.bz2) $ cd bug-dep_order/ $ ./render_locally [...] diff --git a/doc/bugs/FormattingHelp_links_to_MarkDown_help_page_regardless_of_page_format.mdwn b/doc/bugs/FormattingHelp_links_to_MarkDown_help_page_regardless_of_page_format.mdwn new file mode 100644 index 000000000..04e7e9078 --- /dev/null +++ b/doc/bugs/FormattingHelp_links_to_MarkDown_help_page_regardless_of_page_format.mdwn @@ -0,0 +1,3 @@ +The `FormattingHelp` link in the edit form of any page points to the same [ikiwiki/formatting](/ikiwiki/formatting) help text for Markdown, regardless of page type (which could be HTML, reStructuredText, etc.) On the wiki I run, this is confusing users. + +What I would like is that either the `FormattingHelp` link changes with page type (requires Javascript, if one is going to change the page type for new pages), or that the [ikiwiki/formatting](/ikiwiki/formatting) page is an index of supported page types with a further link to help text for each one (less user-friendly but likely easier to implement). diff --git a/doc/bugs/Inlining_adds_newlines_which_can_break_markdown.mdwn b/doc/bugs/Inlining_adds_newlines_which_can_break_markdown.mdwn new file mode 100644 index 000000000..eb71994e5 --- /dev/null +++ b/doc/bugs/Inlining_adds_newlines_which_can_break_markdown.mdwn @@ -0,0 +1,43 @@ +I'm trying to put a list of tags in a table, so I carefully make a newline-free taglist.tmpl and then do: + + | \[[!inline pages="link(/category/env)" feeds=no archive=yes sort=title template=taglist]] | + +but there's a line in `inline.pm` that does: + + return "<div class=\"inline\" id=\"$#inline\"></div>\n\n"; + +And the extra newlines break the table. Can they be safely removed? + +> If you want an HTML table, I would suggest using an HTML table, which +> should pass through Markdown without being interpreted further: +> +> +> \[[!inline pages="link(/category/env)" feeds=no archive=yes sort=title template=tagtd]] +>
+> +> where tagtd.tmpl is of the form `your markup here`; or even just +> +> \[[!inline pages="link(/category/env)" feeds=no archive=yes sort=title template=tagtable]] +> +> where tagtable.tmpl looks like +> +> +> +> +> +> +> +> +>
your tag here
+>
+> +> I don't think you're deriving much benefit from Markdown's table syntax +> if you have to mix it with HTML::Template and ikiwiki directives, +> and be pathologically careful with whitespace. "Right tool for the job" +> and all that :-) +> +> When I edited this page I was amused to find that you used HTML, +> not Markdown, as its format. It seems oddly appropriate to my answer, but +> I've converted it to Markdown and adjusted the formatting, for easier +> commenting. +> --[[smcv]] diff --git a/doc/bugs/Please_update_highlight_plugin_for_highlight_3.18.mdwn b/doc/bugs/Please_update_highlight_plugin_for_highlight_3.18.mdwn new file mode 100644 index 000000000..e98f66881 --- /dev/null +++ b/doc/bugs/Please_update_highlight_plugin_for_highlight_3.18.mdwn @@ -0,0 +1,12 @@ +I have put two patches + + git://pivot.cs.unb.ca/ikiwiki.git -b master + +The first works around a highlight API change, and the second supports the new(ish) +feature of having multiple directories with language defintions for highlight. + +The corresponding version of libhighlight-perl is in Debian experimental if you want to test. + +[[!tag patch]] + +> [[done]] thanks --[[Joey]] diff --git a/doc/bugs/__91____91____33__inline_postform__61__no__93____93___doesn__39__t_disable_it.mdwn b/doc/bugs/__91____91____33__inline_postform__61__no__93____93___doesn__39__t_disable_it.mdwn index 70deda2ab..7e7548657 100644 --- a/doc/bugs/__91____91____33__inline_postform__61__no__93____93___doesn__39__t_disable_it.mdwn +++ b/doc/bugs/__91____91____33__inline_postform__61__no__93____93___doesn__39__t_disable_it.mdwn @@ -1,3 +1,8 @@ +[[!tag patch users/smcv/ready]] +[[!template id=gitbranch branch=smcv/ready/postform-no +author="[[Simon McVittie|smcv]]" +browse=http://git.pseudorandom.co.uk/smcv/ikiwiki.git/shortlog/refs/heads/ready/postform-no]] + The [[ikiwiki/directive/inline]] directive generates a form if it has either rootpage, or postform with a "yes-like" value. This means that @@ -9,4 +14,10 @@ mentioning rootpage there is useless). See also [[forum/How_to_disable_"Add_a_new_post_titled:"_submission_form?]]. +My `ready/postform-no` branch also contains a trivial regression test for +`inline`. So far the only thing it really tests is that this bug was fixed, +not the actual inlining of pages, but it's a start. + --[[smcv]] + +>> this looks simple, straightforward and good to me --[[chrysn]] diff --git a/doc/bugs/can__39__t_upload_a_simple_png_image:_prohibited_by_allowed__95__attachments___40__file_MIME_type_is_application__47__octet-stream....mdwn b/doc/bugs/can__39__t_upload_a_simple_png_image:_prohibited_by_allowed__95__attachments___40__file_MIME_type_is_application__47__octet-stream....mdwn index b55605245..627b2c827 100644 --- a/doc/bugs/can__39__t_upload_a_simple_png_image:_prohibited_by_allowed__95__attachments___40__file_MIME_type_is_application__47__octet-stream....mdwn +++ b/doc/bugs/can__39__t_upload_a_simple_png_image:_prohibited_by_allowed__95__attachments___40__file_MIME_type_is_application__47__octet-stream....mdwn @@ -56,19 +56,36 @@ Weird... --[[anarcat]] > > > > --[[anarcat]] +> > > [[!template id=gitbranch branch=ready/more-magic author="[[smcv]]" browse=http://git.pseudorandom.co.uk/smcv/ikiwiki.git/commitdiff/ready/more-magic]] > > > If the regex match isn't necessary and it's just about deleting the -> > > parameters, I think I'd prefer something like +> > > parameters, I think I'd prefer > > > > > > if (! defined $mimetype) { > > > ... > > > } > > > $mimetype =~ s/;.*//; > > > -> > > but I'd be hesitant to do that without knowing why Joey implemented it -> > > the way it is. If it's about catching a result from file(1) that +> > > as done in my `ready/more-magic` branch. +> > > +> > > I'm a little hesitant to do that without knowing why Joey implemented it +> > > the way it is, but as far as I can tell it's just an oversight. +> > > +> > > Or, if the result of the s/// is checked for a reason, and it's +> > > about catching a result from file(1) that > > > is not, in fact, a MIME type at all (empty string or error message > > > or something), maybe something more like this? > > > > > > if (! defined $mimetype || $mimetype !~ s{[-\w]+/[-\w]+(?:;.*)?}{}) > > > > > > (or whatever the allowed characters in MIME types are). --[[smcv]] + +> > > > I don't mind either way, but i feel this should be fixed for the next release, as I need to reapply this patch at every upgrade now. -- [[anarcat]] + +> > > > > This is still a problem in 3.20140831. -- [[anarcat]] + +> > > > > > I still don't think appending a semicolon is the right answer: +> > > > > > at best it's equivalent to what I suggested, and at worst it's +> > > > > > disabling a check that does have some reason behind it. +> > > > > > I've turned the version I suggested above into a proper branch. +> > > > > > Review by someone who can commit to ikiwiki.git would be appreciated. +> > > > > > --[[smcv]] diff --git a/doc/bugs/conditional_preprocess_during_scan.mdwn b/doc/bugs/conditional_preprocess_during_scan.mdwn index 1ba142331..739be8286 100644 --- a/doc/bugs/conditional_preprocess_during_scan.mdwn +++ b/doc/bugs/conditional_preprocess_during_scan.mdwn @@ -55,3 +55,58 @@ reprocessed is done so in the same conditions as the original call. >> with vicious conditional dependency circles that would break/unbreak >> depending on which pass we are in. And I believe this is an intrinsic >> limitation of the system, which cannot be solved at all. + +>>> One way forward that I can think of for this issue is to +>>> have a way to tell `\[[!if]]` which answer it should assume for +>>> scanning purposes, so it would assume that answer when running +>>> in the scan phase, and really evaluate the pagespec when running +>>> in the render phase. For instance: +>>> +>>> \[[!if test="enabled(foo)" scan_assume=yes then=""" +>>> \[[!foo]] +>>> """]] +>>> +>>> could maybe scan \[[!foo]] unconditionally. +>>> +>>> This makes me wonder whether `\[[!if]]` was too general: by having +>>> the full generality of pagespecs, it reduces its possible uses to +>>> "those contexts where pagespecs work". +>>> +>>> Another possibility might be to have "complex" pagespecs and sort +>>> orders (those whose correct answer requires scanning to have completed, +>>> like `link()` and sorting by `meta(title)`) throw an error when used in +>>> the scan phase, but simple pagespecs like `enabled()` and `glob()`, and +>>> simple sort orders like `title` and `path`, could continue to work? +>>> My `wip-too-soon` work-in-progress branch is heading in this direction, +>>> although it currently makes `pagespec_match` fail completely and does +>>> not even allow "simple" pagespecs and sort orders. +>>> +>>> At the moment, if a pagespec cannot be evaluated, `\[[!if]]` will +>>> produce neither the `then` clause nor the `else` clause. This could +>>> get pretty confusing if it is run during the scan phase and produces +>>> an error, then run during the render phase and succeeds: if you had, +>>> say, +>>> +>>> \[[!if run_during_scan=1 test="link(foo)" then=""" +>>> there is a link to foo +>>> \[[!tag there_is_a_link_to_foo]] +>>> """ else=""" +>>> there is no link to foo +>>> \[[!tag there_is_no_link_to_foo]] +>>> """]] +>>> +>>> then the resulting page would contain one of the snippets of text, +>>> but its metadata would contain neither of the tags. Perhaps the plugin +>>> would have to remember that it failed during the scan phase, so that +>>> it could warn about the failure during the render phase instead of, +>>> or in addition to, producing its normal output? +>>> +>>> Of the conditional-specific tests, `included()` and `destpage(glob)` +>>> can never match during scan. +>>> +>>> Does anyone actually use `\[[!if]]` in ways that they would want to +>>> be active during scan, other than an `enabled(foo)` test? +>>> I'm increasingly tempted to add `\[[!ifenabled foo]]` to solve +>>> that single case, and call that a solution to this bug... +>>> +>>> --[[smcv]] diff --git a/doc/bugs/cutpaste.pm:_missing_filter_call.mdwn b/doc/bugs/cutpaste.pm:_missing_filter_call.mdwn index 4b22fd06c..de4296000 100644 --- a/doc/bugs/cutpaste.pm:_missing_filter_call.mdwn +++ b/doc/bugs/cutpaste.pm:_missing_filter_call.mdwn @@ -1,7 +1,7 @@ Consider this: - $ wget http://schwinge.homeip.net/~thomas/tmp/cutpaste_filter.tar.bz2 - $ wget http://schwinge.homeip.net/~thomas/tmp/cutpaste_filter.patch + $ wget http://nic-nac-project.de/~schwinge/ikiwiki/cutpaste_filter.tar.bz2 + $ wget http://nic-nac-project.de/~schwinge/ikiwiki/0001-cutpaste.pm-missing-filter-call.patch $ tar -xj < cutpaste_filter.tar.bz2 $ cd cutpaste_filter/ diff --git a/doc/bugs/debwiki_shortcut_creates_buggy_URLs_to_subpages.mdwn b/doc/bugs/debwiki_shortcut_creates_buggy_URLs_to_subpages.mdwn new file mode 100644 index 000000000..f83f960ce --- /dev/null +++ b/doc/bugs/debwiki_shortcut_creates_buggy_URLs_to_subpages.mdwn @@ -0,0 +1,5 @@ +E.g. [[!debwiki Derivatives/Guidelines]]. + +Maybe we should use `%S` instead of `%s` in the shortcut definition? + +> seems reasonable, [[done]] --[[smcv]] diff --git a/doc/bugs/editing_gitbranch_template_is_really_slow.mdwn b/doc/bugs/editing_gitbranch_template_is_really_slow.mdwn index d8af150c1..c7d0ffbe2 100644 --- a/doc/bugs/editing_gitbranch_template_is_really_slow.mdwn +++ b/doc/bugs/editing_gitbranch_template_is_really_slow.mdwn @@ -29,3 +29,37 @@ of the problem is that it evaluates the pagespec `backlink(plugins/goodstuff)` up to a million times, with various pages and locations. --[[smcv]] + +> [[!template id=gitbranch branch=smcv/ready/perf +author="[[Simon McVittie|smcv]]" +browse=http://git.pseudorandom.co.uk/smcv/ikiwiki.git/shortlog/refs/heads/ready/perf]] +> [[!tag patch users/smcv/ready]] +> +> Previously, if a page like `plugins/trail` contained a conditional like +> +> \[[!if test="backlink(plugins/goodstuff)" all=no]] +> +> (which it gets via `templates/gitbranch`), then the +> [[plugins/conditional]] plugin would give `plugins/trail` a dependency on +> `(backlink(plugins/goodstuff)) and plugins/trail`. This dependency is +> useless: that pagespec can never match any page other than +> `plugins/trail`, but if `plugins/trail` has been modified or deleted, +> then it's going to be rendered or deleted *anyway*, so there's no point +> in spending time evaluating match_backlink for it. +> +> Conversely, the influences from the result were not taken into account, +> so `plugins/trail` did not have the +> `{ "plugins/goodstuff" => $DEPEND_LINKS }` dependency that it should. +> +> We should invert that, depending on the influences but not on the test. +> +> This is at least an order of magnitude faster: when I edit the docwiki +> as described above, a refresh takes 37s with nytprof overhead, compared +> with 458s with nytprof overhead before this change. Without nytprof, +> that refresh takes 14s, which is faster than the 24s rebuild again. +> I didn't record how long the refresh took without nytprof before this +> change, but it was something like 200s. +> +> `bestlink` is still the single most expensive function in this refresh +> at ~ 9.5s, with `match_glob` at ~ 5.2s as the runner-up. +> --[[smcv]] diff --git a/doc/bugs/enabling_or_disabling_plugin_x_does_not_rebuild_pages_that_use_enabled__40__x__41__.mdwn b/doc/bugs/enabling_or_disabling_plugin_x_does_not_rebuild_pages_that_use_enabled__40__x__41__.mdwn new file mode 100644 index 000000000..4b4adb2c6 --- /dev/null +++ b/doc/bugs/enabling_or_disabling_plugin_x_does_not_rebuild_pages_that_use_enabled__40__x__41__.mdwn @@ -0,0 +1,11 @@ +If you have a page like + + \[[!if test="enabled(smileys)" then=":-P"]] + +then enabling or disabling the smileys plugin will not rebuild it. + +Unfortunately, I can't think of a good way to solve this without +introducing a special case for `enabled()` in Render.pm, either a +new dependency type `"enabled(smileys)" => $DEPENDS_ENABLED` +or a special case that treats `"enabled(smileys)" => $DEPENDS_PRESENCE` +differently. --[[smcv]] diff --git a/doc/bugs/error_handlers_with_gettext_can_clobber___36____64__.mdwn b/doc/bugs/error_handlers_with_gettext_can_clobber___36____64__.mdwn index 00656c1f0..719c1ef25 100644 --- a/doc/bugs/error_handlers_with_gettext_can_clobber___36____64__.mdwn +++ b/doc/bugs/error_handlers_with_gettext_can_clobber___36____64__.mdwn @@ -25,3 +25,5 @@ for fixing this would be to depend on something like Try::Tiny, which is already indirectly recommended by ikiwiki, because [[!cpan RPC::XML]], [[!cpan XML::Feed]], etc., depend on it. --[[smcv]] + +[[fixed in 3.20140227|done]] --s diff --git a/doc/bugs/garbled_non-ascii_characters_in_body_in_web_interface.mdwn b/doc/bugs/garbled_non-ascii_characters_in_body_in_web_interface.mdwn new file mode 100644 index 000000000..657b86baa --- /dev/null +++ b/doc/bugs/garbled_non-ascii_characters_in_body_in_web_interface.mdwn @@ -0,0 +1,126 @@ +since my latest jessie upgrade here, charsets are all broken when editing a page. the page i'm trying to edit is [this wishlist](http://anarc.at/wishlist/), and it used to work fine. now, instead of: + +`Voici des choses que vous pouvez m'acheter si vous êtes le Père Nowel (yeah right):` + +... as we see in the rendered body right now, when i edit the page i see: + +`Voici des choses que vous pouvez m'acheter si vous �tes le P�re Nowel (yeah right):` + +... a typical double-encoding nightmare. The actual binary data is this for the word "Père" according to `hd`: + +~~~~ +anarcat@marcos:ikiwiki$ echo "Père" | hd +00000000 50 c3 a8 72 65 0a |P..re.| +00000006 +anarcat@marcos:ikiwiki$ echo "P�re" | hd +00000000 50 ef bf bd 72 65 0a |P...re.| +00000007 +~~~~ + +> I don't know what that is, but it isn't the usual double-UTF-8 encoding: +> +> >>> u'è'.encode('utf-8') +> '\xc3\xa8' +> >>> u'è'.encode('utf-8').decode('latin-1').encode('utf-8') +> '\xc3\x83\xc2\xa8' +> +> A packet capture of the incorrect HTTP request/response headers and body +> might be enlightening? --[[smcv]] +> +> > Here are the headers according to chromium: +> > +> > ~~~~ +> > GET /ikiwiki.cgi?do=edit&page=wishlist HTTP/1.1 +> > Host: anarc.at +> > Connection: keep-alive +> > Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 +> > User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36 +> > Referer: http://anarc.at/wishlist/ +> > Accept-Encoding: gzip,deflate,sdch +> > Accept-Language: fr,en-US;q=0.8,en;q=0.6 +> > Cookie: openid_provider=openid; ikiwiki_session_anarcat=XXXXXXXXXXXXXXXXXXXXXXX +> > +> > HTTP/1.1 200 OK +> > Date: Mon, 08 Sep 2014 21:22:24 GMT +> > Server: Apache/2.4.10 (Debian) +> > Set-Cookie: ikiwiki_session_anarcat=XXXXXXXXXXXXXXXXXXXXXXX; path=/; HttpOnly +> > Vary: Accept-Encoding +> > Content-Encoding: gzip +> > Content-Length: 4093 +> > Keep-Alive: timeout=5, max=100 +> > Connection: Keep-Alive +> > Content-Type: text/html; charset=utf-8 +> > ~~~~ +> > +> > ... which seem fairly normal... getting more data than this is a little inconvenient since the data is gzip-encoded and i'm kind of lazy extracting that from the stream. Chromium does seem to auto-detect it as utf8 according to the menus however... not sure what's going on here. I would focus on the following error however, since it's clearly emanating from the CGI... --[[anarcat]] + +Clicking on the Cancel button yields the following warning: + +~~~~ +Error: Cannot decode string with wide characters at /usr/lib/x86_64-linux-gnu/perl/5.20/Encode.pm line 215. +~~~~ + +> Looks as though you might be able to get a Python-style backtrace for this +> by setting `$Carp::Verbose = 1`. +> +> The error is that we're taking some string (which string? only a backtrace +> would tell you) that is already flagged as Unicode, and trying to decode +> it from byte-blob to Unicode again, analogous to this Python: +> +> some_bytes.decode('utf-8').decode('utf-8') +> +> --[[smcv]] +> > +> > I couldn't figure out where to set that Carp thing - it doesn't work simply by setting it in /usr/bin/ikiwiki - so i am not sure how to use this. However, with some debugging code in Encode.pm, i was able to find a case of double-encoding - in the left menu, for example, which is the source of the Encode.pm crash. +> > +> > It seems that some unicode semantics changed in Perl 5.20, or more precisely, in Encode.pm 2.53, according to [this](https://code.activestate.com/lists/perl-unicode/3314/). 5.20 does have significant Unicode changes, but I am not sure they are related (see [perldelta](https://metacpan.org/pod/distribution/perl/pod/perldelta.pod)). Doing more archeology, it seems that Encode.pm is indeed where the problem started, all the way back in [commit 8005a82](https://github.com/dankogai/p5-encode/commit/8005a82d8aa83024d72b14e66d9eb97d82029eeb#diff-f3330aa405ffb7e3fec2395c1fc953ac) (august 2013), taken from [pull request #11](https://github.com/dankogai/p5-encode/pull/11) which expressively forbids double-decoding, in effect failing like python does in the above example you gave (Perl used to silently succeed instead, a rather big change if you ask me). +> > +> > So stepping back, it seems that this would be a bug in Ikiwiki. It could be in any of those places: +> > +> > ~~~~ +> > anarcat@marcos:ikiwiki$ grep -r decode_utf8 IkiWiki* | wc -l +> > 31 +> > ~~~~ +> > +> > Now the fun part is to determine which one should be turned off... or should we duplicate the logic that was removed in decode_utf8, or make a safe_decode_utf8 for ourselves? --[[anarcat]] + +The apache logs yield: + +~~~~ +[Mon Sep 08 16:17:43.995827 2014] [cgi:error] [pid 2609] [client 192.168.0.3:47445] AH01215: Died at /usr/share/perl5/IkiWiki/CGI.pm line 467., referer: http://anarc.at/ikiwiki.cgi?do=edit&page=wishlist +~~~~ + +Interestingly enough, I can't reproduce the bug here (at least in this page). Also, editing the page through git works fine. + +I had put ikiwiki on hold during the last upgrade, so it was upgraded separately. The bug happens both with 3.20140613 and 3.20140831. The major thing that happened today is the upgrade from perl 5.18 to 5.20. Here's the output of `egrep '[0-9] (remove|purge|install|upgrade)' /var/log/dpkg.log | pastebinit -b paste.debian.net` to give an idea of what was upgraded today: + +http://paste.debian.net/plain/119944 + +This is a major bug which should probably be fixed before jessie, yet i can't seem to find a severity statement in reportbug that would justify blocking the release based on this - unless we consider non-english speakers as "most" users (i don't know the demographics well enough). It certainly makes ikiwiki completely unusable for my users that operate on the web interface in french... --[[anarcat]] + +Note that on this one page, i can't even get the textarea to display and i immediately get `Error: Cannot decode string with wide characters at /usr/lib/x86_64-linux-gnu/perl/5.20/Encode.pm line 215`: http://anarc.at/ikiwiki.cgi?do=edit&page=hardware%2Fserver%2Fmarcos. + +Also note that this is the same as [[forum/"Error: cannot decode string with wide characters" on Mageia Linux x86-64 Cauldron]], I believe. The backtrace I get here is: + +~~~~ +Error: Cannot decode string with wide characters at /usr/lib/x86_64-linux-gnu/perl/5.20/Encode.pm line 215. Encode::decode_utf8("**Menu**\x{d}\x{a}\x{d}\x{a} * [[\x{fffd} propos|index]]\x{d}\x{a} * [[Logiciels|software]]"...) +called at /usr/share/perl5/IkiWiki/CGI.pm line 117 IkiWiki::decode_form_utf8(CGI::FormBuilder=HASH(0x2ad63b8)) +called at /usr/share/perl5/IkiWiki/Plugin/editpage.pm line 90 IkiWiki::cgi_editpage(CGI=HASH(0xd514f8), CGI::Session=HASH(0x27797e0)) +called at /usr/share/perl5/IkiWiki/CGI.pm line 443 IkiWiki::__ANON__(CODE(0xfaa460)) +called at /usr/share/perl5/IkiWiki.pm line 2101 IkiWiki::run_hooks("sessioncgi", CODE(0x2520138)) +called at /usr/share/perl5/IkiWiki/CGI.pm line 443 IkiWiki::cgi() +called at /usr/bin/ikiwiki line 192 eval {...} +called at /usr/bin/ikiwiki line 192 IkiWiki::main() +called at /usr/bin/ikiwiki line 231 +~~~~ + +so this would explain the error on cancel, but doesn't explain the weird encoding i get when editing the page... ... + +... and that leads me to this crazy patch which fixes all the above issue, by avoiding double-decoding... go figure that shit out... + +[[!template id=gitbranch branch=anarcat/dev/safe_unicode author="[[anarcat]]"]] + +> [[Looks good to me|users/smcv/ready]] although I'm not sure how valuable +> the `$] < 5.02 || ` test is - I'd be tempted to just call `is_utf8`. --[[smcv]] + +>> [[merged|done]] --[[smcv]] diff --git a/doc/bugs/image_rescaling_distorts_with_small_pictures.mdwn b/doc/bugs/image_rescaling_distorts_with_small_pictures.mdwn index c535f88a4..6425c1ece 100644 --- a/doc/bugs/image_rescaling_distorts_with_small_pictures.mdwn +++ b/doc/bugs/image_rescaling_distorts_with_small_pictures.mdwn @@ -1 +1,49 @@ If you use the rescaling feature of the directive [[ikiwiki/directive/img/]] with a smaller image it will distort. E.g. an image with 150x250 rescaled into size=200x200. --bastla + +> More specifically: `img` normally preserves aspect ratio: +> `size=200x200` normally means "as large as possible, keeping +> the width 200px or less, the height 200px or less, and the +> aspect ratio correct". So a 4:3 image with `size=200x200` +> would actually come out 200px wide and 150px tall. +> +> However, when (desired width is specified) && (desired height is specified) +> && ((width > desired width) || (height > desired height)), +> it uses exactly the desired size, without preserving aspect ratio. +> --smcv + +>> [[!template id=gitbranch branch=chrysn/imgforpdf-and-more author="[[chrysn]]"]] +>> +>> [[!tag patch]] +>> +>> i've implemented a fix for this along with a unit test. +>> +>> the patch branch is based on the imgforpdf branch +>> ([[bugs/svg and pdf conversion fails]]), because it would not cleanly merge. +>> the branch also enhances on how images are handled in preview, falling back +>> to data: urls if the image has not been rendered in a saved version. please +>> review. --[[chrysn]] + +>>> Mostly [[looks good to me|users/smcv/ready]]. +>>> +>>> Minor things, which wouldn't stop me merging it if I could: +>>> +>>> * `$imgdatalink = "data:image/".$im->Get("magick").";base64,".encode_base64($blob[0]);`: +>>> is the ImageMagick file type always valid as the second part of +>>> a MIME type? +>>> * In this code: +>>> +>>> +open (my $outhtmlfd, "<", "$outpath.html"); +>>> +local $/=undef; +>>> +my $outhtml = <$outhtmlfd>; +>>> +close $outhtmlfd; +>>> +>>> no block is closed, so the "local" is ineffective, so the `<>` operator +>>> remains in read-entire-file mode afterwards. To avoid odd side-effects, +>>> I would suggest using `readfile()` like `t/trail.t` does. +>>> +>>> [[!template id=gitbranch branch=smcv/ready/imgforpdf-and-more author="[[chrysn]], [[smcv]]" + browse=http://git.pseudorandom.co.uk/smcv/ikiwiki.git/shortlog/refs/heads/ready/imgforpdf-and-more]] +>>> I've used `readfile()` (but not done anything about the ImageMagick file type) +>>> in my copy of the branch. +>>> +>>> --[[smcv]] diff --git a/doc/bugs/linkmap_displays_underscore_escapes.mdwn b/doc/bugs/linkmap_displays_underscore_escapes.mdwn index 66bffc159..14164d076 100644 --- a/doc/bugs/linkmap_displays_underscore_escapes.mdwn +++ b/doc/bugs/linkmap_displays_underscore_escapes.mdwn @@ -17,5 +17,19 @@ the attached [[!taglink patch]] fixes this; from its commit message: the output will look much better (at least in my wikis) with the "[[bugs/pagetitle function does not respect meta titles]]" issue fixed. +> [[Looks good to me|users/smcv/ready]]. +> +> I don't think it's correct for `pagetitle()` to output `\[[!meta title]]` +> though, as discussed on the linked bug: it appears in an assortment of +> contexts where the full formal title of the page seems inappropriate. +> If you want linkmap to use `\[[!meta title]]`, I think it would be +> better to give it a `show` parameter, like `\[[!map]]` has? +> --[[smcv]] + +>> sounds good; i'll have a look at it the next time i touch the linkmap +>> plugin. the patch at hand would be a starting point for that. --[[chrysn]] + the patch is stored in [[the patch.pl]] as created by git-format-patch, and can be pulled from the abovementioned branch. + +> update 2014-06-29: branch still merges cleanly and works. --[[chrysn]] diff --git a/doc/bugs/listdirectives_doesn__39__t_register_a_link.mdwn b/doc/bugs/listdirectives_doesn__39__t_register_a_link.mdwn index b462948eb..ad52d780a 100644 --- a/doc/bugs/listdirectives_doesn__39__t_register_a_link.mdwn +++ b/doc/bugs/listdirectives_doesn__39__t_register_a_link.mdwn @@ -94,3 +94,21 @@ The [[ikiwiki/directive/listdirectives]]` directive doesn't register a link betw >>> "add_reachable". On the other hand, maybe that's too computationally >>> intensive to actually do; I haven't tried it. >>> --[[smcv]] +>>>> +>>>> (I'll interpet Joeys silence as a good sign ;-). Is there a difference between "link to it" and "path to it"? If we assume autoindex produces bonafide "first class" links there shouldn't be one!? +>>>> +>>>> So far your idea sounds great, says me without any knowledge of the source. I'll try to grok it. Is there a medium for silly questions, a wiki seems not the right fit for that? -- [[holger]] +>>>>> Yes, there *has* to be a difference between a first class wikilink +>>>>> and the thing to which `map` and `inline` can contribute. +>>>>> `map` and `inline` use a pagespec to decide what they include, +>>>>> and pagespecs can't be evaluated and get a correct answer until the +>>>>> set of links has been collected, because their results often depend +>>>>> on the set of links. Otherwise, suppose you had a page `foo` whose only +>>>>> contents were this: +>>>>> +>>>>> \[[!inline pages="!backlink(foo)"]] +>>>>> +>>>>> If `inline` generated links, it would inline exactly those pages that +>>>>> it doesn't inline. That's never going to end well :-) --[[smcv]] +>>>>>> We have to differentiate between what users of ikiwiki consider first class links and what internally is happening. For the user any link contributing to the structured access tree is first class. The code on the other hand has to differentiate between the static links, then generated links, then orphan links. Three "passes", even your proposed solution could be seen as adding another pass since the orphan plugin has to run after all the plugins generating (first class user) links. -- [[holger]] + diff --git a/doc/bugs/notifyemail_fails_with_some_openid_providers.mdwn b/doc/bugs/notifyemail_fails_with_some_openid_providers.mdwn index 90e2c7900..dd5016619 100644 --- a/doc/bugs/notifyemail_fails_with_some_openid_providers.mdwn +++ b/doc/bugs/notifyemail_fails_with_some_openid_providers.mdwn @@ -65,3 +65,27 @@ It would probably be better to add a comment on the field as indicated above, bu Any other ideas? --[[anarcat]] > Note: it seems that my email *is* given by my OpenID provider, no idea why this is not working, but the fix proposed in my branch works. --[[anarcat]] + +>> Note: this is one of two patches i need to apply at every upgrade. The other being [[can__39__t_upload_a_simple_png_image:_prohibited_by_allowed__95__attachments___40__file_MIME_type_is_application__47__octet-stream...]]. --[[anarcat]] + +>>> Is there any sort of check that the owner of the given email address +>>> wants to receive email from us, or way for the owner of that email +>>> address to stop getting the emails? +>>> +>>> With passwordauth, if someone maliciously subscribes my email +>>> address to high-traffic pages or something (by using it as the +>>> email address of their wiki login), I can at least use +>>> password-recovery to hijack their account and unsubscribe myself. +>>> If they're signing in with an OpenID not associated with my +>>> email address and then changing the email address in the userdb +>>> to point to me, I don't think I can do that. +>>> +>>> With OpenID, I think we're just trusting that the OpenID provider +>>> wouldn't give us an unverified email address, which also seems +>>> a little unwise. +>>> +>>> It might be better to give ikiwiki a concept of verifying an +>>> email address (the usual send-magic-token flow) and only be +>>> willing to send notifications to a verified address? +>>> +>>> --[[smcv]] diff --git a/doc/bugs/openid_login_fails_wirth_Could_not_determine_ID_provider_from_URL.mdwn b/doc/bugs/openid_login_fails_wirth_Could_not_determine_ID_provider_from_URL.mdwn new file mode 100644 index 000000000..073c10d14 --- /dev/null +++ b/doc/bugs/openid_login_fails_wirth_Could_not_determine_ID_provider_from_URL.mdwn @@ -0,0 +1,200 @@ +On some ikiwikis that I run, I get the following error on OpenID logins: + + no_identity_server: Could not determine ID provider from URL. + +> Is this fixed now that [[!debbug 738493]] has been fixed? --[[smcv]] + +> > No, it isn't. I still get: `no_identity_server: Could not determine ID provider from URL.` from the latest ikiwiki in jessie (3.20140831), with liblwpx-paranoidagent-perl 1.10-3. Debugging tells me it's still related to the `500 Can't verify SSL peers without knowing which Certificate Authorities to trust` error, so probably because `Mozilla::CA` is not packaged ([[!debbug 702124]]). I still had to apply the patch to disable SSL verification at the end of this file. However, setting `$ENV{PERL_LWP_SSL_CA_PATH} = '/etc/ssl/certs';` seems to work now, so the following dumb patch works: +> > +> > ~~~~ +> > --- /usr/bin/ikiwiki.orig 2014-09-08 15:48:35.715868902 -0400 +> > +++ /usr/bin/ikiwiki 2014-09-08 15:50:29.666779878 -0400 +> > @@ -225,4 +225,5 @@ +> > } +> > } +> > +> > +$ENV{PERL_LWP_SSL_CA_PATH} = '/etc/ssl/certs'; +> > main; +> > ~~~~ +> > +> > may not be the best place to fiddle around with this, but then again it makes sense that it applies to the whole program. it should probably be reported upstream as well. also in my git repo. -- [[anarcat]] +> > +> > > This seems Debian-specific. I would be inclined to consider this to be +> > > a packaging/system-integration (i.e. non-upstream) bug in +> > > `liblwpx-paranoidagent-perl` rather than an upstream bug in IkiWiki; +> > > it certainly seems inappropriate to put this Debian-specific path +> > > in upstream IkiWiki. If it can't be fixed in LWPX::ParanoidAgent for +> > > whatever reason, applying it via some sort of sed in ikiwiki's +> > > `debian/rules` might be more reasonable? --[[smcv]] +> > > +> > > > by "upstream", i did mean `liblwpx-paranoidagent-perl`. so yeah, maybe this should be punted back into that package's court again. :( --[[anarcat]] +> > > > +> > > > done, by bumping the severity of [[!debbug 744404]] to release-criticial. --[[anarcat]] +> > > > +> > > > > ooh cool, the bug was fixed already with an upload, so this should probably be considered [[done]] at this point, even without the patch below! great! -- [[anarcat]] + +[[!template id=gitbranch branch=anarcat/dev/ssl_ca_path author="[[anarcat]]"]] + +I seem recall having that error before, and fixing it, but it always seems to come back and I forget how to fix it. So I'll just open this bug and document it if i can figure it out... -- [[users/anarcat]] + +The Perl module manual says: + +> "no_identity_server" +> (CV) Tried to do discovery on a URL that does not seem to have any providers at all. + +Yet on the server side, I see no request coming in on the OpenID provider... + +Adding debugging helps in figuring out wtf is going on: + +~~~~ +anarcat@marcos:~$ diff -u ~/src/ikiwiki/IkiWiki/Plugin/openid.pm /usr/share/perl5/IkiWiki/Plugin/openid.pm +--- /home/anarcat/src/ikiwiki/IkiWiki/Plugin/openid.pm 2014-02-03 20:21:09.502878631 -0500 ++++ /usr/share/perl5/IkiWiki/Plugin/openid.pm 2014-04-13 11:45:25.413297420 -0400 +@@ -257,6 +256,7 @@ + return Net::OpenID::Consumer->new( + ua => $ua, + args => $q, ++ debug => 1, + consumer_secret => sub { return shift()+$secret }, + required_root => auto_upgrade_https($q, $cgiurl), + ); +~~~~ + +In my case, I see: + + +~~~~ +[Sun Apr 13 11:45:35.796531 2014] [cgi:error] [pid 7299] [client 162.223.3.24:39547] AH01215: [DEBUG Net::OpenID::Consumer] Cache MISS for https://id.koumbit.net/anarcat, referer: http://cats.orangeseeds.org/ikiwiki.cgi?do=signin&action=verify&openid_identifier=https%3A%2F%2Fid.koumbit.net%2Fanarcat +[Sun Apr 13 11:45:35.842520 2014] [cgi:error] [pid 7299] [client 162.223.3.24:39547] AH01215: [DEBUG Net::OpenID::Consumer] Cache MISS for https://id.koumbit.net/anarcat, referer: http://cats.orangeseeds.org/ikiwiki.cgi?do=signin&action=verify&openid_identifier=https%3A%2F%2Fid.koumbit.net%2Fanarcat +[Sun Apr 13 11:45:35.845603 2014] [cgi:error] [pid 7299] [client 162.223.3.24:39547] AH01215: [DEBUG Net::OpenID::Consumer] semantic info (https://id.koumbit.net/anarcat) = , referer: http://cats.orangeseeds.org/ikiwiki.cgi?do=signin&action=verify&openid_identifier=https%3A%2F%2Fid.koumbit.net%2Fanarcat +[Sun Apr 13 11:45:35.845672 2014] [cgi:error] [pid 7299] [client 162.223.3.24:39547] AH01215: [DEBUG Net::OpenID::Consumer] fail(no_identity_server) Could not determine ID provider from URL., referer: http://cats.orangeseeds.org/ikiwiki.cgi?do=signin&action=verify&openid_identifier=https%3A%2F%2Fid.koumbit.net%2Fanarcat +~~~~ + +There are three places in the code the original error message happens: + +* Net::OpenID::claimed_identity +* Net::OpenID::verified_identity +* Net::OpenID::_find_openid_server + +We'll look at the last one because it's where the URL data is actually fetched. + +[[!format perl """ +sub _find_openid_server { + my Net::OpenID::Consumer $self = shift; + my $url = shift; + my $final_url_ref = shift; + + my $sem_info = $self->_find_semantic_info($url, $final_url_ref) or + return; + + return $self->_fail("no_identity_server") unless $sem_info->{"openid.server"}; + $sem_info->{"openid.server"}; +} +"""]] + +From there we look at `_find_semantic_info()`, which is supposed to hit the OpenID server, but doesn't somehow.... By cranking up debugging, we can see that the consumer fails to verify the HTTPS signature on the host: + +~~~~ +[Sun Apr 13 11:58:30.284511 2014] [cgi:error] [pid 11141] [client 162.223.3.24:39563] AH01215: [DEBUG Net::OpenID::Consumer] url dump (https://id.koumbit.net/anarcat, SCALAR(0x3275ac0)) = 500 Can't verify SSL peers without knowing which Certificate Authorities to trust, referer: http://cats.orangeseeds.org/ikiwiki.cgi?do=signin&action=verify&openid_identifier=https%3A%2F%2Fid.koumbit.net%2Fanarcat +[Sun Apr 13 11:58:30.284551 2014] [cgi:error] [pid 11141] [client 162.223.3.24:39563] AH01215: , referer: http://cats.orangeseeds.org/ikiwiki.cgi?do=signin&action=verify&openid_identifier=https%3A%2F%2Fid.koumbit.net%2Fanarcat +[Sun Apr 13 11:58:30.284573 2014] [cgi:error] [pid 11141] [client 162.223.3.24:39563] AH01215: This problem can be fixed by either setting the PERL_LWP_SSL_CA_FILE, referer: http://cats.orangeseeds.org/ikiwiki.cgi?do=signin&action=verify&openid_identifier=https%3A%2F%2Fid.koumbit.net%2Fanarcat +[Sun Apr 13 11:58:30.284593 2014] [cgi:error] [pid 11141] [client 162.223.3.24:39563] AH01215: envirionment variable or by installing the Mozilla::CA module., referer: http://cats.orangeseeds.org/ikiwiki.cgi?do=signin&action=verify&openid_identifier=https%3A%2F%2Fid.koumbit.net%2Fanarcat +[Sun Apr 13 11:58:30.284597 2014] [cgi:error] [pid 11141] [client 162.223.3.24:39563] AH01215: , referer: http://cats.orangeseeds.org/ikiwiki.cgi?do=signin&action=verify&openid_identifier=https%3A%2F%2Fid.koumbit.net%2Fanarcat +~~~~ + +To get this little wonder, I had to change the `_find_semantic_info()` as followed: + +[[!format perl """ +sub _find_semantic_info { + my Net::OpenID::Consumer $self = shift; + my $url = shift; + my $final_url_ref = shift; + + my $doc = $self->_get_url_contents($url, $final_url_ref); + $self->_debug("url dump ($url, $final_url_ref) = " . $doc) if $self->{debug}; + my $info = _document_to_semantic_info($doc); + $self->_debug("semantic info ($url) = " . join(", ", map { $_.' => '.$info->{$_} } keys %$info)) if $self->{debug}; + + return $info; +} +"""]] + +A minimal test case would be: + +~~~~ +perl -e 'use LWPx::ParanoidAgent; + print $LWPx::ParanoidAgent::VERSION, " $]: "; + print length(LWPx::ParanoidAgent->new->get + ("https://id.koumbit.net/anarcat") + ->decoded_content), "\n";' +~~~~ + +And the results vary according to the version of perl: + +* wheezy: 1.07 5.014002: 5720 +* jessie: 1.10 5.018002: 398 + +Thanks [jwz](http://www.jwz.org/blog/2014/03/apple-broke-lwp-in-a-new-and-exciting-way-on-10-9-2/) for that.. Mozilla::CA *could* have been packaged in Debian, except it overlaps with the `ca-certificates` package, so it was [basically barred entry](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702124). + +I tried the workaround of hardcoding the path to the CA root, using `PERL_LWP_SSL_CA_PATH=/etc/ssl/certs`, but then I hit *another* bug in LWP: [#738493](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=738493). + +Note that this bug is similar to [[bugs/ssl_certificates_not_checked_with_openid/]], but backwards: it checks the SSL certs but then fails to verify. + +I filed this bug in the Debian BTS as [#702124](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702124). Downgrading to wheezy's version of LWPx::ParanoidAgent doesn't fix the problem, instead i get this error: + + 500 Can't read entity body: Resource temporarily unavailable + +... yet the commandline client works fine... I'm out of ideas for this sucker. + +Update: i found a way to reproduce the problem even with LWPx::ParanoidAgent 1.07: + +~~~~ +$ perl -e 'use LWPx::ParanoidAgent; + print $LWPx::ParanoidAgent::VERSION, " $]\n"; + $ua = new LWPx::ParanoidAgent; for (my $i = 0; $i< 10 ; $i++) { $c = LWPx::ParanoidAgent->new->get + ("https://id.koumbit.net/anarcat") + ->decoded_content; if (length($c) < 100) { print $c; } else { print length($c),"\n";}}' +1.07 5.018002 +5720 +500 Can't read entity body: Ressource temporairement non disponible +500 Can't read entity body: Ressource temporairement non disponible +500 Can't read entity body: Ressource temporairement non disponible +500 Can't read entity body: Ressource temporairement non disponible +500 Can't read entity body: Ressource temporairement non disponible +500 Can't read entity body: Ressource temporairement non disponible +500 Can't read entity body: Ressource temporairement non disponible +500 Can't read entity body: Ressource temporairement non disponible +500 Can't read entity body: Ressource temporairement non disponible +~~~~ + +Workaround - disable error checking: + +~~~~ +--- /home/anarcat/src/ikiwiki/IkiWiki/Plugin/openid.pm 2014-02-03 20:21:09.502878631 -0500 ++++ /usr/share/perl5/IkiWiki/Plugin/openid.pm 2014-04-13 16:00:06.875744596 -0400 +@@ -237,7 +237,7 @@ + + my $ua; + eval q{use LWPx::ParanoidAgent}; +- if (! $@) { ++ if (! $@ && 0) { + $ua=LWPx::ParanoidAgent->new; + } + else { +~~~~ + +> I get the same trouble with OpenID and some locally installed versions of IkiWiki on Debian wheezy (server) as well as on 13.10 Ubuntu (laptop). To be precise I hit the *other* bug in LWP: [#738493](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=738493). +> +> My only workaround for now was to fix `PERL_LWP_SSL_VERIFY_HOSTNAME` to 0 directly in `ikiwiki` :-( -- [[users/bbb]] + +~~~~ +--- /usr/bin/ikiwiki.orig 2014-09-08 15:48:35.715868902 -0400 ++++ /usr/bin/ikiwiki 2014-09-08 15:48:38.895947911 -0400 +@@ -225,4 +225,5 @@ + } + } + ++$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; + main; +~~~~ + diff --git a/doc/bugs/password_reset_fails_with___34__Wide_character_in_subroutine_entry__34__.mdwn b/doc/bugs/password_reset_fails_with___34__Wide_character_in_subroutine_entry__34__.mdwn new file mode 100644 index 000000000..b9452a5ef --- /dev/null +++ b/doc/bugs/password_reset_fails_with___34__Wide_character_in_subroutine_entry__34__.mdwn @@ -0,0 +1,29 @@ +Similar to [[bugs/syslog_fails_with_non-ASCII_wikinames]], this bug happens when the wiki name has non-ascii characters in the site name. In my case, it has the "CⒶTS" string. + +We get the following error in a password reset: + + Error: Wide character in subroutine entry at /usr/share/perl5/Mail/Sendmail.pm line 308. + +Help! :) --[[anarcat]] + +> I assume this means Mail::Sendmail doesn't know how to send Unicode +> strings, so any string passed to it (or any message body, or something?) +> will need to be passed through `encode_utf8()`. It looks as though +> Mail::Sendmail also defaults to +> +> Content-Type: 'text/plain; charset="iso-8859-1"' +> +> so it'll need a `'Content-Type' => 'text/plain; charset="utf-8"'` +> too. +> +> I'm disappointed to see how many of the library modules used by ikiwiki +> are not Unicode-clean... but then again, Mail::Sendmail was last released +> in 2003 so it's hardly surprising. I wonder whether [[!cpan Email::Sender]] +> is any better? +> +> (If you know Python 2, the analogous situation would be "doesn't +> know how to send unicode objects, so you have to get a str object +> with `a_unicode_object.encode('utf-8')`".) --[[smcv]] + +>> Shameless plug: [[todo/passwordauth:_sendmail_interface]]. Though, I have +>> no idea whether that is UTF-8-safe. --[[tschwinge]] diff --git a/doc/bugs/possible_to_post_comments_that_will_not_be_displayed.mdwn b/doc/bugs/possible_to_post_comments_that_will_not_be_displayed.mdwn new file mode 100644 index 000000000..bb6cd17d3 --- /dev/null +++ b/doc/bugs/possible_to_post_comments_that_will_not_be_displayed.mdwn @@ -0,0 +1,32 @@ +[[!template id=gitbranch branch=smcv/ready/comments author="[[smcv]]" +browse="http://git.pseudorandom.co.uk/smcv/ikiwiki.git/shortlog/refs/heads/ready/comments"]] +[[!tag patch users/smcv/ready]] + +The ability to post comments depends on several factors: + +* `comments_pagespec` controls whether comments on a particular + page will be displayed +* `comments_closed_pagespec` controls whether comments on + a particular page are allowed +* the `check_canedit` call controls whether comments are allowed + for a particular combination of page and user + +If `check_canedit` says that a user can post a comment +(in particular, if [[plugins/opendiscussion]] is enabled or +[[plugins/lockedit]] is disabled or permissive), +and `comments_closed_pagespec` does not contradict it, +then users who construct a `do=comment` CGI URL manually +can post comments that will not be displayed. I don't think +this is a security flaw as such, which is why I'm not +reporting it privately, but it violates least-astonishment. + +My `ready/comments` branch fixes this, by changing the test +at submission time from (pseudocode) + + !comments_closed_pagespec && check_canedit + +to + + comments_pagespec && !comments_closed_pagespec && check_canedit + +--[[smcv]] diff --git a/doc/bugs/preprocessing_loop_control_too_tight.mdwn b/doc/bugs/preprocessing_loop_control_too_tight.mdwn index 807d6b7ef..7cf92af57 100644 --- a/doc/bugs/preprocessing_loop_control_too_tight.mdwn +++ b/doc/bugs/preprocessing_loop_control_too_tight.mdwn @@ -18,6 +18,6 @@ index 75c9579..ad0f8b0 100644 [[!tag patch]] -> [[Seems reasonable|users/smcv/yesplease]] --smcv +> [[Seems reasonable|users/smcv/ready]] --smcv >> [[done]] --[[Joey]] diff --git a/doc/bugs/pythonproxy-utf8_again.mdwn b/doc/bugs/pythonproxy-utf8_again.mdwn new file mode 100644 index 000000000..cc6d11de7 --- /dev/null +++ b/doc/bugs/pythonproxy-utf8_again.mdwn @@ -0,0 +1,68 @@ +[[!template id=gitbranch branch=chrysn/more-proxy-utf8-fail author="[[chrysn]]"]] +[[!template id=gitbranch author="[[chrysn]], [[smcv]]" branch=smcv/ready/more-proxy-utf8-fail + browse=http://git.pseudorandom.co.uk/smcv/ikiwiki.git/shortlog/refs/heads/ready/more-proxy-utf8-fail]] + +the recently introduced fixes for [[crashes in the python proxy even if disabled]] +caused the typical python2 implicit conversion failures ("'ascii' codec +can't...") on my debian sid system -- to fix it, i had to revert commit 154c4ea9e. + +i did not dig down all the way to the xml / xmlrpc modules, but my impression +is that some module changed its behavior between stable and sid and now +generates `unicode` strings instead of `str`. + +a [[patch]] to allow both versions by inspecting the types and en-/decoding on +demand should work both for anarcat's and my case. i did not test the python3 +version, but i'm pretty sure it was already broken after the abovementioned +patch. + +-- [[chrysn]] + +> update 2014-06-29: the problem persists, but i found it is not trivial to +> reproduce. to demonstrate, use this test plugin: +> +> #!/usr/bin/env python +> # -*- coding: utf-8 -*- +> +> from proxy import IkiWikiProcedureProxy +> +> def preprocess(self, proxy, *args): +> return repr(self.rpc('pagetype', 'schön')) +> +> proxy = IkiWikiProcedureProxy(__name__) +> proxy.hook('preprocess', preprocess, id='testdirective') +> proxy.run() +> +> note that when the 'schön' is stored in a variable, the exception changes -- +> it seems to me that the issue is related to the way exceptions are encoded. +> +> the suggested patch still applies and solves the issue. --[[chrysn]] + +>> In this patch band: +>> +>> - xml = _IkiWikiExtPluginXMLRPCHandler._read(in_fd).decode('utf8') +>> + response = _IkiWikiExtPluginXMLRPCHandler._read(in_fd) +>> + if isinstance(response, unicode): +>> + xml = response.encode('utf8') +>> +>> I think you mean `response.decode`, not `response.encode`. +>> +>> Other than that it looks good to me. I like the use of `repr` in debug +>> messages. --[[smcv]] + +>>> afaict, encode is fine there -- the relevant methods in python2 are +>>> `unicode.encode` which gives a `str`, and `str.decode` which usually gives +>>> a `unicode`. (i'd happily ditch python2 and port all plugins to python3, +>>> where this is all easier, but my [[todo/vCard rendering]] still uses an +>>> ancient module.) --[[chrysn]] + +>>>> You were right about this, `encode` is appropriate to go from `unicode` +>>>> to `str` under Python 2. However, Python 3 is still broken. +>>>> +>>>> My `ready/more-proxy-utf8-fail` branch, based on yours, +>>>> [[fixes the `rst` test when run under Python 3|bugs/rst_plugin_hangs_when_used_with_Python_3]] +>>>> and hopefully also fixes this one. Please check that it still +>>>> fixes your test-case too. +>>>> +>>>> Joey, I think this is [[ready for merge|users/smcv/ready]] even if it +>>>> doesn't fix chrysn's bug - it does fix Python 3 support +>>>> in general. --[[smcv]] diff --git a/doc/bugs/redirect.mdwn b/doc/bugs/redirect.mdwn index 6296c3df1..87f6a67e7 100644 --- a/doc/bugs/redirect.mdwn +++ b/doc/bugs/redirect.mdwn @@ -24,3 +24,30 @@ then the following command should print 302 > In current ikiwiki, you can get a broadly similar effect by either > using \[[!meta redir=foo]] (which does a HTML `` redirect) > or reconfiguring the web server. --[[smcv]] + +>> The CGI spec (http://www.ietf.org/rfc/rfc3875) says that a CGI can cause a redirect by returning a Location: header. +>> So it's possible; desirable (due to your point about conflicting with git-annex support) is a different matter. + +>>> One of the major things that separates ikiwiki from other wiki software +>>> is that ikiwiki is a wiki compiler: ordinary page-views are purely +>>> static HTML, and the CGI only gets involved when you do something +>>> that really has to be dynamic (like an edit). +>>> +>>> However, there is no server-independent static content that ikiwiki +>>> could write out to the destdir that would result in that redirect. +>>> +>>> If you're OK with requiring the [[plugins/404]] plugin (and a +>>> web server where it works, which I think still means Apache) then +>>> it would be possible to write a plugin that detected symlinks, +>>> stored them in the `%wikistate`, and used them to make the +>>> [[plugins/404]] plugin (or its own hook similar to the one +>>> in that plugin) do a 302 redirect instead of a 404. +>>> Similarly, a plugin that assumed a suitable Apache +>>> configuration with fairly broad `AllowOverrides`, +>>> and wrote out `.htaccess` files, would be a feasible thing +>>> for someone to write. +>>> +>>> I don't think this is a bug; I think it's a request for a +>>> feature that not everyone will want. The solution to those +>>> is for someone who wants the feature to +>>> [[write a plugin|plugins/write]]. --[[smcv]] diff --git a/doc/bugs/rst_plugin_fails_with___34__uncaught_exception:___39__ascii__39___codec_can__39__t_encode_character__34__.mdwn b/doc/bugs/rst_plugin_fails_with___34__uncaught_exception:___39__ascii__39___codec_can__39__t_encode_character__34__.mdwn new file mode 100644 index 000000000..1893e7089 --- /dev/null +++ b/doc/bugs/rst_plugin_fails_with___34__uncaught_exception:___39__ascii__39___codec_can__39__t_encode_character__34__.mdwn @@ -0,0 +1,40 @@ + I get this error when enabling the `rst` plugin. I am running IkiWiki +3.20130904.1ubuntu1 on Ubuntu 14.04 in a non-English UTF-8 locale; the +pages can also contain characters in UTF-8 encoding. + + uncaught exception: 'ascii' codec can't encode character u'\xa9' in position 13: ordinal not in range(128) + Traceback (most recent call last): + File "/usr/lib/ikiwiki/plugins/proxy.py", line 309, in run + self._in_fd, self._out_fd) + File "/usr/lib/ikiwiki/plugins/proxy.py", line 192, in handle_rpc + ret = self._dispatcher.dispatch(method, params) + File "/usr/lib/ikiwiki/plugins/proxy.py", line 84, in dispatch + return self._dispatch(method, params) + File "/usr/lib/python2.7/SimpleXMLRPCServer.py", line 420, in _dispatch + return func(*params) + File "/usr/lib/ikiwiki/plugins/proxy.py", line 253, in hook_proxy + "{0} hook `{1}' returned: [{2}]".format(type, name, ret)) + UnicodeEncodeError: 'ascii' codec can't encode character u'\xa9' in position 13: ordinal not in range(128) + + Traceback (most recent call last): + File "/usr/lib/ikiwiki/plugins/rst", line 86, in + proxy.run() + File "/usr/lib/ikiwiki/plugins/proxy.py", line 317, in run + self.error('uncaught exception: {0}\n{1}'.format(e, tb)) + File "/usr/lib/ikiwiki/plugins/proxy.py", line 298, in error + self.rpc('error', msg) + File "/usr/lib/ikiwiki/plugins/proxy.py", line 233, in rpc + *args, **kwargs) + File "/usr/lib/ikiwiki/plugins/proxy.py", line 173, in send_rpc + raise GoingDown() + proxy.py.GoingDown + +A fix is akin to the one for +: change +`...format(type, name, ret)` in `proxy.py` line 253 to `format(type, +name, repr(ret))` (which should not hurt since it's a message +for debugging purposes only). + + +> this is [[fixed|done]] in commit [154c4ea9](http://source.ikiwiki.branchable.com/?p=source.git;a=commit;h=154c4ea9e65d033756330a7f8c5c0fa285380bf0) +> (november 2013), which is included in 3.20140227. --[[chrysn]] diff --git a/doc/bugs/rst_plugin_hangs_when_used_with_Python_3.mdwn b/doc/bugs/rst_plugin_hangs_when_used_with_Python_3.mdwn new file mode 100644 index 000000000..ca0738ad5 --- /dev/null +++ b/doc/bugs/rst_plugin_hangs_when_used_with_Python_3.mdwn @@ -0,0 +1,35 @@ +During ikiwiki make phase the rst process hangs: +[ps output](http://dpaste.com/21TQQKT) +[gdb backtrace 1](http://dpaste.com/0VQBW6D) +[gdb backtrace 1](http://dpaste.com/1VHS88Y) + +working with python 2.7 +[http://dpaste.com/0985A91](http://dpaste.com/0985A91) +not working with python3.3~3.4 +[http://dpaste.com/0ACNK3W](http://dpaste.com/0ACNK3W) + +> Retitled this bug report since it seems to be specific to Python 3. +> +> The `rst` plugin is probably more commonly used with Python 2. +> It seems likely that there is some Python-3-specific bug in `proxy.py`, +> perhaps introduced by [commit 154c4ea + "properly encode and decode from/to utf8 when sending rpc to ikiwiki"]( +http://source.ikiwiki.branchable.com/?p=source.git;a=commitdiff;h=154c4ea9e65d033756330a7f8c5c0fa285380bf0). +> +> I can reproduce this on Debian by installing `python3-docutils` +> and changing the first line of `plugins/proxy.py`, the first +> line of `plugins/pythondemo`, the first line of `plugins/rst` +> and the `system()` call in `t/rst.t` to use `python3` instead +> of `python`. --[[smcv]] + +looks like the problem is in proxy.py +ml = _IkiWikiExtPluginXMLRPCHandler._read(in_fd).decode('utf8') + +without decode('utf8') is working + +> That call was introduced +> [[to fix a bug under Python 2|bugs/crashes_in_the_python_proxy_even_if_disabled]] +> so it cannot just be removed, but I've put a proposed branch on +> [[this related bug|bugs/pythonproxy-utf8_again]]. [[!tag patch]] --smcv + +tested and fixed with patch [http://git.pseudorandom.co.uk/smcv/ikiwiki.git/commitdiff/38bd51bc1bab0cabd97dfe3cb598220a2c02550a](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/commitdiff/38bd51bc1bab0cabd97dfe3cb598220a2c02550a) and patch [http://git.pseudorandom.co.uk/smcv/ikiwiki.git/commitdiff/81506fae8a6d5360f6d830b0e07190e60a7efd1c](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/commitdiff/81506fae8a6d5360f6d830b0e07190e60a7efd1c) diff --git a/doc/bugs/svg_and_pdf_conversion_fails.mdwn b/doc/bugs/svg_and_pdf_conversion_fails.mdwn new file mode 100644 index 000000000..ac18fe8aa --- /dev/null +++ b/doc/bugs/svg_and_pdf_conversion_fails.mdwn @@ -0,0 +1,58 @@ +[[!template id=gitbranch branch=chrysn/imgforpdf author="[[chrysn]]"]] + +when using the [[img plugin|plugins/img]] with an svg file, it is supposed to +convert it into a png for display in all browsers, and because the typical use +case is rendering small preview versions. + +this currently doesn't work (at least with graphicsmagick-libmagick-dev-compat +1.3.18-1) due to the sequence imagemagick options are set, needs an extension +to work for pdfs (or any other imagemagick compatibile file) too, and should +have an additional parameter for page selection. + +i've provided a series of [[!taglink patch]]es in the chrysn/imgforpdf [[git]] +branch. + +i'd prefer to go a step further, and not only convert pdf and svg files to png, +but everything (with the possible exception of jpg files), as most other image +formats can't be displayed in a browser anyway -- but i didn't in this patch +series, as it would alter the file names of existing images, i don't know if +that needs special care or breaks something i don't use; this way, my patches +should be safe for inclusion. + +--[[chrysn]] + +> update 2014-06-29: the patch still applies and fixes the issue. in the +> meantime, i noticed that the desired effect doesn't happen when no explicit +> size is set. as scalable graphics don't necessarily have a natural size +> anyway, i don't consider that a showstopper. --[[chrysn]] + +>> This all looks good in principle, but I would like to do a more detailed +>> review, and test it with "real ImageMagick" in case its behaviour differs +>> from GraphicsMagick. +>> +>> An automated regression test for the desired behaviour in `t/` would +>> be great. There are SVGs and PNGs in the docwiki already; there are no +>> JPEGs or PDFs, but perhaps you could add a trivially small example +>> of each to `t/`? Imitating `t/tag.t` or `t/trail.t`, and skipping the +>> test if the required modules are missing like `t/podcast.t` does, +>> seems like it would work best. +>> +>> I agree that everything not in an interoperable web format should be +>> converted to PNG when it's scaled down, but yes, that's more likely +>> to be a breaking change, so it seems best to do that as a separate +>> branch. In practice I think this means JPEG -> JPEG and everything +>> else -> PNG, since JPEG is commonly used for photos and photo-like +>> images that don't compress well under lossless compression. --[[smcv]] + +>>> i've added a unit test and tested it with the [[!debsid perlmagick]] +>>> package, the [[!debsid graphicsmagick-libmagick-dev-compat]] package and +>>> the experimental [[!debpts libimage-magick-perl]] package (where the +>>> [[!debpts libmagickcore-6.q16-2-extra]] package is required too), in the +>>> meantime filing [[!debbug 753770]]. (why is it that it sometime seems i +>>> find more bugs in ikiwiki's dependencies than in itself when working with +>>> it?) +>>> +>>> the unit test also checks for file removal when it is not created any more, +>>> which works, so my biggest fear about the all-to-png change is unwarranted. +>>> i'll have a look at that some time, but i think as things are, this is +>>> ready now, please review again. --[[chrysn]] diff --git a/doc/bugs/syslog_fails_with_non-ASCII_wikinames.mdwn b/doc/bugs/syslog_fails_with_non-ASCII_wikinames.mdwn index b641f2db2..0d40d232a 100644 --- a/doc/bugs/syslog_fails_with_non-ASCII_wikinames.mdwn +++ b/doc/bugs/syslog_fails_with_non-ASCII_wikinames.mdwn @@ -18,10 +18,15 @@ Yet I am not sure how to fix that kind of problem in Perl... --[[anarcat]] > > Error: Wide character in syswrite at /usr/lib/perl/5.14/Sys/Syslog.pm line 485. > -> I have improved a little the error handling in log_message() so that we see *something* when syslog fails, see the branch documented above. I can also confirm that reverting [[todo/syslog_should_show_wiki_name]] fixes the bug. Finally, I have a unit test that reproduces the problem in git, and a working [[!taglink patch]] for the bug, again in git. +> I have improved a little the error handling in log_message() so that we see *something* when syslog fails, see the branch documented above. I can also confirm that reverting [[todo/syslog_should_show_wiki_name]] fixes the bug. Finally, I have a unit test that reproduces the problem in git, and a working patch for the bug, again in git. > > > One last note: I noticed that this problem also happens elsewhere in ikiwiki. For example, the [[plugins/notifyemail]] plugin will silently fail to send notifications if the pages contain unicode. The [[plugins/notifychanges]] plugin I am working on (in [[todo/option to send only the diff in notifyemail]]) seems to be working around the issue so far, but there's no telling which similar problem are out there. ->> [[I'd merge it|/users/smcv/yesplease]]. --[[smcv]] +>> I'd merge it. --[[smcv]] >>> I've merged it, but I don't feel it fixes this bug. --[[Joey]] + +>>>> (I removed the patch tag to take it off the patches list.) +>>>> +>>>> What else is needed? Systematic classification of outputs into +>>>> those that do and don't cope with Unicode? --[[smcv]] diff --git a/doc/bugs/template_creation_error.mdwn b/doc/bugs/template_creation_error.mdwn index f14652ed8..d1fb788f5 100644 --- a/doc/bugs/template_creation_error.mdwn +++ b/doc/bugs/template_creation_error.mdwn @@ -194,27 +194,77 @@ Please, let me know what to do to avoid this kind of error. >>>>> >>>>> --[[chrysn]] ->>>>>> [[!template id=gitbranch author="[[smcv]]" branch=smcv/ready/templatebody - browse=http://git.pseudorandom.co.uk/smcv/ikiwiki.git/shortlog/refs/heads/ready/templatebody]] ->>>>>> [[!tag patch]] ->>>>>> Branch and directive renamed to `ready/templatebody` as chrysn suggested. ->>>>>> It's on-by-default now (or will be if that branch is merged). ->>>>>> Joey, any chance you could review this? ->>>>>> ->>>>>> There is one known buglet: `template_syntax.t` asserts that the entire ->>>>>> file is a valid HTML::Template, whereas it would ideally be doing the ->>>>>> same logic as IkiWiki itself. I don't think that's serious. --[[smcv]] - ->>>>>>> Looking over this, I notice it adds a hash containing all scanned ->>>>>>> files. This seems to me to be potentially a scalability problem on ->>>>>>> rebuild of a site with many pages. Ikiwiki already keeps a lot ->>>>>>> of info in memory, and this adds to it, for what is a fairly ->>>>>>> minor reason. It seems to me there should be a way to avoid this. --[[Joey]] - ->>>>>>>> Maybe. Are plugins expected to cope with scanning the same ->>>>>>>> page more than once? If so, it's just a tradeoff between ->>>>>>>> "spend more time scanning the template repeatedly" and ->>>>>>>> "spend more memory on avoiding it", and it would be OK to ->>>>>>>> omit that, or reduce it to a set of scanned *templates* ->>>>>>>> (in practice that would mean scanning each template twice ->>>>>>>> in a rebuild). --s +---- + +[[!template id=gitbranch author="[[smcv]]" branch=smcv/ready/templatebody + browse=http://git.pseudorandom.co.uk/smcv/ikiwiki.git/shortlog/refs/heads/ready/templatebody]] +[[!tag patch users/smcv/ready]] +Branch and directive renamed to `ready/templatebody` as chrysn suggested. +It's on-by-default now (or will be if that branch is merged). +Joey, any chance you could review this? + +There is one known buglet: `template_syntax.t` asserts that the entire +file is a valid HTML::Template, whereas it would ideally be doing the +same logic as IkiWiki itself. I don't think that's serious. --[[smcv]] + +> Looking over this, I notice it adds a hash containing all scanned +> files. This seems to me to be potentially a scalability problem on +> rebuild of a site with many pages. Ikiwiki already keeps a lot +> of info in memory, and this adds to it, for what is a fairly +> minor reason. It seems to me there should be a way to avoid this. --[[Joey]] + +>> Maybe. Are plugins expected to cope with scanning the same +>> page more than once? If so, it's just a tradeoff between +>> "spend more time scanning the template repeatedly" and +>> "spend more memory on avoiding it", and it would be OK to +>> omit that, or reduce it to a set of scanned *templates* +>> (in practice that would mean scanning each template twice +>> in a rebuild). --s +>>> [Commit f7303db5](http://source.ikiwiki.branchable.com/?p=source.git;a=commitdiff;h=f7303db5) +>>> suggests that scanning the same page more than once is problematic, +>>> so that solution is probably not going to work. +>>> +>>> The best idea I've come up with so far is to track whether +>>> we're in the scan or render phase. If we're in the scan +>>> phase, I think we do need to keep track of which pages +>>> we've scanned, so we don't do them again? (Or perhaps that's +>>> unnecessary - commit f7303db5 removed a scan call that's in +>>> the render phase.) If we're in the render phase, we can assume +>>> that all changed pages have been scanned already, so we can +>>> drop the contents of `%scanned` and rely on a single boolean +>>> flag instead. +>>> +>>> `%scanned` is likely to be no larger than `%rendered`, which +>>> we already track, and whose useful lifetime does not overlap +>>> with `%scanned` now. I was tempted to merge them both and call +>>> the result `%done_in_this_phase`, but that would lead to really +>>> confusing situations if a bug led to `render` being called sooner +>>> than it ought to be. +>>> +>>> My ulterior motive here is that I would like to formalize +>>> the existence of different phases of wiki processing - at the +>>> moment there are at least two phases, namely "it's too soon to +>>> match pagespecs reliably" and "everything has been scanned, +>>> you may use pagespecs now", but those phases don't have names, +>>> so [[plugins/write]] doesn't describe them. +>>> +>>> I'm also considering adding warnings +>>> if people try to match a pagespec before scanning has finished, +>>> which can't possibly guarantee the right result, as discussed in +>>> [[conditional_preprocess_during_scan]]. My `wip-too-soon` branch +>>> is a start towards that; the docwiki builds successfully, but +>>> the tests that use IkiWiki internals also need updating to +>>> set `$phase = PHASE_RENDER` before they start preprocessing. --s + +>>>> reviewing those modifications, i think this is a good way to go. along +>>>> with warning about pagespecs evaluated in scan phase, i think it should be +>>>> an error to invoke scan in the render phase; that would mean that +>>>> `readtemplate` needs to check whether it's invoked as a scan or not to +>>>> decide whether to scan the template page, but would be generally more +>>>> robust for future plugin writing. +>>>> +>>>> **addendum**: if the new phase state is used to create warnings/errors +>>>> about improper ikiwiki api use of plugins (which is something i'd +>>>> advocate), that should likewise warn if `add_link` actually adds a link in +>>>> the render phase. such a warning would have helped spotting the +>>>> link-related [[template evaluation oddities]] earlier. --[[chrysn]] diff --git a/doc/bugs/template_evaluation_oddities.mdwn b/doc/bugs/template_evaluation_oddities.mdwn new file mode 100644 index 000000000..06ef57375 --- /dev/null +++ b/doc/bugs/template_evaluation_oddities.mdwn @@ -0,0 +1,67 @@ +[[ikiwiki/directive/template]]s expose odd behavior when it comes to composing +links and directives: + +* the parameters are passed through the preprocessor twice, once on + per-parameter basis and once for the final result (which usually contains the + preprocessed parameters). + + one of the results it that you have to write: + + \[[!template id="infobox" body=""" + Just use the \\\[[!template]] directive! + """]] + + (that'd be three backslashes in front of the opening [.) + + + + this also means that parts which are not used by the template at all still + have their side effects without showing. + + furthermore, the evaluation sequence is hard to predict. this might or might + not be a problem, depending on whether someone comes up with a less contrived + example (this one assumes a ``\[[!literal value]]`` directive that just + returns value but protects it from the preprocessor): + + we can use `\[[!literal """[[!invalid example]]"""]]`, but we can't use + `\[[!template id=literalator value="""[[!invalid example]]"""]]` with a + 'literalator' template `\[[!literal """"""]]` because then the `invalid` directive comes to action in + the first (per-argument) preprocessor run + +* links in templates are not stored at all; they appear, but the backlinks + don't work unless the link is explicit in one of the arguments. + + \[[!template id="linker" destination="foo"]] + + with a 'linker' template like + + Go to \[[]]! + + would result in a link to 'destination', but would not be registered in the + scan phase and thus not show a backlink from 'foo'. + + (a ``\[[!link to=...]]`` directive, as suggested in + [[todo/flexible relationships between pages]], does get evaluated properly + though.) + + this seems to be due to linkification being called before preprocess rather + than as a part of it, or (if that is on purpose) by the template plugin not + running linkification as an extra step (not even once). + +(nb: there is a way to include the ``raw_`` value of a directive, but that only +refers to htmlification, not directive evaluation.) + +both those behaviors are non-intuitive and afaict undocumented. personally, i'd +swap them out for passing the parameters as-is to the template, then running +the linkifier and preprocessor on the final result. that would be as if all +parameters were queried `raw_` -- then again, i don't see where `raw_` makes +anything not work that worked originally, so obviously i'm missing something. + + +i think it boils down to one question: are those behaviors necessary for +compatibility reasons, and if yes, why? + +--[[chrysn]] diff --git a/doc/bugs/trails_depend_on_everything.mdwn b/doc/bugs/trails_depend_on_everything.mdwn new file mode 100644 index 000000000..babb1e361 --- /dev/null +++ b/doc/bugs/trails_depend_on_everything.mdwn @@ -0,0 +1,14 @@ +[[!template id=gitbranch branch=smcv/ready/trail-sort +author="[[Simon McVittie|smcv]]" +browse=http://git.pseudorandom.co.uk/smcv/ikiwiki.git/shortlog/refs/heads/ready/trail-sort]] +[[!tag patch users/smcv/ready]] + +On [[trail's discussion page|plugins/trail/discussion]], [[kjs]] pointed out +that [[plugins/trail]] and [[plugins/contrib/album]] get excessive +dependencies on `internal(*)`. I tracked this down to their (ab)use of +`pagespec_match_list` with the pagespec `internal(*)` to sort a pre-existing +list of pages. + +They should just sort the pages instead; they'll already have all the +dependencies they need. My branch adds `IkiWiki::sort_pages` but does not +make it plugin API just yet. --[[smcv]] diff --git a/doc/bugs/transient_autocreated_tagbase_is_not_transient_autoindexed.mdwn b/doc/bugs/transient_autocreated_tagbase_is_not_transient_autoindexed.mdwn index 702608831..0673aa674 100644 --- a/doc/bugs/transient_autocreated_tagbase_is_not_transient_autoindexed.mdwn +++ b/doc/bugs/transient_autocreated_tagbase_is_not_transient_autoindexed.mdwn @@ -6,9 +6,11 @@ Shouldn't `ikiwiki-tag-test/raw/.ikiwiki/transient/tag.mdwn` and `ikiwiki-tag-test/rendered/tag/index.html` exist? -[[!tag patch]] -[[!template id=gitbranch branch=smcv/ready/autoindex author=smcv]] -[[!template id=gitbranch branch=smcv/ready/autoindex-more-often author=smcv]] +[[!tag patch users/smcv/ready]] +[[!template id=gitbranch branch=smcv/ready/autoindex author=smcv + browse=http://git.pseudorandom.co.uk/smcv/ikiwiki.git/shortlog/refs/heads/ready/autoindex]] +[[!template id=gitbranch branch=smcv/ready/autoindex-more-often author=smcv + browse=http://git.pseudorandom.co.uk/smcv/ikiwiki.git/shortlog/refs/heads/ready/autoindex-more-often]] > To have a starting point to (maybe) change this, my `ready/autoindex` > branch adds a regression test for the current behaviour, both with @@ -29,3 +31,44 @@ Shouldn't `ikiwiki-tag-test/raw/.ikiwiki/transient/tag.mdwn` and `ikiwiki-tag-te > git repositories any more? My `autoindex-more` branch changes > the logic so it will do what you want in the `autoindex_commit => 0` > case, and amends the appropriate regression test. --[[smcv]] + +>> the autoindex-more-often branch looks good to me in general. +>> +>> i do have doubts about the 3ba2ef1a patch ("remove unnecessary special case +>> for transient underlay"): now that we consider the complete transient +>> directory as well, the sequence in which the refresh hooks are called starts +>> to matter, and pages created by other plugins in a similar fashion as by +>> autoindex will only be included the next time refresh gets called. +>> +>> *addendum:* i just found where i discussed the issue of fighting transient +>> pages last, it was on [[todo/alias directive]]. the example cited there +>> (conflicts with autotag) would probably work here as well. (imagine a +>> `tags/project/completed` and a `tags/project/inprogress` exist, and a page +>> is tagge `tags/project`. will that be an autoindex or an autotag?) +>> +>> --[[chrysn]] + +>>> That's a fair point. I think what happens is down to commit vs. refresh +>>> timing. +>>> +>>> If pages tagged t/p/c, t/p/i and t/p are all created between one +>>> refresh and the next, with none of those tag pages existing, I think the +>>> answer is that they would all be autotags, because until t/p/c and +>>> t/p/i are created, there's no reason to need t/p as an autoindex. +>>> +>>> If there were already pages tagged t/p/c and t/p/i at the previous +>>> refresh, then t/p would already be an autoindex, and that's a +>>> valid page, so autotagging wouldn't touch it. +>>> +>>> I can't see much reason to prefer one over the other; the ideal answer +>>> is probably to have a tag-cloud *and* a list of child pages, but this +>>> seems a weird enough thing to do that I'd be OK with a wiki user +>>> having to disambiguate it themselves. "Whichever automatic process +>>> happens first, happens" is at least easy to explain, and I consider +>>> both autoindices and autotags to be time-saving conveniences rather +>>> than something fundamental. --s + +>>>> i think a behavior that does the right thing when there is a right thing +>>>> and *something* when there is ambiguity is ok for now; especially, it's +>>>> not up to the autoindex branch to come up with a solution to the general +>>>> problem. --[[chrysn]] diff --git a/doc/contact.mdwn b/doc/contact.mdwn index 7d31ddf10..dab092549 100644 --- a/doc/contact.mdwn +++ b/doc/contact.mdwn @@ -7,5 +7,4 @@ developers monitor [[RecentChanges]] closely, via the webpage, email, and IRC, and respond in a timely fashion. You could also drop by the IRC channel `#ikiwiki` on -[OFTC](http://www.oftc.net/) (`irc.oftc.net`), or use the -[identi.ca ikiwiki group](http://identi.ca/group/ikiwiki). +[OFTC](http://www.oftc.net/) (`irc.oftc.net`). diff --git a/doc/css_market.mdwn b/doc/css_market.mdwn index c9c6694e7..376f81b8b 100644 --- a/doc/css_market.mdwn +++ b/doc/css_market.mdwn @@ -48,6 +48,8 @@ gnomes will convert them to css files..) templates. [[!meta stylesheet="bma"]] +* ** http://blog.lastlog.de/, contributed by joachim schiele; please feel free to copy. + * **[blankoblues.css][1]**, contributed by [[Blanko]]. Can be seen on [Blankoblues Demo][2]. Local.css and templates available [here][3]. * **[contraste.css][4]**, contributed by [[Blanko]]. Can be seen on [Contraste Demo][5]. Local.css and templates available [here][6]. @@ -60,9 +62,9 @@ gnomes will convert them to css files..) * **[ikiwiked gray-orange](https://github.com/AntPortal/ikiwiked/raw/master/theme/gray-orange/local.css)**, contributed by [Danny Castonguay](https://antportal.com/). Can be seen in action at [antportal.com/wiki](https://antportal.com/wiki/). Feel free to modify and contribute on [Github](https://github.com/AntPortal/ikiwiked) - [1]: http://blankoworld.homelinux.com/demo/ikiwiki/blankoblues/src/local.css (Download Blankoblues CSS) - [2]: http://blankoworld.homelinux.com/demo/ikiwiki/blankoblues/htdocs/ (Take a tour on Blankoblues Demo) - [3]: http://blankoworld.homelinux.com/demo/ikiwiki/blankoblues/blankoblues.tar.gz (Download local.css and templates for Blankoblues theme) - [4]: http://blankoworld.homelinux.com/demo/ikiwiki/contraste/src/local.css (Download Contraste CSS) - [5]: http://blankoworld.homelinux.com/demo/ikiwiki/contraste/htdocs/ (Take a tour on Contraste Demo) - [6]: http://blankoworld.homelinux.com/demo/ikiwiki/contraste/contraste.tar.gz (Download local.css and templates for Contraste theme) + [1]: http://olivier.dossmann.net/demo/ikiwiki/blankoblues/src/local.css (Download Blankoblues CSS) + [2]: http://olivier.dossmann.net/demo/ikiwiki/blankoblues/htdocs/ (Take a tour on Blankoblues Demo) + [3]: http://olivier.dossmann.net/demo/ikiwiki/blankoblues/blankoblues.tar.gz (Download local.css and templates for Blankoblues theme) + [4]: http://olivier.dossmann.net/demo/ikiwiki/contraste/src/local.css (Download Contraste CSS) + [5]: http://olivier.dossmann.net/demo/ikiwiki/contraste/htdocs/ (Take a tour on Contraste Demo) + [6]: http://olivier.dossmann.net/demo/ikiwiki/contraste/contraste.tar.gz (Download local.css and templates for Contraste theme) diff --git a/doc/forum/Adding_a_custom_header_and_footer.mdwn b/doc/forum/Adding_a_custom_header_and_footer.mdwn new file mode 100644 index 000000000..d9bdedc6a --- /dev/null +++ b/doc/forum/Adding_a_custom_header_and_footer.mdwn @@ -0,0 +1,13 @@ +I want to do some things that I think are easiest accomplished +by allowing me to add arbitrary HTML to be embedded on all pages +in the site. Specifically, I want to add meta tags to the top of +the page so that it renders pretty-like in things like Twitter, +and I want to add Piwik tracking to the bottom of the page. + +So how do I do that? + +I could write a whole new template for the site, but I suspect +that there's a more modular approach that is advised. And if you +have ideas of totally different ways do do this, do tell. + +Thanks diff --git a/doc/forum/Adding_a_custom_header_and_footer/comment_1_e82dbfef77ff222a7fa07aab0a19fb18._comment b/doc/forum/Adding_a_custom_header_and_footer/comment_1_e82dbfef77ff222a7fa07aab0a19fb18._comment new file mode 100644 index 000000000..d10961c19 --- /dev/null +++ b/doc/forum/Adding_a_custom_header_and_footer/comment_1_e82dbfef77ff222a7fa07aab0a19fb18._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="spalax" + ip="82.216.247.172" + subject="Use page.tmpl" + date="2014-05-16T17:11:01Z" + content=""" +I think the right thing to do is to copy the default `page.tmpl` to your wiki (in your template directory), and add the code you wish. + +-- [[Louis|spalax]] +"""]] diff --git a/doc/forum/Can__39__t_call_method___34__distribution__34___on_an_undefined_value_at_FirstTime.pm.html b/doc/forum/Can__39__t_call_method___34__distribution__34___on_an_undefined_value_at_FirstTime.pm.html new file mode 100644 index 000000000..b68395856 --- /dev/null +++ b/doc/forum/Can__39__t_call_method___34__distribution__34___on_an_undefined_value_at_FirstTime.pm.html @@ -0,0 +1,64 @@ +This really look like a general PERL problem, but google search returns no relative result of undfined method 'distribution' at FireTime.pm at all. Answer on where to look for answer is appreciated too. Using perl 5.18 on NETBSD 6.1 + +
+$ PERL5LIB=`pwd`/ikiwiki:`pwd`/ikiwiki/cpan:`pwd`/lib/perl5 PERL_MM_USE_DEFAULT=1 perl -MCPAN -e 'CPAN::Shell->install("Bundle::IkiWiki")'
+perl: warning: Setting locale failed.
+perl: warning: Please check that your locale settings:
+        LC_ALL = "en_US.UTF-8",
+        LANG = "en_US.UTF-8"
+    are supported and installed on your system.
+perl: warning: Falling back to the standard locale ("C").
+perl: warning: Setting locale failed.
+perl: warning: Please check that your locale settings:
+        LC_ALL = "en_US.UTF-8",
+        LANG = "en_US.UTF-8"
+    are supported and installed on your system.
+perl: warning: Falling back to the standard locale ("C").
+
+CPAN.pm requires configuration, but most of it can be done automatically.
+If you answer 'no' below, you will enter an interactive dialog for each
+configuration option instead.
+
+Would you like to configure as much as possible automatically? [yes] yes
+
+ 
+
+Warning: You do not have write permission for Perl library directories.
+
+To install modules, you need to configure a local Perl library directory or
+escalate your privileges.  CPAN can help you by bootstrapping the local::lib
+module or by configuring itself to use 'sudo' (if available).  You may also
+resolve this problem manually if you need to customize your setup.
+
+What approach do you want?  (Choose 'local::lib', 'sudo' or 'manual')
+ [local::lib] local::lib
+
+Autoconfigured everything but 'urllist'.
+
+Now you need to choose your CPAN mirror sites.  You can let me
+pick mirrors for you, you can select them from a list or you
+can enter them by hand.
+
+Would you like me to automatically choose some CPAN mirror
+sites for you? (This means connecting to the Internet) [yes] yes
+Trying to fetch a mirror list from the Internet
+Fetching with LWP:
+http://www.perl.org/CPAN/MIRRORED.BY
+
+Looking for CPAN mirrors near you (please be patient)
+.......................... done!
+
+New urllist
+  http://cpan.llarian.net/
+  http://mirrors.syringanetworks.net/CPAN/
+  http://noodle.portalus.net/CPAN/
+
+Autoconfiguration complete.
+
+Attempting to bootstrap local::lib...
+
+Writing /arpa/tz/w/weiwu/.local/share/.cpan/CPAN/MyConfig.pm for bootstrap...
+commit: wrote '/arpa/tz/w/weiwu/.local/share/.cpan/CPAN/MyConfig.pm'
+Can't call method "distribution" on an undefined value at /usr/pkg/lib/perl5/5.18.0/CPAN/FirstTime.pm line 1257.
+$ rm -r /arpa/tz/w/weiwu/.local/share/.cpan/
+
diff --git a/doc/forum/Error___34__is_locked_and_cannot_be_edited__34__.mdwn b/doc/forum/Error___34__is_locked_and_cannot_be_edited__34__.mdwn new file mode 100644 index 000000000..44d25af70 --- /dev/null +++ b/doc/forum/Error___34__is_locked_and_cannot_be_edited__34__.mdwn @@ -0,0 +1,15 @@ +I returned to one of my old ikiwiki blogs and received the above error message after entering (on the web interface of the blog) a title for a new post. + +I found the following three locks in the .ikiwiki directory of the blog: + +-rw-r--r-- 1 zoidberg zoidberg 0 May 23 15:10 cgilock +-rw-r--r-- 1 zoidberg zoidberg 0 May 23 15:20 lockfile +-rw------- 1 zoidberg zoidberg 0 May 23 15:10 sessions.db.lck + +When I delete these and and again try to create a new post the above error message reappears and the locks have been recreated. + +Re-running 'ikiwiki --setup myblog.setup' disclosed a couple of permission problems (files owned by root - bah), but fixing them has had no effect on hte behavior of the blog. + +I really would like to rehab this ikiwiki blog! + +*Thanks!* diff --git a/doc/forum/Error___34__is_locked_and_cannot_be_edited__34__/comment_1_dc99a921813d4f8adf797a900ee0a2c1._comment b/doc/forum/Error___34__is_locked_and_cannot_be_edited__34__/comment_1_dc99a921813d4f8adf797a900ee0a2c1._comment new file mode 100644 index 000000000..7aed7a21e --- /dev/null +++ b/doc/forum/Error___34__is_locked_and_cannot_be_edited__34__/comment_1_dc99a921813d4f8adf797a900ee0a2c1._comment @@ -0,0 +1,18 @@ +[[!comment format=mdwn + username="http://smcv.pseudorandom.co.uk/" + nickname="smcv" + subject="comment 1" + date="2014-05-23T22:02:07Z" + content=""" +I believe that error message indicates that the [[plugins/lockedit]] +plugin is preventing editing. Either make the user account you're +trying to use into a wiki admin via the `adminuser` setting: + + # either or both of these + adminuser: + - yourname + - http://your-openid.example.com/ + +or allow that user to edit pages by altering the `locked_pages` +setting. +"""]] diff --git a/doc/forum/Error___34__is_locked_and_cannot_be_edited__34__/comment_2_48daf77f097ed94bf78cf97b0c027129._comment b/doc/forum/Error___34__is_locked_and_cannot_be_edited__34__/comment_2_48daf77f097ed94bf78cf97b0c027129._comment new file mode 100644 index 000000000..f94e7785e --- /dev/null +++ b/doc/forum/Error___34__is_locked_and_cannot_be_edited__34__/comment_2_48daf77f097ed94bf78cf97b0c027129._comment @@ -0,0 +1,14 @@ +[[!comment format=mdwn + username="http://bob-bernstein.myopenid.com/" + nickname="bernstein" + subject="comment 2" + date="2014-05-24T02:04:07Z" + content=""" +Thanks. Your prompt reply encouraged me to poke around a bit more. I found a perl module was missing (how I cannot imagine) XML/Writer.pm. Installing the relevant deb seemed to fix things up. + +nb This is a rather old install of ikiwiki. It dates from 2009. + +ps Your use of ikiwiki for your homepage is quite impressive, and tasteful! + +*Thanks!* +"""]] diff --git a/doc/forum/Export_images_when_building_the_wiki.mdwn b/doc/forum/Export_images_when_building_the_wiki.mdwn new file mode 100644 index 000000000..9802ea4ed --- /dev/null +++ b/doc/forum/Export_images_when_building_the_wiki.mdwn @@ -0,0 +1,16 @@ +My repository contains image sources made with tools like Inkspace, Dia, LibreOffice, Gimp and so on. + +Instead of pushing the images themselves into git or manually exporting them to PNG/SVG, +I'd like to keep just the sources in git, and have ikiwiki compile them into the final +images just like it compiles Markdown into HTML. Is it possible to add new files types +and tell ikiwiki how to compile them? + +(After reading some plugin docs...) + +I just read 'perlintro' yesterday in unrelated context, but... +could it maybe be done by writing a plugin like this one, +which compiles textile? + + + +-- [[fr33domlover]] diff --git a/doc/forum/Export_images_when_building_the_wiki/comment_1_f7328be9b201f3eea6b90c269781fd0b._comment b/doc/forum/Export_images_when_building_the_wiki/comment_1_f7328be9b201f3eea6b90c269781fd0b._comment new file mode 100644 index 000000000..182be88f3 --- /dev/null +++ b/doc/forum/Export_images_when_building_the_wiki/comment_1_f7328be9b201f3eea6b90c269781fd0b._comment @@ -0,0 +1,18 @@ +[[!comment format=mdwn + username="spalax" + ip="82.216.247.172" + subject="Other plugins to study" + date="2014-05-16T10:38:17Z" + content=""" +Several plugins process data using external programs. You may have a look at: + +- [[plugins/teximg]] which calls LaTeX; +- [[plugins/graphviz]] which calls graphviz; +- [[plugins/contrib/pandoc]] which calls pandoc. + +The first and second plugins I mentionned create an image using an external +tool, and integrate it in the page. It may be exactly what you want. + +-- [[Louis|spalax]] + +"""]] diff --git a/doc/forum/Export_images_when_building_the_wiki/comment_2_99a592c8ff9d2c2094132edd27356922._comment b/doc/forum/Export_images_when_building_the_wiki/comment_2_99a592c8ff9d2c2094132edd27356922._comment new file mode 100644 index 000000000..0c270987e --- /dev/null +++ b/doc/forum/Export_images_when_building_the_wiki/comment_2_99a592c8ff9d2c2094132edd27356922._comment @@ -0,0 +1,18 @@ +[[!comment format=mdwn + username="fr33domlover" + ip="85.65.55.38" + subject="comment 2" + date="2014-05-17T11:10:35Z" + content=""" +Thanks, I already saw those. + +I need a plugin of exactly the same kind, but which calls other tools, such as Dia and Inkspace. +In addition, embedding into a page means the same image may end up being generated +many times. So it's best to generate the image as an attachment of some page, and then +all other pages in the wiki can use it. What do you think? + +Also, if I write a plugin (and test it of course), where do I publish it so people can +see and enjoy it? Is [[plugins]] moderated? + +-- [[fr33domlover]] +"""]] diff --git a/doc/forum/Export_images_when_building_the_wiki/comment_3_7f5a1ef639453c83748405d2b3b0b880._comment b/doc/forum/Export_images_when_building_the_wiki/comment_3_7f5a1ef639453c83748405d2b3b0b880._comment new file mode 100644 index 000000000..48aec10ec --- /dev/null +++ b/doc/forum/Export_images_when_building_the_wiki/comment_3_7f5a1ef639453c83748405d2b3b0b880._comment @@ -0,0 +1,27 @@ +[[!comment format=mdwn + username="spalax" + ip="82.216.247.172" + subject="comment 3" + date="2014-05-17T13:49:14Z" + content=""" +> I need a plugin of exactly the same kind, but which calls other tools, such as Dia and Inkspace. +> In addition, embedding into a page means the same image may end up being generated +> many times. So it's best to generate the image as an attachment of some page, and then +> all other pages in the wiki can use it. What do you think? + +Then the [[plugins/contrib/pandoc]] may be a good start, since *you can configure it for Pandoc to take over processing of all .mkdn files, or only files with a different extension.* Have a look at it to make your plugin process files with a particular extension. Then, it will be possible to have several pages refer to the same file, generated only once (maybe by storing stuff in `%pagestate` or `%wikistate`. + +Have a look at [[plugins/write]] to write your plugin. + +> Also, if I write a plugin (and test it of course), where do I publish it so people can +> see and enjoy it? Is [[plugins]] moderated? + +What is usually done is: + +- you publish your code somewhere (your server, or on github or something like that); +- you advertise your plugin by creating a subpage of [[plugins/contrib]]. Use the [[templates/plugin]] [[template|templates]] (it generates the frame you can see on the right of [[one of my plugins|plugins/contrib/jscalendar]], for example): + + \[[!template id=plugin name=YourFancyPlugin author=\"[[fr33domlover]]\"]] + +-- [[Louis|spalax]] +"""]] diff --git a/doc/forum/Export_images_when_building_the_wiki/comment_4_bd3b37fbee54f1bf510ef5fc6ba27e55._comment b/doc/forum/Export_images_when_building_the_wiki/comment_4_bd3b37fbee54f1bf510ef5fc6ba27e55._comment new file mode 100644 index 000000000..5f5647a57 --- /dev/null +++ b/doc/forum/Export_images_when_building_the_wiki/comment_4_bd3b37fbee54f1bf510ef5fc6ba27e55._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="fr33domlover" + ip="85.65.55.38" + subject="comment 4" + date="2014-05-17T14:46:15Z" + content=""" +Great, thanks. I'll take a look. But it's a bit different, because images are not HTML pages at all. + +Thanks for the quick replies :-) +"""]] diff --git a/doc/forum/File_wiki.setup.mdwn b/doc/forum/File_wiki.setup.mdwn new file mode 100644 index 000000000..173988fd5 --- /dev/null +++ b/doc/forum/File_wiki.setup.mdwn @@ -0,0 +1,6 @@ +Hi, + +I'd like to know if there were a way to get the user's directory path where the file wiki.setup is, and the name of this file. Because i'm working on an improvement of the plugin userlist, and i want to modify the .setup file but i haven't found a way to dynamically get this file. + +> The [[plugins/websetup]] plugin rewrites the setup file. You may find your +> answer in its code. [[Louis|spalax]] diff --git a/doc/forum/Formatting_algorithms.mdwn b/doc/forum/Formatting_algorithms.mdwn new file mode 100644 index 000000000..c7f4aaa76 --- /dev/null +++ b/doc/forum/Formatting_algorithms.mdwn @@ -0,0 +1,54 @@ +I'm using ikiwiki for a software project, and in the design process one of the things I sometimes write +algorithms. It doesn't happen much, but for components of functional nature it's very useful. + +I've been thinking how to write them in the wiki. I can use a numbered list and manually make +keywords __bold__, but it's not optimal. I could also use plain text formatting and indent using tabs, +but again there is no highlighting of any keywords or formatting of structures. +Before I do that, I'd like to know if there are better options. + +One option I know is LaTeX, which has some very nice packages. You write pseudo-code which looks +very much like source code, and the result looks great, very readable and high quality. + +I saw the [[plugins/teximg]] plugin, but the explanation there is poor: Does the plugin handle things +that aren't formulas? Could it work with a LaTeX document or with an algorithm environment? + +Of course, of you have other suggestions I'll be happy to hear. I want to make a careful choice before +I start writing many algorithms :-) + +> You may try to see if you can select a pseudo-code languages in one of the +> highlight plugins ([[plugins/contrib/highlightcode]], +> [[plugins/contrib/sourcehighlight]], [[plugins/highlight]], other ?). The +> list of supported languages with the [[plugins/highlight]] plugin is +> [[here|http://www.andre-simon.de/doku/highlight/en/langs.php]], and if you +> cannot find your languages, I think you can define your own +> [[here|http://www.andre-simon.de/doku/highlight/en/plugins.php]]. +> +> -- [[Louis|spalax]] + +>> Thanks, I looked at it. I don't think there's any special language for algorithms +>> (anyway I couldn't find any), but for the record I found the following possibilities: +>> +>> 1. LaTeX: Not very readable in source form, but could be highlighted, didn't try +>> 2. Writing in a subset of Python/Pascal/Fortran and using their highlighting +>> 3. Define a new highlight syntax +>> +>> What about [[plugins/teximg]]? If it can be used to generate algorithms from LaTeX, it would be +>> an easy excellent solution. +>> +>> --[[fr33domlover]] + +> [[plugins/teximg]] is the best thing that currently exists. Since it isn't +> enabled on this wiki, and the author's ikiwiki has disappeared, I put one of +> the test formulas into a private test wiki of mine. Here's a screenshot: +> +> +> I think it would be great if someone [[wrote a +> plugin for something nicer|todo/Add_nicer_math_formatting]]. -- [[Jon]] + +>> [[plugins/teximg]] is fine for math (al least for GUI browsers, I didn't try with w3m etc.), +>> but what I'm looking for is a solution for formatting **algorithms**. If teximg can help +>> with that, great, otherwise there's the 3 workarounds I mentioned above. +>> +>> Do you have any ideas not mentioned? :-) +>> +>> -- [[fr33domlover]] diff --git a/doc/forum/How_to_properly_create_--_in_a_wiki_--____39__page__47__index.html__39___files.mdwn b/doc/forum/How_to_properly_create_--_in_a_wiki_--____39__page__47__index.html__39___files.mdwn new file mode 100644 index 000000000..4b7f468bf --- /dev/null +++ b/doc/forum/How_to_properly_create_--_in_a_wiki_--____39__page__47__index.html__39___files.mdwn @@ -0,0 +1,17 @@ +I am trying **in a wiki** to "manually," i.e. not using the web interface, use the "page/index.html" type of page creation. + +In my working clone src dir I can use, in succession, commands such as: + +mkdir MyNewPage + +touch MyNewPage/index.mdwn + +git add MyNewPage MyNewPage/index.mdwn + +[here I edit the new index.mdwn] + +git commit -a + +git push + +These are, roughly, the steps I have taken, and they seem to work. But surely there is a more elegant, **Ikiwiki-ish** solution. diff --git a/doc/forum/How_to_properly_create_--_in_a_wiki_--____39__page__47__index.html__39___files/comment_1_d9ee358ded5d5307ba73a8c11f81549d._comment b/doc/forum/How_to_properly_create_--_in_a_wiki_--____39__page__47__index.html__39___files/comment_1_d9ee358ded5d5307ba73a8c11f81549d._comment new file mode 100644 index 000000000..7412aa936 --- /dev/null +++ b/doc/forum/How_to_properly_create_--_in_a_wiki_--____39__page__47__index.html__39___files/comment_1_d9ee358ded5d5307ba73a8c11f81549d._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="https://me.yahoo.com/a/eetjWe8B34ZeUsHyFzpwC5QvBcEuVxllSvpJHw--#376d7" + nickname="Bob" + subject="SOLVED. NEVER MIND. SORRY." + date="2014-06-03T00:33:59Z" + content=""" +I get it. All I have to do is create NewPage.mdwn, add, commit, git pull and then git push, and lo and behold, NewPage/index.html is in my destination dir. +"""]] diff --git a/doc/forum/How_to_rename_all_markdown_files_from___42__.mdwn_to___42__.md__63__.mdwn b/doc/forum/How_to_rename_all_markdown_files_from___42__.mdwn_to___42__.md__63__.mdwn new file mode 100644 index 000000000..d11f7a3c5 --- /dev/null +++ b/doc/forum/How_to_rename_all_markdown_files_from___42__.mdwn_to___42__.md__63__.mdwn @@ -0,0 +1,3 @@ +Github does not take .mdwn as Markdown files: https://github.com/github/markup/blob/b865add2e053f8cea3d7f4d9dcba001bdfd78994/lib/github/markups.rb#L1 + +I'd like to use filename extensions complaint to GitHub. My question is after renaming all markdown files from *.mdwn to *.md how do I correct all the dependencies? Does simply committing the renamed files to the source repository suffice? diff --git a/doc/forum/How_to_rename_all_markdown_files_from___42__.mdwn_to___42__.md__63__/comment_1_c2720ebfe56ad816f241693d9e2e5072._comment b/doc/forum/How_to_rename_all_markdown_files_from___42__.mdwn_to___42__.md__63__/comment_1_c2720ebfe56ad816f241693d9e2e5072._comment new file mode 100644 index 000000000..c458b5345 --- /dev/null +++ b/doc/forum/How_to_rename_all_markdown_files_from___42__.mdwn_to___42__.md__63__/comment_1_c2720ebfe56ad816f241693d9e2e5072._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="fr33domlover" + ip="85.65.55.38" + subject="comment 1" + date="2014-05-16T08:49:30Z" + content=""" +I don't know, but I remember there's a setting in the setup file which sets the extension for Markdown files. I would create a dummy wiki for tests, where I'd create some files with .md extension and change that setting in the setup file. Then try rebuilding the wiki and see what happens. + +I'm just a user, I don't know beyond that. +"""]] diff --git a/doc/forum/I_do_not_know_anything_abut_git.mdwn b/doc/forum/I_do_not_know_anything_abut_git.mdwn new file mode 100644 index 000000000..31358bbb1 --- /dev/null +++ b/doc/forum/I_do_not_know_anything_abut_git.mdwn @@ -0,0 +1,22 @@ +I want to learn how to use a text editor in addition to the web interface. I am stuck on pushing changes back to where they're supposed to go. + +I have done: + + git clone Zoidwicky.git Zoidwicky.src + +and then, after editing sidebar.mdwn in that new Zoidwicky.src directory + + git commit sidebar.mdwn + +Now I believe I must use git push to move that change to I am not sure where. + +I learn best by example. Would someone be good enough to post an example of what that 'git push" command might look like? + +Here are some samples of what I have tried: + + $ git push sidebar.mdwn Zoidwicky.git + fatal: Invalid gitfile format: sidebar.mdwn + + $ git push sidebar.mdwn /home/zoid/Zoidwicky.git/ + fatal: remote part of refspec is not a valid name in /home/zoidberg/Zoidwicky.git + diff --git a/doc/forum/I_do_not_know_anything_abut_git/comment_1_2efdf8563bcdeba73b11282157aba72d._comment b/doc/forum/I_do_not_know_anything_abut_git/comment_1_2efdf8563bcdeba73b11282157aba72d._comment new file mode 100644 index 000000000..7649feece --- /dev/null +++ b/doc/forum/I_do_not_know_anything_abut_git/comment_1_2efdf8563bcdeba73b11282157aba72d._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="http://kerravonsen.dreamwidth.org/" + ip="203.206.140.235" + subject="comment 1" + date="2014-05-24T23:30:43Z" + content=""" +Just use \"git push\" without any arguments at all. + + git push +"""]] diff --git a/doc/forum/I_do_not_know_anything_abut_git/comment_2_3dd0fa0612a5fac785cc7d5ea23d42a5._comment b/doc/forum/I_do_not_know_anything_abut_git/comment_2_3dd0fa0612a5fac785cc7d5ea23d42a5._comment new file mode 100644 index 000000000..18617ac9e --- /dev/null +++ b/doc/forum/I_do_not_know_anything_abut_git/comment_2_3dd0fa0612a5fac785cc7d5ea23d42a5._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="http://bob-bernstein.myopenid.com/" + nickname="bernstein" + subject="comment 2" + date="2014-05-25T03:39:41Z" + content=""" +Ah. That is simple enough even for me! Thank you so much! +"""]] diff --git a/doc/forum/Right-to-left_support.mdwn b/doc/forum/Right-to-left_support.mdwn new file mode 100644 index 000000000..7ca4f9ad6 --- /dev/null +++ b/doc/forum/Right-to-left_support.mdwn @@ -0,0 +1,15 @@ +Does ikiwiki support RTL languages? I read somewhere it does, but I don't see +any mention of that here (or anywhere else... that info may be wrong). + +I'd like to add RTL support to my wiki, for text direction and maybe for the +page layout too. Before I edit my CSS, page.tmpl and possibly Perl for +automatic direction setting - does ikiwiki support this in any way? + +On my wiki (ikiwiki version from Debian 7 stable) everything is aligned to +the left, and unicode RTL characters cannot change that - the .tmpl and +css files would need to be changed, it seems. + +I will happily share my insights and code, if I manage to get anything +useful to work :-) + +--[[fr33domlover]] diff --git a/doc/forum/Right-to-left_support/comment_1_5b2bf4d037ae8db940296e6f58884927._comment b/doc/forum/Right-to-left_support/comment_1_5b2bf4d037ae8db940296e6f58884927._comment new file mode 100644 index 000000000..1e9558f96 --- /dev/null +++ b/doc/forum/Right-to-left_support/comment_1_5b2bf4d037ae8db940296e6f58884927._comment @@ -0,0 +1,21 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawmfcr1X7TXwuCju7vCBG6vii455SX1Qxro" + nickname="Mesar" + subject="comment 1" + date="2014-08-30T17:53:53Z" + content=""" +Hi, + +You need ikiwiki 3.20140227 or newer, which includes the patch to expose the language code/direction see [[todo/expose_html_language_and_direction/]] +After which you need to modify the templates to make use of the tags. + +I'm currently running this on http://addons.nvda-project.org +The config/templates can be [found here](https://bitbucket.org/nvdaaddonteam/ikiwiki-ctl) + +I haven't investigated how this functions when the po plugin is disabled, but I am guessing that you can simply enable the po plugin, define your master language, and miss out any slave languages. + +I would be intrested to hear feedback/what you got to work, as we are a bunch of blind people running the project above, so the correct markup was the goal in our case, I haven't had any feedback on its visual appearance. + + +--[[mhameed]] +"""]] diff --git a/doc/forum/Spaces_in_URLs.mdwn b/doc/forum/Spaces_in_URLs.mdwn new file mode 100644 index 000000000..4749f4dc5 --- /dev/null +++ b/doc/forum/Spaces_in_URLs.mdwn @@ -0,0 +1,14 @@ +There is one file on my site that had a space in the name; +on my old site, this link worked: +[http://dada.pink/scarsdale/Statement 20140527.pdf](http://dada.pink/scarsdale/Statement 20140527.pdf) + +Now that I've moved to Ikiwiki, that doesn't work. So I moved the file here: +[http://dada.pink/scarsdale/Statement_20140527.pdf](http://dada.pink/scarsdale/Statement_20140527.pdf) + +Is there a better approach to maintaining this link than setting an alias in Apache? + +> You can add the space character to the `wiki_file_chars` argument in your setup file. -- [[Jon]] + +>> a space character is not allowed in a url; user agents that read one usually represent it in percent encoded form (`%20`). if you use that, things also work for direct links, which i assume caused the problem (for both the links in the original description render correctly): `\[[http://dada.pink/scarsdale/Statement%2020140527.pdf]]` renders [[http://dada.pink/scarsdale/Statement%2020140527.pdf]]. +>> +>> spaces are allowed in internal pages because wiki page names are not urls per se but converted using conversion rules -- this allows people to not think about url rules and just link to pages, but when you're linking outside ikiwiki, some strings just aren't valid urls. --[[chrysn]] diff --git a/doc/forum/Trail_plugin_links_with_Actiontabs_theme.mdwn b/doc/forum/Trail_plugin_links_with_Actiontabs_theme.mdwn new file mode 100644 index 000000000..decaaa1bc --- /dev/null +++ b/doc/forum/Trail_plugin_links_with_Actiontabs_theme.mdwn @@ -0,0 +1,47 @@ +I'm using the trail plugin with the actiontabs theme, and the prev/next links +seem to appear in a strange way on the page. + +I use modified CSS, but it changes just the colors and some font sizes. +Nothing related to positions and trails. + +Here's an example - the top prev/next links appear above the action tabs. +Is this normal? I'm using the ikiwiki version from Debian 7 stable. + +- If you use OpenNIC: +- If you don't (will work only until the IP changes): + +I can look at the CSS and try to figure this out, but I don't know much CSS or +how the trail plugin works. If anyone uses trails, especially with actiontabs, and +can help me - it will be great. + +Thanks in advance! + +--[[fr33domlover]] + +> I looked at the file *page.tmpl* and it seems I may be able to change +> the trail link location if I edit that file. Would it be a good/possible solution to +> edit it and put it in the git repo to be used instead of the default one? +> +> --[[fr33domlover]] + +>> That's how I intended trails to look with actiontabs: +>> is +>> another example. +>> +>> With the way the actiontabs theme works, if you want to move the +>> trail bits down into the content area (white background in the +>> unedited theme) you might have to alter both `page.tmpl` +>> and the actiontabs CSS. You'll see that the actiontabs CSS +>> has a special case for trails, because the tabs and the trail +>> links would overlap otherwise - you might have to remove +>> that special case. --[[smcv]] + +>>> Thanks, I'll try that. But I've been using those trails in the last +>>> several hours and I'm beginning to get used to the current +>>> layout. Maybe I'll just keep it :-) +>>> +>>> (Anyway the way trail links look on my wiki is valid, it's exactly +>>> like on your link, only with different colors. I suppose it's +>>> just a cosmetic issue then) +>>> +>>> --[[fr33domlover]] diff --git a/doc/forum/Using_reverse_proxy__59___base_URL_is_http_instead_of_https/comment_3_f402fb426e0460ce927b7847246f699f._comment b/doc/forum/Using_reverse_proxy__59___base_URL_is_http_instead_of_https/comment_3_f402fb426e0460ce927b7847246f699f._comment new file mode 100644 index 000000000..8b976fac2 --- /dev/null +++ b/doc/forum/Using_reverse_proxy__59___base_URL_is_http_instead_of_https/comment_3_f402fb426e0460ce927b7847246f699f._comment @@ -0,0 +1,19 @@ +[[!comment format=mdwn + username="amcalvo" + ip="78.53.114.169" + subject="Workaround for Nginx" + date="2014-05-05T21:49:10Z" + content=""" +Thank you for the analysis. I have worked around the issue by using the , something like: + +~~~ +location { + # Proxy stuff... + sub_filter 'http://example.com' 'https://example.com'; + +} +~~~ + +Best regards, +amc. +"""]] diff --git a/doc/forum/Using_reverse_proxy__59___base_URL_is_http_instead_of_https/comment_4_db726bc81ec5feac76d17ea81f0f80a5._comment b/doc/forum/Using_reverse_proxy__59___base_URL_is_http_instead_of_https/comment_4_db726bc81ec5feac76d17ea81f0f80a5._comment new file mode 100644 index 000000000..d0b2952b0 --- /dev/null +++ b/doc/forum/Using_reverse_proxy__59___base_URL_is_http_instead_of_https/comment_4_db726bc81ec5feac76d17ea81f0f80a5._comment @@ -0,0 +1,13 @@ +[[!comment format=mdwn + username="amcalvo" + ip="78.53.114.169" + subject="comment 4" + date="2014-05-05T21:56:36Z" + content=""" +A correction to the above comment, one needs activate multiple replacements: + +~~~ + sub_filter 'http://example.com' 'https://example.com'; + sub_filter_once off; +~~~ +"""]] diff --git a/doc/forum/Using_reverse_proxy__59___base_URL_is_http_instead_of_https/comment_5_674f56100c0682eba36cc5327fbdae4a._comment b/doc/forum/Using_reverse_proxy__59___base_URL_is_http_instead_of_https/comment_5_674f56100c0682eba36cc5327fbdae4a._comment new file mode 100644 index 000000000..1546c67a0 --- /dev/null +++ b/doc/forum/Using_reverse_proxy__59___base_URL_is_http_instead_of_https/comment_5_674f56100c0682eba36cc5327fbdae4a._comment @@ -0,0 +1,61 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawk6z7Jsfi_XWfzFJNZIjYUcjgrthg4aPUU" + nickname="Alejandro" + subject="Same Trick in Apache" + date="2014-09-10T18:58:24Z" + content=""" +I got it working with Apache 2.4 and Virtual Hosts on both HTTP 1.1 and HTTPS (SNI). The procedure is somewhat analogous to the nginx procedure above. So here is my set-up in the hopes will help other avoid this pain. + +## Set-up + + CLIENT <---- HTTPS ----> REVERSE PROXY <---- HTTP ----> IKIWIKI + + +## The HTTP to HTTPS Redirect + +To assure that all your HTTP requests are being redirected to HTTPS I chose to use mod_rewrite because simple Redirect does not pass query parameters. You will want an HTTP VHost that will redirect with something like the one below (notice the subtle ? before query string). **Note: This will NOT re-write ikiwiki's http:// URLs (base tag, etc.)**. For that I use a content filter like you will see below. This HTTP to HTTPS redirect is required though for both security and for the /foo/?updated URI form in this set-up. + +
+
+<VirtualHost *:80>
+    ServerName imass.name
+    RewriteEngine On
+    RewriteCond %{HTTPS} off
+    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}?%{QUERY_STRING}
+    ErrorLog /var/log/imass.name-error.log
+    LogLevel warn
+    CustomLog /var/log/imass.name-access.log combined
+</VirtualHost>
+
+
+ +## The SSL Virtual Host + +This part is a bit more tricky. First I am using SNI as I don't care for non-SNI user agents. Second, you need to use a filter that replaces all http:// to https:// before the response is set. Note that this alone won't deal with ?update so you will need the HTTP to HTTPS set-up above anyway. Third, I use HTTP Auth so I don't know if this will work with your particular Auth set-up (although it should IMHO), YMMV: + +
+
+<VirtualHost *:443>
+    ServerName imass.name
+    ProxyHTMLEnable On
+    ProxyHTMLExtended On
+    SSLEngine on
+    SSLCertificateFile XXX
+    SSLCertificateKeyFile XXX
+    SSLCertificateChainFile XXX
+    SSLOptions +StdEnvVars
+    ProxyPreserveHost On
+    ProxyHTMLURLMap http:// https://
+    ProxyPass / http://192.168.101.101/
+    ProxyPassReverse / http://192.168.101.101/
+    LogLevel warn
+    ErrorLog /var/log/imass.name-ssl-error.log
+    TransferLog \"/var/log/imass.name-ssl-access.log\"
+    CustomLog \"/var/log/imass.name-ssl-request.log\" \"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \\"%r\\" %b\"
+</VirtualHost>
+
+
+ + + +"""]] diff --git a/doc/forum/Your_local_changes_to_the_following_files_would_be_overwritten_by_merge:.mdwn b/doc/forum/Your_local_changes_to_the_following_files_would_be_overwritten_by_merge:.mdwn new file mode 100644 index 000000000..911e4c8ab --- /dev/null +++ b/doc/forum/Your_local_changes_to_the_following_files_would_be_overwritten_by_merge:.mdwn @@ -0,0 +1,35 @@ +In my first attempt to edit in a text editor I chose sidebar.mdwn. I committed it after the editing, and get this when I execute "git push:" + +$ git push + + Counting objects: 5, done. + + Delta compression using up to 8 threads. + + Compressing objects: 100% (3/3), done. + + Writing objects: 100% (3/3), 289 bytes, done. + + Total 3 (delta 2), reused 0 (delta 0) + + Unpacking objects: 100% (3/3), done. + + remote: From /home/zoidberg/Zoidwicky + + remote: e878e6a..0ac0c44 master -> origin/master + + remote: error: Your local changes to the following files would be overwritten by merge: + + remote: sidebar.mdwn + + remote: Please, commit your changes or stash them before you can merge. + + remote: Aborting + + remote: 'git pull --prune origin' failed: at /usr/share/perl5/IkiWiki/Plugin/git.pm line 218. + + To /home/zoidberg/Zoidwicky.git + + e878e6a..0ac0c44 master -> master + +I have committed my changes to sidebar.mdwn and given my reason for doing so. Also, I get this complaint about sidebar.mdwn when I try 'git push' after editng other files. So I am stuck here. Pls. help. diff --git a/doc/forum/Your_local_changes_to_the_following_files_would_be_overwritten_by_merge:/comment_1_2223c8b463b22a9dab53b71c01b67209._comment b/doc/forum/Your_local_changes_to_the_following_files_would_be_overwritten_by_merge:/comment_1_2223c8b463b22a9dab53b71c01b67209._comment new file mode 100644 index 000000000..b306c9bcf --- /dev/null +++ b/doc/forum/Your_local_changes_to_the_following_files_would_be_overwritten_by_merge:/comment_1_2223c8b463b22a9dab53b71c01b67209._comment @@ -0,0 +1,12 @@ +[[!comment format=mdwn + username="http://bob-bernstein.myopenid.com/" + nickname="bernstein" + subject="FIXED! YIPPEE!" + date="2014-05-26T04:26:17Z" + content=""" +Just diddling around I got the old copy of sidebar.mdwn out of the way, i.e. I moved it out of, not the .git directory in my home dir, but the \"plain\" one. I really ought to learn the names of these things. At any rate it was what git called my \"local copy,\" so I got it out of there. + +Now with the logjam broken I can edit, commit, and push changes, apparently, 'til the cows come home. + +Thank yourse A::! +"""]] diff --git a/doc/forum/Your_local_changes_to_the_following_files_would_be_overwritten_by_merge:/comment_2_2466ce4303f5b8145bdfae23b6dbddda._comment b/doc/forum/Your_local_changes_to_the_following_files_would_be_overwritten_by_merge:/comment_2_2466ce4303f5b8145bdfae23b6dbddda._comment new file mode 100644 index 000000000..690808a00 --- /dev/null +++ b/doc/forum/Your_local_changes_to_the_following_files_would_be_overwritten_by_merge:/comment_2_2466ce4303f5b8145bdfae23b6dbddda._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="http://bob-bernstein.myopenid.com/" + nickname="bernstein" + subject="Fat Fingers" + date="2014-05-26T04:29:44Z" + content=""" +Make that last line, above: + +Thank youse ALL! +"""]] diff --git a/doc/forum/__34__Error:_cannot_decode_string_with_wide_characters__34___on_Mageia_Linux_x86-64_Cauldron.mdwn b/doc/forum/__34__Error:_cannot_decode_string_with_wide_characters__34___on_Mageia_Linux_x86-64_Cauldron.mdwn index 8f9225968..c5a91be06 100644 --- a/doc/forum/__34__Error:_cannot_decode_string_with_wide_characters__34___on_Mageia_Linux_x86-64_Cauldron.mdwn +++ b/doc/forum/__34__Error:_cannot_decode_string_with_wide_characters__34___on_Mageia_Linux_x86-64_Cauldron.mdwn @@ -18,3 +18,6 @@ Can anyone shed any light on this problem and guide me what I need to do to fix Regards, -- [Shlomi Fish](http://www.shlomifish.org/) + +> [[Merged anarcat's fix for +this|bugs/garbled non-ascii characters in body in web interface]] --[[smcv]] diff --git a/doc/forum/__34__Error:_cannot_decode_string_with_wide_characters__34___on_Mageia_Linux_x86-64_Cauldron/comment_1_abf7ec7c378ab0908685d72d159e9fd2._comment b/doc/forum/__34__Error:_cannot_decode_string_with_wide_characters__34___on_Mageia_Linux_x86-64_Cauldron/comment_1_abf7ec7c378ab0908685d72d159e9fd2._comment new file mode 100644 index 000000000..8b066b391 --- /dev/null +++ b/doc/forum/__34__Error:_cannot_decode_string_with_wide_characters__34___on_Mageia_Linux_x86-64_Cauldron/comment_1_abf7ec7c378ab0908685d72d159e9fd2._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="https://id.koumbit.net/anarcat" + ip="72.0.72.144" + subject="comment 1" + date="2014-09-10T03:00:22Z" + content=""" +i had a similar issue, reported in [[bugs/garbled_non-ascii_characters_in_body_in_web_interface]]. +"""]] diff --git a/doc/forum/blocked_by_blogspam.mdwn b/doc/forum/blocked_by_blogspam.mdwn new file mode 100644 index 000000000..c28f38572 --- /dev/null +++ b/doc/forum/blocked_by_blogspam.mdwn @@ -0,0 +1,9 @@ +[[!meta title="Wrongfully blocked by blogspam"]] + +For a few days, I can no longer post anything on ikiwiki.info using the web interface, but I can still do so using git. Everytime I try to edit a page, I get following message: + + Error: Sorry, but that looks like spam to [[blogspam|http://blogspam.net/]]: Comment rejected by admin. + +Does someone know what the problem is? + +--[[Louis|spalax]] diff --git a/doc/forum/cutpaste.pm_not_only_file-local.mdwn b/doc/forum/cutpaste.pm_not_only_file-local.mdwn index 0c5221cc9..c75fc53e0 100644 --- a/doc/forum/cutpaste.pm_not_only_file-local.mdwn +++ b/doc/forum/cutpaste.pm_not_only_file-local.mdwn @@ -3,7 +3,7 @@ has \[[!cut id=foo text="foo"]], and fileB does \[[!absorb pagenames=fileA]], and can then use \[[!paste id=foo]]. Therefore, I've written an [*absorb* directive / -plugin](http://schwinge.homeip.net/~thomas/tmp/absorb.pm), which is meant to +plugin](http://nic-nac-project.de/~schwinge/ikiwiki/absorb.pm), which is meant to absorb pages in order to get hold of their *cut* and *copy* directives' contents. This does work as expected. But it also absorbs page fileA's *meta* values, like a *meta title*, etc. How to avoid / solve this? diff --git a/doc/forum/default_paths._Are_there_better_defaults__63__.mdwn b/doc/forum/default_paths._Are_there_better_defaults__63__.mdwn new file mode 100644 index 000000000..ab955a513 --- /dev/null +++ b/doc/forum/default_paths._Are_there_better_defaults__63__.mdwn @@ -0,0 +1,8 @@ +Is there a reason for srcdir and repository to be put into the home dir by default? Especially the srcdir seems to be misplaced there because it looks, smells and usually has the same name as the clone you want to generate exactly there to edit the wiki on the command line. Both srcdir and repository should usually be left alone and that doesn't sound like the files you would want to place highly visible into $HOME + +Sure, I have no problem relocating the dirs myself or editing/replacing /etc/ikiwiki/auto.setup whenever I reinstall a new PC, but a better default would spare me and others a bit of work. + +To me it seems $HOME/.ikiwiki/ might be a good default for storing all this essentially-to-be-ignored dirs as it is created anyway. + +Right? Wrong? + diff --git a/doc/forum/default_paths._Are_there_better_defaults__63__/comment_1_3db622152a8ab53841cc13280ca31da4._comment b/doc/forum/default_paths._Are_there_better_defaults__63__/comment_1_3db622152a8ab53841cc13280ca31da4._comment new file mode 100644 index 000000000..da24613e8 --- /dev/null +++ b/doc/forum/default_paths._Are_there_better_defaults__63__/comment_1_3db622152a8ab53841cc13280ca31da4._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="http://christian.amsuess.com/chrysn" + ip="84.114.244.41" + subject="default paths: basedir spec" + date="2014-05-04T13:30:20Z" + content=""" +i have no opinion on *whether* there should be different default directories, but *if* new directories are desired, they should go to their respective paths according to [basedir-spec](http://freedesktop.org/wiki/Specifications/basedir-spec/). + +i'm no expert in that, but i think it means that the setup files go to `XDG_CONFIG_HOME` (`~/.config/ikiwiki/${wikiname_short}.setup`), and srcdir and repository go to `XDG_DATA_HOME` (`~/.local/share/ikiwiki/${wikiname_short}`). +"""]] diff --git a/doc/forum/how_to_have_a_plugin_delete_a_file.mdwn b/doc/forum/how_to_have_a_plugin_delete_a_file.mdwn new file mode 100644 index 000000000..ea29555e4 --- /dev/null +++ b/doc/forum/how_to_have_a_plugin_delete_a_file.mdwn @@ -0,0 +1,18 @@ +[[!meta title="How to have a plugin delete a file?"]] + +When using the [[plugins/contrib/jscalendar]] plugin, it creates in the +[[plugins/transient]] directory some files (a bit like the +[[plugins/recentchanges]] plugin does). When the calendar that triggered +creation of this file is removed, I would like to remove the corresponding +page as well, but I cannot, because I get the following error. + + internal error: jscalendar/90cde8dfad6413813b324a15ae2d1d95041aedd69e7be36c02b0cd4a58c4af73.jscalendar cannot be found in or underlay + +My guess is that: + +* the page is stored, internally, in some list of pages to render (as it depends on the page containing the calendar that was just deleted); +* my plugin delete this page (using `IkiWiki::prune()` or `unlink()`, in the `rendered()` or `needsbuild()` hook); +* IkiWiki tries to render the page, but cannot (since I just deleted it), and throws the error. + +My question is: How can I tell IkiWiki that I *deleted* this page, and that it is no longer necessary to render it? Is there a hook in which I can safely do this? + diff --git a/doc/forum/how_to_have_a_plugin_delete_a_file/comment_1_061c8bca174f7155d4065dd200c0c8db._comment b/doc/forum/how_to_have_a_plugin_delete_a_file/comment_1_061c8bca174f7155d4065dd200c0c8db._comment new file mode 100644 index 000000000..439b07429 --- /dev/null +++ b/doc/forum/how_to_have_a_plugin_delete_a_file/comment_1_061c8bca174f7155d4065dd200c0c8db._comment @@ -0,0 +1,11 @@ +[[!comment format=mdwn + username="smcv" + ip="81.100.115.242" + subject="comment 1" + date="2014-07-21T20:15:13Z" + content=""" +Without actually checking the source code, I think the answer is: +if you refrain from saying that page *x* `will_render` a file *f* that +was previously rendered by *x*, IkiWiki will notice the difference, +and delete *f* automatically. +"""]] diff --git a/doc/forum/how_to_have_a_plugin_delete_a_file/comment_2_864a20147885642ad3bbcf8400d8ee46._comment b/doc/forum/how_to_have_a_plugin_delete_a_file/comment_2_864a20147885642ad3bbcf8400d8ee46._comment new file mode 100644 index 000000000..f22a60748 --- /dev/null +++ b/doc/forum/how_to_have_a_plugin_delete_a_file/comment_2_864a20147885642ad3bbcf8400d8ee46._comment @@ -0,0 +1,9 @@ +[[!comment format=mdwn + username="smcv" + ip="81.100.115.242" + subject="comment 2" + date="2014-07-21T20:16:16Z" + content=""" +... and in that situation, you need to put *x* in the output of +`needsbuild`, if it did not already have a reason to be built. +"""]] diff --git a/doc/git.mdwn b/doc/git.mdwn index 4fe7d3314..e71fa57d7 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -78,8 +78,9 @@ think about merging them. This is recommended. :-) * anderbubble `git://civilfritz.net/ikiwiki.git` * frioux `git://github.com/frioux/ikiwiki` * llipavsky `git://github.com/llipavsky/ikiwiki` -* [[cbaines]] `git://github.com/cbaines/ikiwiki.git` +* [[cbaines]] `git://git.cbaines.net/ikiwiki` * [[mhameed]] `git://github.com/mhameed/ikiwiki.git` +* [[spalax]] `git://github.com/paternal/ikiwiki.git` ([[browse|https://github.com/paternal/ikiwiki]]) ## branches diff --git a/doc/ikiwiki-calendar/discussion.mdwn b/doc/ikiwiki-calendar/discussion.mdwn index b64321008..17c79b303 100644 --- a/doc/ikiwiki-calendar/discussion.mdwn +++ b/doc/ikiwiki-calendar/discussion.mdwn @@ -20,7 +20,7 @@ Having done this, the only purpose of ikiwiki-calendar would be to re-generate t Did I miss something? If I am right, I offer to write the necessary patch, copied and adapted from the tag plugin, to generate the pages `archive_base/year/month.mdwn` on the fly. --- Spalax +-- [[Louis|spalax]] > Good spotting, `ikiwiki-calendar` predates the `add_autofile` API used to > autocreate tag pages and was bolted in as an easy way to create calendar @@ -34,3 +34,5 @@ Did I miss something? If I am right, I offer to write the necessary patch, copie > That last is, arguably, the real point of running ikiwiki-calendar in > a cron job. Of course all it really does is run `ikiwiki -setup foo > -refresh`. --[[Joey]] + +> > [[Patch|todo/calendar_autocreate]]. -- [[Louis|spalax]] diff --git a/doc/ikiwiki/directive/format.mdwn b/doc/ikiwiki/directive/format.mdwn index 7d11d225f..04ed13959 100644 --- a/doc/ikiwiki/directive/format.mdwn +++ b/doc/ikiwiki/directive/format.mdwn @@ -18,7 +18,7 @@ some other format: 4 """]] -Note that if the highlight plugin is enabled, this directive can also be +Note that if the [[!iki plugins/highlight desc=highlight]] plugin is enabled, this directive can also be used to display syntax highlighted code. Many languages and formats are supported. For example: diff --git a/doc/ikiwiki/directive/meta/discussion.mdwn b/doc/ikiwiki/directive/meta/discussion.mdwn index a0aefe081..428f454ab 100644 --- a/doc/ikiwiki/directive/meta/discussion.mdwn +++ b/doc/ikiwiki/directive/meta/discussion.mdwn @@ -67,3 +67,14 @@ index 984f685..b82fa58 100644 ---- I guess patching [[/ikiwiki/directive/meta]] to document the fact this attribute is supported would be good. — [[Jon]] + + +---- + ++1 the language attribute works, I see: + + + +The problem is that it does not generate the lang attribute in `` and that's what's required for [hyphenation](https://developer.mozilla.org/en-US/docs/Web/CSS/hyphens) so this would be welcome too! + +Also, being able to use the language variable in templates would be very useful for various css tweaks. — [Hugo](https://hroy.eu) diff --git a/doc/ikiwiki/markdown/discussion.mdwn b/doc/ikiwiki/markdown/discussion.mdwn new file mode 100644 index 000000000..7c0d75858 --- /dev/null +++ b/doc/ikiwiki/markdown/discussion.mdwn @@ -0,0 +1,48 @@ +There is an ongoing [effort to standardise Markdown][sm]; I think it would be nice to check whether this implementation is compliant with it. + +[sm]: http://standardmarkdown.com/ + +http://standardmarkdown.com/ + +> IkiWiki's [[plugins/mdwn]] plugin does not contain an implementation +> of Markdown: it relies on external libraries. It can currently use +> any of these, most-preferred first: +> +> * [[!cpan Text::MultiMarkdown]], only if explicitly requested via +> `$config{multimarkdown}` +> * [[!cpan Text::Markdown::Discount]], if not explicitly disabled +> via `$config{nodiscount}` +> * [[!cpan Text::Markdown]] +> * [[!cpan Markdown]] +> * `/usr/bin/markdown` +> +> In practice, Discount is the implementation pulled in by the +> Debian package dependencies, and (I suspect) the most +> commonly used with IkiWiki. +> +> If the selected external library (whatever it happens to be) +> complies with a particular interpretation of Markdown, then +> IkiWiki will too. If not, it won't. The only influence +> IkiWiki has over its level of compliance with a particular +> interpretation is in how we choose which external library +> we prefer. +> +> As such, if you want IkiWiki to change its interpretation of +> Markdown, the way to do that is to either change Discount's +> interpretation of Markdown, or contribute a patch to make +> `mdwn.pm` prefer a different (and presumably "more compliant") +> Markdown implementation. +> +> IkiWiki has one syntax extension beyond Markdown, which is +> that text enclosed in double-square-brackets is an IkiWiki +> [[ikiwiki/wikilink]] or [[ikiwiki/directive]]. This applies +> to any markup language used with IkiWiki, not just Markdown. +> +> (There also doesn't seem to be any consensus that labelling +> any particular fork of Markdown as "standard" can make it the +> truth, or that this particular fork is the Correct™ fork and not +> just ; but that's between the authors of +> Markdown implementations and those who want to standardize +> Markdown, and it isn't IkiWiki's job to police that.) +> +> --[[smcv]] diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index ea0e98d43..bc5df6cf9 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -13,7 +13,12 @@ appreciation. Ikiwiki Hosting =============== -* [Branchable](http://branchable.com/) +[[!table data=""" +Name | Ikiwiki Configuration | Costs +[Branchable](http://branchable.com/) | Open configuration with [ikiwiki-hosting](http://ikiwiki-hosting.branchable.com/) | Free for free software, otherwise involves fees +[Piny.be](http://piny.be/) | Restricted configuration with [Piny](http://piny.be/piny-code/) | Free for non-profit purposes (including open source projects); commercial activity disallowed. +[FairlyStable.org](http://fairlystable.org/) | Restricted configuration with [Piny](http://piny.be/piny-code/) | Free for small projects, otherwise involves fees +"""]] Projects & Organizations ======================== @@ -22,6 +27,8 @@ Projects & Organizations * [NetBSD wiki](http://wiki.netbsd.org) * The [GNU Hurd](http://www.gnu.org/software/hurd/) * [DragonFly BSD](http://www.dragonflybsd.org/) +* [X.org](http://www.x.org/) +* [Freedesktop.org](http://www.freedesktop.org/) and many projects therein * [Monotone](http://wiki.monotone.ca/) * The [Free Software Foundation](http://fsf.org) uses it for their internal wiki, with subversion. * The [cairo graphics library](http://cairographics.org/) website. @@ -89,6 +96,10 @@ Projects & Organizations * [[CAS Libres|http://cas-libres.poivron.org]] - A French feminist radio program. * [[Les Barricades|http://barricades.int.eu.org]] - A French socialist choir (CSS has been adapted from the one of [[Grésille|http://www.gresille.org]]). * [DKØTU Amateur Radio Station](http://www.dk0tu.de), TU Berlin +* [[Plan A|http://www.plan-a-muenchen.de/]] - A proposal for improvement of the urban public transport in Munich (by PRO BAHN, Bund Naturschutz and others) +* [[Smuxi IRC Client|https://smuxi.im/]] - powerful IRC client for GNOME +* [[hplusroadmap|http://diyhpl.us/wiki/]] - a community for open source hardware, do-it-yourself biohacking and practical transhumanism +* [[OpenAFS|http://wiki.openafs.org]] - an open-source, cross-platform distributed file system Personal sites and blogs ======================== @@ -188,3 +199,9 @@ Personal sites and blogs * [Z is for Zombies](http://blog.zouish.org/) — personal blog/site of Francesca Ciceri * Julien Lefrique's [homepage](http://julien.lefrique.name/), hosted on [GitHub pages](https://github.com/jlefrique/jlefrique.github.com) with CGI disabled * [Anarcat's homepage](http://anarcat.ath.cx/) - with a custom [[theme|theme_market]] +* [Wouter's Blog](http://grep.be/blog/), with a custom CSS stylesheet based off the rest of his website. +* [Julian Andres Klode's blog](http://jak-linux.org/) +* [KheOps's blog](https://w.ceops.eu/words/) +* [Stig Sandbeck Mathisen](http://fnord.no/) - Personal site and blog, with a bootstrap theme, and varnish frontend. +* Kalle Söderman: [Seen Architecture](http://img.kalleswork.net), [Stockholm Project](http://stockholm.kalleswork.net) - Mainly -image galleries using the album and osm plugins with a customized html5 theme. + diff --git a/doc/news/openid.mdwn b/doc/news/openid.mdwn index 56a69c943..c158ec3f9 100644 --- a/doc/news/openid.mdwn +++ b/doc/news/openid.mdwn @@ -10,4 +10,4 @@ log back in, try out the OpenID signup process if you don't already have an OpenID, and see how OpenID works for you. And let me know your feelings about making such a switch. --[[Joey]] -[[!poll 71 "Accept only OpenID for logins" 21 "Accept only password logins" 47 "Accept both"]] +[[!poll 76 "Accept only OpenID for logins" 21 "Accept only password logins" 49 "Accept both"]] diff --git a/doc/news/openid/discussion.mdwn b/doc/news/openid/discussion.mdwn index bc9856ad9..d8c83f022 100644 --- a/doc/news/openid/discussion.mdwn +++ b/doc/news/openid/discussion.mdwn @@ -94,3 +94,30 @@ One caveat to the above is that, of course, OpenID is a distributed trust system ---- Submitting bugs in the OpenID components will be difficult if OpenID must be working first... + +------ + +# Privacy and Decentralization + +Maybe I don't understand OpenID well enough, but it looks like there are just few providers, most +of which are huge companies or belong to such, and I don't trust them to verify me identity +or to not track all my logins. I'll use OpenID only if I can make my own home server +be my OpenID provider, and if doing so doesn't interfere with the design and security and +privacy of OpenID, and doesn't require me to use centrally-signed certificates or pay to some +company or anything like that. + +Is it possible to use OpenID in a way keeping the user in full control and allowing any user to +have their personal provider without damaging the architecture behind OpenID? + +I'm worried, at least until the issue is cleared. + +-- [[fr33domlover]] + +> You can install an OpenID provider on your own server and use that if you +> wish. I believe you will need an SSL certificate that `ikiwiki.info` trusts. +> -- [[Jon]] + +---- + +This poll is now 8 years old. Do we have enough data to make a decision? +Can we consider adding `open=no` to the poll? -- [[Jon]] diff --git a/doc/news/version_3.20130904.1.mdwn b/doc/news/version_3.20130904.1.mdwn deleted file mode 100644 index a24829540..000000000 --- a/doc/news/version_3.20130904.1.mdwn +++ /dev/null @@ -1,3 +0,0 @@ -ikiwiki 3.20130904.1 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * Fix cookiejar default setting."""]] \ No newline at end of file diff --git a/doc/news/version_3.20130904.mdwn b/doc/news/version_3.20130904.mdwn deleted file mode 100644 index c5b65d5ac..000000000 --- a/doc/news/version_3.20130904.mdwn +++ /dev/null @@ -1,15 +0,0 @@ -ikiwiki 3.20130904 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * calendar: Display the popup mouseover when there is only 1 page for a - given day, for better UI consistency. - * meta: Can now be used to add an enclosure to a page, which is a fancier - way to do podcasting than just inlining the media files directly; - this way you can write a post about the podcast episode with show notes, - author information, etc. - (schmonz) - * aggregate: Show author in addition to feedname, if different. - (schmonz) - * Consistently configure LWP::UserAgent to allow use of http\_proxy - and no\_proxy environment variables, as well as ~/.ikiwiki/cookies - (schmonz) - * Fix test suite to work with perl 5.18. Closes: #[719969](http://bugs.debian.org/719969)"""]] \ No newline at end of file diff --git a/doc/news/version_3.20140102.mdwn b/doc/news/version_3.20140102.mdwn deleted file mode 100644 index e10164625..000000000 --- a/doc/news/version_3.20140102.mdwn +++ /dev/null @@ -1,24 +0,0 @@ -ikiwiki 3.20140102 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * aggregate: Improve display of post author. - * poll: Fix behavior of poll buttons when inlined. - * Fixed unncessary tight loop hash copy in saveindex where a pointer - can be used instead. Can speed up refreshes by nearly 50% in some - circumstances. - * Optimized loadindex by caching the page name in the index. - * Added only\_committed\_changes config setting, which speeds up wiki - refresh by querying git to find the files that were changed, rather - than looking at the work tree. Not enabled by default as it can - break some setups where not all files get committed to git. - * comments: Write pending moderation comments to the transient underlay - to avoid conflict with only\_committed\_changes. - * search: Added google\_search option, which makes it search google - rather than using the internal xapain database. - (googlesearch plugin is too hard to turn on when xapain databases - corrupt themselves, which happens all too frequently). - * osm: Remove invalid use of charset on embedded javascript tags. - Closes: #[731197](http://bugs.debian.org/731197) - * style.css: Add compatibility definitions for more block-level - html5 elements. Closes: #[731199](http://bugs.debian.org/731199) - * aggregrate: Fix several bugs in handling of empty and colliding - titles when generating filenames."""]] \ No newline at end of file diff --git a/doc/news/version_3.20140613.mdwn b/doc/news/version_3.20140613.mdwn new file mode 100644 index 000000000..ab9940a96 --- /dev/null +++ b/doc/news/version_3.20140613.mdwn @@ -0,0 +1,5 @@ +ikiwiki 3.20140613 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * only\_committed\_changes could fail in a git repository merged + with git merge -s ours. + * Remove google from openid selector, per http://xkcd.com/1361/"""]] \ No newline at end of file diff --git a/doc/news/version_3.20140815.mdwn b/doc/news/version_3.20140815.mdwn new file mode 100644 index 000000000..6ec3c73c3 --- /dev/null +++ b/doc/news/version_3.20140815.mdwn @@ -0,0 +1,10 @@ +ikiwiki 3.20140815 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * Add google back to openid selector. Apparently this has gotten a stay + of execution until April 2015. (It may continue to work until 2017.) + * highlight: Add compatibility with highlight 3.18, while still supporting + 3.9+. Closes: #[757679](http://bugs.debian.org/757679) + Thanks, David Bremner + * highlight: Add support for multiple language definition directories + Closes: #[757680](http://bugs.debian.org/757680) + Thanks, David Bremner"""]] \ No newline at end of file diff --git a/doc/news/version_3.20140831.mdwn b/doc/news/version_3.20140831.mdwn new file mode 100644 index 000000000..c8ea1a237 --- /dev/null +++ b/doc/news/version_3.20140831.mdwn @@ -0,0 +1,3 @@ +ikiwiki 3.20140831 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * Make --no-gettime work in initial build. Closes: #[755075](http://bugs.debian.org/755075)"""]] \ No newline at end of file diff --git a/doc/plugins/contrib/addtag.mdwn b/doc/plugins/contrib/addtag.mdwn index ed57202d8..5b9461d28 100644 --- a/doc/plugins/contrib/addtag.mdwn +++ b/doc/plugins/contrib/addtag.mdwn @@ -1,3 +1,4 @@ +[[!meta author="spalax"]] [[!template id=plugin name=addtag author="[[Louis|spalax]]"]] [[!tag type/widget]] diff --git a/doc/plugins/contrib/album.mdwn b/doc/plugins/contrib/album.mdwn index 745a44e8b..9fac11164 100644 --- a/doc/plugins/contrib/album.mdwn +++ b/doc/plugins/contrib/album.mdwn @@ -11,6 +11,65 @@ This plugin automatically enables the [[filecheck]], [[img]], [[inline]], [[trail]] and [[transient]] plugins. The [[meta]] plugin is also recommended. +## Demo + +* [HTML page of thumbnails](http://ikialbum.hosted.pseudorandom.co.uk/album/) + as an entry point to the album +* Each thumbnail links to + [a "viewer" HTML page](http://ikialbum.hosted.pseudorandom.co.uk/album/img_0120/) + with a full size image, optional next/previous thumbnail links, and + optional [[plugins/comments]] + +### Altered Demo + +[[!template id=gitbranch branch=cbaines/album]] +This uses the album plugin, with some altered css, and with the css applied to +all of the themes. + +* [Simple album, rendered using mutiple themes](http://cbaines.net/projects/ikiwiki/album/dest/basic) + using the ikiwiki logo. + +## Installation + +[[!template id=gitbranch branch=smcv/album5 author="[[Simon_McVittie|smcv]]"]] + +Available from [[smcv]]'s git repository, in the `album5` branch. +I've called it `album` to distinguish it from +[[contrib/gallery|plugins/contrib/gallery]], although `gallery` might well be +a better name for this functionality. + +(The Summer of Code [[plugins/contrib/gallery]] plugin does the +next/previous UI in Javascript using Lightbox, which means that +individual photos can't be bookmarked in a meaningful way, and +the best it can do as a fallback for non-Javascript browsers +is to provide a direct link to the image.) + +Updated, June 2014: integrated changes from [[KathrynAndersen]], +Lukas Lipavsky and kjs + +An `album6` branch is also available, but is less suitable +for manual installation since it needs core IkiWiki changes +(until [[bugs/trails depend on everything]] is fixed). + +### Manual installation + +First, you need a version of ikiwiki with the [[trail]] plugin merged in +(version 3.20120203 or later). + +Manual installation requires these files (use the "raw" link in gitweb +to download): + +* [album.pm](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/IkiWiki/Plugin/album.pm) + in an `IkiWiki/Plugin` subdirectory of your configured `plugindir` +* [albumviewer.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/templates/albumviewer.tmpl), + [albumitem.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/templates/albumitem.tmpl), + [albumnext.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/templates/albumnext.tmpl) and + [albumprev.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/templates/albumprev.tmpl), + in your configured `templatedir`, or a `templates` subdirectory of your wiki repository +* the album-related bits from the end of the + [stylesheet](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/doc/style.css) + (put them in your local.css) + ## Changing the templates When a viewer page is generated or inlined into an album, the template can @@ -44,51 +103,6 @@ template: \[[!inline pages="..." sort="-age" template="albumitem"]] ----- - -[[!template id=gitbranch branch=smcv/album4 author="[[Simon_McVittie|smcv]]"]] - -Available from [[smcv]]'s git repository, in the `album4` branch. -I've called it `album` to distinguish it from -[[contrib/gallery|plugins/contrib/gallery]], although `gallery` might well be -a better name for this functionality. - -(The Summer of Code [[plugins/contrib/gallery]] plugin does the -next/previous UI in Javascript using Lightbox, which means that -individual photos can't be bookmarked in a meaningful way, and -the best it can do as a fallback for non-Javascript browsers -is to provide a direct link to the image.) - -Updated, April 2012: rebased onto the version of [[trail]] that got merged - -## Manual installation - -First, you need a version of ikiwiki with the [[trail]] plugin merged in -(version 3.20120203 or later). - -Manual installation requires these files (use the "raw" link in gitweb -to download): - -* [album.pm](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/IkiWiki/Plugin/album.pm) - in an `IkiWiki/Plugin` subdirectory of your configured `plugindir` -* [albumviewer.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/templates/albumviewer.tmpl), - [albumitem.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/templates/albumitem.tmpl), - [albumnext.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/templates/albumnext.tmpl) and - [albumprev.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/templates/albumprev.tmpl), - in your configured `templatedir`, or a `templates` subdirectory of your wiki repository -* the album-related bits from the end of the - [stylesheet](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/doc/style.css) - (put them in your local.css) - -## Demo - -* [HTML page of thumbnails](http://ikialbum.hosted.pseudorandom.co.uk/album/) - as an entry point to the album -* Each thumbnail links to - [a "viewer" HTML page](http://ikialbum.hosted.pseudorandom.co.uk/album/img_0120/) - with a full size image, optional next/previous thumbnail links, and - optional [[plugins/comments]] - ## Bugs * There's currently a hard-coded list of extensions that are treated as @@ -117,9 +131,9 @@ to download): * The generated viewer page should extract as much metadata as possible from the photo's EXIF tags (creation/modification dates, author, title, caption, - copyright). [[smcv]] has a half-written implementation which runs - `scanimage` hooks, and has an `exiftool` plugin using [[!cpan Image::ExifTool]] - as a reference implementation of that hook. + copyright). [[smcv]] once had a half-written implementation which runs + `scanimage` hooks, and an `exiftool` plugin using [[!cpan Image::ExifTool]] + as a reference implementation of that hook, but has lost that code somewhere :-( * There should be an option to reduce the size of photos and write them into an underlay (perhaps just the transient underlay), for this workflow: diff --git a/doc/plugins/contrib/album/discussion.mdwn b/doc/plugins/contrib/album/discussion.mdwn index 074e2ece0..23ff9017d 100644 --- a/doc/plugins/contrib/album/discussion.mdwn +++ b/doc/plugins/contrib/album/discussion.mdwn @@ -1,3 +1,5 @@ +## installation queries from brush + thanks for this plugin. it might help me in my application, which is to provide album/galleries which can be edited (ie. new images added, taken away, etc.) through web interface. > That's my goal eventually, too. Perhaps you can help to @@ -58,6 +60,13 @@ i'm new to ikiwiki, apologies if this is dealt with elsewhere. -brush ---- +## design feedback from joeyh on an earlier version + +Not entirely relevant any more. +[[!toggle id="old-design-feedback" text="show"]] +[[!toggleable id="old-design-feedback" text=""" +[[!toggle id="old-design-feedback" text="hide"]] + You had wanted my feedback on the design of this. I have not looked at the code or tried it yet, but here goes. --[[Joey]] @@ -256,12 +265,19 @@ code or tried it yet, but here goes. --[[Joey]] >> changed, and only update those viewers where it has. But the dependency >> type stuff is still very new, and not plugin friendly .. so only just >> possible, --[[Joey]] +"""]] ---- +## alternative "special extension" design (conclusion: "don't") + '''I think the "special extension" design is a dead-end, but here's what happened when I tried to work out how it would work. --[[smcv]]''' +[[!toggle id="special-extension-sketch" text="show"]] +[[!toggleable id="special-extension-sketch" text=""" +[[!toggle id="special-extension-sketch" text="hide"]] + Suppose that each viewer is a JPEG-or-GIF-or-something, with extension ".albumimage". We have a gallery "memes" with three images, badger, mushroom and snake. @@ -402,17 +418,30 @@ Things that would be nice, and are probably possible: * some way to deep-link to memes/badger.jpg with a wikilink, without knowing a priori that it's secretly a JPEG (probably harder than it looks - you'd have to make a directive for it and it's probably not worth it) +"""]] ---- +## resolved bug reports + +[[!toggle id="fixed-bugs" text="show"]] +[[!toggleable id="fixed-bugs" text=""" +[[!toggle id="fixed-bugs" text="hide"]] + +### bug: unable to vary thumbnail size + Hi smcv, great plugin. I am an ikiwiki newbie but so far I've had success using your plugin. I've integrated the jquery masonry plugin into the albumitem template and it works great. But is there a way to create thumnails of different sizes? I've passed thumnailsize option and value to album directive and while it does create the new thumbnail sizes it doesn't use them, The 96x96 thumbnails still appear on the page no matter what I do. - jaime +> Fixed in album5 branch, thanks to [[KathrynAndersen]]. --[[smcv]] + ---- +### failed installation + Hi, the plugin looks great, but I am probably too dumb to use it ;( here is what I did: created page gal.mdwn with just \[\[!album\]\] directive (no arguments) and subdirectory gal/ with images in form img_1234.jpg @@ -458,23 +487,35 @@ Thanks Lukas >> Thanks for all the work you did on the plugin! --Lukas ---- -Hi smcv, we spoke on irc the other day. Passed `show => "0"` on line 126 in album.pm to remove the limit on the thumbnails shown on the album page. Setting it on the album directive didn't work. As mentioned above by Jaime setting the thumbnailsize doesn't catch either. Or rather if I git push after changing the album directive the generated thumbnails (the image files) are the correct size as set in the directive. The html however uses the default thumbnailsize as hardcoded in album.pm and has broken thumbnails as it links to a file with the default size in the filename. -Issuing `ikiwiki --rebuild` knocks the system into another gear where the thumbnails show up correctly but this is only due to the html being the same as above (linking to hardcoded thumbnailsize) but the generated thumbnail images are now matching the hardcoded size ignoring the thumbnailsize attribute on the album directive. +### bug + patch: not all images shown on album page -For me this behaviour is way beyond my skills to sort out (I'm no coder). The albumplugin ikiwiki combo is very attractive to me and the plugin i soo close to working! +Hi smcv, we spoke on irc the other day. Passed `show => "0"` on line 126 in album.pm to remove the limit on the thumbnails shown on the album page. Setting it on the album directive didn't work. -I've changed the behavior of the "slideshow" to show the next image when clicking the large image as downloading a full resolution image is a rare use case in a gallery of this type imho. The large clicktarget means you are likely to unnecessarily download large files otherwise. I can't quite follow the template, album.pm flow so I can't figure out how to put a "download full resolution" link on the viewer page which would be my next step. To achieve the next link i added ` link => ($nextpage or $album),` around line 454 in `my $img` +--kjs -My wishlist for the plugin would include: +> That sounds like a correct solution. I'll fix that in my branch when I work on +> this again. --[[smcv]] -- Reading exif info from the imagefile -- Keeping the full resolution image files out of version control -- Being able to create new albums by tag or bym anually picking images from other albums. Could be a simple comma separated list of viewer names, or even full urls, in the album directive. +>> Fixed in `album5` branch --s + +---- + +### bug: thumbnailsize doesn't work + +As mentioned above by Jaime setting the thumbnailsize doesn't catch either. Or rather if I git push after changing the album directive the generated thumbnails (the image files) are the correct size as set in the directive. The html however uses the default thumbnailsize as hardcoded in album.pm and has broken thumbnails as it links to a file with the default size in the filename. + +> [[KathrynAndersen]] fixed this, see below. --[[smcv]] + +>> Fixed in `album5` branch --s + +Issuing `ikiwiki --rebuild` knocks the system into another gear where the thumbnails show up correctly but this is only due to the html being the same as above (linking to hardcoded thumbnailsize) but the generated thumbnail images are now matching the hardcoded size ignoring the thumbnailsize attribute on the album directive. + +For me this behaviour is way beyond my skills to sort out (I'm no coder). The albumplugin ikiwiki combo is very attractive to me and the plugin i soo close to working! --kjs ----- +### suggested fix for thumbnail size bug I've tracked down the "always showing the 96x96 thumbnails" bug! @@ -516,10 +557,333 @@ Here's a context-diff of my fix: -- [[KathrynAndersen]] +> I haven't tried this change, but it seems sane. I'll apply it +> when I next work on this plugin. +> +> (OOI: why not a unified diff? The VCS world seems to have +> settled on those as universal, and I find them easier to +> read.) +> +> --[[smcv]] + +>> Fixed in `album5` --s + ---- +### bug: inability to show more than 10 items + I've found another bug. The album plugin doesn't allow one to have more than 10 items in an album section. This is because it uses "inline" to display album sections, and the default for inline is to show only 10 items. So it only shows 10 items. What would be good is if the album directive could have a "show" parameter which is passed on to preprocess_inline, so that users could decide how many items to show (including ALL of them, if they give show=0). -- [[KathrynAndersen]] + +> My intention was that all items would always be shown, so I would always pass +> `show => 0` to `preprocess_inline` (as kjs suggested above), but that must have +> got lost somewhere. I'll apply it next time I work on this plugin. +> +> An optional `show` parameter would be a possible enhancement beyond that, +> although I don't know how useful it would be; if it isn't passed, the +> default should be 0 (unlimited). --[[smcv]] + +>> Fixed in `album5` --s + +---- + +### cbaines' commit to change default thumbnail size + +Regarding commit `Change the default thumbnail size`: as far as I +understand it, `size => 96x96` is meant to set the image size to +be as large as possible given these constraints: width ≤ 96px, +height ≤ 96px, and the original aspect ratio is preserved. So I +would hope that 96x96 doesn't distort the thumbnails. What distortion +are you seeing, and which versions of Imagemagick and Perlmagick +are you using? + +--[[smcv]] + +> I rebuilt the examples using both your album4 and album5 branches, and I only +> see this in the album4 branch. So this is probably ok to ignore. +> --[[cbaines]] +> +>> OK, I'll assume that was a duplicate of an earlier patch, probably the +>> one from KathrynAndersen. --s + +"""]] + +---- + +## wishlist + patch: make clicking on the large image go to the next + +I've changed the behavior of the "slideshow" to show the next image when clicking the large image as downloading a full resolution image is a rare use case in a gallery of this type imho. The large clicktarget means you are likely to unnecessarily download large files otherwise. I can't quite follow the template, album.pm flow so I can't figure out how to put a "download full resolution" link on the viewer page which would be my next step. To achieve the next link i added ` link => ($nextpage or $album),` around line 454 in `my $img` + +--kjs + +> That seems reasonable. I'll consider that when I work on this +> plugin again next. --[[smcv]] + +---- + +## wishlist from kjs + +My wishlist for the plugin would include: + +- Reading exif info from the imagefile +- ~~Keeping the full resolution image files out of version control~~ Solved this by simply creating a underlay for the images. Works out of the box for my non cgi workflow. +- Being able to create new albums by tag or by manually picking images from other albums. Could be a simple comma separated list of viewer names, or even full urls, in the album directive. +- A counter showing **current image/total number of images in album**. This would mean that you know how many images you have left to click through before you have seen all images in an album. This gives you enought info to decide weather to click through or go back/leave. + +--kjs + +> I want the first two of those too, perhaps one day I'll get round to +> implementing them. +> +> For the third, you can get the same practical effect using an inline +> as documented in the main page. --[[smcv]] +>> The downside to current behaviour is that clicking an inlined thumbnail will take you to the original album context. Previous/Next image will not match the thumbnails in the inline but the thumbnails in the album. This is a bit confusing for users and prevents using the image in multiple contexts without duplicating the image. To achieve what I'm looking for there would have to be several AlbumViewer pages for a single image. --kjs +>> +>>> Hmm, OK. That breaks the "one picture : one page" mental model, +>>> unfortunately. The pictures themselves can't be first-class wiki pages (see +>>> lengthy design discussions with Joey above) because they aren't something +>>> that produces HTML, and don't have human-readable text source code. +>>> In the current (album5) design, the viewer pages that are automatically +>>> created to go alongside the pictures are basically stand-ins for the +>>> pictures, as far as metadata, wikilinks, tags and other "first-class +>>> wiki page" things are concerned. --s + +>>>> I can see why it's important to keep these models simple and have figured out +>>>> that the viewer pages are stand-ins for the image. Just as a tought though. If +>>>> this relationship was made more explicit ie. the viewer pages *are the content* +>>>> just initially generated from the image metadata with a link to the image. Then +>>>> the mental model would stay intact and more in line with how html and the +>>>> implementation works. +>>>> +>>>> One thing to point out is that last time I tried pages can be members of +>>>> arbitrary numbers of trails/albums. You just get multiple rows of navigation, one +>>>> for each trail. This doesn't quite work as it's hard to know which one to click. +>>>> +>>>> --k + +>>>>> Pages can be part of arbitrarily many trails, yes - that's a consequence of +>>>>> how trails are created. If you can think of a better way to present a page +>>>>> that's in more than one trail, I'd welcome ideas... I did originally have an +>>>>> implementation where only one trail would generate links, but when I tried +>>>>> it on some (rather artificial) overlapping trails, the result was more +>>>>> confusing. --s + +>>> If there are to be viewer pages elsewhere in the wiki, I don't think +>>> inheriting the picture's metadata is desired. Suppose you have a +>>> picture of Alice and Bob in the album "holiday in Exampleton, 2010", +>>> and it is tagged people/alice, people/bob and places/exampleton; the +>>> other contexts it appears in might include "pictures of Alice" and +>>> "pictures near Exampleton". If you look at the tag page for +>>> places/exampleton, I doubt you want to see that photo listed three +>>> times - once is enough, there's only one actual photo after all. So +>>> I think the "main" viewer page should be the only one that has +>>> the taglinks for people/alice, people/bob, places/exampleton. +>>> --s + +>>>> The problem exposed by the tag page issue is very tricky. As you'd +>>>> probably want the exif info, captions and titles to transfer. Just not +>>>> necessarily the tags. +>>>> --k + +>>> My next question is, should the viewer page representing that +>>> particular picture in its context of "pictures near Exampleton" +>>> (i.e. its "next" and "previous" links go to the next and +>>> previous picture near Exampleton, regardless of whether it was +>>> on an earlier or later visit) be a first-class wiki page +>>> at all? +>>> --s + +>>> * Does it make any sense to comment on "this picture in this +>>> context", if your wiki has comments, or should the only +>>> place you can comment on it be its "main" viewer page? +>>> * Is there any need for it to be possible to make a wikilink +>>> to that particular picture in that particular context, +>>> or does it only need wikilinks "to the picture" (which, +>>> as an implementation detail, really go to its "main" viewer +>>> page)? +>>> * Can the picture in that particular context have tags +>>> that are orthogonal to the tags its "main" viewer page has? +>>> * ... and so on for various wiki features +>>> +>>> It sound as though the answer might ideally be that this secondary +>>> viewer page doesn't need to be a first-class wiki page at all, +>>> only a HTML output... except that the trail plugin works in terms +>>> of next and previous first-class wiki pages, not next and +>>> previous HTML outputs, and the HTML-generation pipeline +>>> is really aimed towards real pages. +>>> +>>> Perhaps the secondary viewer page should end up looking +>>> something like this: +>>> +>>> \[[!albumviewer original=holiday-in-exampleton-2010/img1234 +>>> comment="To edit picture metadata, edit the original page instead"]] +>>> +>>> and one of the side-effects of the albumviewer directive should be to +>>> replace [[plugins/comments]] with a link to the original? --s + +>>>> One thing to consider is the built in difference between the original and +>>>> the secondary inferred by the fact that the first is an `album` the second +>>>> an `inline` --k + +>>>>> I had assumed that both the "original" album (the one where the picture +>>>>> is physically located), and any other places you wanted to display it, +>>>>> would be some other directive whose implementation includes a call to +>>>>> `preprocess_inline`. `inline` on its own is not enough to create +>>>>> viewer pages to display the pictures, regardless of whether you +>>>>> want them to be one-per-picture or many-per-picture, and I'm not +>>>>> going to wedge yet more functionality into that plugin :-) +>>>>> +>>>>> It might be a good idea for the thing that displays pictures not +>>>>> physically located below that point to be a different directive, yes. +>>>>> --s + +>>>> ### Single viewer +>>>> For my own usecase what you describe makes sense. I see the content of an inline object +>>>> (struggling a bit with what terms to user here) as a particular composition of +>>>> viewers. Perhaps comments should only be possible on the page with the inline rather +>>>> than the secondary viewer pages as the inline page not the image viewer is +>>>> the first-class page in this scenario? The inline page would also be the page you tag +>>>> etc. to make it show up in various contexts such as the tag page. +>>>> +>>>> With the thinking outlined above I'd say that the secondary viewer should be a +>>>> non editable clone of the original viewer without any source. Just html output with +>>>> backlinks to the original page. This means that there are limitations to how these +>>>> secondary viewers can be used as the title, caption etc might fit some contexts +>>>> better than others. Personally this is fine as I see these inline based albums as +>>>> compositions or views on existing content. +>>>> --k +>>>> +>>>>> This is basically what I thought at first, but I realised while +>>>>> writing my earlier comments that it would be necessary +>>>>> to hack up [[plugins/trail]] fairly seriously to make it produce +>>>>> a trail through things that are not first-class wiki pages, and +>>>>> I'm not sure how much it would be necessary to subvert the +>>>>> rendering pipeline to get the right parentlinks and so on. --s +>>>> +>>>> ###Multiple viewers alternative +>>>> The alternative is having a page say in `/story/album.mdwn` with the following directive +>>>> \[[!inline pages="/01/IMGP6494 or /02/IMGP6601 or /04/IMGP6922" sort="title" show="0" template="albumitem"]] +>>>> that creates new fully fledged editable viewers for each image in `/story/album/' +>>>> without tags being auto populated but backlinks to the original album viewer. +>>>> --k +>>>> +>>>>> It can't *only* be an inline, because an inline wouldn't generate the +>>>>> viewer pages, but I see what you mean. --s +>>>>> +>>>>>> That's actually excellent as the inline is a very useful feature +>>>>>> the way it works now. I started writing about this yesterday but +>>>>>> got interrupted. My indexes of albums use the inline in it's current +>>>>>> form. --k +>>>> +>>>> This would make the viewers completely independent allowing for unique titles, captions and comments +>>>> depending on context. Very useful when creating powerpoint like slideshows where you might need +>>>> different captions depending on the context. In your example wiki with photos from gigs this would allow +>>>> a page with an album inline about stage lighting with a selections of images and captions that highlight +>>>> relevant things in the image as well as a separate inline album page, with some of the same images, +>>>> about drumming styles and posture/grip of drummers. +>>>> +>>>> I started writing all this supporting your single page case but looking at it now from my limited +>>>> understanding of how ikiwiki works it seems the multiple viewers option is conceptually cleaner +>>>> and more flexible. It relies on three things: + +>>>> * A mental model where the viewer page is the content not the image +>>>> * That tags aren't automatically transferred from the original context. This doesn't seem that critical however. +>>>> * Backlinks to the other places the image is used. +>>>> +>>>> --[[kjs]] + +I've added "--k" to some of your comments so other readers (possibly including +my future self) can keep track of our conversation, I hope you don't mind :-) +--s + +---- + +## cbaines' CSS changes + +Regarding the CSS changes: I'll try to have a look soon, work out +what actually changed (since you re-ordered the CSS, so it isn't +immediately obvious from the diff), and integrate some or all of your +changes. Since Joey shows no signs of wanting to merge it, and "out of tree" +installation is currently a pain, I might split out the CSS changes into a +separate `ikiwiki/album.css` so that the only thing that needs to be merged +into style.css (or into local.css) is an appropriate +`@import` rule. + +It shouldn't be necessary to add the album stuff to each individual +theme's style.css unless you actually want an actiontabs album and +a blueview album to be styled differently, because the IkiWiki Makefile +concatenates them: for instance, `/usr/share/ikiwiki/themes/actiontabs/style.css` +is the output of `cat doc/style.css themes/actiontabs/style.css`. So adding it +to `doc/style.css` should be enough? --[[smcv]] + +> I don't think this is the case? Or at least, looking at the generated +> stylesheet for the examples built using my branch, I would expect there to be +> two copies of the album rules in the stylesheet [1], but there does not +> appear to be. This could quite easily be a result of some mistake in my part +> in not isolating the build though. --[[cbaines]] +> +> 1: +> +>> I searched for `/* relevant to the index page */` and found it twice, +>> so I stand by what I said :-) --s +>> +>>> And right you are, unsure how I missed that. My album branch is now rebased +>>> on your album5 branch (with the two now useless commits removed). +>>> --[[cbaines]] + +cbaines, would you mind publishing an album with more realistic pixel-sizes +of images using your modified CSS? It's difficult to get an idea of how it +will degrade under conditions like "image size > browser window" with +images as small as the ones you used. You might find + +(`git clone git://git.pseudorandom.co.uk/git/smcv/ikiwiki-demos/ikialbum.git`), +or the same techniques, useful: it contains images with a realistic pixel +count, but very very lossy JPEG compression, to keep the size in bytes low. + +> I have now created a large (images) example, you can find all the examples +> here [1]. I have also built all the examples with the album5 branch, you can +> find the results here [2]. +> +> 1: +> 2: + +It's much, much easier to review changes if you use separate commits for +cosmetic changes like "separate index CSS from viewer CSS" and "more +consistent indentation", and functional changes like turning the prev/next +links from absolutely-positioned to floating. I'd be happy to apply +the cosmetic changes if they were in commits that were literally only +cosmetic changes, with no functional effect. + +> I have now rewritten the CSS changes to get a smaller diff. The only big +> functional change is from the previous patch is the max-width stuff to cope +> better with large images. + +For the functional bits: I think I'd have used floating boxes instead of the +absolutely-positioned boxes that are currently used if they provided the effect +I wanted. I can't remember exactly why I didn't do that now, but +it might have been because if the browser window shrinks below the image width, +floats have weird behaviour (they push the actual image out of the way), or because +I wanted the entire left/right margin of the image to be clickable to have +a large click-target for scrolling through the album. + +If there's something specific that you think is wrong with the CSS in my +branch, could you please explain it, and perhaps we can come up with something +that matches both our requirements? + +--smcv + +> I don't think that something specific is wrong with CSS in the album5 branch, +> but it does not display large [3], or small [4] images very well. It might be +> possible to resolve the image size issues without changing from absolute +> positioning, but I felt (for no particular reason) that I would do it using +> floats. +> +> The clickable region on the margin seems the most likely reason to me to go +> with absolute positioning, as an initial look at doing this with floats +> suggests that it is non-trivial. +> +> 3: +> 4: diff --git a/doc/plugins/contrib/created_in_future.mdwn b/doc/plugins/contrib/created_in_future.mdwn index ce920d913..95793e12a 100644 --- a/doc/plugins/contrib/created_in_future.mdwn +++ b/doc/plugins/contrib/created_in_future.mdwn @@ -1,7 +1,15 @@ -[[!template id=plugin name=created_in_future author="[[Louis|spalax]]"]] +[[!meta author="spalax"]] +[[!template id=plugin name="created_in_future (deprecated)" author="[[Louis|spalax]]"]] # Created_in_future +This plugin is deprecated, and can be replaced by function `cdate_geq_today()` in plugin [[datetime_cmp|plugins/contrib/datetime_cmp]]. + +[[!toggle id=old text="Show/Hide old documentation"]] + +[[!toggleable id=old text=""" +# Created_in_future + This plugin provides a `created_in_future()` [[PageSpec|ikiwiki/pagespec/]] function. It matches pages which have a creation date in the future. @@ -18,3 +26,4 @@ It can be used to display a list of upcoming events. ## Code Code and documentation this way: [[https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Created_in_future]]. +"""]] diff --git a/doc/plugins/contrib/datetime_cmp.mdwn b/doc/plugins/contrib/datetime_cmp.mdwn new file mode 100644 index 000000000..ba35b37c6 --- /dev/null +++ b/doc/plugins/contrib/datetime_cmp.mdwn @@ -0,0 +1,86 @@ +[[!meta author="spalax"]] +[[!template id=plugin name=datetime_cmp author="[[Louis|spalax]]"]] +[[!tag type/pagespec]] + +# Datetime_cmp + +This plugin provides a family of +[pagespec](http://ikiwiki.info/ikiwiki/pagespec/) matching pages according to +creation or modification times. + +It also sets the date of the next modification of the page on relevant date, so +that the page will be rebuilt if the condition changes. + +## List of functions + +The list of functions is given by the following regexp: + + [ct](date|time)_(lt|gt|leq|geq|eq|neq)_(abs|page|now|today)(|_delta) + +where: + + * `[ct]`: compare creation or modification time or date: + * `c`reation time; + * `m`odification time. + * `(date|time)`: compare full date and time, or only date (useful when time is irrelevant): + * `time`: compare full date and time; + * `date`: compare only date. + * `(lt|gt|leq|geq|eq|neq)`: operator of comparison: + * `lt`: less than; + * `gt`: greater than; + * `leq`: less or equal than; + * `geq`: greater or equal than; + * `eq`: equal; + * `neq`: not equal. + * `(abs|page|now|today)`: element to compare to: + * `abs`: absolute date or time (given in argument); + * `page`: other page (given in argument); + * `now`: date or time of compilation; + * `today`: same meaning as `now`. + * `(|_delta)`: used to add a time delta (to use comparisons such as *created at least two days after `some_page`*): + * *empty*: no delta; + * `_delta`: delta (given in argument). + +### Number of arguments + +[[!table header=no data=""" + | `now` `today` | `page` | `abs` +no delta | *no arguments* | `pagename` | `date` +delta | `delta` | `pagename, delta` | `date, delta` +"""]] + +### Format of arguments + +* *date* or *time*: anything that can be recognized by perl [[str2time|http://search.cpan.org/~rse/lcwa-1.0.0/lib/lwp/lib/HTTP/Date.pm]] function, *without any comma*. +* *delta*: One of the following patterns: + * `Y-M-D`: positive date; + * `H:M:S`: positive time; + * `Y-M-D H:M:S`: positive date and time; + * Add `-` at the beginning of the string to make durations negative. +* several arguments: when two arguments are provided, they are passed as one string, which is then split according to the last comma. + +## Time zones + +Key `timezone` in the setup file is used to define time zone. If not set, we +try to guess the local time zone. + +## Examples + +### Some functions + +* `ctime_gt_page(foo)`: match pages created after page `foo`. +* `cdate_eq_today()`: match pages created the day the wiki is compiled. +* `mtime_eq_now()`: match pages modified the time the wiki is compiled (likely no page, since comparison is done up to the milisecond). +* `cdate_geq_page_delta(foo, 00-00-01)`: match pages created at least one day after page `foo`. +* `cdate_gt_page(foo)`: same as the previous one. +* `mdate_gt_today_delta(-00-01-00)`: match pages modified one month ago, or later (can be used to display recent changes). + +### Use case + +It can be used to display a list of upcoming events. + + \[[!inline pages="events/* and cdate_geq_today()" reverse=yes sorted=meta(date)]] + +## Code + +Code and documentation this way: [[https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/datetime_cmp]]. diff --git a/doc/plugins/contrib/default_content_for___42__copyright__42___and___42__license__42__/discussion.mdwn b/doc/plugins/contrib/default_content_for___42__copyright__42___and___42__license__42__/discussion.mdwn new file mode 100644 index 000000000..9374112b7 --- /dev/null +++ b/doc/plugins/contrib/default_content_for___42__copyright__42___and___42__license__42__/discussion.mdwn @@ -0,0 +1,7 @@ +These plugins do not to work well with reStructuredText pages (and +possibly others). + +The issue seems to be that the copyright/licence HTML text is injected +into the page text before the page is converted to HTML. So, parsers +like reStructuredText which do not allow intermixing their native +format with HTML, will complain. diff --git a/doc/plugins/contrib/jscalendar.mdwn b/doc/plugins/contrib/jscalendar.mdwn index 794e4bd9c..8123b3132 100644 --- a/doc/plugins/contrib/jscalendar.mdwn +++ b/doc/plugins/contrib/jscalendar.mdwn @@ -1,3 +1,4 @@ +[[!meta author="spalax"]] [[!template id=plugin name=jscalendar author="[[Louis|spalax]]"]] # Jscalendar @@ -12,33 +13,37 @@ Here are some differences compared to this latter plugin. * No need to rebuild the page containing the calendar each time day changes, or a page (indexed by the calendar) is added, changed or deleted. This is particularly useful if you want to have this calendar in the sidebar. - * Handles the case where several pages appear the same day: a popup appear to let user choose the day he wants. * Smooth navigation among months. -* Neutral - * Most of options are defined in Ikiwiki's setup files instead of the options - of the directive. * Cons - * As a consequence, every calendar of the wiki must index the same set of pages. * Javascript :( . ## Usage -### Directive +### Examples of directive \[[!jscalendar type="month" ]] + \[[!jscalendar type="month" archivebase="calendar"]] + + \[[!jscalendar type="month" year=2014 month=08 pages="posts/* and !posts/*"]] + + \[[!jscalendar type="month" year=-1 month=08]] + ### Setup file -It being javascript rather than markdown, most of the configuration must be done in the IkiWiki configuration file rather than in the directive +This plugin uses the options used by the [[plugins/calendar]] plugin: - 'archivebase' => "evenements/calendrier", - 'archive_pagespec' => "evenements/liste/* and ! evenements/liste/*/*", + 'archivebase' => "archive", + 'archive_pagespec' => "posts/* and ! posts/*/*", 'week_start_day' => 1, 'month_link' => 1, +The `archivebase` and `archive_pagespec` can be overloaded by the very same +options of the directive. + ## Example -You can see this plugin in action on [[our website|http://www.gresille.org]]. To see what happens when several pages happens on the same day, check the 15th of March 2012. +You can see this plugin in action on [[our website|http://www.gresille.org]]. Code and documentation can be found here : [[https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Jscalendar]] diff --git a/doc/plugins/contrib/monthcalendar.mdwn b/doc/plugins/contrib/monthcalendar.mdwn index c8d889e35..c21be0abe 100644 --- a/doc/plugins/contrib/monthcalendar.mdwn +++ b/doc/plugins/contrib/monthcalendar.mdwn @@ -1,9 +1,12 @@ +[[!meta author="spalax"]] [[!template id=plugin name=monthcalendar author="[[Louis|spalax]]"]] # Monthcalendar This plugin displays a calendar, containing in each of its day the list of links of pages published on this day. It can be used, for example, to display archives of blog posts, or to announce events. +The difference between this plugin and the [[plugins/calendar]] plugin is that the calendar displayed by this plugin is a big one, containing the full title of every page indexed in it. + ## Usage ### Directive @@ -16,10 +19,109 @@ By using the following line in template `calendarmonth.tmpl`, you can have `ikiw \[[!monthcalendar type="month" year="" month="" pages=""]] -## Code +## CSS -Code and documentation can be found here : [[https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Monthcalendar]]. +Here is an example of CSS properly rendering the calendar produced by this +plugin. +[[!toggle id=css text="CSS"]] +[[!toggleable id=css text=""" + /* Calendar */ + .monthcalendar + { + color:#aaa; + /* font-size:18pt; */ + margin-top:1em; + margin-bottom:1em; + width: 100%; + } + + .monthcalendar table, + .monthcalendar td, + .monthcalendar th + { + border: 1px solid #ccc; + } + + #content .monthcalendar td + { + padding: 0; + position: relative; + } + + .monthcalendar td div + { + min-height: 10ex; + height: 100%; + position: relative; + } + + .monthcalendar th + { + vertical-align: middle; + } + + .monthcalendar td ul + { + padding-left: 0.5em; + list-style: dot; + list-style-position: inside; + text-align: left; + font-size: 8pt; + position: relative; + z-index: 10; + font-weight: bold; + } + + table.monthcalendar + { + table-layout: fixed; + } + + .monthcalendar .selflink + { + color:#444444; + } + + .monthcalendar-day-head { + text-transform:capitalize; + } + + .monthcalendar-head { + text-transform:capitalize; + } + + .monthcalendar-daynumber + { + float: left; + position: absolute; + display: block; + font-size: 7ex; + color: #ccc; + line-height: 100%; + z-index: 5; + padding-top: 0.3ex; + text-align: right; + width: 1.8em; + } + + /* List of pages */ + + .monthcalendar-pagelist { + display: flex; + flex-direction: column; + } + + .monthcalendar-item { + opacity: 0; + height: 0; + } + + .monthcalendar-item:target { + opacity: 1; + height: initial; + } +"""]] -## Example +## Code -This plugin is used in [our website](http://www.gresille.org/evenements/calendrier/2012/03) +Code and documentation can be found here : [[https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Monthcalendar]]. diff --git a/doc/plugins/contrib/navbar.mdwn b/doc/plugins/contrib/navbar.mdwn index f1c15c6e0..9de66f787 100644 --- a/doc/plugins/contrib/navbar.mdwn +++ b/doc/plugins/contrib/navbar.mdwn @@ -38,3 +38,6 @@ If you are interested in this, drop me a line tobi at oetiker dot ch In the meanwhile, I ([[MartinQuinson]]) have hacked this a bit to make it fit my needs. The result is [[here|http://www.loria.fr/~quinson/Hacking/ikiwiki/]] + +In the meanwhile I too have hacked this for my needs and fixed a few bugs in Martin's version. +The result (and source / instructions) can be found [[here|http://wiki.math.cmu.edu/iki/wiki/tips/20140720-ikiwiki-navbar.html]]. (It is not mobile ready yet, but might be soon...) diff --git a/doc/plugins/contrib/parenttag.mdwn b/doc/plugins/contrib/parenttag.mdwn index d3bede797..5dc01c7c5 100644 --- a/doc/plugins/contrib/parenttag.mdwn +++ b/doc/plugins/contrib/parenttag.mdwn @@ -1,3 +1,4 @@ +[[!meta author="spalax"]] [[!template id=plugin name=parenttag author="[[Louis|spalax]]"]] [[!tag type/tags]] diff --git a/doc/plugins/contrib/poetry.mdwn b/doc/plugins/contrib/poetry.mdwn new file mode 100644 index 000000000..aed2e420a --- /dev/null +++ b/doc/plugins/contrib/poetry.mdwn @@ -0,0 +1,107 @@ +[[!meta author="spalax"]] +[[!template id=plugin name=poetry author="[[Louis|spalax]]"]] + +# Poetry + +The poetry plugin provides the [[ikiwiki/directive/poetry]] directive, used to +render poetry (or songs). + +## Why? + +### Typography + +In regular text, there are two different meaning of a new line: a break between +two paragraphs, and the line wrap. + +When rendering poetry, we need a third one: the carriage return between two +verse lines. This one should be different from the line wrap carriage return, +otherwise one will not be able to tell apart these two: is a word displayed at +the begenning of its line a new verse line, or the previous verse line, +continuing on a new line because it is too long? + +Generally, wrapped text is indented, whereas verse lines are not. + +### Markdown + +One could use carriage return (two white spaces at the end of a line) between +verse lines, and paragraph break between stanzas, but: + +* adding white spaces at the end of lines is painful; +* there is no easy way to render chorus (in a different way from verses). + +## Usage + +The directive takes only one argument `content`, containing the poetry to +render. Carriage returns are respected. + +Chorus are lines with `> ` as a starting character. + +Lines starting with `) ` are consored/outdated/crossed out verses. + +[[!toggle id=example text="View example"]] +[[!toggleable id=example text=''' + \[[!poetry content=""" + This is a verse + Made of several lines + + > And here is the chorus + > La la la! + > A beautiful chorus + + Another verse + A bit longer + Than the previous one + + ) This one is deleted + ) Because I did not like it + """]] +''']] + + +## CSS + +This plugin is useless without some corresponding CSS. An example is given +below. + +[[!toggle id=css text="CSS"]] +[[!toggleable id=css text=""" + .poetry { + padding-left: 1em; + border-left: 0.1em solid lightgray; + border-radius: 0.5em; + } + + .poetry .stanza { + padding-left: 1em; + } + + .poetry .paren { + font-style: italic; + font-size: smaller; + text-decoration: line-through; + } + + .poetry .paren:hover { + text-decoration: initial; + } + + .poetry .chorus { + margin-left: 0.1em; + padding-left: 2em; + border-left: 0.3em solid slategray; + } + + .poetry .line { + display: block; + text-indent: -1em; + } +"""]] + +## Example + +This plugin is used to render songs on [this choir's +website](http://barricades.int.eu.org/repertoire/bread_and_roses/). + +## Code + +Code and documentation can be found here : [[https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Poetry]]. diff --git a/doc/plugins/contrib/purge.mdwn b/doc/plugins/contrib/purge.mdwn new file mode 100644 index 000000000..62fcfb30d --- /dev/null +++ b/doc/plugins/contrib/purge.mdwn @@ -0,0 +1,38 @@ +[[!template id=plugin name=purge core=0 author="[[users/ssm]]"]] + +IkiWiki plugin to send PURGE requests to remote http cache server (like Varnish Cache) when your content changes. + +PURGE requests are sent for the changed page, as well as all pages indirectly changed when ikiwiki rebuilds the web pages. + +# Download + +Download from [Github](https://github.com/ssm/ikiwiki-plugin-purge) + +# Configure ikiwiki + + # purge_url (mandatory), the address of your cache server. + purge_url: http://example.com/ + + # purge_timeout (optional, default 5) timeout in seconds for a purge request. + + # purge_method (optional, default "PURGE") HTTP method to use. + +# Configure your cache server + +For Varnish, you'll need to add a handler for the non-standard "PURGE" method, and preferrably an ACL which restricts who can send these requests to empty your cache. + + acl origin_server { + "localhost"; + "192.0.2.0"/24; + "2001:db8::"/64; + } + + sub vcl_recv { + if (req.method == "PURGE") { + if (!client.ip ~ origin_server) { + return(synth(405,"Not allowed.")); + } + return (purge); + } + } + diff --git a/doc/plugins/contrib/sidebar2.mdwn b/doc/plugins/contrib/sidebar2.mdwn index 574bdeaab..5c169bfd4 100644 --- a/doc/plugins/contrib/sidebar2.mdwn +++ b/doc/plugins/contrib/sidebar2.mdwn @@ -1,9 +1,10 @@ +[[!meta author="spalax"]] [[!template id=plugin name=sidebar2 author="[[Louis|spalax]]"]] [[!tag type/chrome]] *Claim:* The [[sidebar|plugins/sidebar]] plugin has nothing to do with sidebars. This plugin renders some page (which happens to be named -`sidebar`) and put the result in template variable `SIDEBAR`, in template +`sidebar`) and put the result in template variable `SIDEBAR` of template `page.tmpl`. But the fact that it is a sidebar, i.e. a bar appearing on the side on the screen, is done by CSS. @@ -40,7 +41,7 @@ The default, which gives the behaviour of the sidebar plugin, is # Improvements over sidebar plugin -* You can add several "sidebars" to your wiki. For example, to have a sidebar, a submeno that appear only in pages documentations, and a footer, your `global_sidebars` would be: +* You can add several "sidebars" to your wiki. For example, to have a sidebar, a submenu that appears only in documentation pages (`doc/*`), and a footer, your `global_sidebars` would be: global_sidebars => [ "sidebar", "sidebar", "*", diff --git a/doc/plugins/contrib/taskreport.mdwn b/doc/plugins/contrib/taskreport.mdwn index 08f7ee7a2..377c9ed39 100644 --- a/doc/plugins/contrib/taskreport.mdwn +++ b/doc/plugins/contrib/taskreport.mdwn @@ -1,3 +1,4 @@ +[[!meta author="spalax"]] [[!template id=plugin name=taskreport author="[[Louis|spalax]]"]] # Taskreport @@ -15,7 +16,7 @@ The taskreport plugin provides the `task` directive (see below), displaying argument. This argument must be relative to the root of the wiki sources. * `task_tmpdir`: directory where to copy task data files before calling task. It can be used to circumvent [[lack of `--read-only` - option|http://taskwarrior.org/issues/424]]. Otherwise, those data files may + option|https://bug.tasktools.org/browse/TW-204]]. Otherwise, those data files may be modified by the task call. Setting this directory ensure that they are not. This argument should be absolute (I do not know what would happen otherwise). diff --git a/doc/plugins/contrib/todo.mdwn b/doc/plugins/contrib/todo.mdwn new file mode 100644 index 000000000..d8ba05681 --- /dev/null +++ b/doc/plugins/contrib/todo.mdwn @@ -0,0 +1,17 @@ +[[!template id=plugin name=todo author="Joël Porquet"]] +[[!tag type/widget]] + +This plugin provides the todo [[ikiwiki/directive]], which enables a page to be marked as a todo page. Additionally a deadline date can be provided. + +An example of a page marked as todo could be: + + \[[!todo deadline="3 April 1982"]] + # Title of what should be done for April 3, 1982 + blabla + +This plugin also provides ways to display pages marked as todo, and can even sort those pages by deadline dates: + + \[[!inline pages="* and todo() and !todo(done)" archive="yes" sort="todo(deadline)"]] + +The full documentation and source code can be found here: + diff --git a/doc/plugins/osm.mdwn b/doc/plugins/osm.mdwn index 040d175ca..a2455a4be 100644 --- a/doc/plugins/osm.mdwn +++ b/doc/plugins/osm.mdwn @@ -1,10 +1,10 @@ [[!template id=plugin name=osm author="Blars Blarson, Antoine Beaupré"]] [[!tag type/special-purpose todo/geotagging]] -## Openstreetmap/Openlayers support for ikiwiki +## OpenStreetMap/OpenLayers support for ikiwiki -This plugin provides simple Openstreetmap/Openlayers support for ikiwiki. -It can embed Openstreetmap viewports within a page or link to a bigger map +This plugin provides simple OpenStreetMap/OpenLayers support for ikiwiki. +It can embed OpenStreetMap viewports within a page or link to a bigger map that will have multiple markers, generated with a KML (or CSV, or GeoJSON) datafile of markers based on the different calling pages. Multiple distinct maps on a single wiki are supported. @@ -15,6 +15,22 @@ if the [[!cpan JSON]] perl module is installed. This provides the [[ikiwiki/directive/waypoint]] and [[ikiwiki/directive/osm]] directives. +### Examples + +A [[basic set of examples|http://cbaines.net/osm-examples]] is available +([[repository|http://git.cbaines.net/?p=ikiwiki/osm-examples.git;a=summary]]). +Note that none of these will work without patching the plugin. With the +following patches, most of the examples will work (while each patch is +seperate, the branch includes all previous patches in the list, so the +cbaines/osm-icon-fixes branch includes all patches). + + - [[bugs/osm plugin error TypeError: mapProjection is null]] + - [[todo/osm plugin GeoJSON popup patch]] + - [[todo/osm plugin icon patch]] + +Even with these patches, the CSV examples do not work, and there are cosmetic +issues with a few of the other examples. + --- The plugin was originally written by diff --git a/doc/plugins/otl.mdwn b/doc/plugins/otl.mdwn index d890b0126..f12d6edca 100644 --- a/doc/plugins/otl.mdwn +++ b/doc/plugins/otl.mdwn @@ -2,5 +2,5 @@ [[!tag type/format]] This plugin allows ikiwiki to process `.otl` outline files, as created by -[vimoutliner](http://www.vimoutliner.org/). To use it, you need to have +[vimoutliner](https://github.com/vimoutliner/vimoutliner). To use it, you need to have vimoutliner installed, since it uses the `otl2html` program. diff --git a/doc/plugins/teximg.mdwn b/doc/plugins/teximg.mdwn index 866b1ee05..98f01faaa 100644 --- a/doc/plugins/teximg.mdwn +++ b/doc/plugins/teximg.mdwn @@ -4,7 +4,12 @@ This plugin provides a [[ikiwiki/directive/teximg]] [[ikiwiki/directive]], that renders LaTeX formulas into images. -Of course you will need LaTeX installed for this to work. +You will need LaTeX installed for this to work, specifically something +providing `latex` in the path. You will also need either `dvipng` or a +combination of `dvips` and `convert` from ImageMagick/GraphicsMagick. + +On Debian systems, the relevant package names are `texlive-latex-base` +and either `dvipng` or `graphicsmagick-imagemagick-compat`. ## configuration diff --git a/doc/plugins/trail/discussion.mdwn b/doc/plugins/trail/discussion.mdwn index 6c0b790b9..6b1b58bd8 100644 --- a/doc/plugins/trail/discussion.mdwn +++ b/doc/plugins/trail/discussion.mdwn @@ -103,3 +103,83 @@ Some later changes to trail: --[[smcv]] > Applied --[[Joey]] + +---- + +### Trail plugin creates unexpected interdependencies? +*(ikiwiki master branch 2014-06-06 also tested with 3.20140228 release)* + +I noticed the problem when using the [[/plugins/contrib/album]] plugin but a bit of testing revealed that the [[trail]] plugin, which is used by [[/plugins/contrib/album]] may be the cause of the problem. + +On a site with the following structure where all albumN.mdwn files have the `\[[!inline pages="page(./album01/*)" trail="yes"]]` directive set. All albumN pages and imgN pages get rebuilt whenever any one of the albumN or imgN pages are changed and the command `ikiwiki --setup wiki.setup --refresh --verbose` + is issued. + + /index.mdwn Contains no links maps or inlines + |-album01.mdwn \[[!inline pages="page(./album01/*)" trail="yes"]] + |-album01/ + | |-imgA.mdwn + | |-imgB.mdwn + | + |-album02.mdwn \[[!inline pages="page(./album02/*)" trail="yes"]] + |-album02/ + | |-imgC.mdwn + | |-imgD.mdwn + | + |-album03.mdwn \[[!inline pages="page(./album03/*)" trail="yes"]] + |-album03/ + | |-imgE.mdwn + | |-imgF.mdwn + +Changing the index.mdwn page also triggers a full rebuild of all pages with [[trail]] directives. My sites tend to look like the above but with double digit numbers of files in at each level. Changing any file then means a full rebuild of a rather complex site which takes a long time. + +My setup and test may very well have mistakes but perhaps someone using the trail plugin could check (using the --verbose flag) if all their trails get rebuild when changing only one. I also find it curious that changes to the parent index.mdwn page triggers the same behaviour. + +I have removed a similar comment from the album discussion. + + --[[kjs]] + +> I would expect changing imgE.mdwn to rebuild album03.mdwn (because album03 +> inlines imgE) and vice versa (because imgE uses album03's \[[!meta title]]). +> +> I would not expect changing imgE.mdwn or album03.mdwn to affect album02 +> or imgC. +> +> I would also not expect changing index.mdwn to rebuild anything else +> unless there is a valid dependency reason to do so. +> +> Can you reproduce this problem in a wiki that does not contain anything +> private, and publish its git repo somewhere? (I realise photo galleries +> tend to be more personal/private than typical wikis, so you don't +> necessarily want to link the real thing - that's why my album demos +> tend to use dummy data). --[[smcv]] + +>> I was expecting the same depends pattern you describe. +>> My photo wikis are mostly public so I've set up a publicly accessible repo +>> (update-server-info type, git clone the first link below), a low-res copy of +>> the underlay and a quick sanitized setup file. + +>>* [[http://www.kalleswork.net/downloads/stockholm/.git]] +>>* [[http://www.kalleswork.net/downloads/stockholm.underlay.tar.gz]] +>>* [[http://www.kalleswork.net/downloads/stockholm.setup]] + +>> It might be a bit unwieldly and the site itself at [[http://stockholm.kalleswork.net]] +>> uses a few tweaks to the album templates and css, but I don't currently +>> have access to the machine where I setup a cleaner debug wiki to test. +>> (travelling atm). The images will likely be distorted due to the up scaling +>> bug in the [[img]] plugin but other than that it should work. + +>> Let me know if you need anything else. Would be great to hear it works +>> as expected for everyone else ;) --[[kjs]] + +>>> Hmm. Investigating the indexdb: +>>> +>>> perl -le 'use Storable; my $index = Storable::retrieve("stockholm/.ikiwiki/indexdb"); use Data::Dumper; print Dumper $index' |less +>>> +>>> indicates that `20130504` depends on `internal(*)` and so does `20130505`. +>>> +>>> After adding some `Carp::cluck` calls to the bits of IkiWiki.pm that add +>>> dependencies, this turns out to be two similar issues, in `album` and +>>> `trail`: they each use `pagespec_match_list` with the pagespec +>>> `internal(*)` in order to apply a trivial filter (accept everything) +>>> to an existing list for its side-effect of sorting that list. +>>> Bug filed as [[bugs/trails depend on everything]] --smcv diff --git a/doc/rcs/git/wiki_edit_flow.svg b/doc/rcs/git/wiki_edit_flow.svg index 200a3439d..53eae39e3 100644 --- a/doc/rcs/git/wiki_edit_flow.svg +++ b/doc/rcs/git/wiki_edit_flow.svg @@ -9,11 +9,11 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="493.90625" - height="548.64734" + width="493.02975" + height="542.18921" id="svg2" version="1.1" - inkscape:version="0.48.1 r9760" + inkscape:version="0.48.4 r9939" sodipodi:docname="wiki_edit_flow.svg"> @@ -195,18 +195,18 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1.0885159" - inkscape:cx="281.26331" - inkscape:cy="219.65103" + inkscape:cx="281.27395" + inkscape:cy="314.69374" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" showguides="true" inkscape:guide-bbox="true" inkscape:snap-global="true" - inkscape:window-width="1280" - inkscape:window-height="995" - inkscape:window-x="1280" - inkscape:window-y="0" + inkscape:window-width="1438" + inkscape:window-height="872" + inkscape:window-x="0" + inkscape:window-y="26" inkscape:window-maximized="1" fit-margin-top="25" fit-margin-left="25" @@ -218,7 +218,9 @@ empspacing="5" visible="true" enabled="true" - snapvisiblegridlinesonly="true" /> + snapvisiblegridlinesonly="true" + originx="0.010641754px" + originy="26px" /> @@ -228,7 +230,7 @@ image/svg+xml - + @@ -236,108 +238,108 @@ inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" - transform="translate(-159.65625,-106.875)"> + transform="translate(-159.64561,-139.33311)"> + y="251.21931" /> working clones repository srcdir destdir + transform="translate(5,51.000003)"> + transform="translate(0,17)"> @@ -469,7 +471,7 @@ + transform="translate(0,17)"> @@ -522,7 +524,7 @@ sodipodi:cy="187.36218" sodipodi:rx="5" sodipodi:ry="5" - d="m 300,187.36218 a 5,5 0 1 1 -10,0 5,5 0 1 1 10,0 z" + d="m 300,187.36218 c 0,2.76143 -2.23858,5 -5,5 -2.76142,0 -5,-2.23857 -5,-5 0,-2.76142 2.23858,-5 5,-5 2.76142,0 5,2.23858 5,5 z" transform="matrix(1.4,0,0,1.4,-120,-74.944873)" /> @@ -530,17 +532,17 @@ xml:space="preserve" style="font-size:16px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans" x="265" - y="211.36218" + y="237.36218" id="text5806" sodipodi:linespacing="125%">ikiwiki.cgi @@ -548,157 +550,157 @@ xml:space="preserve" style="font-size:16px;font-style:normal;font-weight:normal;text-align:end;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans" x="351.31982" - y="362.36218" + y="388.36218" id="text6240" sodipodi:linespacing="125%">post-updatehook ikiwiki.cgipush .git + y="342.36218">.git .git + y="618.36218">.git .git + y="617.36218">.git .git + y="618.36218">.git .git + y="482.36218">.git web-sideedit automaticrebuild gitpull gitpush diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn index bc8f4d824..d1b2191e2 100644 --- a/doc/roadmap.mdwn +++ b/doc/roadmap.mdwn @@ -65,16 +65,16 @@ Released 31 December, 2008. The 3.x series is expected to undergo continuing development for some time, adding improvements and new features, but avoiding changes that break -backwards compatability. +backwards compatibility. ---- -# compatability breaking changes +# compatibility breaking changes Probably incomplete list: * Drop old `--getctime` option. -* Remove compatability code in `loadindex` to handle old index data layouts. +* Remove compatibility code in `loadindex` to handle old index data layouts. * Make pagespecs match relative by default? (see [[discussion]]) * Flip wikilinks? (see [[todo/link_plugin_perhaps_too_general?]] and [[todo/do_not_make_links_backwards]]) * Enable tagbase by default (so that tag autocreation will work by default). diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index d11211cac..f9fa321b3 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -1,3 +1,4 @@ + This is the [[SandBox]], a page anyone can edit to try out ikiwiki (version [[!version ]]). @@ -5,7 +6,11 @@ What about [[this page]]? hello world (right back at ya) -test +test, is it being saved? Probably. I will check. This seems really straightforward. + +~~~ +pre formated text? +~~~ > This is a blockquote. > @@ -45,7 +50,7 @@ Bulleted list test _this_ out. `test this code block` - +[[!wikipedia War_of_1812]] ---- [[!template id=note text="this is generated by the [[plugins/haiku]] plugin"]] @@ -96,7 +101,7 @@ This is an email link: Send Mail

-This is some preformatted text. Each line is proceeded by four spaces. +What follows is some preformatted text. Each line is proceeded by four spaces. Test @@ -109,7 +114,7 @@ This is some preformatted text. Each line is proceeded by four spaces. -...Now why doesn't it work like that on my copy of ikiwiki? :( +...Now why doesn't it work like that on my own copy of ikiwiki? :( Räksmörgås. diff --git a/doc/sandbox/discussion.mdwn b/doc/sandbox/discussion.mdwn new file mode 100644 index 000000000..ec651a5b3 --- /dev/null +++ b/doc/sandbox/discussion.mdwn @@ -0,0 +1,7 @@ +Whilst discussing Ikiwiki on IRC, someone pointed out that "This is the SandBox, a page anyone can edit to try out ikiwiki" is not strictly true, or is debatably so, since they must log in to edit. This proved to be enough of a barrier that said person didn't consider ikiwiki any further. -- [[Jon]] + +> I personally think we'd be better off with a separate demo wiki +> (sandbox.ikiwiki.info?) that has its own git repo and +> `nofollow` configuration, so edits to that wiki aren't archived +> in ikiwiki's git history forever; perhaps with a cron job to +> reset the sandbox every few days? --[[smcv]] diff --git a/doc/sandbox/new__95__test.mdwn b/doc/sandbox/new__95__test.mdwn new file mode 100644 index 000000000..90bfcb510 --- /dev/null +++ b/doc/sandbox/new__95__test.mdwn @@ -0,0 +1 @@ +this is a test diff --git a/doc/shortcuts.mdwn b/doc/shortcuts.mdwn index b4f6d8ef4..ca529c296 100644 --- a/doc/shortcuts.mdwn +++ b/doc/shortcuts.mdwn @@ -27,7 +27,7 @@ This page controls what shortcut links the wiki supports. * [[!shortcut name=debrt url="https://rt.debian.org/Ticket/Display.html?id=%s"]] * [[!shortcut name=debss url="http://snapshot.debian.org/package/%s/"]] * Usage: `\[[!debss package]]` or `\[[!debss package/version]]`. See for details. -* [[!shortcut name=debwiki url="https://wiki.debian.org/%s"]] +* [[!shortcut name=debwiki url="https://wiki.debian.org/%S"]] * [[!shortcut name=fdobug url="https://bugs.freedesktop.org/show_bug.cgi?id=%s" desc="freedesktop.org bug #%s"]] * [[!shortcut name=fdolist url="http://lists.freedesktop.org/mailman/listinfo/%s" desc="%s@lists.freedesktop.org"]] * [[!shortcut name=gnomebug url="https://bugzilla.gnome.org/show_bug.cgi?id=%s" desc="GNOME bug #%s"]] @@ -55,7 +55,7 @@ This page controls what shortcut links the wiki supports. * [[!shortcut name=whois url="http://reports.internic.net/cgi/whois?whois_nic=%s&type=domain"]] * [[!shortcut name=cve url="https://cve.mitre.org/cgi-bin/cvename.cgi?name=%s"]] * [[!shortcut name=flickr url="https://secure.flickr.com/photos/%s"]] -* [[!shortcut name=man url="http://linux.die.net/man/%s"]] +* [[!shortcut name=man url="http://manpages.debian.org/%s"]] * [[!shortcut name=ohloh url="https://www.ohloh.net/p/%s"]] * [[!shortcut name=cpanrt url="https://rt.cpan.org/Ticket/Display.html?id=%s" desc="CPAN RT#%s"]] * [[!shortcut name=novellbug url="https://bugzilla.novell.com/show_bug.cgi?id=%s" desc="bug %s"]] diff --git a/doc/spam_fighting.mdwn b/doc/spam_fighting.mdwn index 6e04dcf8f..712eb0740 100644 --- a/doc/spam_fighting.mdwn +++ b/doc/spam_fighting.mdwn @@ -30,4 +30,6 @@ cba01c2 | 2013/09/15 | spain1001 | 80.187.106.136 702a3e5 | 2014/01/02 | Toni | 124.105.173.121 c2924ce | 2014/01/02 | domtheo9110 | 182.253.51.174 cd81b9f | 2014/01/03 | domtheo9110 | ? +e3376ce | 2014/08/19 | Nng_L (OpenID) | 58.186.127.104 +104c606 | 2014/08/19 | tlevine (OpenID) | 82.153.13.48 """]] diff --git a/doc/templates/discussion.mdwn b/doc/templates/discussion.mdwn index c7115e4d6..dddab48d4 100644 --- a/doc/templates/discussion.mdwn +++ b/doc/templates/discussion.mdwn @@ -25,3 +25,4 @@ Is there a list of all the available variables somewhere, or do I just grep the I pulled a list of variables and posted it, its in the history for [[templates]] under my name. [[justint]] +I am trying to override `page.tmpl` by providing `templates/page.tmpl` in my `srcdir`- this works, but now `templates/page.tmpl` is created in my `destdir` as well! Is this expected? Is there a way to avoid this? --chenz diff --git a/doc/theme_market.mdwn b/doc/theme_market.mdwn index e9bdaa056..4ac41cb0a 100644 --- a/doc/theme_market.mdwn +++ b/doc/theme_market.mdwn @@ -11,3 +11,5 @@ Feel free to add your own [[theme|themes]] here, but first consider writing a si * **[[Night city theme|http://anarcat.ath.cx/night_city/README/]]**, contributed by [[anarcat]], see an example [[on his homepage|http://anarcat.ath.cx/]] * **[[Bootstrap theme|http://anonscm.debian.org/gitweb/?p=users/jak/website.git;a=summary]]**, contributed by [[JAK LINUX|http://jak-linux.org/about/]], based on [[Twitter Bootstrap|http://twitter.github.com/bootstrap/]] + + * **[[Bootstrap 3|https://github.com/ramseydsilva/ikiwiki-bootstrap-theme]]**, contributed by [[ramsey]], based on [[Twitter Bootstrap 3|http://getbootstrap.com]] diff --git a/doc/tips/Git_repository_and_web_server_on_different_hosts.mdwn b/doc/tips/Git_repository_and_web_server_on_different_hosts.mdwn index 58940b89f..c1529c7a0 100644 --- a/doc/tips/Git_repository_and_web_server_on_different_hosts.mdwn +++ b/doc/tips/Git_repository_and_web_server_on_different_hosts.mdwn @@ -3,6 +3,8 @@ server located at different hosts. Here's a description for such a setup, using password-less SSH as a way of communication between these two hosts. +[[!img separate-webserver.svg size=490x align=right]] + Git server ========== diff --git a/doc/tips/Git_repository_and_web_server_on_different_hosts/separate-webserver.svg b/doc/tips/Git_repository_and_web_server_on_different_hosts/separate-webserver.svg new file mode 100644 index 000000000..a9a428158 --- /dev/null +++ b/doc/tips/Git_repository_and_web_server_on_different_hosts/separate-webserver.svg @@ -0,0 +1,716 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + working clones + repository + srcdir + destdir + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <html> + + + + + + + + + + + + + + + ikiwiki.cgi + + post-updatehook + ikiwiki.cgipush + .git + .git + .git + .git + .git + web-sideedit + automaticrebuild + gitpull + gitpush + + + diff --git a/doc/tips/Hosting_Ikiwiki_and_master_git_repository_on_different_machines.mdwn b/doc/tips/Hosting_Ikiwiki_and_master_git_repository_on_different_machines.mdwn index 35feacb71..e6277d338 100644 --- a/doc/tips/Hosting_Ikiwiki_and_master_git_repository_on_different_machines.mdwn +++ b/doc/tips/Hosting_Ikiwiki_and_master_git_repository_on_different_machines.mdwn @@ -17,6 +17,7 @@ I assume the [[rcs]] used is [[rcs/git]], but it might be done for other rcs. # Similar and related tips and problems +- [[tips/distributed_wikis]] References different way of distributing wikis (including this one). - [[http://www.icanttype.org/blog/ikiwiki_git_remote_repo/]] Similar to what I am describing, excepted that you must be able to connect to the machine hosting Ikiwiki using ssh. @@ -37,6 +38,8 @@ it on a remote machine, and tell Ikiwiki to use it instead of its local one. We will also ensure that the wiki is rendered whenever a commit is done to the git repository. +[[!img separate-web-git-servers.svg size=400x]] + # Conventions - We are building a wiki called *SITE*. @@ -143,14 +146,12 @@ the IkiWiki machine, and here is the deadlock. Explanations of the command: ## Going further - *Web server on a third machine* It should be possible to use a third machine - to host the web server. A hook might be used to export the rendered wiki on - this server, or use a nfs repository as the destination repository of - ikiwiki. However, allowing web modifications (using CGI) might be tricky… + to host the web server, using [[this documentation|tips/Git_repository_and_web_server_on_different_hosts/]]. - *Using [[gitolite|https://github.com/sitaramc/gitolite]] to manage repositories on the git machine* Simply replace the manipulations of git on the git machine by the corresponding manipulations using gitolite. * With gitolite, you can use this line in a `post-update` hook: - `[ x"$GL_USER" = x"`*`gitolite-user`*`" ] || wget ...` + `[ x"$GL_USER" = x"`*`gitolite-user`*`" ] || wget ...` where *gitolite-user* is the name of the public key registered through gitolite. - thus, you filter out precisely the events that originate from the server-to-be-pinged, no matter what the commit id says. (For example, if you push commits you created on a local CGI ikiwiki, they'd be called '@web' as well). + Thus, you filter out precisely the events that originate from the server-to-be-pinged, no matter what the commit id says. (For example, if you push commits you created on a local CGI ikiwiki, they'd be called '@web' as well). diff --git a/doc/tips/Hosting_Ikiwiki_and_master_git_repository_on_different_machines/discussion.mdwn b/doc/tips/Hosting_Ikiwiki_and_master_git_repository_on_different_machines/discussion.mdwn new file mode 100644 index 000000000..12565fd6a --- /dev/null +++ b/doc/tips/Hosting_Ikiwiki_and_master_git_repository_on_different_machines/discussion.mdwn @@ -0,0 +1,14 @@ +It may be clear to experienced/technical gitolite users, but it confused me so I'd like to ask: + +In the comment about gitolite mentioning the line with $GL_USER, I assume "gitolite-user" +needs to be replaced with the name of the gitolite user with which ikiwiki pushes +changes? For example, if I have a key 'ikiwiki.pub', I use "ikiwiki" in the hook. + +If that's what the comment means, I'd be happy if it was made clear, so it's easier +to understand. Or I can edit it myself, once I make sure I really understand. + +--[[fr33domlover]] + +> You are right. I [[updated|http://source.ikiwiki.branchable.com/?p=source.git;a=blobdiff;f=doc/tips/Hosting_Ikiwiki_and_master_git_repository_on_different_machines.mdwn;h=6bbaf3e6e818e2e286c0cf9d357c9b03f649e146;hp=af4438bd5f6ac4f64cb443c6cfa3ba52e12da4f0;hb=54d47eb26ae41ff23932b9c0e3f15e698cb56ada;hpb=fc24df96c10b804d3022eb92caf687729921adbb]] the page to make it more precise, but feel free to continue to improve it. +> +> -- [[Louis|spalax]] diff --git a/doc/tips/Hosting_Ikiwiki_and_master_git_repository_on_different_machines/separate-web-git-servers.svg b/doc/tips/Hosting_Ikiwiki_and_master_git_repository_on_different_machines/separate-web-git-servers.svg new file mode 100644 index 000000000..b6095a2b7 --- /dev/null +++ b/doc/tips/Hosting_Ikiwiki_and_master_git_repository_on_different_machines/separate-web-git-servers.svg @@ -0,0 +1,783 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + working clones + repository + srcdir + destdir + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <html> + + + + + + + + + + + + + + + ikiwiki.cgi + + post-updatehook + ikiwiki.cgipush + .git + .git + .git + .git + .git + web-sideedit + automaticrebuild + gitpull + gitpush + + pingee + + + + diff --git a/doc/tips/Right-to-left___40__RTL__41___page_text.mdwn b/doc/tips/Right-to-left___40__RTL__41___page_text.mdwn new file mode 100644 index 000000000..2b176c811 --- /dev/null +++ b/doc/tips/Right-to-left___40__RTL__41___page_text.mdwn @@ -0,0 +1,49 @@ +Here's a simple way to create pages in which the page body (or a part of it) goes right-to-left. +This includes things you insert into the page, such as polls and blockquotes and +lists and a progress bar and so on. Some things don't work perfectly, but if +you want to have some RTL pages in your wiki, this will probably do. + +It does not modify the things around the body, such as the page header and the +footer. Only what is rendered from the mdwn file is affected. + +# 1 Add an RTL Template + +Create a new template page *templates/rtl.mdwn* with the following content: + +
+ +
+ + Use this template to insert RTL text into a page. + This template has one parameter: +
    +
  • `text` - the text to display in RTL +
+
+ +# 2 Add an RTL class to the CSS + +In your *local.css* add the following: + +[[!format css """ +/* rtl template */ +.rtl { + direction: rtl; +} +"""]] + +# 3 Use the Template + +To make a page or part of it RTL, use the [[ikiwiki/directive/template]] directive: + + \[[!template id="rtl" text=""" + + This text will be aligned to the right. You can write here in Hebrew, Arabic, etc. You can + put here anything you want to put on the page. As said above, some elements may not + align perfectly, but: + + 1. It can be solved per case + 2. It's not critical, everything works quite well and is readable. If you have any comments, + suggestions, improvements, bugs, etc - please share here :-) + + """]] diff --git a/doc/tips/convert_moinmoin_to_ikiwiki.mdwn b/doc/tips/convert_moinmoin_to_ikiwiki.mdwn index ec4574971..211cb4e2a 100644 --- a/doc/tips/convert_moinmoin_to_ikiwiki.mdwn +++ b/doc/tips/convert_moinmoin_to_ikiwiki.mdwn @@ -12,10 +12,9 @@ Issues can be filed in the redmine bugtracker: > I was actually thinking the ACLs would cause a problem just for the crawler, I hadn't considered their re-implementation (but yes, that would be good!) — [[Jon]] -Note that freedesktop.org are doing a moinmoin to ikiwiki conversion, see [this page](http://www.freedesktop.org/wiki/conversion/) for some documentation. It's unclear which software they are using for that purpose. — [[anarcat]] +Note that freedesktop.org are doing a moinmoin to ikiwiki conversion, see [this page](http://www.freedesktop.org/wiki/conversion/) for some documentation. It's unclear which software they are using for that purpose. They used the software documented here, and haven't done significant patches: they manually convert the remaining broken bits. — [[anarcat]] diff --git a/doc/tips/distributed_wikis.mdwn b/doc/tips/distributed_wikis.mdwn index 29273ada1..2547a2e9f 100644 --- a/doc/tips/distributed_wikis.mdwn +++ b/doc/tips/distributed_wikis.mdwn @@ -5,52 +5,69 @@ git, let's explore some possibilities for distributed wikis. [[!toc levels=2]] -## a wiki mirror +## Overview -The simplest possibility is setting up a mirror. If a wiki exposes its git -repository and has the [[plugins/pinger]] plugin enabled, then anyone can -set up a mirror that will automatically be kept up-to-date with the origin -wiki. Just clone the git repo, configure ikiwiki to use it, enable the -[[plugins/pingee]] plugin in your configuration, and edit the origin wiki, -adding a ping directive for your mirror: +There are several possible level of decentralisation: - \[[!ping from="http://thewiki.com/" - to="http://mymirror.com/ikiwiki.cgi?do=ping"]] + 0. [[default setup|rcs/git]], no decentralisation + 1. [[a simple HTML mirror|tips/Git_repository_and_web_server_on_different_hosts/]] + 2. [[separate ikiwiki and git servers|tips/Hosting_Ikiwiki_and_master_git_repository_on_different_machines]] + 3. separate `srcdir`, still requires a central bare repo - uses [[plugins/pinger]] + 4. completely distinct ikiwiki installs, synchronised with [[plugins/contrib/gitpush]] -The "from" parameter needs to be the url to the origin wiki. The "to" parameter -is the url to ping on your mirror. +Here's a graphic overview of those: -Now whenever the main wiki is edited, it will ping your mirror, which will -pull the changes from "origin" using git, and update itself. It could, in -turn ping another mirror, etc. +### Default setup - one central server -And if someone edits a page on your mirror, it will "git push origin", -committing the changes back to the origin git repository, and updating the -origin mirror. Assuming you can push to that git repository. If you can't, -and you want a mirror, and not a branch, you should disable web edits on -your mirror. (You could also point the cgiurl for your mirror at the origin -wiki.) +[[!img rcs/git/wiki_edit_flow.svg size=400x]] -## branching a wiki +In the default setup, all the resources are stored on the central +servers. Users can still clone and edit the git repo by hand and +contribute by git, but otherwise all the changes happen on a single +web interface. This basic setup is best described in [[rcs/git]]. -It follows that setting up a branch of a wiki is just like a mirror, except -we don't want it to push changes back to the origin. The easy way to -accomplish this is to clone the origin git repository using a readonly -protocol (ie, "git://"). Then you can't push to it. +### Separate webserver and git repository -If a page on your branch is modified and other modifications are made to -the same page in the origin, a conflict might occur when that change is -pulled in. How well will this be dealt with and how to resolve it? I think -that the conflict markers will just appear on the page as it's rendered in -the wiki, and if you could even resolve the conflict using the web -interface. Not 100% sure as I've not gotten into this situation yet. +[[!img tips/Git_repository_and_web_server_on_different_hosts/separate-webserver.svg size=400x]] ---[[Joey]] +This is the configuration described in +[[tips/Git_repository_and_web_server_on_different_hosts]]. The webserver part +hosts the HTML files, the ikiwiki [[cgi]] but everything else is on +the git server. + +### Separate webserver and git repository, the git srcdir being hosted on the webserver + +[[!img Hosting_Ikiwiki_and_master_git_repository_on_different_machines/separate-web-git-servers.svg size=400x]] + +This is the configuration described in +[[tips/Hosting_Ikiwiki_and_master_git_repository_on_different_machines]]. One server hosts the web server (and the [[Ikiwiki cgi|cgi]]) and the git source dir; a second server hosts the git bare repository. This can be used when you have very limited access to the git server. + +### Decentralised pinger setup + +[[!img ping-setup.svg size=400x]] + +In this configuration, the mirrors all have their own `srcdir`, but +still need to push and pull from the same central bare git repo. The +[[plugins/pinger]] plugin is used to ping the mirrors from the central +server on edits. + +Step by step setup instructions for this are detailed below. -## Practical example +### Fully decentralised setup + +[[!img decentralized_wikis.svg size=400x]] + +In this configuration, each wiki is fully independent and pushes its +changes to other wikis using the [[plugins/contrib/gitpush]] plugin. + +## Step by step setup instructions + +The first two ways of setting up ikiwiki are better described in [[setup]] or [[tips/Git_repository_and_web_server_on_different_hosts]]. The remainder of this page describes the latter two more complex distributed setups. Say you have a friend that has already configured a shiny ikiwiki site, and you want to help by creating a mirror. You still need to figure out how to install ikiwiki and everything, hopefully this section will help you with that. +Note that parts of the following documentation duplicate instructions from [[setup]], [[setup/byhand]], [[rcs/git]] and [[tips/laptop_wiki_with_git]]. + ### Installing ikiwiki You need to install the ikiwiki package for the mirror to work. You can use ikiwiki to publish the actual HTML pages elsewhere if you don't plan on letting people edit the wiki, but generally you want the package to be installed on the webserver for editing to work. @@ -96,7 +113,7 @@ You should already be able to make a plain HTML rendering of the wiki: You will also need a webserver to serve the content in the `destdir` defined above. We assume you will configure a virtual host named `mirror.example.com`. Here are some examples on how to do those, see [[!iki setup]] and [[!iki tips/dot_cgi]] for complete documentation. -Note that this will also configure CGI so that people can edit the wiki. Note that this configuration may involve timeouts if the main site is down. +Note that this will also configure CGI so that people can edit the wiki. Note that this configuration may involve timeouts if the main site is down, as ikiwiki will attempt to push to the central git repository at every change. #### Apache configuration @@ -141,20 +158,33 @@ Make this writable: chmod a+w /tmp/fcgi.socket -### Read-only mirror: done! +### Enable the pinger functionality -At this point, you are done! You can edit your own clone of the wiki, although your changes will not go back to the main site. However, you can always push or pull manually from the `repository` in `~user/source.git` to update the main site. +At this point, you need to enable the pinger functionality to make sure that changes on the central server propagate to your mirror. -### Announcing the mirror +This assumes a central wiki that exposes its git +repository and has the [[plugins/pinger]] plugin enabled. Enable the +[[plugins/pingee]] plugin in your configuration, and edit the origin wiki, +adding a ping directive for your mirror: -Once your mirror works, you can also add it to the list of mirrors. You can ask the mirror where you take it from (and why not, all mirrors) to add it to their setup file. As an example, here's the configuration for the first mirror: + \[[!ping from="http://thewiki.com/" + to="http://mymirror.com/ikiwiki.cgi?do=ping"]] - mirrorlist: - example: https://wiki.example.com/ +The "from" parameter needs to be the url to the origin wiki. The "to" parameter +is the url to ping on your mirror. This can be done basically in any page. -The [[plugins/mirrorlist]] plugin of course needs to be enabled for this to work. +Now whenever the main wiki is edited, it will ping your mirror, which will +pull the changes from "origin" using git, and update itself. It could, in +turn ping another mirror, etc. -### Alternative configuration +And if someone edits a page on your mirror, it will "git push origin", +committing the changes back to the origin git repository, and updating the +origin mirror. Assuming you can push to that git repository. If you can't, +and you want a mirror, and not a branch, you should disable web edits on +your mirror. (You could also point the cgiurl for your mirror at the origin +wiki if you do not want to incur that overhead or do not want to, or can't, run a CGI.) + +### Fully decentralized configuration In the above configuration, the master git repository is still on the main site. If that site goes down, there will be delays when editing the wiki mirror. It could also simply fail because it will not be able to push the changes to the master git repo. An alternative is to setup a local bare repository that is synced with the master. @@ -175,17 +205,44 @@ The following entries will be different from the above setup file: git_wrapper: /home/user/source.git/hooks/post-commit git_test_receive_wrapper: /home/user/source.git/hooks/pre-receive -To do this, the mirror needs to push back to the master, again using the gitpush plugin: +To do this, the mirror needs to push back to the master, using the [[plugins/contrib/gitpush]] plugin: git_push_to: - git://wiki.example.com/ This will ensure that commits done on the mirror will propagate back to the master. -### Other guides +## Other ideas + +See also: + + * [[setup]] + * [[setup/byhand]] + * [[rcs/git]] + * [[tips/laptop_wiki_with_git]] + * [ikiwiki creation notes](http://piny.be/jrayhawk/notes/ikiwiki_creation/) + +### Announcing the mirror + +Once your mirror works, you can also add it to the list of mirrors. You can ask the mirror where you take it from (and why not, all mirrors) to add it to their setup file. As an example, here's the configuration for the first mirror: + + mirrorlist: + example: https://wiki.example.com/ + +The [[plugins/mirrorlist]] plugin of course needs to be enabled for this to work. -Another guide is the [[tips/laptop_wiki_with_git]] guide. To get a -better understanding of how ikiwiki works, see [[rcs/git]]. +### branching a wiki -[This](http://piny.be/jrayhawk/notes/ikiwiki_creation/) may also be of -use if the above doesn't work. +It follows that setting up a branch of a wiki is just like the fully decentralised mirror above, except +we don't want it to push changes back to the origin. The easy way to +accomplish this is to clone the origin git repository using a readonly +protocol (ie, "git://"). Then you can't push to it. + +If a page on your branch is modified and other modifications are made to +the same page in the origin, a conflict might occur when that change is +pulled in. How well will this be dealt with and how to resolve it? I think +that the conflict markers will just appear on the page as it's rendered in +the wiki, and if you could even resolve the conflict using the web +interface. Not 100% sure as I've not gotten into this situation yet. + +--[[Joey]] diff --git a/doc/tips/distributed_wikis/decentralized_wikis.svg b/doc/tips/distributed_wikis/decentralized_wikis.svg new file mode 100644 index 000000000..f74e07023 --- /dev/null +++ b/doc/tips/distributed_wikis/decentralized_wikis.svg @@ -0,0 +1,1511 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + working clones + repository + srcdir + destdir + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <html> + + + + + + + + + + + + + + + ikiwiki.cgi + + post-updatehook + ikiwiki.cgipush + .git + .git + .git + .git + .git + web-sideedit + automaticrebuild + gitpull + gitpush + + + gitpushplugin + + + + + + + + working clones + repository + srcdir + destdir + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <html> + + + + + + + + + + + + + + + ikiwiki.cgi + + post-updatehook + ikiwiki.cgipush + .git + .git + .git + .git + .git + web-sideedit + automaticrebuild + gitpull + gitpush + + diff --git a/doc/tips/distributed_wikis/discussion.mdwn b/doc/tips/distributed_wikis/discussion.mdwn index 994c493f9..101f64d51 100644 --- a/doc/tips/distributed_wikis/discussion.mdwn +++ b/doc/tips/distributed_wikis/discussion.mdwn @@ -5,3 +5,18 @@ Would it work if the mirrored wiki was configured with cgiurl set to the cgiurl > leave the user on a page on the origin wiki when they save the edit.) > I've put a mention of this option in the page. > --[[Joey]] + +--- + +### Separate ikiwiki web server, and git server + +> I don't understand how this configuration is different from the previous one, could you clarify? the image link is broken as well. [[anarcat]] +> +>> Sorry. I did a mistake. I hope this is more clear now. [[Louis|spalax]] +>> +>>> I still don't understand the difference, and I can't reach the URL you have given above. Previously, to upload stuff I created a clone of the git repository and asked joeyh to pull, like [[this|todo/improve_decentralised_wikis_documentation_and_graphics/]]. --[[anarcat]] +>>> +>>>> Upload: I have set up a [[clone|https://github.com/paternal/ikiwiki]] on github and asking joeyh to pull: [[branch|https://github.com/paternal/ikiwiki/tree/paternal/upload-svg]], [[pull request|todo/upload__95__figure]], [[figure|https://github.com/paternal/ikiwiki/blob/paternal/upload-svg/doc/tips/Hosting_Ikiwiki_and_master_git_repository_on_different_machines/separate-web-git-servers.svg]] +>>>> +>>>> Difference between *Separate webserver and git repository* and *Separate ikiwiki web server, and git server* : the only difference is that in the first case, the git srcdir is on the same server as the git main repository, whereas in the second case, it is present on the same server as the web server. One use case is when one as a very limited access to the server hosting the git repository, and cannot setup the git srcdir (because of, for instance, a (reasonably?) paranoid sysadmins would require the creation of a new user to own the git srcdir). Using this configuration, it is possible to have an Ikiwiki instance where the main public repository is hosted on [[github|http://github.com]] (excepted that the wiki won't automatically rebuild when pushing a repo to github, since the [[github webhook|https://help.github.com/articles/creating-webhooks]] does not seem to allow conditional). + diff --git a/doc/tips/distributed_wikis/ping-setup.svg b/doc/tips/distributed_wikis/ping-setup.svg new file mode 100644 index 000000000..2d971c412 --- /dev/null +++ b/doc/tips/distributed_wikis/ping-setup.svg @@ -0,0 +1,1064 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + working clones + repository + srcdir + destdir + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <html> + + + + + + + + + + + + + + + ikiwiki.cgi + + post-updatehook + ikiwiki.cgipush + .git + .git + .git + .git + .git + web-sideedit + automaticrebuild + gitpull + gitpush + + + + srcdir + destdir + + + + + + + + + + + + + + + + + + + <html> + + + + + + + + + + + + + + + ikiwiki.cgi + + pingee + ikiwiki.cgipush + .git + web-sideedit + automaticrebuild + pinger + + diff --git a/doc/tips/ikiwiki_on_mac_os_x.mdwn b/doc/tips/ikiwiki_on_mac_os_x.mdwn index b1757af84..b36bb6a03 100644 --- a/doc/tips/ikiwiki_on_mac_os_x.mdwn +++ b/doc/tips/ikiwiki_on_mac_os_x.mdwn @@ -5,10 +5,16 @@ The easiest way of installing an up-to-date ikiwiki on any version of Mac OS X is via [pkgsrc](http://www.pkgsrc.org/). +## From source: + 7. [Bootstrap pkgsrc](http://www.netbsd.org/docs/pkgsrc/platforms.html#bootstrapping-pkgsrc) 7. Run `cd .../pkgsrc/www/ikiwiki && make install clean` -{OK} As of 2013/09/14, the [version of ikiwiki in pkgsrc](http://pkgsrc.se/www/ikiwiki) is 3.20130904.1. +## From binary packages: + +7. [install binary packages (OSX)](http://www.pkgsrc.org/#index1h1) + +{OK} As of 2014/08/24, the [version of ikiwiki in pkgsrc](http://pkgsrc.se/www/ikiwiki) is 3.20140815. ----- @@ -33,7 +39,7 @@ enjoy Enrique Castilla -[!] As of 2013/09/14, the [version of ikiwiki in MacPorts](http://www.macports.org/ports.php?by=name&substr=Ikiwiki) is 3.20110608. +[!] As of 2014/08/24, the [version of ikiwiki in MacPorts](http://www.macports.org/ports.php?by=name&substr=Ikiwiki) is 3.20110608. ----- diff --git a/doc/tips/ikiwiki_on_mac_os_x/discussion.mdwn b/doc/tips/ikiwiki_on_mac_os_x/discussion.mdwn new file mode 100644 index 000000000..40ac87435 --- /dev/null +++ b/doc/tips/ikiwiki_on_mac_os_x/discussion.mdwn @@ -0,0 +1,16 @@ +This recommended method (sc. install Ikiwiki using pkgsrc) is not compatible with homebrew and the packages installed via homebrew, and, therefore, not always a viable solution to installing Ikiwiki on Mac computers. + +> In what way is it "not compatible"? Have you tried it? I can't +> think of any technical reason why having a working Homebrew +> installation would prevent one from also having a working pkgsrc +> installation, or vice versa. (MacPorts and Fink can certainly coexist +> with each other and with other package managers on the same system.) +> +> We used to direct OS X ikiwiki users to MacPorts, but the version +> there is almost three years old. pkgsrc's ikiwiki stays up to date +> because I keep it that way. If someone packages ikiwiki for Homebrew +> and reliably keeps the package updated, then we could discuss +> whether pointing folks at Homebrew is better advice than what's +> currently being given here. In the meantime, if you've tried and +> failed to install ikiwiki from pkgsrc on OS X, please report your +> problem in detail so it can be addressed in some way. --[[schmonz]] diff --git a/doc/tips/monitor_page_changes_through_IRC.mdwn b/doc/tips/monitor_page_changes_through_IRC.mdwn new file mode 100644 index 000000000..ebddbfeac --- /dev/null +++ b/doc/tips/monitor_page_changes_through_IRC.mdwn @@ -0,0 +1,9 @@ +because of [[bugs/notifyemail_fails_with_some_openid_providers]], I have been struggling with finding ways of being notified of changes to pages I want to watch here. + +the workaround I found so far was to join the `#ikiwiki` channel on freenode, and set the following "hilight" in irssi: + + /hilight -channels #ikiwiki -word tips/monitor_page_changes_through_IRC + +this will watch for any change to this page. -- [[anarcat]] + +hello anarcat, I'm editing your page! -- [[micah]] diff --git a/doc/todo/Add_nicer_math_formatting.mdwn b/doc/todo/Add_nicer_math_formatting.mdwn index d83c97add..ac17f6745 100644 --- a/doc/todo/Add_nicer_math_formatting.mdwn +++ b/doc/todo/Add_nicer_math_formatting.mdwn @@ -25,4 +25,7 @@ I think [mathjax](http://www.mathjax.org/) would be the best option. This is the > I've updated Jason Blevin's pandoc plugin to permit tighter integration between Ikiwiki and Pandoc. Given the features Pandoc has added over the past 6-12 months, this makes for a very powerful combination, e.g. with code block syntax highlighting and lots of options for how to process and display inline TeX. Both jsMath and MathJaX are supported, along with many other methods. See https://github.com/profjim/pandoc-iki for details. --Profjim +> talking to my semantic-web/scientist colleagues, [math.js](http://mathjs.org) +> is apparently the current state-of-the-art. -- [[Jon]]. + [[!tag wishlist]] diff --git a/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn b/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn index 0dbda8a3a..1fa710f8f 100644 --- a/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn +++ b/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn @@ -39,3 +39,25 @@ I've written a new plugin, sectiontemplate, available in the `page_tmpl` branch >>>>> --[[KathrynAndersen]] Just a quick note that Kathryn's branch is ready.[[!template id=gitbranch branch=rubykat/pagetemplate author="[[KathrynAndersen]]"]][[!tag patch]] --[[Will]] + +> Review: +> +> The indentation seems odd. IkiWiki is mostly indented with hard tabs; +> this seems to be a mixture of tabs and spaces, assuming 4 spaces per tab. +> +> [[!format perl """ +sub checkconfig () { +... + ! defined IkiWiki::template_file($tmpl)) +"""]] +> +> I think `checkconfig` is too soon to rely on `template_file` +> producing correct results? It looks in `%pagesources` which has not +> yet been updated. +> +> If we had a "just before building" hook, that would be a good time +> to emit warnings; or doing it once per run, on-demand, triggered +> by the first call to the `templatefile` hook could work. Or the +> hook could just silently ignore bad pagespecs? +> +> --[[smcv]] diff --git a/doc/todo/__42__forward__42__ing_functionality_for_the_meta_plugin.mdwn b/doc/todo/__42__forward__42__ing_functionality_for_the_meta_plugin.mdwn index b3804d652..dd007b97d 100644 --- a/doc/todo/__42__forward__42__ing_functionality_for_the_meta_plugin.mdwn +++ b/doc/todo/__42__forward__42__ing_functionality_for_the_meta_plugin.mdwn @@ -3,9 +3,6 @@ to the [[`meta`_plugin|plugins/meta]]. > [[done]], with some changes --[[Joey]] -Find the most recent version at -. - I can't use `scrub(...)`, as that will strip out the forwarding HTML command. How to deal with that? diff --git a/doc/todo/add_remove_to_actionlist.mdwn b/doc/todo/add_remove_to_actionlist.mdwn new file mode 100644 index 000000000..b50fe885f --- /dev/null +++ b/doc/todo/add_remove_to_actionlist.mdwn @@ -0,0 +1,20 @@ +[[!template id=gitbranch branch=jon/remove_action author="[[Jon]]"]] + +The "remove" plugin allows one to remove pages via the web, but you first have +to click on 'edit' to get to the 'remove' button. This is a bit +counter-intuitive, and ikiwiki has an action list, so it would be good if +"remove" (and also "rename" for that plugin) added items to the action list. + +First cut series of patches in the indicated branch. A bit more review is +needed, in my tests removals work and are committed to the vcs but +recentchanges isn't regenerated for some reason (probably the constructed `` +link needs to add/adjust the parameters to emulate a formbuilder form +submission more carefully). + +I haven't begun on the 'rename' plugin. -- [[Jon]] + +[[!tag wishlist patch]] + +> I accidentally pushed an incomplete patch to that branch that starts the +> work of doing the same for rename, but it's not working yet, to merge one +> would need to cherry-pick the other patches for now. Sorry. -- [[Jon]] diff --git a/doc/todo/allow_option_for_requiring_description_when_editing_page.mdwn b/doc/todo/allow_option_for_requiring_description_when_editing_page.mdwn index 4fe591a48..bb8524841 100644 --- a/doc/todo/allow_option_for_requiring_description_when_editing_page.mdwn +++ b/doc/todo/allow_option_for_requiring_description_when_editing_page.mdwn @@ -1 +1,24 @@ allow option for requiring description when editing page. This is so if a commit to an rcs is used, the commit message will not be blank. + +> Duplicate of [[todo/Allow_web_edit_form_comment_field_to_be_mandatory]] where +> Joey indicated that he didn't want this in ikiwiki core, but would +> accept a plugin that did it. +> +> Expanding on what Joey said there a little, the problem I have with +> *requiring* a commit message is that solving a social problem +> by technical means rarely works. If you can't persuade users +> to obey a policy like "provide a nonempty commit message", then +> you can't persuade them to obey a policy like "provide a *useful* +> nonempty commit message" either. I used to work on a project +> whose Bugzilla had been configured or patched to require a comment +> whenever you changed a field (e.g. priority, cc, ...) and in +> practice that just led to a lot of wasted time when people tried +> to triage bugs quickly, and a lot of comments whose text was +> ".", " ", or on at least one occasion, ☃ +> (U+2603 SNOWMAN). +> +> If your chosen RCS has a technical constraint that the commit +> message must be non-empty (and will just not work otherwise), +> that's another matter; I'd say that in that situation +> it's appropriate for its plugin to replace empty commit +> messages with "." or gettext("update") or something. --smcv diff --git a/doc/todo/beef_up_sidebar_to_allow_for_multiple_sidebars.mdwn b/doc/todo/beef_up_sidebar_to_allow_for_multiple_sidebars.mdwn index fdaa09f26..084c6fd16 100644 --- a/doc/todo/beef_up_sidebar_to_allow_for_multiple_sidebars.mdwn +++ b/doc/todo/beef_up_sidebar_to_allow_for_multiple_sidebars.mdwn @@ -123,3 +123,7 @@ Footer example: -- [[KathrynAndersen]] [[!tag wishlist]] + +> I am stumbling upon this discussion, and I noticed that I implemented part of [[KathrynAndersen]] idea in the [[plugins/contrib/sidebar2]] [[plugin|plugins]]. Using this plugin, you can have several sidebars, which are included only in pages matching some pagespec. +> +> [[Louis|spalax]] diff --git a/doc/todo/calendar_autocreate.mdwn b/doc/todo/calendar_autocreate.mdwn new file mode 100644 index 000000000..2a7350b79 --- /dev/null +++ b/doc/todo/calendar_autocreate.mdwn @@ -0,0 +1,225 @@ +Here is a patch that makes [[ikiwiki-calendar]] almost useless. + +It adds some options, the main one being `calendar_autocreate`, which is +similar to the `tag_autocreate` option of the [[tag|plugins/tag]]: it create +archive pages when needed. + +The documentation is updated as well (but as a non-native English speaker, I +won't be offended if you correct stuff you consider awkward): + +- [[plugin|https://github.com/paternal/ikiwiki/blob/calendar-autocreate/doc/plugins/calendar.mdwn]] +- [[directive|https://github.com/paternal/ikiwiki/blob/calendar-autocreate/doc/ikiwiki/directive/calendar.mdwn]] + +[[!tag patch]] +[[!template id=gitbranch branch=spalax/calendar-autocreate browse="https://github.com/paternal/ikiwiki/tree/calendar-autocreate" author="[[Louis|spalax]]"]] + +--[[Louis|spalax]] + +> An attempt at a review (although note that I don't have commit access, +> so my opinion is not final): +> +> Should `calendar_autocreate_commit` really default to 1? I would personally +> expect that any new features that synthesize new pages should not commit +> them by default - I'd prefer to avoid cluttering git history with generated +> pages. (Indeed, should the option even exist?) +> +> > I copied those options from the [[plugins/tag]] plugin: the +> > `tag_autocreate_commit` option exists and default to 1. +> > +> > It should definitely exists: suppose a calendar page is created and not +> > commited, and later, someone tries to push some changes where a page with +> > the same name has been created. This would result in a conflict. The +> > `calendar_autocreate_commit` prevents this. +> +> > > `tag_autocreate_commit` exists because when tag autocreation +> > > was introduced, they were always in the `$srcdir` and committed. +> > > I changed it so that it was possible to put them in the [[plugins/transient]] +> > > underlay and not commit them. It defaults to 1 to preserve existing +> > > functionality. +> > > +> > > When automatic tag pages (or autoindex pages) are not committed, they +> > > go in the transient underlay, which means they can't cause conflicts: +> > > independent page creation will simply mask them (a page in the +> > > `$srcdir` hides a page of the same name in an underlay). I thought +> > > this implementation did the same when not committing? --[[smcv]] +> +> > > > I did not realize how easy it was to use the [[plugins/transient]] +> > > > plugin! I [[took it into +> > > > account|https://github.com/paternal/ikiwiki/commit/492a22ac75f8b41a427a98c44525b01a6fd181b5]]. +> > > > -- [[Louis|spalax]] +> +> I'd personally do the conditional in gencalendaryear more like: +> +> [[!format perl """ +return unless $config{calendar_autocreate}; +"""]] +> +> to reduce the indentation depth of the more interesting code. +> +> > [[I agree|https://github.com/paternal/ikiwiki/commit/7f18c1ce48630507b744fa56b83999e8ca684606]] +> +> The recursion to generate missing years: +> +> [[!format perl """ +if (not exists $wikistate{calendar}{minyear}) { + $wikistate{calendar}{minyear} = $year; +} elsif ($wikistate{calendar}{minyear} > $year) { + gencalendaryear($year + 1); + $wikistate{calendar}{minyear} -= 1; +} +"""]] +> +> does seem to be correct on closer examination, but it took me a while +> to work out that it would actually do the right thing by recursing: +> +> * generate 2005 +> * recurse to generate 2006 +> * recurse to generate 2007 +> * recurse to generate 2008 +> * recurse to generate 2009 +> * recurse to try to generate 2010 (no effect) +> * minyear = minyear - 1 = 2010 - 1 = 2009 +> * minyear = minyear - 1 = 2009 - 1 = 2008 +> * minyear = minyear - 1 = 2008 - 1 = 2007 +> * minyear = minyear - 1 = 2007 - 1 = 2006 +> * minyear = minyear - 1 = 2006 - 1 = 2005 +> +> I think it might be clearer (as well as less +> recursion-happy) to use iteration: +> +> * generate 2005 +> * recurse to generate 2006 +> * ... +> * recurse to generate 2009 +> * minyear = 2005 +> +> something like this: +> +> [[!format perl """ +sub gencalendaryear { + my $year = shift; + my %params = @_; + ... + # generate this year + ... + # Filling potential gaps in years [...] years 2006 to 2009. + return if $params{norecurse}; + if (not exists $wikistate{calendar}{minyear}) { + $wikistate{calendar}{minyear} = $year; + } elsif ($wikistate{calendar}{minyear} > $year) { + foreach my $other ($year + 1 .. $wikistate{calendar}{minyear} - 1) { + gencalendar($year, norecurse => 1); + } + $wikistate{calendar}{minyear} = $year; + } + # ... and the opposite for maxyear +} +"""]] +> +> +> > [[I agree|https://github.com/paternal/ikiwiki/commit/7f18c1ce48630507b744fa56b83999e8ca684606]] +> +> I'm not sure about generating missing years at all, though: if the +> generation is entirely dynamic, and there were no posts at all during +> a particular year (or month for that matter), shouldn't we just skip +> the year/month? That seems to be what e.g. Wordpress does. +> +> > [[Done|https://github.com/paternal/ikiwiki/commit/59b46942e01b32138d056381249effbbaf773892]]. +> > I added an option `calendar_fill_gaps` to chose between the two +> > alternatives (since skipping empty months and years would change the +> > default behaviour of this plugin). +> > +> > I think the code is a bit ugly at some places. Perl is not one the the +> > programming languages I am fluent into. Sorry. +> > +> > PS: Good idea, thought. I now have to implement a similar thing for +> > [[plugins/contrib/jscalendar]]. +> +> This piece of ikiwiki-calendar functionality is lost: +> +> [[!format diff """ +- ... It also refreshes the wiki, updating the calendars to +-highlight the current day. This command is typically run at midnight from +-cron. +"""]] +> +> If I understand correctly, the highlight will be on the day at which +> the wiki was last refreshed, which seems arbitrary and confusing. +> If ikiwiki-calendar is not used, I'd say there should just not be a +> highlight for today (although I'm not sure how best to implement that - +> perhaps a config option representing "I am going to use ikiwiki-calendar"). +> +> > This is not lost. What ikiwiki-calendar do is simply: build the missing +> > `archive/year/month` pages, and run `ikiwiki -refresh`. With my patch, the +> > `ikiwiki -refresh` includes: +> > +> > - the build of missing `archive/year/month` pages; +> > - highlighting the current day (this was already the case). +> > +> > So one can simply drop the `ikiwiki-calendar ...` for `ikiwiki --refresh +> > ...` in cron to get the same result. +> > +> > I +> > [[tried|https://github.com/paternal/ikiwiki/commit/7a92444e56fe023cea3b074dc5e6b5c4acdb6114]] +> > to make the documentation clearer. +> +> [[!format diff """ +-\[[!template id=plugin name=calendar author="\[[ManojSrivastava]]"]] +-\[[!tag type/widget]] +"""]] +> +> Why did you remove that? It's useful information about the plugin +> which I think ought to stay. +> +> > Oops! It was a mistake. +> > [[Corrected|https://github.com/paternal/ikiwiki/commit/de9842ecc8914e11e73148dae78cd6909b535262]]. +> +> --[[smcv]] +> +> > Thank you for this review. -- [[Louis|spalax]] + +--- + +[[smcv]], can you please go on reviewing this? + +> I don't think I'm really the reviewer you want, since I don't have commit +> access (as you might be able to tell from the number of pending branches +> I have)... but nobody with commit access seems to be available to do +> reviews at the moment, so I'm probably the best you're going to get. +> +> + 0 0 * * * ikiwiki ~/ikiwiki.setup --refresh +> +> I think that should be `ikiwiki --setup ~/ikiwiki.setup --refresh` +> +> The indentation of some of the new code in `IkiWiki/Plugin/calendar.pm` +> is weird. Please use one hard tab (U+0009) per indent step: you seem +> to have used a mixture of one hard tab per indent or two spaces +> per indent, which looks bizarre for anyone whose tab size is not +> 2 spaces. +> +> + return unless $config{calendar_autocreate}; +> +> This is checked in `gencalendaryear` but not in `gencalendarmonth`. +> Shouldn't `gencalendarmonth` do it too? Alternatively, do the check +> in `scan`, which calls `gencalendarmonth` directly. +> +> + my $year = $date[5] + 1900; +> +> You calculate this, but you don't seem to do anything with it? +> +> + if (not exists $changed{$params{year}}) { +> + $changed{$params{year}} = (); +> + } +> + $changed{$params{year}}{$params{month}} = 1; +> +> `$changed{$params{year}}` is a scalar (you can tell because it starts with the +> `$` sigil) but `()` is a list. I think you want `{}` +> (a scalar that is a reference to an empty anonymous hash). +> +> However, that whole `if` block can be omitted, and you can just use +> `$changed{$params{year}}{$params{month}} = 1;`, because Perl will automatically +> create `$changed{$params{year}}` as a reference to an empty hash if necessary, +> in order to put the pair `$params{month} => 1` in it (the term to look +> up if you're curious is "autovivification"). +> +> --[[smcv]] diff --git a/doc/todo/concatenating_or_compiling_CSS.mdwn b/doc/todo/concatenating_or_compiling_CSS.mdwn new file mode 100644 index 000000000..068be9398 --- /dev/null +++ b/doc/todo/concatenating_or_compiling_CSS.mdwn @@ -0,0 +1,159 @@ +It would be great if IkiWiki could apply some sort of preprocessing to +CSS. I'm just "thinking out loud" at the moment, but I might write +a plugin. + +The simplest starting point would be concatenating a list of files: + +* The actiontabs and monochrome themes are not ready for use as-is; + the Makefile constructs the real stylesheet by concatenating the + anti-theme's CSS and the relevant theme's CSS. It would be better + if they could just drop a file in an underlay, and IkiWiki would + concatenate the anti-theme stylesheet and the theme's file. + +* The blueview theme is the same, but the theme's CSS also starts + with a couple of stylesheets from YUI. IkiWiki could maybe + concatenate the anti-theme stylesheet, the two YUI stylesheets + and the blueview-specific part? Or maybe that's too complicated. + +* The goldtype theme is the blueview theme with some overrides + added to the end. Again, IkiWiki could concatenate all the pieces. + +* The [[plugins/contrib/album]] plugin needs to append some + stuff to the stylesheet, making its installation more involved + than it ought to be. If it could append the pieces by putting them + in an underlay, installation would just be a matter of "add + the files". + +I'm not sure whether local.css should be concatenated too, or whether +it should be separate. + +It would also be great if the same mechanism could be extended +to compile CSS-like languages like [[!debpkg ruby-sass desc=SASS]] +or [[!debpkg node-less desc=LESS]] down to CSS, but for dependency +reasons, I don't think the themes shipped with IkiWiki should rely on that. + +If the compiled CSS ended up with a content-based filename (perhaps +ikiwiki/compiled-HASH.css where HASH is the (possibly truncated) MD5 or SHA1 +hash of the content), that would mitigate stale CSS being served from cache +(as long as the HTML has a short expiry, which is desirable anyway), +and ikiwiki-hosting could maybe even do something like this to allow +long-term caching of the files with content-based names: + + + ExpiresByType text/css "now plus 1 year" + + +A similar mechanism could maybe be used to minify JavaScript. + +## vague syntax proposal: controlled by directive + + \[[!css files=""" + style.css + ikiwiki/plugin*.css + ikiwiki/theme*.css + local.css + """]] + +* *css* directive, placed in any page, concatenates the given files + and uses them as the stylesheet for that page and its subpages, + replacing `style.css` + +* the files can be globs, which are sorted lexicographically within + a glob, and do not have to match anything (so it's OK if you don't + have anything that matches `plugin*.css`); "-" happens to sort + before ".", so theme-base.css would sort before theme.css, + which is nice to have + +* the default would be `style.css`, then `ikiwiki/plugin*.css`, + then `ikiwiki/theme*.css` and maybe `local.css`, as in the + example above + +* `style.css` would continue to be the anti-theme + +* themes would ship `ikiwiki/theme.css` instead of `style.css`, + resulting in concatenation + +* goldtype would ship `ikiwiki/theme-base.css` (which is a copy of + blueview, or a symlink to blueview if we can make symlinks safe) + and `ikiwiki/theme.css` (which is the goldtype additions) + +* [[plugins/contrib/album]] would put its templates and + `ikiwiki/plugin-album.css` in an underlay + +* any non-contrib plugin with complicated CSS requirements + could also move its CSS to an underlay + +I think this could be done entirely in a plugin, except for this +change to `page.tmpl` to allow the `