Commit Graph

2455 Commits (75f762014bbb2bef19b443e2f6617692efdbda87)

Author SHA1 Message Date
Simon McVittie 4a4610e66e trail: fix inline documentation 2012-04-06 16:17:44 +01:00
Joey Hess 792e660cb1 improve prototype
src param always needed now
2012-04-05 15:09:13 -04:00
Joey Hess e4cdce4bce rename: Allow rename to be started not from the edit page; return to the renamed page in this case. 2012-04-05 14:48:18 -04:00
Simon McVittie 276ab9a78a Reinstate trail support in inline
This was removed in aaa72a3a80.
2012-04-05 09:43:44 +01:00
Joey Hess 93bda514ba httpauth: When it's the only auth method, avoid a pointless and confusing signin form, and just right to the httpauthurl. 2012-04-04 12:58:36 -04:00
Joey Hess c885ec66e0 allow users to subscribe to comments w/o registering
Technically, when the user does this, a passwordless account is created
for them. The notify mails include a login url, and once logged in that
way, the user can enter a password to get a regular account (although
one with an annoying username).

This all requires the passwordauth plugin is enabled. A future enhancement
could be to split the passwordless user concept out into a separate plugin.
2012-04-02 13:45:39 -04:00
Joey Hess c16b1e638e support do=tokenauth login for passwordless accounts 2012-04-02 12:29:13 -04:00
Joey Hess f9e96b0c32 passwordauth: Fix url in password recovery email to be absolute.
This got broken when cgiurl began often returning a relative url.
Added a cgiurl_abs for the things that need a guaranteed absolute cgiurl.
2012-04-02 12:24:14 -04:00
Joey Hess 1d1ef20034 add support for a passwordless login token
The plan is to use this for accounts that are created implicitly, as when
a non-logged-in user subscribes to notifyemail. Such an account has no
password, and login can be accomplished by way of a url that is sent to
them in email.

When the user sets a password, the passwordless login token is disabled.
2012-04-02 12:17:07 -04:00
Joey Hess 89df287aaa meta: Support keywords header. Closes: #664780 Thanks, Martin Michlmayr 2012-04-01 14:39:27 -04:00
Joey Hess 5ed773c643 more fixes to subscription prefs 2012-03-28 20:56:22 -04:00
Joey Hess d366a7bbb5 don't force old subscriptions value when posting 2012-03-28 20:45:52 -04:00
Joey Hess 6c297c4097 fix adding first subscription to pagespec 2012-03-28 20:42:37 -04:00
Joey Hess dadc822295 remove misc section 2012-03-28 20:36:25 -04:00
Joey Hess accf79f94a polishing notifyemail 2012-03-28 19:39:08 -04:00
Joey Hess a22be4eef0 finish notifyemail plugin 2012-03-28 18:52:11 -04:00
Joey Hess d68d255268 Added a "changes" hook. Renamed the "change" hook to "rendered", but
the old hook name is called for now for back-compat.
2012-03-28 18:43:07 -04:00
Joey Hess 1916f97472 integrate comments plugin with notifyemail 2012-03-28 18:38:37 -04:00
Joey Hess 4b85a6eca1 add Subscriptions field to prefs 2012-03-28 17:00:54 -04:00
Joey Hess c0e5a0f1aa fix another undef/"" confusion 2012-03-28 16:47:37 -04:00
Joey Hess 723c5b97d3 changemail: New plugin, sends emails about changed pages. 2012-03-28 16:40:10 -04:00
Joey Hess 88e8f0ced9 simplify 2012-03-27 15:52:35 -04:00
Joey Hess 4250d389d3 meta: Export author information in html <meta> tag. Closes: #664779 Thanks, Martin Michlmayr 2012-03-27 15:52:35 -04:00
Joey Hess e7bf599ee0 remove debug message
A file may have no git sha1 if it's in the underlay, or just is not checked
into git. This debug message doesn't add any value and is potentially
confusing.
2012-03-22 13:07:30 -04:00
Joey Hess aaa72a3a80 inline: When the pagenames list includes pages that do not exist, skip them.
bestlink returns '' if no existing page matches a link. This propigated
through inline and other plugins, causing uninitialized value warnings, and
in some cases (when filecheck was enabled) making the whole directive fail.

Skipping the empty results fixes that, but this is papering over another
problem: If the missing page is later added, there is not dependency
information to know that the inline needs to be updated. Perhaps smcv will
fix that later.
2012-03-21 15:48:25 -04:00
Joey Hess 83876a7da6 remove pod documentation
This caused the build system to make unwanted man pages. Using comments
instead.
2012-03-19 14:36:03 -04:00
Joey Hess 0faceb91c0 misc cleanup 2012-03-18 19:33:11 -04:00
Joey Hess 1e0389fffb remove fullscreen option
The cgi shows a fullscreen map, so having this other option to do it seems
redundant, and also layering a fullscreen map over an existing wiki page
doesn't look very good to me (and prevents editing the page etc).
2012-03-18 18:03:48 -04:00
Joey Hess b2471aa729 fix waypoint hrefs 2012-03-18 17:48:57 -04:00
Joey Hess 06aa145676 fix href parameter for osm
This was not set anywhere, which causes their javascript to crash.
It *seems* the idea is this is the url to use to view the map full screen,
which uses ikiwiki.cgi.
2012-03-18 17:39:06 -04:00
Joey Hess 917cdb7ade multiple osm fixes
* fix will_render calls to pass proper relative filenames
* fix urls to kml etc files to not assume wiki's top is at /
* avoid building the javascript to display the map in two different
  ways between the cgi and on-page maps
* refactor duplicate code
2012-03-18 17:07:01 -04:00
Joey Hess 3867f038a7 load index file in osm cgi hook
This hook involves urlto, and that needs to have state loaded to work
in all situations.

Note that I can see no reason for the osm plugin to use a cgi hook at all.
This could just as well be a static html page!
2012-03-18 15:54:47 -04:00
Joey Hess d134a2a6e9 avoid unnecessary uses of UNIVERSAL
Foo->Bar->can("method") works just as well, even if Foo::Bar is not
loaded. Using UNIVERSAL::can is deprecated.

But, I was unable to easily eliminate conditional.pm's use of UNIVERSAL::can
2012-03-18 14:34:21 -04:00
Joey Hess a812692a50 changelog 2012-03-18 14:22:28 -04:00
Simon McVittie 24168b993e Add a build_affected hook so trail doesn't have to inject
In principle, building any pages affected by links, backlinks etc.
could work the same way.
2012-03-18 17:34:39 +00:00
Simon McVittie 63bb8b42f7 Replace [[!trailinline]] directive with [[!inline trail=yes]] 2012-03-18 17:11:05 +00:00
Simon McVittie 4e54fa1144 tagging version 3.20120202
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIVAwUATytJp8kQ2SIlEuPHAQgKeg/+MPL9KcL13f1DQUwu9TXEr7hSocn3NTa/
 LMvLJvrzqI5BGRP+jBGFG/Kn9yFt6S4gdCvpOwi1INxAanLQnaVoSLoie1teUbU3
 dxi8f3wGMBtEX+BiOi9gbjxF2v98D+Fh73O9H7newsEJiRDRor7U4EE1dWC8uidc
 d/9vhWkaDy1BlEahaU85v7RY94h5EnEzgD0Rm7wkSSr1aquQsr89OijC6SY0dEJe
 b6AunkRqsOGDrm6elSRFi6E5eStPhIu2t6GmyhpulWn5vr4PyqdWZ7jcWvDGYr+r
 v2iuses1fH8qWE1CQ6Y2XadK7Cj2IbGhaiLXp3TdbPgKnB7BS89cSWRKQ5SlvTlJ
 sUUPauhLDMqp1Cux6oUgs5T9ADTO922p1FzR3JuTkgwNLWH7UXTRuwVvtPz4aKqN
 QBmQeknTTQAxqi+DhgBK+CXM7LIt3d2TaoUFt6gl4kKt3FYzGfyh9ohhDSQniAa8
 C52InJ2X5bamz8/fIcELChg+wBT+naQrDW7V74kFKvWzIwnqfvseaF3zVqDgYLQy
 e12vL6GAdnO66VhzULU1NyH/XNvfyKEpwiKHPwCEK5wPTLweWBqjU0952GDBlUov
 PDDoQgwijnSCSxJOcEsAnnpkT16pw0VWHTSLrqkYYZBg7WGkZbhwk4cRVkqcsMK7
 JjKUdA9rK0E=
 =KLr6
 -----END PGP SIGNATURE-----

Merge tag '3.20120202' into trail3-integrated
2012-03-18 15:31:41 +00:00
Joey Hess 9fad75fd53 make icon absolute
it is put into kml files, etc
2012-03-13 17:55:48 -04:00
Joey Hess 5b5731182f avoid double amp escaping 2012-03-13 17:55:47 -04:00
Joey Hess 5a7f1ebcd4 various fixes to links
Build links the right way.

This also involved dropping that leading slash on the osm_default_icon.
And since it would require changing the old osm_tag_icons too,
I just removed that relic.
2012-03-13 17:55:47 -04:00
Joey Hess a1d7aad401 fix writing of kml file
It just didn't work, but also, it didn't use writefile, which is not
desirable for security. Fixed both issues.

Also removed some unnecessary debug messages.
2012-03-13 17:55:47 -04:00
Joey Hess f0733e6b96 URI escape filename when generating the diffurl.
ikiwiki source files can contain at least one character that
needs to be escaped in an url: +
2012-03-13 11:50:39 -04:00
Joey Hess 2f013cc0c2 move osm.js to osm underlay and osm does not need javascript underlay 2012-03-03 17:39:02 -04:00
Antoine Beaupré 733e9b454e properly link to javascript underlay 2012-03-03 15:38:01 -05:00
Antoine Beaupré 8bc28be4fa split off the javascript in a separate file 2012-03-03 15:19:29 -05:00
Joey Hess 77344163ed add osm.png
Add an underlay for the osm plugin.

Update links to right path to icon. Note that the osm plugin has a
pervasive bug in how it links to icons; it assumes the site is at /.
I did not attempt to fix that; it should be using urlto() to make a correct
relative link.
2012-03-03 12:16:00 -04:00
Joey Hess 8125cfa45b reindentation and style
no code changes
2012-03-03 12:05:04 -04:00
Joey Hess 9f56a417a1 add osm plugin 2012-03-03 11:30:44 -04:00
Joey Hess 78737cbfbf shortcut: Support Wikipedia's form of url-encoding for unicode characters
I think it's the wrong encoding, seems like mojibake to me, but it works
now. Closes: #661198
2012-03-03 11:27:59 -04:00
Paul Wise 5b9005a8dd Drop the version attribute on the generator tag in Atom feeds.
Removing the version means that rebuilds are reproducible over time.

Both the generator tag and its version attribute are optional:

http://tools.ietf.org/html/rfc4287#section-4.2.4
2012-03-03 11:01:55 -04:00
Joey Hess 38ff2b44c6 Fix a snail mail address. Closes: #659158 2012-02-08 16:07:20 -04:00
Amitai Schlair 9faa0f3c65 Merge branch 'master' into cvs 2012-02-07 02:47:24 -05:00
Joey Hess 1b6c189578 fix display of page name in recentchanges after a revert
When the wiki is in a subdir of the git repo, a web revert would show
in recentchanges as eg, doc/index, instead of just index.

This happened because decode_git_file caches a $prefix that is dependant
on the $git_dir setting, and the revert code runs with a different
$git_dir, which polluted the $prefix for later.

Fix this by adding a with_git_dir that juggles the variables properly.
2012-02-07 03:06:40 -04:00
Amitai Schlair e45175d545 More testings and fixings:
* Test that adding a text file under a name formerly tracked as
  binary (and vice versa) gets the right keyword-substitution
  behavior.
* Explicitly set -kkv for text files to make the tests pass.
* CVS warns in these cases about "changing keyword expansion mode",
  but this is correct behavior, so filter it from stderr. Filter
  stdout the same way in case we ever want to keep any of it.
* In rcs_add(), replace comments with obviousness.
2012-02-05 16:33:49 -05:00
Amitai Schlair 6753235d98 Write rcs_diff() tests according to the API spec, then make them pass. 2012-02-05 01:20:52 -05:00
Joey Hess c3f9ef8289 revert change to prettydate
Its strftime is from Date::Format, doesn't have the problem, and using the
POSIX one breaks its %o.
2012-02-02 22:27:55 -04:00
Joey Hess a78126c55e calendar, prettydate: Fix strftime encoding bug
strftime is a C function, it does not return decoded utf8.
Several places in ikiwiki manually decoded it, but at least two
forgot to.

Also, strftime might not return even encoded utf8, if LC_TIME is set
to a non-utf8 value. Went ahead and supported decoding whatever encoding
it uses.

The remaining direct calls to strftime() are all ones that first set
LC_TIME=C, in order to get times that are not for human display.
2012-01-30 15:09:37 -04:00
Amitai Schlair d6b7654fcf Move cvs_keyword_subst_args() down with the other internal support routines. 2012-01-26 17:08:12 -05:00
Amitai Schlair ac8eab29e8 Uncomment the CVS keyword substitution mode tests, and make them pass:
Extract cvs_keyword_subst_args() and ensure it runs in $config{srcdir}.
Using Perl's -T operator appears to work equally well, perhaps switch?
2012-01-26 16:57:00 -05:00
Amitai Schlair 9fd09149a3 Mollify strictures about barewords. 2012-01-26 16:55:13 -05:00
Amitai Schlair c9c5264191 Merge branch 'master' of git://git.ikiwiki.info into cvs 2012-01-25 00:41:53 -05:00
Joey Hess bfda13f16c recentchangesdiff: truncate extremely large diffs
A diff was already truncated after 200 lines. But it could still be
arbitrarily enormous, if a spammer or other random noise source likes long
lines. That could use a lot of memory to html encode etc the diff and fill
it into the template. Truncating after 100kb seems sufficient; it allows
for 200 lines of up to 512 characters each.
2012-01-23 18:39:53 -04:00
Joey Hess 100a68f4e2 fix the nodiscount setting 2012-01-23 18:15:14 -04:00
Amitai Schlair 8e99750545 No functional change: sort sub definitions.
In the code:
* general plugin API calls (in plugins/write order),
* VCS plugin API calls (in plugins/write order), then
* internal support routines (in alphabetical order).

In the tests:
* general meta-behavior (in no particular order, yet),
* general plugin API calls (in plugins/write order),
* VCS plugin API calls (in plugins/write order), then
* internal support routines (in semi-logical order).
2012-01-22 10:44:50 -05:00
Joey Hess 18f35269c2 mdwn: Added nodiscount setting, which can be used to avoid using the markdown discount engine, when maximum compatability is needed. 2012-01-16 13:42:30 -04:00
Joey Hess 1572c3c376 attachment: Fix utf-8 display bug. 2012-01-15 16:39:13 -04:00
Joey Hess b38261a03a Workaround discount's eliding of <style> blocks. 2012-01-15 16:19:22 -04:00
Joey Hess 12f86df239 workaround a bug in the discount perl binding
Empty input, or input consisting soley of whitespace
caused an uninitialized value warning.
2012-01-01 17:28:31 -04:00
Joey Hess 9dce803faf discount support
mdwn: Can use the discount markdown library, via the
Text::Markdown::Discount perl module.

This is preferred if available since it's the fastest currently supported
markdown library, speeding up markdown rendering by a factor of 40.

That is to say, when only rendering a lot of markdown, discount is 40x
faster. When building a ikiwiki site, ikiwiki's other overhead gets in the
way, but I still see significant speedups. Building the ikiwiki docwiki
dropped from 62 to 45 seconds, for example.

However, when multimarkdown is enabled, Text::Markdown::Multimarkdown is
still used.

While discount contains some nonstandard markdown extensions,
including tables and footnotes, AFAICS most of them are not
enabled by default in the perl bindings.

I consider sticking to non-extended markdown a desirable thing, since this
is probably not the last markdown engine. In particular, sundown is waiting
in the wings to get packaged and get a perl binding.

----

Reviewing all the showdown extensions, here are the ones that are enabled:

centered paragraphs:

->centered<-

image sizes: [dust mite](http://dust.mite =150x150)

<style>..</style> blocks are eaten. The perl binding does not provide
access to the gathered CSS. This is not legal html anyway, so unlikely
to cause breakage.
2012-01-01 17:28:31 -04:00
Joey Hess b8bf318b91 remove x bit from comments.pm
how did that get set?
2011-12-27 11:37:28 -04:00
Giuseppe Bilotta 7411d1a6ce tag plugin: encode categories using numeric values
This ensures that RSS/Atom feeds produced are valid XML.
2011-12-24 19:43:16 -04:00
Simon McVittie 5333c113d6 Add path and path_natural sort orders
(cherry picked from commit 272e0b2f17)
2011-12-06 14:26:27 -04:00
Joey Hess 6cadcacffd apply Postel's law 2011-11-30 16:25:17 -04:00
Joey Hess 4cb343f348 graphviz: Support wikilinks embedded in the graph.
(Sponsored by The TOVA Company.)
2011-11-30 15:47:13 -04:00
Joey Hess 997116f160 store imagemap in %pagestate, rather than a file
Using a file was sorta not right.

Note that when previewing, %pagestate is not saved, so
it has to rebuild the graph every time until that graph is saved;
then previews can use the cached data until the next time the graph
is changed.

Also note that it's stored in the destpage's pagestate. The imagemap
could vary between a page and an inlined page if wikilinks were supported.
2011-11-30 15:47:12 -04:00
Joey Hess 44863ea234 graphviz: Support urls embedded in the graph, by having graphviz generate an imagemap.
Also, I let preview mode write real files, rather than using data: uri.
Which is ok these days, since ikiwiki tracks files created during
previewing, and cleans them up later.
2011-11-30 15:47:12 -04:00
Joey Hess 41f6363a63 editpage: Fix FormattingHelp link on Discussion pages.
In 875d550f12 I for some reason
made $page be changed when creating a discussion page, which
broke the link on the edit page. Changing page seems unnecessary,
so reverted that part of the change.
2011-11-27 13:19:19 -04:00
Joey Hess 64e09f9968 cannot reproduce 2011-11-23 16:13:16 -04:00
Joey Hess 2872e1d738 cleanup now unused setting 2011-11-17 18:47:51 -04:00
Per Carlson 937c074232 Always use true image size 2011-11-17 22:59:31 +01:00
Simon McVittie d70ba7cff3 Split trail directive into trailitems, trailoptions 2011-11-12 21:37:28 +00:00
Simon McVittie 74b1b2761a trail: update documentation; drop docs for directives, which are now in the wiki 2011-11-12 17:08:08 +00:00
Simon McVittie e0bfd0cafd trail: improve and test sorting 2011-11-12 16:57:54 +00:00
Simon McVittie 0394a49e67 trail: avoid collecting trail members twice 2011-11-12 16:57:27 +00:00
Simon McVittie 272e0b2f17 Add path and path_natural sort orders 2011-11-12 15:11:02 +00:00
Simon McVittie 156f709122 trail: new plugin (3rd attempt) 2011-11-09 22:49:37 +00:00
Joey Hess 875d550f12 Fix handling of discussion page creation links to make discussion pages in the right place and with the right case.
Broken by page case preservation feature added in 3.20110707.
2011-11-06 16:14:04 -04:00
Joey Hess 496874ab27 svn: Support subversion 1.7, which does not have .svn in each subdirectory.
Involved dropping some checks for .svn which didn't add anything, since if
svn is enabled and you point it at a non-svn checkout, you get both pieces.

The tricky part is add and rename, in both cases the new file can be in
some subdirectory that is not added to svn.

For add, turns out svn has a --parents that will deal with this by adding
the intermediate directories to svn as well.

For rename though, --parents fails if the directories exist but are not
yet in svn -- which is exactly the case, since ikiwiki makes them
by calling prep_writefile. So instead, svn add the parent directory,
recursively.

tldr; svn made a reasonable change in dropping the .svn directories from
everywhere, but the semantics of other svn commands, particularly their
pickiness about whether parent directories are in svn or not, means
that without the easy crutch of checking for those .svn directories,
code has to tiptoe around svn to avoid pissing it off.
2011-10-12 19:07:38 -04:00
Joey Hess 5cb0ecc000 Fix web revert of a file deletion.
When reverting, an add is a remove, and a remove is an add.
2011-09-05 14:51:49 -04:00
Joey Hess 35b69392c8 Avoid warning message when generating setup file if highlight is not installed. Closes: #637606
There's a nice message if the plugin is loaded and used and highlight is
not available, and a nice fallback. So no need for this other warning,
which can happen any time all plugins are loaded to generate a setup file.
2011-09-05 13:21:56 -04:00
Joey Hess 7d2b68cd16 inline: When indexing internal pages for searching, use the url of the inlining page. 2011-09-01 11:38:10 -04:00
Joey Hess 4af7b2c14d search: Fix encoding bug in calculation of maximum term size. 2011-08-30 11:37:38 -04:00
Joey Hess 1873095484 Put in a workaround for #622591, by ensuring Search::Xapian gets loaded before Image::Magick. 2011-08-07 11:01:41 -04:00
Joey Hess 5dd414fbe5 mercurial: fix date parsing so test suite passes 2011-07-30 10:52:49 +02:00
Joey Hess 577f5d3837 fix mercurial commit with session but without nickname 2011-07-30 10:46:26 +02:00
Joey Hess ed360d045a Fix escaping of html entities in tag names.
Example case was a tag with & in its name, which resulted in a malformed
rss feed.
2011-07-29 12:54:30 +02:00
Joey Hess 65a7bc4e06 Fix escaping of html entities in permalinks. 2011-07-29 12:37:43 +02:00
Joey Hess 8512ae3ed5 Merge remote-tracking branch 'intrigeri/po' 2011-07-19 14:11:36 -04:00
Joey Hess e04cb1ffd3 mercurial: Implement rcs_diff. (Daniel Andersson) 2011-07-19 11:44:26 -04:00
Joey Hess b4db945b34 mercurial: Make both rcs_getctime and rcs_getmtime fast. (Daniel Andersson) 2011-07-19 11:39:32 -04:00