Commit Graph

1635 Commits (ab3efb21d9f3c43cf01e5d1be5a55cf7a233adfb)

Author SHA1 Message Date
Joey Hess 9951060f62 Merge branch 'master' into autotag 2010-04-21 15:53:59 -04:00
Joey Hess 204c0a63f3 document tag_autocreate 2010-04-21 15:22:52 -04:00
Joey Hess c4afb13fa5 spelling 2010-04-21 15:19:47 -04:00
Joey Hess 2f9504a10d bzr: changelog and refactor 2010-04-17 13:55:38 -04:00
Joey Hess 7834989d86 typo 2010-04-17 12:24:58 -04:00
Joey Hess c769a33392 autoindex: Switch to using %wikistate instead of abusing $pagestate{index}. 2010-04-17 12:20:50 -04:00
Joey Hess 64bc7d60a2 update changelog 2010-04-16 19:22:13 -04:00
Joey Hess b13bb0c83c implement rcs_getmtime for svn
This is a slow implementation; it runs svn log once per file
still, rather than running svn log once on the whole srcdir.

I did it this way because in my experience, svn log, run on a directory,
does not always list every change to files inside that directory.
I don't know why, and I use svn as little as possible these days.
2010-04-16 18:46:20 -04:00
Joey Hess dee2940c0b automatically run --gettime, and optimise it for git
* Automatically run --gettime the first time ikiwiki is run on
  a given srcdir.
* Optimise --gettime for git, so it's appropriatly screamingly
  fast. (This could be done for other backends too.)
* However, --gettime for git no longer follows renames.
* Use above to fix up timestamps on docwiki, as well as ensure that
  timestamps on basewiki files shipped in the deb are sane.
2010-04-16 18:30:56 -04:00
Joey Hess b14f84c4ac --gettime revamp
* Rename --getctime to --gettime. (The old name still works for
  backwards compatability.)
* --gettime now also looks up last modification time.
* Add rcs_getmtime to plugin API; currently only implemented
  for git.
2010-04-16 17:02:29 -04:00
Joey Hess 142e025ae4 calendar: Improved display of arrows. 2010-04-15 20:12:03 -04:00
Joey Hess c0a2eaf796 calendarmonth.tmpl: The month calendar is now put in a sidebar. 2010-04-15 18:51:50 -04:00
Joey Hess 50d08bc2ae conditional: Fix bug that forced "all" mode off by default.
Commit b7351daacd introduced the bug.
2010-04-15 18:18:48 -04:00
Joey Hess 1f7175e891 sidebar: Add global_sidebars setting. 2010-04-15 17:31:50 -04:00
Joey Hess adbbd014dc Enable calendar and sidebar in auto-blog.setup. 2010-04-15 16:52:41 -04:00
Joey Hess 358fa953e1 sidebar: Now a sidebar directive can be used to override the sidebar shown on a page. 2010-04-15 16:51:27 -04:00
Joey Hess baaa848f6c CSS and templates for sidebar changed to use a class, not an id.
Multiple sidebars should be possible; also, I want to add a sidebar
template.
2010-04-15 15:04:17 -04:00
Joey Hess fe733e2a42 enhance pagestats and rework example blog front page
* pagestats: Class parameter can be used to override default class for
  custom styling.
* pagestats: Use style=list to get a list of tags, scaled by use like
  in a tag cloud. This is useful to put in a sidebar.
* Rework example blog front page.
2010-04-15 14:29:14 -04:00
Joey Hess 3131433f64 calendar: Add archive_pagespec, which is used by ikiwiki-calendar to specify which pages to include on the calendar archive pages. (The pagespec can still also be specified on the ikiwiki-calendar command line.) 2010-04-15 13:40:53 -04:00
Joey Hess 1be3227583 formatting 2010-04-10 22:04:48 -04:00
Joey Hess d5eb540149 po: Configuring the same language as master and slave confuses processing; so filter out such a misconfiguration. 2010-04-10 18:28:15 -04:00
Joey Hess 61cbcb049f update changelog, update rebuild version 2010-04-10 14:35:45 -04:00
Joey Hess d1a616df2e po: Check that translated underlay directories exist before using them for master language. 2010-04-09 18:43:25 -04:00
Joey Hess a4a63cb7f9 Update dependency for git-core to git transition. 2010-04-08 16:07:43 -04:00
Joey Hess 196851d4e2 typo 2010-04-06 23:37:46 -04:00
Joey Hess 425ffc34f7 update for sort changes 2010-04-06 23:35:14 -04:00
Joey Hess c0ca196758 tweak wording and versions and add changelog entry 2010-04-06 22:58:22 -04:00
Joey Hess a01028ae81 txt: Add a special case for robots.txt. 2010-04-05 17:02:10 -04:00
Joey Hess 09d4e9d6bb comments: Fix missing entity encoding in title.
The meta title data set by comments needs to be encoded the same way that
meta encodes it. (NB The security implications of the missing encoding
are small.)

Note that meta's encoding of title, description, and guid data, and not
other data, is probably a special case that should be removed. Instead,
these values should be encoded when used. I have avoided doing so here
because that would mean forcing a wiki rebuild on upgrade to have the data
consitently encoded.
2010-04-05 16:34:49 -04:00
Joey Hess 992c2c6bca changelog 2010-04-04 12:17:36 -04:00
Joey Hess 0f82fe5225 releasing version 3.20100403 2010-04-03 15:15:04 -04:00
Joey Hess 59ba938822 template: Search for templates in the templatedir, if they are not found as pages in the wiki. 2010-04-02 16:54:06 -04:00
Joey Hess 104919ee07 htmlscrubber: Allow colons in url fragments after '?'
Colons are not allowed at the start of urls, because it can be interpreted
as a protocol, and allowing arbitrary protocols can be unsafe
(CVE-2008-0809). However, this check was too restrictive, not allowing
use of eg, "video.ogv?t=0:03:00/0:04:00" to seek to a given place in a
video, or "somecgi?foo=bar:baz" to pass parameters with colons.

It's still not allowed to have a filename with a colon in it (ie
"foo:bar.png") -- to link to such a file, a fully qualified url must be
used.
2010-04-02 16:05:14 -04:00
Joey Hess 4dcea6207d page.tmpl: Add Cache-Control must-revalidate to ensure that users (especially of Firefox) see fresh page content.
Since Firefox version 3, it's done aggressive caching of visited pages, and
does not, by default, check if the cached content is still valid when
reloading or revisiting a page. By default, Firefox seems to not re-contact
the web server at all. Compare with eg, Epiphany and Chromium, which appear
to always check, and get back a 304 when the page is unchanged.

This header makes Firefox do the right thing, at least for html files. It
still over-caches if css, javascript, images, etc, are changed.
2010-03-31 17:52:58 -04:00
Joey Hess aa116d67ab update 2010-03-29 13:37:16 -04:00
Joey Hess 6e7bfbe7bb auto-blog.setup: Set tagbase by default, since most bloggers will want it.
Also modified first_post page to use a tag format that will work whether
or not tagbase is set.
2010-03-28 19:23:34 -04:00
Joey Hess 1273f1de52 Add preprocessed 'use lib' line to ikiwiki-transition and ikiwiki-calendar if necessary for unusual install. 2010-03-26 13:11:02 -04:00
Joey Hess 0d524ad672 Fix incorrect influence info returned by a failing link() pagespec, that could lead to bad dependency handling in certian situations. 2010-03-26 01:38:53 -04:00
Joey Hess 243b0dd082 fix the other half of the filecheck filename bug 2010-03-26 00:16:21 -04:00
Joey Hess 3d671ea8c1 filecheck: Fix bug that prevented the pagespecs from matching when not called by attachment plugin. 2010-03-25 14:39:09 -04:00
Joey Hess eb06a01355 use perl YAML for dumping
Only it understands $YAML::UseHeader
2010-03-24 16:12:35 -04:00
Joey Hess c64c4b9962 Add --set-yaml switch for setting more complex config file options. 2010-03-24 14:39:50 -04:00
Joey Hess 440e18bc15 reset setuptype first, actually
so setup file can override default
2010-03-21 14:59:21 -04:00
Joey Hess bba513a3e5 Add support for setup files written in YAML.
Not the default. (Yet?)
2010-03-19 15:52:53 -04:00
Joey Hess dddd6aa990 Allow wrappers to be built using tcc. 2010-03-18 17:44:46 -04:00
Joey Hess 823ec815d4 Add a include setting, which can be used to make ikiwiki process wiki source files, such as .htaccess, that would normally be skipped for security or other reasons. Closes: #447267 (Thanks to Aaron Wilson for the original patch.) 2010-03-14 14:58:13 -04:00
Joey Hess 30c30a0cdd Add complete German basewiki and directives translation done by Sebastian Kuhnert. 2010-03-14 13:15:55 -04:00
Joey Hess c0ad4929de Improve openid url munging; do not display anchors and cgi parameters, as used by yahoo and google urls. 2010-03-13 20:10:50 -05:00
Joey Hess a01e0679f4 openid: Use Openid Simple Registration or OpenID Attribute Exchange to get the user's email address and username.
The info is stored in the session database, not the user database.
There should be no reason to need it when a user is not logged in.

Also, hide the email field in the preferences page for openid users.

Note that the email and username are not yet actually used for anything.
The email will be useful for gravatar, while the username might be used
for a more pretty display of the openid.
2010-03-13 19:08:15 -05:00
Joey Hess e56ec7a96c websetup: Add websetup_unsafe to allow marking other settings as unsafe. 2010-03-13 15:08:00 -05:00
Joey Hess 2ad3e60ee8 htmlscrubber: Security fix: In data:image/* uris, only allow a few whitelisted image types. No svg. 2010-03-12 14:50:26 -05:00
Joey Hess 9c274a001a formatting 2010-03-11 16:29:00 -05:00
Joey Hess d1ebdcd0a2 redundancy 2010-03-11 16:28:32 -05:00
Joey Hess 45dfdcb257 search: Avoid '$' in the wikiname appearing unescaped on omega's query template, where it might crash omega.
Really, a more general fix, this deals with any $ that might appear on the
misctemplate.
2010-03-11 16:10:04 -05:00
Joey Hess f259f33a0a Fix missing span on recentchanges page template. 2010-03-11 15:49:48 -05:00
Joey Hess ac3aac560f moderatedcomments: Added moderate_pagespec
* moderatedcomments: Added moderate_pagespec that can be used
  to control which users or comment locations are moderated.
  This can be used, just for example, to moderate http://myopenid.com/*
  if you're getting a lot of spammers from one particular openid
  provider (who should perhaps answer your emails about them),
  while not moderating other users.
* moderatedcomments: The moderate_users setting is deprecated. Instead,
  set moderate_pagespec to "!admin()" or "user(*)" instead.
2010-03-11 15:44:10 -05:00
Joey Hess 6d27bbd026 Fix utf8 issues in calls to md5_hex.
This prevented comments containing some utf-8, including euro sign, from
being submitted. Since md5_hex is a C implementation, the string has to be
converted from perl's internal encoding to utf-8 when it is called. Some
utf-8 happened to work before, apparently by accident.

Note that this will change the checksums returned.

unique_comment_location is only used when posting comments, so the checksum
does not need to be stable there.

I only changed page_to_id for completeness; it is passed a comment page
name, and they can currently never contain utf-8.

In teximg, the bug could perhaps be triggered if the tex source contained
utf-8. If that happens, the checksum will change, and some extra work might
be performed on upgrade to rebuild the image.
2010-03-09 19:55:19 -05:00
Joey Hess 0385e4080d releasing version 3.20100302 2010-03-02 22:23:07 -05:00
Joey Hess 60d2dd318f Add new --clean option; this makes ikiwiki remove all built files in the destdir, as well as wrappers and the .ikiwiki directory. 2010-02-28 00:12:47 -05:00
Joey Hess 6aaa6e0d24 Fix admin openid detection in setup automator, and avoid prompting for a password. 2010-02-27 16:36:57 -05:00
Joey Hess a12c386c86 Add force_overwrite setting to make setup automator overwrite existing files/directories.
This can be useful if you're driving the setup automator from another
program.
2010-02-27 16:26:18 -05:00
Joey Hess b3c3c42b26 Loosen regexp, to allow empty quoted parameters in directives. 2010-02-26 11:49:51 -05:00
Joey Hess c21eb47e62 comments: Display number of comments in comment action link.
This was not doable before, but when I added transitive dependency handling
in the big dependency rewrite, it became possible to include a comment
count when inlining.

This also improves the action link when a page has no comments. It will
link direct to the cgi to allow posting the first comment. And if the page
is locked to prevent posting new comments, the link is no longer shown.
2010-02-14 19:11:18 -05:00
Joey Hess 0b9b3f3e0a releasing version 3.20100212 2010-02-12 17:07:54 -05:00
Joey Hess a63929f6cc Group related plugins into sections in the setup file, and drop unused rcs plugins from the setup file. 2010-02-11 22:24:15 -05:00
Joey Hess c923e0ba33 Allow globs to be used in user() pagespecs. 2010-02-11 20:39:10 -05:00
Joey Hess e11876b700 httpauth: Add httpauth_pagespec setting that can be used to limit pages to only being edited via users authed with httpauth. 2010-02-11 18:25:10 -05:00
Joey Hess 046095552a httpauth: When cgiauthurl is configured, httpauth can now be used alongside other authentication methods (like openid or anonok). Rather than always redirect to the cgiauthurl for authentication, there is now a button on the login form to use it. 2010-02-11 17:26:09 -05:00
Joey Hess a4ec579d1a amazon_s3: Fix to support the EU S3 datacenter, which is more picky about attempts to create already existing buckets. 2010-02-09 16:24:14 -05:00
Joey Hess 5a2de27947 Fix color and format plugins to appear in the websetup interface. 2010-02-06 16:25:39 -05:00
Joey Hess caa5db6c54 add opendiscussion to auto-blog.setup 2010-02-06 16:20:03 -05:00
Joey Hess b384af237d opendiscussion: This plugin will also now allow posting comments
to otherwise locked-down sites.
2010-02-06 16:19:17 -05:00
Joey Hess eda1d1321b auto-blog.setup: Lock all pages, so only admin can post to the blog by default. 2010-02-06 15:53:54 -05:00
Joey Hess a2e78ebcf2 Add link to userpage (or creation link) to top of preferences page. 2010-02-04 15:30:41 -05:00
Joey Hess b547170a96 Improve display of openid in preferences page.
Now that openiduser is in IkiWiki core, it's ok to have passwordauth check
for it, and avoid displaying useless password fields when showing
preferences for an openid.

Also improved the styling of the display of the openid in the preferneces
page.
2010-02-04 15:07:10 -05:00
Joey Hess 345b40c652 Allow jumping directly into account registration process by going to ikiwiki.cgi?do=register 2010-02-04 14:51:56 -05:00
Joey Hess 49d8c5b821 setup automator: Configure Term::Readline to use bold for prompt, rather than default underline. Closes: #517656 2010-02-01 15:18:53 -05:00
Joey Hess f91d79f469 img: Fix a bug that could taint @links with undef values. 2010-01-28 21:07:23 -05:00
Joey Hess 73253d6925 template: Preprocess parameters before htmlizing.
Consider a template like:

[[!template type=note text="""
[[!inline pages="*foo*"]]
"""]]

The text parameter is htmlized before being passed into the template (in
case the template wraps it in a <span> that prevents markdown from
htmlizing it later).

But, when markdown sees "*foo*", it turns that into <em>foo</em>.
Later, when preprocessing the inline directive, that leads to suprising
results.

To fix this, I made template parameters be preprocessed (and filtered)
before being htmlized.

Note that I left in the preprocessing (and filtering) of the template
output at the end. That's still relevant when the template itself contains
preprocessor directives.
2010-01-26 22:33:46 -05:00
Joey Hess ac1b406431 releasing version 3.20100122 2010-01-22 16:25:22 -05:00
Joey Hess ee9ae0a314 po: avoid crash when page is empty
Note that there is an associated po4a warning when a page is empty:
  Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/Locale/Po4a/Text.pm line 205.
I've filed a bug with po4a about that, but the important thing is fixing
the crash here.
2010-01-21 15:33:20 -05:00
Joey Hess 8bf2f5a31a handle git-notes breakage
The new git-notes feature in git 1.6.6 changes git log output in a way that
broke ikiwiki's parser if notes are added to commits.

I decided to deal with this by disabling notes when ikiwiki uses git,
by setting GIT_NOTES_REF="". AFAICS, looking up notes when dumping logs
will only waste time, since it does not currently seem to make sense for
ikiwiki to do anything with the notes.
2010-01-19 23:42:04 -05:00
Joey Hess 97bc5d8bca typos 2010-01-18 12:08:26 -05:00
Joey Hess 9dc5685de4 linkmap: Simplify and improve browser compatability by using an img, not object tag.
I noticed that chromium was not hyperlinking the areas in the object-based
linkmap, while img works ok. Dunno why, but img based is nicer anyway since
it is allowed right through the htmlscrubber with no workarounds.
2010-01-09 23:10:26 -05:00
Joey Hess 1f51af907e websetup: Fix bug in array change detection. 2010-01-09 16:27:08 -05:00
Joey Hess 59d929d6b1 websetup: Fix utf-8 problems. 2010-01-09 16:20:09 -05:00
Joey Hess bde5265215 close 2010-01-07 15:44:32 -05:00
Joey Hess d78e8ee452 comments: Fix permalinks for comments using new conflict-free filenames. 2010-01-04 20:51:40 -05:00
Joey Hess 264f469894 lockedit can make sense with no auth plugins
On second though, you might want a wide-open wiki with some locked
pages that cannot be edited online.

So, the right thing for lockedit to do when there are no auth plugins is
to just say the page cannot be edited.
2010-01-04 19:40:33 -05:00
Joey Hess ae493178cf lockedit: Detect if no authentication plugins are enabled, and die with an error message as this configuration does not make sense. 2010-01-04 15:01:25 -05:00
Joey Hess f8bd25bfc7 signinedit: Auto-disable the plugin when all authentication methods are disabled. 2010-01-04 14:56:17 -05:00
Joey Hess aed16b4833 inline: Avoid showing edit links if page editing is disabled. (Sjoerd) 2010-01-04 12:54:18 -05:00
Joey Hess 9fdb9561dc releasing version 3.20100102.3 2010-01-02 21:54:07 -05:00
Joey Hess 7dd074e2e7 Fix several places that did not properly handle capitalization of the discussionpage setting.
Specifically, fixes discussion actions on discussion pages, and unbreaks the opendiscussion plugin.
2010-01-02 15:52:38 -05:00
Joey Hess 63cc5384bb inline: Fix bug that limited displayed pages when feedshow was specified w/o show. 2010-01-01 15:09:15 -05:00
Joey Hess 2ae1d9d928 linkmap: Add option to omit disconnected pages from the map. 2010-01-01 03:37:59 -05:00
Joey Hess 6af6c89df3 comments: Add a checksum to the name of comment pages, to avoid merge conflicts when comments are posted to two branches of a site. 2009-12-30 15:41:17 -05:00
Joey Hess 9f841c07df Use env hack in python scripts. 2009-12-29 15:56:25 -05:00
Joey Hess 008d59d3d9 Remove example ikiwiki setup file from the Debian package. This re-enables linking to /usr/share/ikiwiki/examples which has the example sites also used by auto-blog.setup. The example setup file can be generated at any time using ikiwiki --dumpsetup so I do not see a reason to ship it. Closes: #562183 2009-12-28 19:27:03 -05:00
Joey Hess ffc9f25e73 toc: Add startlevel parameter. (kerravonsen) 2009-12-25 15:28:18 -05:00