From baee2aa36b987ec6f75738570fa3f46030484f76 Mon Sep 17 00:00:00 2001 From: dave Date: Sun, 2 Aug 2009 13:35:04 -0400 Subject: --- doc/tips/mathopd.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/tips/mathopd.mdwn (limited to 'doc/tips') diff --git a/doc/tips/mathopd.mdwn b/doc/tips/mathopd.mdwn new file mode 100644 index 000000000..ebcff995e --- /dev/null +++ b/doc/tips/mathopd.mdwn @@ -0,0 +1,10 @@ +When using [mathopd](http://www.mathopd.org) to serve ikiwiki, be careful of your Umask settings in the mathopd.conf. + +With `Umask 026` in mathopd.conf, editing pages would result in the following errors and a 404 page when the wiki tried to take me to the updated page. + + append_indexes: cannot open .../[destdir]/[outputfile].html + open: Permission denied + +With `Umask 022` in mathopd.conf, editing pages works. + +Hopefully this prevents someone else from spending ~2 hours figuring out why this wouldn't work. ;) -- cgit v1.2.3 From 6810e5feaa072755bc2beebc80b923f2420004cf Mon Sep 17 00:00:00 2001 From: dave Date: Sun, 2 Aug 2009 13:37:17 -0400 Subject: rename tips/mathopd.mdwn to tips/mathopd_permissions.mdwn --- doc/tips/mathopd.mdwn | 10 ---------- doc/tips/mathopd_permissions.mdwn | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 doc/tips/mathopd.mdwn create mode 100644 doc/tips/mathopd_permissions.mdwn (limited to 'doc/tips') diff --git a/doc/tips/mathopd.mdwn b/doc/tips/mathopd.mdwn deleted file mode 100644 index ebcff995e..000000000 --- a/doc/tips/mathopd.mdwn +++ /dev/null @@ -1,10 +0,0 @@ -When using [mathopd](http://www.mathopd.org) to serve ikiwiki, be careful of your Umask settings in the mathopd.conf. - -With `Umask 026` in mathopd.conf, editing pages would result in the following errors and a 404 page when the wiki tried to take me to the updated page. - - append_indexes: cannot open .../[destdir]/[outputfile].html - open: Permission denied - -With `Umask 022` in mathopd.conf, editing pages works. - -Hopefully this prevents someone else from spending ~2 hours figuring out why this wouldn't work. ;) diff --git a/doc/tips/mathopd_permissions.mdwn b/doc/tips/mathopd_permissions.mdwn new file mode 100644 index 000000000..ebcff995e --- /dev/null +++ b/doc/tips/mathopd_permissions.mdwn @@ -0,0 +1,10 @@ +When using [mathopd](http://www.mathopd.org) to serve ikiwiki, be careful of your Umask settings in the mathopd.conf. + +With `Umask 026` in mathopd.conf, editing pages would result in the following errors and a 404 page when the wiki tried to take me to the updated page. + + append_indexes: cannot open .../[destdir]/[outputfile].html + open: Permission denied + +With `Umask 022` in mathopd.conf, editing pages works. + +Hopefully this prevents someone else from spending ~2 hours figuring out why this wouldn't work. ;) -- cgit v1.2.3 From 595c1d2a742a141db797a80b9643aa364e66ee8a Mon Sep 17 00:00:00 2001 From: dave Date: Sun, 2 Aug 2009 13:40:06 -0400 Subject: --- doc/tips/mathopd_permissions.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/mathopd_permissions.mdwn b/doc/tips/mathopd_permissions.mdwn index ebcff995e..52a8767cc 100644 --- a/doc/tips/mathopd_permissions.mdwn +++ b/doc/tips/mathopd_permissions.mdwn @@ -1,6 +1,6 @@ When using [mathopd](http://www.mathopd.org) to serve ikiwiki, be careful of your Umask settings in the mathopd.conf. -With `Umask 026` in mathopd.conf, editing pages would result in the following errors and a 404 page when the wiki tried to take me to the updated page. +With `Umask 026` in mathopd.conf, editing pages resulted in the following errors and a 404 page when the wiki tried to take me to the updated page. append_indexes: cannot open .../[destdir]/[outputfile].html open: Permission denied -- cgit v1.2.3 From ba64c720fe57b4c49e3a0757facd1ca2c85eb2e2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 4 Aug 2009 13:50:52 -0400 Subject: mention ikiwiki's own umask setting --- doc/tips/mathopd_permissions.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/mathopd_permissions.mdwn b/doc/tips/mathopd_permissions.mdwn index 52a8767cc..c0425b9ca 100644 --- a/doc/tips/mathopd_permissions.mdwn +++ b/doc/tips/mathopd_permissions.mdwn @@ -8,3 +8,8 @@ With `Umask 026` in mathopd.conf, editing pages resulted in the following errors With `Umask 022` in mathopd.conf, editing pages works. Hopefully this prevents someone else from spending ~2 hours figuring out why this wouldn't work. ;) + +> More generally, if your web server uses a nonstandard umask +> or you're getting permissions related problems in the cgi log +> when using ikiwiki, you can force ikiwiki to use a sane umask +> via the `umask` setting in ikiwiki's own setup file. --[[Joey]] -- cgit v1.2.3 From 67bca4125d6fba24d69f53183949d89b632955dc Mon Sep 17 00:00:00 2001 From: "http://eric.shared.dre.am/" Date: Sat, 8 Aug 2009 14:39:11 -0400 Subject: --- doc/tips/dot_cgi.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/dot_cgi.mdwn b/doc/tips/dot_cgi.mdwn index 4532c84cd..0379ece93 100644 --- a/doc/tips/dot_cgi.mdwn +++ b/doc/tips/dot_cgi.mdwn @@ -56,6 +56,10 @@ rule that allow `ikiwiki.cgi` to be executed. server (offline). I am not sure of how secure this approach is. If you have any thought about it, feel free to let me know. +## nginx + +* To run CGI under nginx, just us a FastCGI wrapper like [this one](http://technotes.1000lines.net/?p=23). The wrapper must be started somehow just like any other FastCGI program. I use launchd on OSX. + ## boa Edit /etc/boa/boa.conf and make sure the following line is not commented: -- cgit v1.2.3 From aa29cb5fc0126e90b4994d31e491179a1184e047 Mon Sep 17 00:00:00 2001 From: "http://joey.kitenet.net/" Date: Sat, 8 Aug 2009 15:39:37 -0400 Subject: typo --- doc/tips/dot_cgi.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/dot_cgi.mdwn b/doc/tips/dot_cgi.mdwn index 0379ece93..da55c1f1c 100644 --- a/doc/tips/dot_cgi.mdwn +++ b/doc/tips/dot_cgi.mdwn @@ -58,7 +58,7 @@ If you have any thought about it, feel free to let me know. ## nginx -* To run CGI under nginx, just us a FastCGI wrapper like [this one](http://technotes.1000lines.net/?p=23). The wrapper must be started somehow just like any other FastCGI program. I use launchd on OSX. +* To run CGI under nginx, just use a FastCGI wrapper like [this one](http://technotes.1000lines.net/?p=23). The wrapper must be started somehow just like any other FastCGI program. I use launchd on OSX. ## boa -- cgit v1.2.3 From 52ee05feb7f136d0211732f7a7f93960d3938555 Mon Sep 17 00:00:00 2001 From: "http://christine-spang.myopenid.com/" Date: Sat, 8 Aug 2009 16:04:58 -0400 Subject: --- doc/tips/importing_posts_from_typo.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/tips/importing_posts_from_typo.mdwn (limited to 'doc/tips') diff --git a/doc/tips/importing_posts_from_typo.mdwn b/doc/tips/importing_posts_from_typo.mdwn new file mode 100644 index 000000000..1b87e7dae --- /dev/null +++ b/doc/tips/importing_posts_from_typo.mdwn @@ -0,0 +1 @@ +[Here](http://blog.spang.cc/posts/migrating_from_typo_to_ikiwiki/) is a blog post that gives instructions and a script for importing posts from [Typo](http://typosphere.org/), a Ruby-on-Rails based blogging engine. -- cgit v1.2.3 From 24d1cf19b8d711c445e1faf825889dd6cfd5bf4b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 10 Aug 2009 16:34:14 -0400 Subject: typo --- doc/tips/untrusted_git_push.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/untrusted_git_push.mdwn b/doc/tips/untrusted_git_push.mdwn index aef67a3db..3573a0ddf 100644 --- a/doc/tips/untrusted_git_push.mdwn +++ b/doc/tips/untrusted_git_push.mdwn @@ -74,7 +74,7 @@ Once you're done modifying the setup file, don't forget to run You'll need to arrange the permissions on your bare git repository so that user anon can write to it. One way to do it is to create a group, and put -both anon and your regular user in that group. Then make make the bare git +both anon and your regular user in that group. Then make the bare git repository owned and writable by the group. See [[rcs/git]] for some more tips on setting up a git repository with multiple committers. -- cgit v1.2.3 From 56bd1735967daef3610357801232a41de7ee2cbb Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sun, 16 Aug 2009 11:56:16 -0400 Subject: switched my DreamHost install to pkgsrc, happily --- doc/tips/DreamHost/discussion.mdwn | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/DreamHost/discussion.mdwn b/doc/tips/DreamHost/discussion.mdwn index 74f48938e..258d385ae 100644 --- a/doc/tips/DreamHost/discussion.mdwn +++ b/doc/tips/DreamHost/discussion.mdwn @@ -3,3 +3,16 @@ I managed to install ikiwiki on eggplant farms, with most basic features except I think ikiwiki is more suitable for VPS/dedicated server. Shared hosting doesn't fit. I just (2009/04/27) installed ikiwiki on DreamHost and the CPAN instructions here are unnecessarily complicated. I used "cpan" instead of "perl -MCPAN -e shell" and had no trouble with that portion of the install. --[[schmonz]] + +After tiring of managing things by hand, I've switched to using +pkgsrc as an unprivileged user. This uses a bit more disk for my +own copies of perl, python, etc., but in exchange I can `cd +.../pkgsrc/www/ikiwiki && make install` and everything just works. +Plus I get all the benefits of a package system, like easy uninstalling +and being notified of outdated or insecure software. + +The only catch: sometimes the package dependency tree gets too deep +for DreamHost's user process limit, resulting in build death. I +work around this by resuming the build partway down the tree, then +trying again from whatever I was actually trying to install. +--[[schmonz]] -- cgit v1.2.3 From 156625ebac9fdd6d7193c5d997e6fd0141d4d84b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 23 Aug 2009 16:27:18 -0400 Subject: update config file snippet to use current git_wrapper name --- doc/tips/laptop_wiki_with_git_extended.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/laptop_wiki_with_git_extended.mdwn b/doc/tips/laptop_wiki_with_git_extended.mdwn index 620370218..0666da450 100644 --- a/doc/tips/laptop_wiki_with_git_extended.mdwn +++ b/doc/tips/laptop_wiki_with_git_extended.mdwn @@ -10,7 +10,7 @@ a bare repo on `gitserver`, and clone that to a workingdir on gitserver. Next create a setup file for the laptop with gitorigin_branch=> "", - wrapper => "/working/dir/.git/hooks/post-commit", + git_wrapper => "/working/dir/.git/hooks/post-commit", At this point, assuming you followed page above, and not my hasty summary, @@ -21,7 +21,7 @@ a bare repo on `gitserver`, and clone that to a workingdir on gitserver. 2. Now create a setup file for the server (I call it server.setup). gitorigin_branch=> "origin", - wrapper => "/repo/wiki.git/hooks/post-update.ikiwiki" + git_wrapper => "/repo/wiki.git/hooks/post-update.ikiwiki" Note the non-standard and bizzare name of the hook. -- cgit v1.2.3 From a0de415ae0bdfef3aa12bc4201f72c6dedbe021d Mon Sep 17 00:00:00 2001 From: bremner Date: Sat, 29 Aug 2009 07:16:57 -0400 Subject: build failure on nearlyfreespeech.net --- doc/tips/nearlyfreespeech/discussion.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 doc/tips/nearlyfreespeech/discussion.mdwn (limited to 'doc/tips') diff --git a/doc/tips/nearlyfreespeech/discussion.mdwn b/doc/tips/nearlyfreespeech/discussion.mdwn new file mode 100644 index 000000000..3d4dc732d --- /dev/null +++ b/doc/tips/nearlyfreespeech/discussion.mdwn @@ -0,0 +1,9 @@ +with version 3.141592 I get +
+HOME=/home/me /usr/bin/perl -Iblib/lib   ikiwiki.out -libdir . -dumpsetup ikiwiki.setup
+Failed to load plugin IkiWiki::Plugin::inline: Can't use global $_ in "my" at IkiWiki/Plugin/inline.pm line 198, near "my $_"
+Compilation failed in require at (eval 19) line 2.
+BEGIN failed--compilation aborted at (eval 19) line 2.
+
+ +perl is 5.8.9 -- cgit v1.2.3 From 2e357179bd9cc7b2b05ae7ecad52273d5be02ebd Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Aug 2009 14:51:51 -0400 Subject: fixed --- doc/tips/nearlyfreespeech/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/nearlyfreespeech/discussion.mdwn b/doc/tips/nearlyfreespeech/discussion.mdwn index 3d4dc732d..a003760b9 100644 --- a/doc/tips/nearlyfreespeech/discussion.mdwn +++ b/doc/tips/nearlyfreespeech/discussion.mdwn @@ -7,3 +7,5 @@ BEGIN failed--compilation aborted at (eval 19) line 2. perl is 5.8.9 + +> This is fixed in 3.1415926. --[[Joey]] -- cgit v1.2.3 From ccb1239d88803e07c590d2a69a0a26977d9c1bc8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 1 Sep 2009 12:32:39 -0400 Subject: typo --- doc/tips/upgrade_to_3.0.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/upgrade_to_3.0.mdwn b/doc/tips/upgrade_to_3.0.mdwn index d22813bf2..05b6d6fbd 100644 --- a/doc/tips/upgrade_to_3.0.mdwn +++ b/doc/tips/upgrade_to_3.0.mdwn @@ -45,7 +45,7 @@ contain the above, then run `ikiwiki-transition prefix_directives your.setup` ## GlobLists In 3.0, the old "GlobList" syntax for [[PageSpecs|ikiwiki/PageSpec]] is no -longer supported. A GlobList contains multiple term, but does not separate +longer supported. A GlobList contains multiple terms, but does not separate them with "and" or "or": sandbox !*/Discussion -- cgit v1.2.3 From 4ded213254928f6190cfe43ce6bf4e1cb9093a8f Mon Sep 17 00:00:00 2001 From: "http://oscarjacho.myopenid.com/" Date: Wed, 2 Sep 2009 17:17:15 -0400 Subject: Added idea on wiki based requirements management tool --- .../ikiwiki_as_a_requirements_management_tool.mdwn | 95 ++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn (limited to 'doc/tips') diff --git a/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn b/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn new file mode 100644 index 000000000..083878aef --- /dev/null +++ b/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn @@ -0,0 +1,95 @@ +[[!template id=note text="**Table of contents** [[!toc ]]"]] + +Introduction +------------ +At work textual requirements and traceability are daily use terms, often used as contracts with clients or among stakeholders, but at the moment the only way we specify requirements is via a word processor, and traceability is managed manually (ouch!) unless we use a commercial UML (Unified Modeling Language) tool that handles office files, an also allows traceability from design, code and test artifacts. But functionality of that tool is less than basic for requirements. + +We are considering the use of a specific requirements management tool, but the problem and something that gets me really frustrated is the extremely expensive price of the licenses of the "de facto" commercial tools we should use. One floating license for both tools (requirements management and modeling) can go beyond $20,000. Of course we can purchase cheaper ones, but I'm tired of this licensing nightmare of worrying about how many licenses are being used, praying not to exceed the limit or restarting a dead license server. We pay companies to not trust us. Taking a look at the FLOSS world doesn't seem to add any reasonable alternative. + +These are the raw high level features of the tool I'd like to use: + + * Requirements edition + * Requirements attributes edition + * Traceability: edition, coverage analysis and navigation + * External traceability: from requirements in one document/module to requirements in other one (eg: software requirements tracing to system requirements). Note: a set of requirements will be called "module" hereafter in this page. + * Requirements identifiers management + * Requirements history and diff/blame + * Team work + * Easy integration with other software lifecycle tools: modeling (eg. BOUML), project management (eg. Trac) + * Support for other formats such as HTML, office... + * Filtering and searching + * Export facilities to create standards compliant documentation. + +Initial idea was to develop a simple web solution using XHTML files. These files would be created in a web broser with existing WYSIWIM editors and store all the stuff in Subversion. All requirements would be stored at the same level (no hierarchies among requirements of the same module) and atomically accessible via a simple web browser. No server side programming would be needed to read requirements. Also special XHTML files (let's call it "views") would be necessary to group requirements hierarchically in a requirements document fashion, using xinclude. + +When I first played with ikiwiki I was so happy that many of the ideas I worked on were already in use in this marvelous piece of software, specially the decision to use well-known RCS software to manage history instead of reinventing the wheel, opening also one interesting feature: off-line edition. Other similarity was the absence of special processing for read-only navigation. + +So, let's now take all the features above and describe how to make them real using ikiwiki and some simple conventions. Some features would need new functionality and improvement, I'd really appreciate additional ideas on how to better get to the point. + +Requirements edition +-------------------- +Suppose that all requirements would reside under a concrete folder. We will call it "reqs", and under "reqs" we add as folders as requirements modules we want to use for a system called "foo" (eg. "foo_sss" for system requirements, "foo_srs" for software requirements...). Index file for each document shall be a page summarizing the module: number of requirements, basic coverage information... Other similar pages under the "views" folder could be used in order to have different sets of requirements including additional stuff: introduction, document identification, etc... The rest of the files - actually requirements - shall be markdown files. So editing a requirement would be as simple as adding a page to the wiki. + +To create the summary and views, just [[ikiwiki/directive/inline]] and [[ikiwiki/directive/pagecount]] directives could provide nice pages. The uncomfortable part is having to use many [[pagespecs|ikiwiki/PageSpec]] to create the whole views, but it actually shoud work. One possible workaround would be an external tool to handle this and create directives automatically or graphically. + +Requirements attributes +----------------------- +There are lots of useful data to associate to a requirement. Eg: + + * If it is traceable or not + * Its criticality level + * Its priority + * If it is funtional or not + +How to implement this? Using [[ikiwiki/directive/meta]] could be a solution, not tried yet, I'd rather keep requirements content alone. Storing this information in SVN it is easy, although ikiwiki does not provide a way to do it it would imply really little effort. The requirement in itself is the content of the file; attributes are stored as key-value pairs in the file's properties. AFAIK this is a feature available only in SVN, although git has something similar (gitattributes) although path based, but anyway whichever RCS is used, a ".properties" file could be created always when a requirement file is created. + +Traceability: edition, coverage analysis and navigation +-------------------------------------------------------- +This is the most important feature of a requirements engineering tool. How to do this with ikiwiki? There are some ways, from extremely simple ones to more sophisticated: + + * One simple solution: Links. Just link from one requirement to another one to create a traceable directional connection + * One harder: file attributes (see section about requirements just above) + +For coverage analysis , using [/ikiwiki/directive/pagecount] is the perfect solution to summarize and show covered and uncovered requirements. We could add several pages per module - probably using template pages- with ready made coverage analysis reports... Wow!!! [/ikiwiki/directive/linkmap] directive can show traceability information graphically. + +Navigating among requirements needs... Nothing!!! Just follow the links of referring pages that ikiwiki adds by default. + +External traceability +--------------------- +Being just different folders under the wiki, external traceability is as easy as internal. + +Requirements identifiers management +----------------------------------- +Another useful convention: requirement identifier shall be the name of the requirements file. In ikiwiki page title is the same as requirement Id. No trouble, it works. I personally prefer to keep title as page title and create a short auto-increasing numeric codes with prefixes and/or suffixes as file name (eg. SRS_FOO_0001, SSS_FOO_002), hope to have somethig running soon. + +Requirements history and diff/blame +----------------------------------- +Out of the box! And really much more useful than average diffing components of requirement management tools. There are plenty online front ends to use and for offline work tools like meld are awesome. + +Team work +--------- +Also no need to do anything, RCS software does it all. Also for experienced users merging and conflict solving can provide much more practical solutions (most requirements management tools work blocking). + +Easy integration with other software lifecycle tools +---------------------------------------------------- +Modeling tools: as a general rule, store model elements in the most atomic parts: classes, enums, actors, use cases... and use again file attributes to store traceability information. Other way is transforming files representing these atomic model parts in independent mdwn files under, for example, a "mdl" folder + +Trac integration is so simple... As simple as any PM tool that acceses the same RCS as ikiwiki does. Diffing, blaming, even navigating directly to ikiwiki generated pages. Integration of a ticketing system will give awesome power to all the team. + +Support for other formats +------------------------- +Out of the box, at least for wiki and mathematical formats, and creating additional ones shouldn't be so difficult. + +Filtering and searching +----------------------- +Look that box in the top right corner? + +Export facilities +----------------- +Views with custom styles and html conversion tools would be enough for most purposes. + +That's all! + +One funny thing: our "de facto future" requirements management tool, after years of research included some years ago a really nice feature: a Discussion tag per each requirement... See this in ikiwiki? Again out of the box!!! + +Comments are really welcome!!! -- cgit v1.2.3 From 086b90c313820b91596f07ed2a05671e321c6f98 Mon Sep 17 00:00:00 2001 From: "http://oscarjacho.myopenid.com/" Date: Wed, 2 Sep 2009 17:23:02 -0400 Subject: Minor changes --- doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn b/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn index 083878aef..17be5b9b2 100644 --- a/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn +++ b/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn @@ -50,7 +50,7 @@ This is the most important feature of a requirements engineering tool. How to do * One simple solution: Links. Just link from one requirement to another one to create a traceable directional connection * One harder: file attributes (see section about requirements just above) -For coverage analysis , using [/ikiwiki/directive/pagecount] is the perfect solution to summarize and show covered and uncovered requirements. We could add several pages per module - probably using template pages- with ready made coverage analysis reports... Wow!!! [/ikiwiki/directive/linkmap] directive can show traceability information graphically. +For coverage analysis , using [ikiwiki/directive/pagecount] is the perfect solution to summarize and show covered and uncovered requirements. We could add several pages per module - probably using template pages- with ready made coverage analysis reports... Wow!!! [ikiwiki/directive/linkmap] directive can show traceability information graphically. Navigating among requirements needs... Nothing!!! Just follow the links of referring pages that ikiwiki adds by default. -- cgit v1.2.3 From dd96853fe36102e512dea69d06514786cd9a96df Mon Sep 17 00:00:00 2001 From: "http://oscarjacho.myopenid.com/" Date: Wed, 2 Sep 2009 17:24:47 -0400 Subject: Minor changes --- doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn b/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn index 17be5b9b2..6bef2619e 100644 --- a/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn +++ b/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn @@ -50,7 +50,7 @@ This is the most important feature of a requirements engineering tool. How to do * One simple solution: Links. Just link from one requirement to another one to create a traceable directional connection * One harder: file attributes (see section about requirements just above) -For coverage analysis , using [ikiwiki/directive/pagecount] is the perfect solution to summarize and show covered and uncovered requirements. We could add several pages per module - probably using template pages- with ready made coverage analysis reports... Wow!!! [ikiwiki/directive/linkmap] directive can show traceability information graphically. +For coverage analysis , using [[ikiwiki/directive/pagecount]] is the perfect solution to summarize and show covered and uncovered requirements. We could add several pages per module - probably using template pages- with ready made coverage analysis reports... Wow!!! [[ikiwiki/directive/linkmap]] directive can show traceability information graphically. Navigating among requirements needs... Nothing!!! Just follow the links of referring pages that ikiwiki adds by default. -- cgit v1.2.3 From 70c9d175b56c3d7a878b8bd47eeaef5cec876c8b Mon Sep 17 00:00:00 2001 From: AlexandreDupas Date: Thu, 3 Sep 2009 04:56:35 -0400 Subject: Using tags or links to represent attributes --- .../discussion.mdwn | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 doc/tips/ikiwiki_as_a_requirements_management_tool/discussion.mdwn (limited to 'doc/tips') diff --git a/doc/tips/ikiwiki_as_a_requirements_management_tool/discussion.mdwn b/doc/tips/ikiwiki_as_a_requirements_management_tool/discussion.mdwn new file mode 100644 index 000000000..94f0f8b4b --- /dev/null +++ b/doc/tips/ikiwiki_as_a_requirements_management_tool/discussion.mdwn @@ -0,0 +1,18 @@ +How about using tags/links to associate attributes with requirements? +This could be as simple as adding a link, fo e.g. : + + * If it is traceable or not + + \[[attributes/traceable]] + + \[[attributes/untraceable]] + * Its criticality level + + \[[attributes/level/critical]] + + \[[attributes/level/important]] + + etc. + * Its priority + + \[[attributes/priority/low]] + + \[[attributes/priority/high]] + * If it is functional or not + + \[[attributes/functional]] + + \[[attributes/non-functional]] + +You just have to create pages for each attribute you want and then pagespec could be used to filter requirements by attributes. I think something similar is used to trac bug with ikiwiki (linking to a \[[done]] page, etc.). -- cgit v1.2.3 From 2736055af532feeb20e23ea49be8115486777439 Mon Sep 17 00:00:00 2001 From: "http://mhymn.pip.verisignlabs.com/" Date: Tue, 29 Sep 2009 09:50:51 -0400 Subject: removing extra space to avoid mistakes --- doc/tips/github.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/github.mdwn b/doc/tips/github.mdwn index c3fdab734..9bdf15751 100644 --- a/doc/tips/github.mdwn +++ b/doc/tips/github.mdwn @@ -24,7 +24,7 @@ for more space, or you can migrate your site elsewhere. ## Local Setup * On your laptop, create two empty git repositories to correspond to the github repositories:
- `YOU = your github username here`
+ `YOU=your github username here`
`mkdir ~/$YOU.github.com`
`cd ~/$YOU.github.com`
`git init`
-- cgit v1.2.3 From d902444875abfe77811e3ef488535a82bb5e579b Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" Date: Fri, 2 Oct 2009 09:11:11 -0400 Subject: remove some unintended wikilinks --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index b3fe9f86c..e2eb56d47 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -286,7 +286,7 @@ Mediawiki.pm - A plugin which supports mediawiki format. } - # Called to handle bookmarks like [[#heading]] or ?#a + # Called to handle bookmarks like \[[#heading]] or ?#a sub generate_fragment_link { my $url = shift; @@ -316,10 +316,10 @@ Mediawiki.pm - A plugin which supports mediawiki format. # Ikiwiki's link link plugin wrecks this line when displaying on the site. # Until the code highlighter plugin can turn off link finding, - # always escape double brackets in double quotes: [[ + # always escape double brackets in double quotes: \[[ if($inlink eq '..') { - # Mediawiki doesn't touch links like [[..#hi|ho]]. - return "[[" . $inlink . ($anchor?"#$anchor":"") . + # Mediawiki doesn't touch links like \[[..#hi|ho]]. + return "\[[" . $inlink . ($anchor?"#$anchor":"") . ($title?"|$title":"") . "]]" . $trailing; } @@ -380,7 +380,7 @@ Mediawiki.pm - A plugin which supports mediawiki format. add_depends($page, $redir_page); my $link=bestlink($page, underscorize(translate_path($page,$redir_page))); if (! length $link) { - return "Redirect Error: [[$redir_page]] not found."; + return "Redirect Error: \[[$redir_page]] not found."; } $value=urlto($link, $page); @@ -393,7 +393,7 @@ Mediawiki.pm - A plugin which supports mediawiki format. my %seen; while (exists $pagestate{$at}{mediawiki}{redir}) { if ($seen{$at}) { - return "Redirect Error: cycle found on [[$at]]"; + return "Redirect Error: cycle found on \[[$at]]"; } $seen{$at}=1; $at=$pagestate{$at}{mediawiki}{redir}; -- cgit v1.2.3 From 143e2de17d084db00487ee4db67b7b0131ccc441 Mon Sep 17 00:00:00 2001 From: Chadius Date: Thu, 15 Oct 2009 09:26:05 -0400 Subject: Asking for a repost of page, as the link is broken. --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index e2eb56d47..1e6fc94a7 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -612,3 +612,5 @@ Mediawiki.pm - A plugin which supports mediawiki format. } 1 + +Hello. Got ikiwiki running and I'm planning to convert my personal Mediawiki wiki to ikiwiki so I can take offline copies around. If anyone has an old copy of the instructions, or any advice on where to start I'd be glad to hear it. Otherwise I'm just going to chronicle my journey on the page.--[[users/Chadius]] -- cgit v1.2.3 From 68aca6516a1c4b78991b5fc002c66efc5f012a0c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 15 Oct 2009 18:42:46 -0400 Subject: add --- doc/tips/optimising_ikiwiki.mdwn | 155 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 doc/tips/optimising_ikiwiki.mdwn (limited to 'doc/tips') diff --git a/doc/tips/optimising_ikiwiki.mdwn b/doc/tips/optimising_ikiwiki.mdwn new file mode 100644 index 000000000..fcf3077f8 --- /dev/null +++ b/doc/tips/optimising_ikiwiki.mdwn @@ -0,0 +1,155 @@ +Is ikiwiki taking too long to build your wiki? Read on for some common +problems that can be avoided to make ikiwiki run quick. + +[[!toc]] + +## rebuild vs refresh + +Are you building your wiki by running a command like this? + + ikiwiki -setup my.setup + +If so, you're always telling ikiwiki to rebuild the entire site, from +scratch. But, ikiwiki is smart, it can incrementally update a site, +building only things affected by the changes you make. You just have to let +it do so: + + ikiwiki -setup my.setup -refresh + +Ikiwiki automatically uses an incremental refresh like this when handing +a web edit, or when run from a [[rcs]] post-commit hook. (If you've +configured the hook in the usual way.) Most people who have run into this +problem got in the habit of running `ikiwiki -setup my.setup` by hand +when their wiki was small, and found it got slower as they added pages. + +### use the latest version + +If your version of ikiwiki is not [[!verison]], try upgrading. New +optimisations are frequently added to ikiwiki, some of them yielding +*enormous* speed increases. + +### expensive inlines + +Do you have an archive page for your blog that shows all posts, +using an inline that looks like this? + + \[[!inline pages="blog/*" show=0]] + +Or maybe you have some tag pages for your blog that show all tagged posts, +something like this? + + \[[!inline pages="blog/* and tagged(foo)" show=0]] + +These are expensive, because they have to be updated whenever you modify a +matching page. And, if there are a lot of pages, it generates a large html +file, which is a lot of work. And also large RSS/Atom files, which is even +more work! + +To optimise the inline, consider enabling quick archive mode. Then the +inline will only need to be updated when new pages are added; no RSS +or Atom feeds will be built, and the generated html file will be much +smaller. + + \[[!inline pages="blog/*" show=0 archive=yes quick=yes]] + + \[[!inline pages="blog/* and link(tag)" show=0 archive=yes quick=yes]] + +Only downsides: This won't show titles set by the [[!ikiwiki/directive/meta]] +directive. And there's no RSS feed for users to use -- but if this page +is only for the archives or tag for your blog, users should be subscribing +to the blog's main page's RSS feed instead. + +For the main blog page, the inline should only show the latest N posts, +which won't be a performance problem: + + \[[!inline pages="blog/*" show=30]] + +## expensive maps + +Do you have a sitemap type page, that uses a map directive like this? + + \[[!map pages="*" show=title]] + +This is expensive because it has to be updated whenever a page is modified. +The resulting html file might get big and expensive to generate as you +keep adding pages. + +First, consider removing the "show=title". Then the map will not show page +titles set by the [[!ikiwiki/directive/meta]] directive -- but will also +only need to be generated when pages are added or removed, not for every +page change. + +Consider limiting the map to only show the toplevel pages of your site, +like this: + + \[[!map pages="* and !*/*" show=title]] + +Or, alternatively, to drop from the map parts of the site that accumulate +lots of pages, like individual blog posts: + + \[[!map pages="* and !blog/*" show=title]] + +## sidebar issues + +If you enable the [[plugins/sidebar]] plugin, be careful of what you put in +your sidebar. Any change that affects what is displayed by the sidebar +will require an update of *every* page in the wiki, since all pages include +the sidebar. + +Putting an expensive map or inline in the sidebar is the most common cause +of problems. At its worst, it can result in any change to any page in the +wiki requiring every page to be rebuilt. + +## avoid htmltidy + +A few plugins do neat stuff, but slowly. Such plugins are tagged +[[plugins/type/slow]]. + +The worst offender is possibly [[plugins/htmltidy]]. This runs an external +`tidy` program on each page that is built, which is necessarily slow. So don't +use it unless you really need it; consider using the faster +[[plugins/htmlbalance]] instead. + +## be careful of large linkmaps + +[[plugins/Linkmap]] generates a cool map of links between pages, but +it does it using the `graphviz` program. And any changes to links between +pages on the map require an update. So, avoid using this to map a large number +of pages with frequently changing links. For example, using it to map +all the pages on a traditional, highly WikiLinked wiki, is asking for things +to be slow. But using it to map a few related pages is probably fine. + +This site's own [[plugins/linkmap]] rarely slows it down, because it +only shows the [[index]] page, and the small set of pages that link to it. +That is accomplished as follows: + + \[!linkmap pages="index or (backlink(index)"]] + +## overhead of the search plugin + +Be aware that the [[plugins/search]] plugin has to update the search index +whenever any page is changed. This can slow things down somewhat. + +## scaling to large numbers of pages + +Finally, let's think about how huge number of pages can affect ikiwiki. + +* Every time it's run, ikiwiki has to scan your `srcdir` to find + new and changed pages. This is similar in speed to running the `find` + command. Obviously, more files will make it take longer. + +* Also, to see what pages match a [[ikiwiki/PageSpec]] like "blog/*", it has + to check if every page in the wiki matches. These checks are done quite + quickly, but still, lots more pages will make PageSpecs more expensive. + +* The backlinks calculation has to consider every link on every page + in the wiki. (In practice, most pages only like to at most a few dozen + other pages, so this is not a `O(N^2)`, but closer to `O(N)`.) + +* Ikiwiki also reads and writes an `index` file, which contains information + about each page, and so if you have a lot of pages, this file gets large, + and more time is spent on it. For a wiki with 2000 pages, this file + will run about 500 kb. + +If your wiki will have 100 thousand files in it, you might start seeing +the above contribute to ikiwiki running slowly. -- cgit v1.2.3 From 4be470a2194aff09056570718d530d103ea2bc45 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 15 Oct 2009 18:49:05 -0400 Subject: update --- doc/tips/optimising_ikiwiki.mdwn | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/optimising_ikiwiki.mdwn b/doc/tips/optimising_ikiwiki.mdwn index fcf3077f8..579157291 100644 --- a/doc/tips/optimising_ikiwiki.mdwn +++ b/doc/tips/optimising_ikiwiki.mdwn @@ -1,8 +1,18 @@ -Is ikiwiki taking too long to build your wiki? Read on for some common -problems that can be avoided to make ikiwiki run quick. +Ikiwiki is a wiki compiler, which means that, unlike a traditional wiki, +all the work needed to display your wiki is done up front. Where you can +see it and get annoyed at it. In some ways, this is better than a wiki +where a page view means running a program to generate the page on the fly. + +But enough excuses. If ikiwiki is taking too long to build your wiki, +let's fix that. Read on for some common problems that can be avoided to +make ikiwiki run quick. [[!toc]] +(And if none of that helps, file a [[bug|bugs]]. One other great thing about +ikiwiki being a wiki compiler is that it's easy to provide a test case when +it's slow, and get the problem fixed!) + ## rebuild vs refresh Are you building your wiki by running a command like this? @@ -22,13 +32,13 @@ configured the hook in the usual way.) Most people who have run into this problem got in the habit of running `ikiwiki -setup my.setup` by hand when their wiki was small, and found it got slower as they added pages. -### use the latest version +## use the latest version If your version of ikiwiki is not [[!verison]], try upgrading. New optimisations are frequently added to ikiwiki, some of them yielding *enormous* speed increases. -### expensive inlines +## expensive inlines Do you have an archive page for your blog that shows all posts, using an inline that looks like this? -- cgit v1.2.3 From 19ec5c22599f15b9a3dc5246bea4e8f09ec94180 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 15 Oct 2009 18:50:40 -0400 Subject: typo --- doc/tips/optimising_ikiwiki.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/optimising_ikiwiki.mdwn b/doc/tips/optimising_ikiwiki.mdwn index 579157291..e3973733f 100644 --- a/doc/tips/optimising_ikiwiki.mdwn +++ b/doc/tips/optimising_ikiwiki.mdwn @@ -133,7 +133,7 @@ This site's own [[plugins/linkmap]] rarely slows it down, because it only shows the [[index]] page, and the small set of pages that link to it. That is accomplished as follows: - \[!linkmap pages="index or (backlink(index)"]] + \[[!linkmap pages="index or (backlink(index)"]] ## overhead of the search plugin -- cgit v1.2.3 From 31ec3a7570061e371e0011831308f88ff0887bb8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 15 Oct 2009 18:51:29 -0400 Subject: typo --- doc/tips/optimising_ikiwiki.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/optimising_ikiwiki.mdwn b/doc/tips/optimising_ikiwiki.mdwn index e3973733f..6d0997603 100644 --- a/doc/tips/optimising_ikiwiki.mdwn +++ b/doc/tips/optimising_ikiwiki.mdwn @@ -34,7 +34,7 @@ when their wiki was small, and found it got slower as they added pages. ## use the latest version -If your version of ikiwiki is not [[!verison]], try upgrading. New +If your version of ikiwiki is not [[!version]], try upgrading. New optimisations are frequently added to ikiwiki, some of them yielding *enormous* speed increases. -- cgit v1.2.3 From 0a2e4e167dc0a6b9fc0b038c4174694117b74628 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Fri, 16 Oct 2009 10:44:14 +0100 Subject: substantially expand the mediawiki tip with some of the steps. More to come --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 101 +++++++++++++++++++++++++++-- 1 file changed, 97 insertions(+), 4 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index f03703b46..c522eaec3 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -1,4 +1,97 @@ -[[sabr]] explains how to [import MediaWiki content into -git](http://u32.net/Mediawiki_Conversion/index.html?updated), including -full edit hostory. The [[plugins/contrib/mediawiki]] plugin can then be -used by ikiwiki to build the wiki. +Mediawiki is a dynamically-generated wiki which stores it's data in a +relational database. Pages are marked up using a proprietary markup. It is +possible to import the contents of a Mediawiki site into an ikiwiki, +converting some of the Mediawiki conventions into Ikiwiki ones. + +The following instructions describe ways of obtaining the current version of +the wiki. We do not yet cover importing the history of edits. + +## Step 1: Getting a list of pages + +The first bit of information you require is a list of pages in the Mediawiki. +There are several different ways of obtaining these. + +### Parsing the output of `Special:Allpages` + +Mediawikis have a special page called `Special:Allpages` which list all the +pages for a given namespace on the wiki. + +If you fetch the output of this page to a local file with something like + + wget -q -O tmpfile 'http://your-mediawiki/wiki/Special:Allpages' + +You can extract the list of page names using the following python script. Note +that this script is sensitive to the specific markup used on the page, so if +you have tweaked your mediawiki theme a lot from the original, you will need +to adjust this script too: + + from xml.dom.minidom import parse, parseString + + dom = parse(argv[1]) + tables = dom.getElementsByTagName("table") + pagetable = tables[-1] + anchors = pagetable.getElementsByTagName("a") + for a in anchors: + print a.firstChild.toxml().\ + replace('&,'&').\ + replace('<','<').\ + replace('>','>') + +Also, if you have pages with titles that need to be encoded to be represented +in HTML, you may need to add further processing to the last line. + +### Querying the database + +If you have access to the relational database in which your mediawiki data is +stored, it is possible to derive a list of page names from this. + +## Step 2: fetching the page data + +Once you have a list of page names, you can fetch the data for each page. + +### Method 1: via HTTP and `action=raw` + +You need to create two derived strings from the page titles already: the +destination path for the page and the source URL. Assuming `$pagename` +contains a pagename obtained above, and `$wiki` contains the URL to your +mediawiki's `index.php` file: + + src=`echo "$pagename" | tr ' ' _ | sed 's,&,&,g'` + dest=`"$pagename" | tr ' ' _ | sed 's,&,__38__,g'` + + mkdir -p `dirname "$dest"` + wget -q "$wiki?title=$src&action=raw" -O "$dest" + +### Method 2: via HTTP and `Special:Export` + +Mediawiki also has a special page `Special:Export` which can be used to obtain +the source of the page and other metadata such as the last contributor, or the +full history, etc. + +You need to send a `POST` request to the `Special:Export` page. See the source +of the page fetched via `GET` to determine the correct arguments. + +You will then need to write an XML parser to extract the data you need from +the result. + +### Method 3: via the database + +It is possible to extract the page data from the database with some +well-crafted queries. + +## Step 2: format conversion + +The next step is to convert Mediawiki conventions into Ikiwiki ones. These +include + + * convert Categories into tags + * ... + +## External links + +[[sabr]] used to explain how to [import MediaWiki content into +git](http://u32.net/Mediawiki_Conversion/index.html?updated), including full +edit history, but as of 2009/10/16 that site is not available. + +The [[plugins/contrib/mediawiki]] plugin can then be used by ikiwiki to build +the wiki. -- cgit v1.2.3 From 811394ec92205112d3fec0d4f6aac380202f114b Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Fri, 16 Oct 2009 11:20:32 +0100 Subject: add snippet for converting categories --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index c522eaec3..ce0c684e7 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -1,3 +1,5 @@ +[[!toc levels=2]] + Mediawiki is a dynamically-generated wiki which stores it's data in a relational database. Pages are marked up using a proprietary markup. It is possible to import the contents of a Mediawiki site into an ikiwiki, @@ -85,7 +87,23 @@ The next step is to convert Mediawiki conventions into Ikiwiki ones. These include * convert Categories into tags - * ... + + import sys, re + pattern = r'\[\[Category:([^\]]+)\]\]' + + def manglecat(mo): + return '[[!tag %s]]' % mo.group(1).strip().replace(' ','_') + + for line in sys.stdin.readlines(): + res = re.match(pattern, line) + if res: + sys.stdout.write(re.sub(pattern, manglecat, line)) + else: sys.stdout.write(line) + +## Step 3: Mediawiki plugin + +The [[plugins/contrib/mediawiki]] plugin can be used by ikiwiki to interpret +most of the Mediawiki syntax. ## External links @@ -93,5 +111,3 @@ include git](http://u32.net/Mediawiki_Conversion/index.html?updated), including full edit history, but as of 2009/10/16 that site is not available. -The [[plugins/contrib/mediawiki]] plugin can then be used by ikiwiki to build -the wiki. -- cgit v1.2.3 From 58287a929b0ea209a062d11940232a3d31805885 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Fri, 16 Oct 2009 11:21:26 +0100 Subject: explanatory text --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index ce0c684e7..3f771ed9b 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -83,10 +83,13 @@ well-crafted queries. ## Step 2: format conversion -The next step is to convert Mediawiki conventions into Ikiwiki ones. These -include +The next step is to convert Mediawiki conventions into Ikiwiki ones. - * convert Categories into tags +### categories + +Mediawiki uses a special page name prefix to define "Categories", which +otherwise behave like ikiwiki tags. You can convert every Mediawiki category +into an ikiwiki tag name using a script such as import sys, re pattern = r'\[\[Category:([^\]]+)\]\]' -- cgit v1.2.3 From 0bee92347020e3034faea5d3cc045ca443e4221c Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Fri, 16 Oct 2009 11:23:55 +0100 Subject: minor reworking of page fetch section --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index 3f771ed9b..4a750882b 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -53,7 +53,7 @@ Once you have a list of page names, you can fetch the data for each page. ### Method 1: via HTTP and `action=raw` -You need to create two derived strings from the page titles already: the +You need to create two derived strings from the page titles: the destination path for the page and the source URL. Assuming `$pagename` contains a pagename obtained above, and `$wiki` contains the URL to your mediawiki's `index.php` file: @@ -64,6 +64,9 @@ mediawiki's `index.php` file: mkdir -p `dirname "$dest"` wget -q "$wiki?title=$src&action=raw" -O "$dest" +You may need to add more conversions here depending on the precise page titles +used in your wiki. + ### Method 2: via HTTP and `Special:Export` Mediawiki also has a special page `Special:Export` which can be used to obtain -- cgit v1.2.3 From f6d08ceb358f6d5e51c54ab1b9e90cc4a86fad37 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Fri, 16 Oct 2009 11:44:13 +0100 Subject: notes about namespaces --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index 4a750882b..87b1ebc48 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -42,6 +42,16 @@ to adjust this script too: Also, if you have pages with titles that need to be encoded to be represented in HTML, you may need to add further processing to the last line. +Note that by default, `Special:Allpages` will only list pages in the main +namespace. You need to add a `&namespace=XX` argument to get pages in a +different namespace. The following numbers correspond to common namespaces: + + * 10 - templates (`Template:foo`) + * 14 - categories (`Category:bar`) + +Note that the page names obtained this way will not include any namespace +specific prefix: e.g. `Category:` will be stripped off. + ### Querying the database If you have access to the relational database in which your mediawiki data is @@ -67,6 +77,12 @@ mediawiki's `index.php` file: You may need to add more conversions here depending on the precise page titles used in your wiki. +If you are trying to fetch pages from a different namespace to the default, +you will need to prefix the page title with the relevant prefix, e.g. +`Category:` for category pages. You probably don't want to prefix it to the +output page, but you may want to vary the destination path (i.e. insert an +extra directory component corresponding to your ikiwiki's `tagbase`). + ### Method 2: via HTTP and `Special:Export` Mediawiki also has a special page `Special:Export` which can be used to obtain -- cgit v1.2.3 From 7a9512918d981762016bdaf7e6196fe2d46c10c7 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Fri, 16 Oct 2009 11:59:27 +0100 Subject: fix step numbering --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index 87b1ebc48..1e5b912a9 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -100,7 +100,7 @@ the result. It is possible to extract the page data from the database with some well-crafted queries. -## Step 2: format conversion +## Step 3: format conversion The next step is to convert Mediawiki conventions into Ikiwiki ones. @@ -122,7 +122,7 @@ into an ikiwiki tag name using a script such as sys.stdout.write(re.sub(pattern, manglecat, line)) else: sys.stdout.write(line) -## Step 3: Mediawiki plugin +## Step 4: Mediawiki plugin The [[plugins/contrib/mediawiki]] plugin can be used by ikiwiki to interpret most of the Mediawiki syntax. -- cgit v1.2.3 From d216a27e0c448447f798883a4d6692d1a51677ef Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 16 Oct 2009 12:18:04 -0400 Subject: pointer --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index 1e6fc94a7..ed3faa324 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -613,4 +613,15 @@ Mediawiki.pm - A plugin which supports mediawiki format. 1 -Hello. Got ikiwiki running and I'm planning to convert my personal Mediawiki wiki to ikiwiki so I can take offline copies around. If anyone has an old copy of the instructions, or any advice on where to start I'd be glad to hear it. Otherwise I'm just going to chronicle my journey on the page.--[[users/Chadius]] +Hello. Got ikiwiki running and I'm planning to convert my personal +Mediawiki wiki to ikiwiki so I can take offline copies around. If anyone +has an old copy of the instructions, or any advice on where to start I'd be +glad to hear it. Otherwise I'm just going to chronicle my journey on the +page.--[[users/Chadius]] + +> Today I saw that someone is working to import wikipedia into git. +> +> Since wikipedia uses mediawiki, perhaps his importer will work +> on mediawiki in general. It seems to produce output that could be +> used by the [[plugins/contrib/mediawiki]] plugin, if the filenames +> were fixed to use the right extension. --[[Joey]] -- cgit v1.2.3 From b2fd4f9b254610283d3fa6944ea73941c2045769 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 16 Oct 2009 15:50:33 -0400 Subject: explain how to profile --- doc/tips/optimising_ikiwiki.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/optimising_ikiwiki.mdwn b/doc/tips/optimising_ikiwiki.mdwn index 6d0997603..085ef0306 100644 --- a/doc/tips/optimising_ikiwiki.mdwn +++ b/doc/tips/optimising_ikiwiki.mdwn @@ -140,6 +140,21 @@ That is accomplished as follows: Be aware that the [[plugins/search]] plugin has to update the search index whenever any page is changed. This can slow things down somewhat. +## profiling + +If you have a repeatable change that ikiwiki takes a long time to build, +and none of the above help, the next thing to consider is profiling +ikiwiki. + +The best way to do it is: + +* Install [[cpan Devel::NYTProf]] +* `PERL5OPT=-d:NYTProf` +* `export PER5OPT` +* Now run ikiwiki as usual, and it will generate a `nytprof.out` file. +* Run `nytprofhtml` to generate html files. +* Those can be examined to see what parts of ikiwiki are being slow. + ## scaling to large numbers of pages Finally, let's think about how huge number of pages can affect ikiwiki. -- cgit v1.2.3 From 69a1ebce16debf8b0aeb61329ff26d235e248e7d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 16 Oct 2009 16:43:26 -0400 Subject: link --- doc/tips/optimising_ikiwiki.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/optimising_ikiwiki.mdwn b/doc/tips/optimising_ikiwiki.mdwn index 085ef0306..cf166998b 100644 --- a/doc/tips/optimising_ikiwiki.mdwn +++ b/doc/tips/optimising_ikiwiki.mdwn @@ -148,7 +148,7 @@ ikiwiki. The best way to do it is: -* Install [[cpan Devel::NYTProf]] +* Install [[!cpan Devel::NYTProf]] * `PERL5OPT=-d:NYTProf` * `export PER5OPT` * Now run ikiwiki as usual, and it will generate a `nytprof.out` file. -- cgit v1.2.3 From 471c04bfd2222dbb8aec9c350a1512213ef711f5 Mon Sep 17 00:00:00 2001 From: "http://blog.mithis.net/" Date: Wed, 28 Oct 2009 03:47:41 -0400 Subject: Adding information about the media2iki github project. --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index 1e5b912a9..ab6984494 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -8,6 +8,9 @@ converting some of the Mediawiki conventions into Ikiwiki ones. The following instructions describe ways of obtaining the current version of the wiki. We do not yet cover importing the history of edits. +Another set of instructions and conversion tools (which imports the full history) +can be found at + ## Step 1: Getting a list of pages The first bit of information you require is a list of pages in the Mediawiki. @@ -131,5 +134,7 @@ most of the Mediawiki syntax. [[sabr]] used to explain how to [import MediaWiki content into git](http://u32.net/Mediawiki_Conversion/index.html?updated), including full -edit history, but as of 2009/10/16 that site is not available. +edit history, but as of 2009/10/16 that site is not available. A copy of the +information found on this website is stored at + -- cgit v1.2.3 From 12a27e7025d8ad560976de8a1a76899daaf23a25 Mon Sep 17 00:00:00 2001 From: "http://blog.mithis.net/" Date: Wed, 28 Oct 2009 03:57:05 -0400 Subject: Adding information about the media2iki github project. --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index ed3faa324..3e9c4dc3c 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -16,6 +16,10 @@ Also, some detail on converting mediawiki transclusion to ikiwiki inlines... > "Who knows, the remote site might disappear.". Right now, it appears to > have done just that. -- [[users/Jon]] +I have manage to recover most of the site using the Internet Archive. What +I was unable to retrieve I have rewritten. You can find a copy of the code +at + The iki-fast-load ruby script from the u32 page is given below: -- cgit v1.2.3 From 6659d78aa2e3c66c9beadf180aa18438db0f40e5 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Wed, 28 Oct 2009 13:43:02 +0000 Subject: add dividers to split up the individual discussions going on --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index 3e9c4dc3c..12c241a7d 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -13,6 +13,8 @@ Also, some detail on converting mediawiki transclusion to ikiwiki inlines... -- [[users/Jon]] +---- + > "Who knows, the remote site might disappear.". Right now, it appears to > have done just that. -- [[users/Jon]] @@ -20,6 +22,7 @@ I have manage to recover most of the site using the Internet Archive. What I was unable to retrieve I have rewritten. You can find a copy of the code at +---- The iki-fast-load ruby script from the u32 page is given below: @@ -617,6 +620,8 @@ Mediawiki.pm - A plugin which supports mediawiki format. 1 +---- + Hello. Got ikiwiki running and I'm planning to convert my personal Mediawiki wiki to ikiwiki so I can take offline copies around. If anyone has an old copy of the instructions, or any advice on where to start I'd be -- cgit v1.2.3 From 4df15554f84831d9e39db8719efa1b4b9ef9dd82 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Wed, 28 Oct 2009 13:51:00 +0000 Subject: response to mithro --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index 12c241a7d..683a3f8ac 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -22,6 +22,21 @@ I have manage to recover most of the site using the Internet Archive. What I was unable to retrieve I have rewritten. You can find a copy of the code at +> This is excellent news. However, I'm still keen on there being a +> comprehensive and up-to-date set of instructions on *this* site. I wouldn't +> suggest importing that material into ikiwiki like-for-like (not least for +> [[licensing|freesoftware]] reasons), but it's excellent to have it available +> for reference, especially since it (currently) is the only set of +> instructions that gives you the whole history. +> +> The `mediawiki.pm` that was at u32.net is licensed GPL-2. I'd like to see it +> cleaned up and added to IkiWiki proper (although I haven't requested this +> yet, I suspect the way it (ab)uses linkify would disqualify it at present). +> +> I've imported Scott's initial `mediawiki.pm` into a repository at +> as a start. +> -- [[Jon]] + ---- The iki-fast-load ruby script from the u32 page is given below: -- cgit v1.2.3 From ed8953716496354561218cdaf10153a8a4f4259d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 29 Oct 2009 07:50:53 -0400 Subject: fix dangling TMPL_IF noticed by rodyaj --- doc/tips/parentlinks_style.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc/tips') diff --git a/doc/tips/parentlinks_style.mdwn b/doc/tips/parentlinks_style.mdwn index 5294e5452..b10d7cf56 100644 --- a/doc/tips/parentlinks_style.mdwn +++ b/doc/tips/parentlinks_style.mdwn @@ -77,6 +77,7 @@ following lines in `page.tmpl`: " class="height"> / + Then write the appropriate CSS bits for `a.height1`, etc. -- cgit v1.2.3 From 341e5cec5912fd593c0d0836efccf13344488ee2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 29 Oct 2009 07:57:30 -0400 Subject: fix indentation --- doc/tips/parentlinks_style.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/parentlinks_style.mdwn b/doc/tips/parentlinks_style.mdwn index b10d7cf56..b992a11a0 100644 --- a/doc/tips/parentlinks_style.mdwn +++ b/doc/tips/parentlinks_style.mdwn @@ -77,7 +77,7 @@ following lines in `page.tmpl`: " class="height"> / - + Then write the appropriate CSS bits for `a.height1`, etc. -- cgit v1.2.3 From c4784a437d82c2c7747ffc600ac54355130b2ac0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 29 Oct 2009 10:32:02 -0400 Subject: add an example of how to use the recently added HAS_PARENTLINKS --- doc/tips/parentlinks_style.mdwn | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/parentlinks_style.mdwn b/doc/tips/parentlinks_style.mdwn index b992a11a0..8b95cd396 100644 --- a/doc/tips/parentlinks_style.mdwn +++ b/doc/tips/parentlinks_style.mdwn @@ -82,6 +82,24 @@ following lines in `page.tmpl`: Then write the appropriate CSS bits for `a.height1`, etc. +Avoid showing title of toplevel index page +------------------------------------------ + +If you don't like having "index" appear on the top page of the wiki, +but you do want to see the name of the page otherwise, you can use a +special `HAS_PARENTLINKS` template variable that the plugin provides. +It is true for every page *except* the toplevel index. + +Here is an example of using it to hide the title of the toplevel index +page: + + + / + + + + + Full-blown example ------------------ -- cgit v1.2.3 From a596e6195cde3a1af5d236a5f6c24ebfd56d9e0a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 8 Nov 2009 18:30:12 -0500 Subject: add sublevels to toc --- doc/tips/parentlinks_style.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/parentlinks_style.mdwn b/doc/tips/parentlinks_style.mdwn index 8b95cd396..f9dfa8f55 100644 --- a/doc/tips/parentlinks_style.mdwn +++ b/doc/tips/parentlinks_style.mdwn @@ -6,7 +6,7 @@ a subset of a page's parents. It also provides a few bonus possibilities, such as styling the parent links depending on their place in the path. -[[!toc ]] +[[!toc levels=2]] Content ======= -- cgit v1.2.3 From 65077372fab1e6fa30c3d143e4c68123557d8441 Mon Sep 17 00:00:00 2001 From: "http://www.openid.albertlash.com/openid/" Date: Sat, 14 Nov 2009 14:34:52 -0500 Subject: missing apostrophe in python code --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index ab6984494..e57144109 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -38,7 +38,7 @@ to adjust this script too: anchors = pagetable.getElementsByTagName("a") for a in anchors: print a.firstChild.toxml().\ - replace('&,'&').\ + replace('&','&').\ replace('<','<').\ replace('>','>') -- cgit v1.2.3 From 7b2571adf4ebe989043b9609b0c42ca96eada71d Mon Sep 17 00:00:00 2001 From: "http://www.openid.albertlash.com/openid/" Date: Sat, 14 Nov 2009 14:36:54 -0500 Subject: import sys and sys.argv --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index e57144109..45df683de 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -30,9 +30,10 @@ that this script is sensitive to the specific markup used on the page, so if you have tweaked your mediawiki theme a lot from the original, you will need to adjust this script too: + import sys from xml.dom.minidom import parse, parseString - dom = parse(argv[1]) + dom = parse(sys.argv[1]) tables = dom.getElementsByTagName("table") pagetable = tables[-1] anchors = pagetable.getElementsByTagName("a") -- cgit v1.2.3 From 182043667058d302d33aefa12dcb8678799d7fc7 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Tue, 17 Nov 2009 15:55:01 +0000 Subject: escape something being interpreted as a directive --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index 45df683de..3b8e5043c 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -118,7 +118,7 @@ into an ikiwiki tag name using a script such as pattern = r'\[\[Category:([^\]]+)\]\]' def manglecat(mo): - return '[[!tag %s]]' % mo.group(1).strip().replace(' ','_') + return '[\[!tag %s]]' % mo.group(1).strip().replace(' ','_') for line in sys.stdin.readlines(): res = re.match(pattern, line) -- cgit v1.2.3 From 07dcf7d6e75705ff0601cb5b9dcf8f00d8093dde Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Tue, 17 Nov 2009 15:56:42 +0000 Subject: shuffle commit symbol around --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index 3b8e5043c..9719d9a7e 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -118,7 +118,7 @@ into an ikiwiki tag name using a script such as pattern = r'\[\[Category:([^\]]+)\]\]' def manglecat(mo): - return '[\[!tag %s]]' % mo.group(1).strip().replace(' ','_') + return '\[[!tag %s]]' % mo.group(1).strip().replace(' ','_') for line in sys.stdin.readlines(): res = re.match(pattern, line) -- cgit v1.2.3 From 4adf2e27c671d6b5441762df34c5ad32d91defe3 Mon Sep 17 00:00:00 2001 From: ettienne Date: Tue, 24 Nov 2009 05:59:30 -0500 Subject: --- doc/tips/dot_cgi/discussion.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/dot_cgi/discussion.mdwn b/doc/tips/dot_cgi/discussion.mdwn index 124b9edff..a8854565c 100644 --- a/doc/tips/dot_cgi/discussion.mdwn +++ b/doc/tips/dot_cgi/discussion.mdwn @@ -34,3 +34,13 @@ there), and so I need to choose the more secure solution. --Ivan Z. >> The easiest way though is probably >> to add your ssh key to the special user's `.ssh/authorized_keys` >> and push that way. --[[Joey]] + +## apache2 - run from userdir +Followed instructions but couldn't get it right to run from user dir (running ubuntu jaunty), +Finally got it working once I've sym linked as follow (& restarted apache): +\# ln -s ../mods-available/userdir.load . +\# ln -s ../mods-available/userdir.conf . +\# pwd +/etc/apache2/mods-enabled + + -- cgit v1.2.3 From df66288c4db6f670e3c258058712c9835f0ebf20 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Mon, 30 Nov 2009 20:31:37 -0500 Subject: an alternative approach using a bare mirror --- doc/tips/laptop_wiki_with_git.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/laptop_wiki_with_git.mdwn b/doc/tips/laptop_wiki_with_git.mdwn index 9758beb80..e85f7d12b 100644 --- a/doc/tips/laptop_wiki_with_git.mdwn +++ b/doc/tips/laptop_wiki_with_git.mdwn @@ -1,3 +1,5 @@ +[[!toc]] + Using ikiwiki with the [[rcs/git]] backend, some interesting things can be done with creating mirrors (or, really, branches) of a wiki. In this tip, I'll assume your wiki is located on a server, and you want to take a copy with @@ -8,6 +10,8 @@ version on the laptop, perhaps while offline. You can browse and edit the wiki using a local web server. When you're ready, you can manually push the changes to the main wiki on the server. +## Original approach + First, set up the wiki on the server, if it isn't already. Nothing special needs to be done here, just follow the regular instructions in [[setup]] for setting up ikiwiki with git. @@ -49,3 +53,14 @@ update the wiki, with a command such as `ikiwiki -setup wiki.setup -refresh`. If you'd like it to automatically update when changes are merged in, you can simply make a symlink `post-merge` hook pointing at the `post-update` hook ikiwiki created. + +## Alternative Approach + +As above, set up a normal ikiwiki on the server, with the usual bare repository. + +Next, `git clone --mirror server:/path/to/bare/repository` + +This will be used as the $REPOSITORY on the laptop. Then you can follow the instructions in [[setup by hand|/setup/byhand]] as per a normal ikiwiki installation. +This means that you can clone from the local bare repository as many times as you want (thus being able to have a repository which is used by the ikiwiki CGI, and another which you can use for updating via git). + +When you want to update the server from the laptop, do a `git push` from within the laptop's bare repository, and likewise do a `git pull` to update the laptop from the server. -- cgit v1.2.3 From b042e4a0511a77df97d1be0657a2621bf1a1de1a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 1 Dec 2009 15:54:48 -0500 Subject: rename headers --- doc/tips/laptop_wiki_with_git.mdwn | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/laptop_wiki_with_git.mdwn b/doc/tips/laptop_wiki_with_git.mdwn index e85f7d12b..85e26c729 100644 --- a/doc/tips/laptop_wiki_with_git.mdwn +++ b/doc/tips/laptop_wiki_with_git.mdwn @@ -10,7 +10,7 @@ version on the laptop, perhaps while offline. You can browse and edit the wiki using a local web server. When you're ready, you can manually push the changes to the main wiki on the server. -## Original approach +## simple clone approach First, set up the wiki on the server, if it isn't already. Nothing special needs to be done here, just follow the regular instructions in [[setup]] @@ -54,13 +54,19 @@ If you'd like it to automatically update when changes are merged in, you can simply make a symlink `post-merge` hook pointing at the `post-update` hook ikiwiki created. -## Alternative Approach +## bare mirror approach As above, set up a normal ikiwiki on the server, with the usual bare repository. Next, `git clone --mirror server:/path/to/bare/repository` -This will be used as the $REPOSITORY on the laptop. Then you can follow the instructions in [[setup by hand|/setup/byhand]] as per a normal ikiwiki installation. -This means that you can clone from the local bare repository as many times as you want (thus being able to have a repository which is used by the ikiwiki CGI, and another which you can use for updating via git). +This will be used as the $REPOSITORY on the laptop. Then you can follow +the instructions in [[setup by hand|/setup/byhand]] as per a normal ikiwiki +installation. This means that you can clone from the local bare repository +as many times as you want (thus being able to have a repository which is +used by the ikiwiki CGI, and another which you can use for updating via +git). -When you want to update the server from the laptop, do a `git push` from within the laptop's bare repository, and likewise do a `git pull` to update the laptop from the server. +When you want to update the server from the laptop, do a `git push` from +within the laptop's bare repository, and likewise do a `git pull` to update +the laptop from the server. -- cgit v1.2.3 From 5a2ffaca16cd31db7fd4ba8ed709aeff75ef8b42 Mon Sep 17 00:00:00 2001 From: "http://salas.livejournal.com/" Date: Tue, 5 Jan 2010 04:33:34 +0000 Subject: --- doc/tips/optimising_ikiwiki.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/optimising_ikiwiki.mdwn b/doc/tips/optimising_ikiwiki.mdwn index cf166998b..5840f2eba 100644 --- a/doc/tips/optimising_ikiwiki.mdwn +++ b/doc/tips/optimising_ikiwiki.mdwn @@ -168,7 +168,7 @@ Finally, let's think about how huge number of pages can affect ikiwiki. quickly, but still, lots more pages will make PageSpecs more expensive. * The backlinks calculation has to consider every link on every page - in the wiki. (In practice, most pages only like to at most a few dozen + in the wiki. (In practice, most pages only link to at most a few dozen other pages, so this is not a `O(N^2)`, but closer to `O(N)`.) * Ikiwiki also reads and writes an `index` file, which contains information -- cgit v1.2.3 From e0590970b66409c9d31dee6301695a5a8f77cc18 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 4 Jan 2010 23:39:14 -0500 Subject: fix link --- doc/tips/optimising_ikiwiki.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/optimising_ikiwiki.mdwn b/doc/tips/optimising_ikiwiki.mdwn index 5840f2eba..f0ce1b0c3 100644 --- a/doc/tips/optimising_ikiwiki.mdwn +++ b/doc/tips/optimising_ikiwiki.mdwn @@ -64,7 +64,7 @@ smaller. \[[!inline pages="blog/* and link(tag)" show=0 archive=yes quick=yes]] -Only downsides: This won't show titles set by the [[!ikiwiki/directive/meta]] +Only downsides: This won't show titles set by the [[ikiwiki/directive/meta]] directive. And there's no RSS feed for users to use -- but if this page is only for the archives or tag for your blog, users should be subscribing to the blog's main page's RSS feed instead. -- cgit v1.2.3 From e22b1d05214ee90e7424f856dae43a35902950cf Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 4 Jan 2010 23:40:19 -0500 Subject: fix link --- doc/tips/optimising_ikiwiki.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/optimising_ikiwiki.mdwn b/doc/tips/optimising_ikiwiki.mdwn index f0ce1b0c3..14d619ff8 100644 --- a/doc/tips/optimising_ikiwiki.mdwn +++ b/doc/tips/optimising_ikiwiki.mdwn @@ -85,7 +85,7 @@ The resulting html file might get big and expensive to generate as you keep adding pages. First, consider removing the "show=title". Then the map will not show page -titles set by the [[!ikiwiki/directive/meta]] directive -- but will also +titles set by the [[ikiwiki/directive/meta]] directive -- but will also only need to be generated when pages are added or removed, not for every page change. -- cgit v1.2.3 From bcf74bd8f8b72abb6466fef1b6848dc4cb5eb7b2 Mon Sep 17 00:00:00 2001 From: MariaJackson Date: Thu, 28 Jan 2010 09:58:20 +0000 Subject: --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index 683a3f8ac..8e1ab2e56 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -8,6 +8,7 @@ there are some variations on the approach that might be useful: * Or, querying the mysql back-end to get the names * using WWW::MediaWiki for importing/exporting pages from the wiki, instead of Special::Export + * use pool covers Also, some detail on converting mediawiki transclusion to ikiwiki inlines... -- cgit v1.2.3 From 7f462b658953c7907d942e71a17b53a678b2ccc6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 28 Jan 2010 05:23:28 -0500 Subject: revert spam --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 1 - 1 file changed, 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index 8e1ab2e56..683a3f8ac 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -8,7 +8,6 @@ there are some variations on the approach that might be useful: * Or, querying the mysql back-end to get the names * using WWW::MediaWiki for importing/exporting pages from the wiki, instead of Special::Export - * use pool covers Also, some detail on converting mediawiki transclusion to ikiwiki inlines... -- cgit v1.2.3 From a2ee2aa9c733b2a8df1fc564e5634abe7d209c05 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 29 Jan 2010 16:05:45 -0500 Subject: note on filtering --- doc/tips/add_chatterbox_to_blog.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/add_chatterbox_to_blog.mdwn b/doc/tips/add_chatterbox_to_blog.mdwn index aa35b9331..e07e36b07 100644 --- a/doc/tips/add_chatterbox_to_blog.mdwn +++ b/doc/tips/add_chatterbox_to_blog.mdwn @@ -18,4 +18,7 @@ from there, like I have on [my blog](http://kitenet.net/~joey/blog/) show=5 feeds=no]] """]] +* To filter out `@-replies`, append "and !*@*" to the [[ikiwiki/PageSpec]]. + The same technique can be used for other filtering. + Note: Works best with ikiwiki 3.10 or better. -- cgit v1.2.3 From 06a56ea9d51d472175cb9279d92f9fb7a62fdf46 Mon Sep 17 00:00:00 2001 From: Javier Rojas Date: Mon, 8 Feb 2010 23:32:05 -0500 Subject: added tip about page navigation from within vim --- doc/tips/follow_wikilinks_from_inside_vim.mdwn | 43 ++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 doc/tips/follow_wikilinks_from_inside_vim.mdwn (limited to 'doc/tips') diff --git a/doc/tips/follow_wikilinks_from_inside_vim.mdwn b/doc/tips/follow_wikilinks_from_inside_vim.mdwn new file mode 100644 index 000000000..93a95bc7a --- /dev/null +++ b/doc/tips/follow_wikilinks_from_inside_vim.mdwn @@ -0,0 +1,43 @@ +The [ikiwiki-nav](http://www.vim.org/scripts/script.php?script_id=2968) plugin +for vim eases the editing of IkiWiki wikis, by letting you "follow" the +wikilinks on your file (page), and loading the file associated with a given +wikilink in vim. The plugin takes care of following the ikiwiki linking rules +to figure out which file a wikilink points to + +The plugin also includes commands (and mappings) to make the cursor jump to the +previous/next wikilink in the current file + +## Jumping to pages + +To open the file associated to a wikilink, place the cursor over its text, and +hit Enter (``). This functionality is also available through the +`:IkiJumpToPage` command + +## Moving to next/previous wikilink in current file + +`Ctrl-j` will move the cursor to the next wikilink. `Ctrl-k` will move it to the +previous wikilink. This functionality is also available through the +`:IkiNextWikiLink` command. This command takes one argument, the direction to +move into + + * `:IkiNextWikiLink 0` will look forward for the wikilink + * `:IkiNextWikiLink 1` will look backwards for the wikilink + +## Current issues: + + * The plugin only works for wikilinks contained in a single text line; + multiline wikilinks are not (yet) seen as such + +## Notes + +The official releases of the plugin are in the +[vim.org script page](http://www.vim.org/scripts/script.php?script_id=2968) + +The latest version of this script can be found in the following location + + + +Any feedback you can provide is appreciated; the contact details can be found +inside the plugin + +[[!tag vim]] -- cgit v1.2.3 From 59868bce02f10e1ed378f5625618198daca58d3a Mon Sep 17 00:00:00 2001 From: Javier Rojas Date: Mon, 8 Feb 2010 23:37:24 -0500 Subject: more notes about the ikiwiki-nav plugin added installation notes added pointer in the forum page to the created tip --- doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn | 4 ++++ doc/tips/follow_wikilinks_from_inside_vim.mdwn | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'doc/tips') diff --git a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn index 0497b66b6..980b92740 100644 --- a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn +++ b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn @@ -1,3 +1,7 @@ +**UPDATE** I have created a [[page|tips/follow_wikilinks_from_inside_vim]] in +the tips section about the plugin, how to get it, install it and use it. Check +that out. --[[jerojasro]] + I wrote a vim function to help me navigate the wiki when I'm editing it. It extends the 'gf' (goto file) functionality. Once installed, you place the cursor on a wiki page name and press 'gf' (without the quotes); if the file exists, it gets loaded. This function takes into account the ikiwiki linking rules when deciding which file to go to. diff --git a/doc/tips/follow_wikilinks_from_inside_vim.mdwn b/doc/tips/follow_wikilinks_from_inside_vim.mdwn index 93a95bc7a..df8145a51 100644 --- a/doc/tips/follow_wikilinks_from_inside_vim.mdwn +++ b/doc/tips/follow_wikilinks_from_inside_vim.mdwn @@ -23,6 +23,10 @@ move into * `:IkiNextWikiLink 0` will look forward for the wikilink * `:IkiNextWikiLink 1` will look backwards for the wikilink +## Installation + +Copy the `ikiwiki_nav.vim` file to your `.vim/ftplugin` directory. + ## Current issues: * The plugin only works for wikilinks contained in a single text line; -- cgit v1.2.3 From f48e98a2ac0325f3e17b2c25151aa6af4ba93b20 Mon Sep 17 00:00:00 2001 From: Javier Rojas Date: Mon, 8 Feb 2010 23:39:06 -0500 Subject: redaction --- doc/tips/follow_wikilinks_from_inside_vim.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/follow_wikilinks_from_inside_vim.mdwn b/doc/tips/follow_wikilinks_from_inside_vim.mdwn index df8145a51..015a4ecee 100644 --- a/doc/tips/follow_wikilinks_from_inside_vim.mdwn +++ b/doc/tips/follow_wikilinks_from_inside_vim.mdwn @@ -1,6 +1,6 @@ The [ikiwiki-nav](http://www.vim.org/scripts/script.php?script_id=2968) plugin for vim eases the editing of IkiWiki wikis, by letting you "follow" the -wikilinks on your file (page), and loading the file associated with a given +wikilinks on your file (page), by loading the file associated with a given wikilink in vim. The plugin takes care of following the ikiwiki linking rules to figure out which file a wikilink points to -- cgit v1.2.3 From 5b55237ab14b9916bf51dff06d9a12c9ad81d21e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 10 Feb 2010 12:51:11 -0500 Subject: add a link to another vim plugin --- doc/tips/vim_syntax_highlighting.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/vim_syntax_highlighting.mdwn b/doc/tips/vim_syntax_highlighting.mdwn index 172b763c3..416318f28 100644 --- a/doc/tips/vim_syntax_highlighting.mdwn +++ b/doc/tips/vim_syntax_highlighting.mdwn @@ -1,4 +1,6 @@ [[ikiwiki.vim]] is a vim syntax highlighting file for ikiwiki -[[ikiwiki/markdown]] files. +[[ikiwiki/markdown]] files. Installation instructions are at the top of the file. + +See also: [[navigation_of_wiki_pages_on_local_filesystem_with_vim]] -- cgit v1.2.3 From 8e75bcd2dc192da1e649ae70c3dd6a181367eb2c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 10 Feb 2010 12:55:46 -0500 Subject: fix --- doc/tips/vim_syntax_highlighting.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/vim_syntax_highlighting.mdwn b/doc/tips/vim_syntax_highlighting.mdwn index 416318f28..18b2f1c92 100644 --- a/doc/tips/vim_syntax_highlighting.mdwn +++ b/doc/tips/vim_syntax_highlighting.mdwn @@ -3,4 +3,5 @@ Installation instructions are at the top of the file. -See also: [[navigation_of_wiki_pages_on_local_filesystem_with_vim]] +See also: [[follow_wikilinks_from_inside_vim]] +[[!tag vim]] -- cgit v1.2.3 From a982b9cf193445dccec0e9ba87eeed324825c2cc Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Mon, 1 Mar 2010 13:14:48 +0000 Subject: new tip: spam and software sites --- doc/tips/spam_and_softwaresites.mdwn | 86 ++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 doc/tips/spam_and_softwaresites.mdwn (limited to 'doc/tips') diff --git a/doc/tips/spam_and_softwaresites.mdwn b/doc/tips/spam_and_softwaresites.mdwn new file mode 100644 index 000000000..fe73518ef --- /dev/null +++ b/doc/tips/spam_and_softwaresites.mdwn @@ -0,0 +1,86 @@ +Any wiki with a form of web-editing enabled will have to deal with +spam. (See the [[plugins/blogspam]] plugin for one defensive tool you +can deploy). + +If: + + * you are using ikiwiki to manage the website for a [[examples/softwaresite]] + * you allow web-based commits, to let people correct documentation, or report + bugs, etc. + * the documentation is stored in the same revision control repository as your + software + +It is undesirable to have your software's VCS history tainted by spam and spam +clean-up commits. Here is one approach you can use to prevent this. This +example is for the [[git]] version control system, but the principles should +apply to others. + +## Isolate web commits to a specific branch + +Create a separate branch to contain web-originated edits (named `doc` in this +example): + + $ git checkout -b doc + +Adjust your setup file accordingly: + + gitmaster_branch => 'doc', + +## merging good web commits into the master branch + +You will want to periodically merge legitimate web-based commits back into +your master branch. Ensure that there is no spam in the documentation +branch. If there is, see 'erase spam from the commit history', below, first. + +Once you are confident it's clean: + + # ensure you are on the doc branch + $ git branch + doc + * master + $ git merge --ff doc + +## removing spam + +### short term + +In the short term, just revert the spammy commit. + +If the spammy commit was the top-most: + + $ git revert HEAD + +This will clean the spam out of the files, but it will leave both the spam +commit and the revert commit in the history. + +### erase spam from the commit history + +Git allows you to rewrite your commit history. We will take advantage of this +to eradicate spam from the history of the doc branch. + +This is a useful tool, but it is considered bad practise to rewrite the +history of public repositories. If your software's repository is public, you +should make it clear that the history of the `doc` branch in your repository +is unstable. + +Once you have been spammed, use `git rebase` to remove the spam commits from +the history. Assuming that your `doc` branch was split off from a branch +called `master`: + + # ensure you are on the doc branch + $ git branch + * doc + master + $ git rebase --interactive master + +In your editor session, you will see a series of lines for each commit made to +the `doc` branch since it was branched from `master` (or since the last merge +back into `master`). Delete the lines corresponding to spammy commits, then +save and exit your editor. + +Caveat: if there are no commits you want to keep (i.e. all the commits since +the last merge into master are either spam or spam reverts) then `git rebase` +will abort. Therefore, this approach only works if you have at least one +non-spam commit to the documentation since the last merge into `master`. For +this reason, it's best to tackle spam with reverts until you have at least one +commit you want merged back into the main history. -- cgit v1.2.3 From 823ec815d4fc9625d6fa3553ad03e9f2ff737659 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 14 Mar 2010 14:58:13 -0400 Subject: 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.) --- IkiWiki.pm | 13 +++++++++++++ debian/changelog | 4 ++++ doc/tips/htaccess_file.mdwn | 30 ++++++++++++++++++++++++++++++ doc/todo/enable-htaccess-files.mdwn | 5 +++++ doc/usage.mdwn | 6 ++++++ ikiwiki.in | 3 +++ 6 files changed, 61 insertions(+) create mode 100644 doc/tips/htaccess_file.mdwn (limited to 'doc/tips') diff --git a/IkiWiki.pm b/IkiWiki.pm index 251ed8cc8..ee94ce659 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -334,6 +334,15 @@ sub getsetup () { safe => 0, # paranoia rebuild => 0, }, + include => { + type => "string", + default => undef, + example => '^\.htaccess$', + description => "regexp of normally ignored source files to include", + advanced => 1, + safe => 0, # regexp + rebuild => 1, + }, exclude => { type => "string", default => undef, @@ -1820,6 +1829,10 @@ sub file_pruned ($;$) { $file =~ s#^\Q$base\E/+##; } + if (defined $config{include} && length $config{include}) { + return 0 if $file =~ m/$config{include}/; + } + my $regexp='('.join('|', @{$config{wiki_file_prune_regexps}}).')'; return $file =~ m/$regexp/; } diff --git a/debian/changelog b/debian/changelog index 92afe661f..e5347e2a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,10 @@ ikiwiki (3.20100313) UNRELEASED; urgency=low as used by yahoo and google urls. * Add complete German basewiki and directives translation done by Sebastian Kuhnert. + * 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.) -- Joey Hess Sat, 13 Mar 2010 14:48:10 -0500 diff --git a/doc/tips/htaccess_file.mdwn b/doc/tips/htaccess_file.mdwn new file mode 100644 index 000000000..5266eba41 --- /dev/null +++ b/doc/tips/htaccess_file.mdwn @@ -0,0 +1,30 @@ +If you try to include a `.htaccess` file in your wiki's source, in order to +configure the web server, you'll find that ikiwiki excludes it from +processing. In fact, ikiwiki excludes any file starting with a dot, as well +as a lot of other files, for good security reasons. + +You can tell ikiwiki not to exclude the .htaccess file by adding this to +your setup file: + + include => '^\.htaccess$', + +Caution! Before you do that, please think for a minute about who can edit +your wiki. Are attachment uploads enabled? Can users commit changes +directly to the version control system? Do you trust everyone who can +make a change to not do Bad Things with the htaccess file? Do you trust +everyone who *might* be able to make a change in the future? Note that a +determined attacker who can write to the htaccess file can probably get a +shell on your web server. + +If any of these questions have given you pause, I suggest you find a +different way to configure the web server. One way is to not put the +`.htaccess` file under ikiwiki's control, and just manually install it +in the destdir. + +[Apache's documentation](http://httpd.apache.org/docs/1.3/howto/htaccess.html) +says +> In general, you should never use .htaccess files unless you don't have +> access to the main server configuration file. +This is good advice -- if you can edit apache's main configuration files, +then you should not use a htaccess file. +--[[Joey]] diff --git a/doc/todo/enable-htaccess-files.mdwn b/doc/todo/enable-htaccess-files.mdwn index 412cb5eba..c895db75d 100644 --- a/doc/todo/enable-htaccess-files.mdwn +++ b/doc/todo/enable-htaccess-files.mdwn @@ -61,3 +61,8 @@ It should be off by default of course. --Max +1 for various purposes (but sometimes the filename isn't `.htaccess`, so please make it configurable) --[[schmonz]] > I've described a workaround for one use case at the [[plugins/rsync]] [[plugins/rsync/discussion]] page. --[[schmonz]] + +--- + +[[done]], you can use the `include` setting to override the default +excludes now. Please use extreme caution when doing so. --[[Joey]] diff --git a/doc/usage.mdwn b/doc/usage.mdwn index a105d7e59..f735170f0 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -234,6 +234,12 @@ also be configured using a setup file. Specifies a rexexp of source files to exclude from processing. May be specified multiple times to add to exclude list. +* --include regexp + + Specifies a rexexp of source files, that would normally be excluded, + but that you wish to include in processing. + May be specified multiple times to add to include list. + * --adminuser name Specifies a username of a user (or, if openid is enabled, an openid) diff --git a/ikiwiki.in b/ikiwiki.in index ae1251ff6..da5555629 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -65,6 +65,9 @@ sub getconfig () { "exclude=s@" => sub { push @{$config{wiki_file_prune_regexps}}, $_[1]; }, + "include=s@" => sub { + $config{include}=defined $config{include} && length $config{include} ? "$config{include}|$_[1]" : $_[1]; + }, "adminuser=s@" => sub { push @{$config{adminuser}}, $_[1] }, -- cgit v1.2.3 From ceadd862930411fed21eab16c428227fdcdc10ba Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 14 Mar 2010 15:26:24 -0400 Subject: update --- doc/tips/htaccess_file.mdwn | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/htaccess_file.mdwn b/doc/tips/htaccess_file.mdwn index 5266eba41..7b4b0901a 100644 --- a/doc/tips/htaccess_file.mdwn +++ b/doc/tips/htaccess_file.mdwn @@ -22,9 +22,7 @@ different way to configure the web server. One way is to not put the in the destdir. [Apache's documentation](http://httpd.apache.org/docs/1.3/howto/htaccess.html) -says +says: > In general, you should never use .htaccess files unless you don't have > access to the main server configuration file. -This is good advice -- if you can edit apache's main configuration files, -then you should not use a htaccess file. --[[Joey]] -- cgit v1.2.3 From d958e96b01ca459055b2c34f140f7c6ec7168f92 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 14 Mar 2010 15:28:50 -0400 Subject: update --- doc/tips/htaccess_file.mdwn | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/htaccess_file.mdwn b/doc/tips/htaccess_file.mdwn index 7b4b0901a..0c1b0f2f7 100644 --- a/doc/tips/htaccess_file.mdwn +++ b/doc/tips/htaccess_file.mdwn @@ -19,10 +19,9 @@ shell on your web server. If any of these questions have given you pause, I suggest you find a different way to configure the web server. One way is to not put the `.htaccess` file under ikiwiki's control, and just manually install it -in the destdir. +in the destdir. --[[Joey]] [Apache's documentation](http://httpd.apache.org/docs/1.3/howto/htaccess.html) says: > In general, you should never use .htaccess files unless you don't have > access to the main server configuration file. ---[[Joey]] -- cgit v1.2.3 From aa36cd66baeca85ca4bca1c35c43b7a01c8a5cf7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 14 Mar 2010 15:30:18 -0400 Subject: update --- doc/tips/htaccess_file.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/htaccess_file.mdwn b/doc/tips/htaccess_file.mdwn index 0c1b0f2f7..6964cf24e 100644 --- a/doc/tips/htaccess_file.mdwn +++ b/doc/tips/htaccess_file.mdwn @@ -21,7 +21,7 @@ different way to configure the web server. One way is to not put the `.htaccess` file under ikiwiki's control, and just manually install it in the destdir. --[[Joey]] -[Apache's documentation](http://httpd.apache.org/docs/1.3/howto/htaccess.html) +[Apache's documentation](http://httpd.apache.org/docs/2.2/howto/htaccess.html) says: > In general, you should never use .htaccess files unless you don't have > access to the main server configuration file. -- cgit v1.2.3 From 9a6a28512025c91b7518d8c9b69678e124c44128 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Thu, 18 Mar 2010 22:33:18 +0000 Subject: corrected the update-the-laptop-from-the-server section --- doc/tips/laptop_wiki_with_git.mdwn | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/laptop_wiki_with_git.mdwn b/doc/tips/laptop_wiki_with_git.mdwn index 85e26c729..857083325 100644 --- a/doc/tips/laptop_wiki_with_git.mdwn +++ b/doc/tips/laptop_wiki_with_git.mdwn @@ -68,5 +68,12 @@ used by the ikiwiki CGI, and another which you can use for updating via git). When you want to update the server from the laptop, do a `git push` from -within the laptop's bare repository, and likewise do a `git pull` to update -the laptop from the server. +within the laptop's bare repository. + +To update the laptop from the server, add a section for the laptop to the config file of the server's bare repository: + + [remote "laptop"] + fetch = +refs/*:refs/* + url = me@laptop:/path/to/bare/repository + +Then do a `git push laptop` from within the server's bare repository. -- cgit v1.2.3 From af83b4c5f576633c03c157a67994af6bfaff617a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 19 Mar 2010 13:40:02 -0400 Subject: Revert "corrected the update-the-laptop-from-the-server section" No, we don't normally push from servers to laptops. Because most laptops do not have publicly accessible IP addresses, for one thing. Also because there's really no reason to ssh to the server from your laptop in order to update the laptop when you can just pull. --- doc/tips/laptop_wiki_with_git.mdwn | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/laptop_wiki_with_git.mdwn b/doc/tips/laptop_wiki_with_git.mdwn index 857083325..85e26c729 100644 --- a/doc/tips/laptop_wiki_with_git.mdwn +++ b/doc/tips/laptop_wiki_with_git.mdwn @@ -68,12 +68,5 @@ used by the ikiwiki CGI, and another which you can use for updating via git). When you want to update the server from the laptop, do a `git push` from -within the laptop's bare repository. - -To update the laptop from the server, add a section for the laptop to the config file of the server's bare repository: - - [remote "laptop"] - fetch = +refs/*:refs/* - url = me@laptop:/path/to/bare/repository - -Then do a `git push laptop` from within the server's bare repository. +within the laptop's bare repository, and likewise do a `git pull` to update +the laptop from the server. -- cgit v1.2.3 From 6dc6fe2f9bc6bcd532291c703a637d24dfe58956 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 19 Mar 2010 13:45:43 -0400 Subject: fix apparently confusing wording --- doc/tips/laptop_wiki_with_git.mdwn | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/laptop_wiki_with_git.mdwn b/doc/tips/laptop_wiki_with_git.mdwn index 85e26c729..cfa565d1a 100644 --- a/doc/tips/laptop_wiki_with_git.mdwn +++ b/doc/tips/laptop_wiki_with_git.mdwn @@ -67,6 +67,5 @@ as many times as you want (thus being able to have a repository which is used by the ikiwiki CGI, and another which you can use for updating via git). -When you want to update the server from the laptop, do a `git push` from -within the laptop's bare repository, and likewise do a `git pull` to update -the laptop from the server. +Use standard git commands, run in the laptop's bare git repository +to handle pulling from and pushing to the server. -- cgit v1.2.3 From 9fb3409613d32e447ababb99bc963867b80340e9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 19 Mar 2010 17:58:40 -0400 Subject: new tip --- doc/tips/yaml_setup_files.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/tips/yaml_setup_files.mdwn (limited to 'doc/tips') diff --git a/doc/tips/yaml_setup_files.mdwn b/doc/tips/yaml_setup_files.mdwn new file mode 100644 index 000000000..4ae0de4aa --- /dev/null +++ b/doc/tips/yaml_setup_files.mdwn @@ -0,0 +1,10 @@ +Here's how to convert your existing standard format ikiwiki setup file into +the new YAML format recently added to ikiwiki. + +1. First, make sure you have the [[!cpan YAML]] perl module installed. + (Run: `apt-get install libyaml-perl`) +2. Run: `ikiwiki -setup my.setup -dumpsetup my.setup --set setuptype=Yaml` + +The format of the YAML setup file should be fairly self-explanatory. + +--[[Joey]] -- cgit v1.2.3 From ec110abc6d412db5f65ea5b9311596bbe7799fd4 Mon Sep 17 00:00:00 2001 From: Redtexture Date: Sun, 28 Mar 2010 12:21:51 +0000 Subject: add "wait" (best to wait to tackle...) --- doc/tips/spam_and_softwaresites.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/spam_and_softwaresites.mdwn b/doc/tips/spam_and_softwaresites.mdwn index fe73518ef..78a35ff05 100644 --- a/doc/tips/spam_and_softwaresites.mdwn +++ b/doc/tips/spam_and_softwaresites.mdwn @@ -82,5 +82,5 @@ Caveat: if there are no commits you want to keep (i.e. all the commits since the last merge into master are either spam or spam reverts) then `git rebase` will abort. Therefore, this approach only works if you have at least one non-spam commit to the documentation since the last merge into `master`. For -this reason, it's best to tackle spam with reverts until you have at least one +this reason, it's best wait to tackle spam with reverts until you have at least one commit you want merged back into the main history. -- cgit v1.2.3 From 9c6b12fe3de453869be7fa2ae5c1d07e9751a69c Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Sun, 28 Mar 2010 14:52:03 +0000 Subject: revert misleading clarification, and try to clarify better --- doc/tips/spam_and_softwaresites.mdwn | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/spam_and_softwaresites.mdwn b/doc/tips/spam_and_softwaresites.mdwn index 78a35ff05..507858c0c 100644 --- a/doc/tips/spam_and_softwaresites.mdwn +++ b/doc/tips/spam_and_softwaresites.mdwn @@ -82,5 +82,6 @@ Caveat: if there are no commits you want to keep (i.e. all the commits since the last merge into master are either spam or spam reverts) then `git rebase` will abort. Therefore, this approach only works if you have at least one non-spam commit to the documentation since the last merge into `master`. For -this reason, it's best wait to tackle spam with reverts until you have at least one -commit you want merged back into the main history. +this reason, it's best to wait until you have at least one +commit you want merged back into the main history before doing a rebase, +and until then, tackle spam with reverts. -- cgit v1.2.3 From 53c8e674ace50d8733e913e8cfa5d40793e5019d Mon Sep 17 00:00:00 2001 From: PaulePanter Date: Wed, 14 Apr 2010 17:38:39 +0000 Subject: Correct comment. We want to merge the branch *doc* into branch *master* as the sample output suggests. --- doc/tips/spam_and_softwaresites.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/spam_and_softwaresites.mdwn b/doc/tips/spam_and_softwaresites.mdwn index 507858c0c..a07889e6b 100644 --- a/doc/tips/spam_and_softwaresites.mdwn +++ b/doc/tips/spam_and_softwaresites.mdwn @@ -34,7 +34,7 @@ branch. If there is, see 'erase spam from the commit history', below, first. Once you are confident it's clean: - # ensure you are on the doc branch + # ensure you are on the master branch $ git branch doc * master -- cgit v1.2.3 From b14f84c4acccbc8450a9102b3b647013989b27bb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 16 Apr 2010 17:02:29 -0400 Subject: --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. --- IkiWiki.pm | 8 +++++-- IkiWiki/Plugin/bzr.pm | 5 +++++ IkiWiki/Plugin/cvs.pm | 5 +++++ IkiWiki/Plugin/darcs.pm | 5 +++++ IkiWiki/Plugin/git.pm | 5 +++++ IkiWiki/Plugin/mercurial.pm | 5 +++++ IkiWiki/Plugin/monotone.pm | 5 +++++ IkiWiki/Plugin/norcs.pm | 7 +++++- IkiWiki/Plugin/svn.pm | 5 +++++ IkiWiki/Plugin/tla.pm | 5 +++++ IkiWiki/Render.pm | 18 +++++++++++++--- debian/changelog | 5 +++++ .../How_does_ikiwiki_remember_times__63__.mdwn | 25 ++++++---------------- ...old_repository_to_new_ikiwiki_system__63__.mdwn | 4 ---- doc/plugins/write.mdwn | 7 ++++++ doc/rcs.mdwn | 8 +++++-- doc/tips/Importing_posts_from_Wordpress.mdwn | 2 +- doc/tips/inside_dot_ikiwiki/discussion.mdwn | 7 +++--- doc/todo/auto_getctime_on_fresh_build.mdwn | 8 +++++-- doc/usage.mdwn | 10 ++++----- ikiwiki.in | 3 ++- mtime-to-git | 14 ------------ 22 files changed, 109 insertions(+), 57 deletions(-) delete mode 100755 mtime-to-git (limited to 'doc/tips') diff --git a/IkiWiki.pm b/IkiWiki.pm index 1730e476a..7655dada5 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -440,10 +440,10 @@ sub getsetup () { safe => 0, rebuild => 0, }, - getctime => { + gettime => { type => "internal", default => 0, - description => "running in getctime mode", + description => "running in gettime mode", safe => 0, rebuild => 0, }, @@ -1790,6 +1790,10 @@ sub rcs_getctime ($) { $hooks{rcs}{rcs_getctime}{call}->(@_); } +sub rcs_getmtime ($) { + $hooks{rcs}{rcs_getmtime}{call}->(@_); +} + sub rcs_receive () { $hooks{rcs}{rcs_receive}{call}->(); } diff --git a/IkiWiki/Plugin/bzr.pm b/IkiWiki/Plugin/bzr.pm index 0efc26b49..f79ca7c8f 100644 --- a/IkiWiki/Plugin/bzr.pm +++ b/IkiWiki/Plugin/bzr.pm @@ -20,6 +20,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub checkconfig () { @@ -306,4 +307,8 @@ sub rcs_getctime ($) { return $ctime; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for bzr\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/cvs.pm b/IkiWiki/Plugin/cvs.pm index 26a3e9dd2..360d97249 100644 --- a/IkiWiki/Plugin/cvs.pm +++ b/IkiWiki/Plugin/cvs.pm @@ -49,6 +49,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub genwrapper () { @@ -485,4 +486,8 @@ sub rcs_getctime ($) { return $date; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for cvs\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/darcs.pm b/IkiWiki/Plugin/darcs.pm index bc8394b90..c1d6661d3 100644 --- a/IkiWiki/Plugin/darcs.pm +++ b/IkiWiki/Plugin/darcs.pm @@ -18,6 +18,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub silentsystem (@) { @@ -427,4 +428,8 @@ sub rcs_getctime ($) { return $date; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for darcs\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index b02f4a5ed..86d80186f 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -25,6 +25,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); hook(type => "rcs", id => "rcs_receive", call => \&rcs_receive); } @@ -634,6 +635,10 @@ sub rcs_getctime ($) { return $ctime; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for git\n"; # TODO +} + sub rcs_receive () { # The wiki may not be the only thing in the git repo. # Determine if it is in a subdirectory by examining the srcdir, diff --git a/IkiWiki/Plugin/mercurial.pm b/IkiWiki/Plugin/mercurial.pm index ea00a3364..34e009c7a 100644 --- a/IkiWiki/Plugin/mercurial.pm +++ b/IkiWiki/Plugin/mercurial.pm @@ -20,6 +20,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub checkconfig () { @@ -254,4 +255,8 @@ sub rcs_getctime ($) { return $ctime; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for mercurial\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/monotone.pm b/IkiWiki/Plugin/monotone.pm index c33cf7e3a..67d4abbaa 100644 --- a/IkiWiki/Plugin/monotone.pm +++ b/IkiWiki/Plugin/monotone.pm @@ -23,6 +23,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub checkconfig () { @@ -693,4 +694,8 @@ sub rcs_getctime ($) { return $date; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for monotone\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/norcs.pm b/IkiWiki/Plugin/norcs.pm index e6a05a3c5..053652a5f 100644 --- a/IkiWiki/Plugin/norcs.pm +++ b/IkiWiki/Plugin/norcs.pm @@ -18,6 +18,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub getsetup () { @@ -63,7 +64,11 @@ sub rcs_diff ($) { } sub rcs_getctime ($) { - error gettext("getctime not implemented"); + return 0; +} + +sub rcs_getmtime ($) { + return 0; } 1 diff --git a/IkiWiki/Plugin/svn.pm b/IkiWiki/Plugin/svn.pm index 7d27ec842..85c205f09 100644 --- a/IkiWiki/Plugin/svn.pm +++ b/IkiWiki/Plugin/svn.pm @@ -19,6 +19,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub checkconfig () { @@ -379,4 +380,8 @@ sub rcs_getctime ($) { return $date; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for svn\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/tla.pm b/IkiWiki/Plugin/tla.pm index 764da9b98..f5ad0cc96 100644 --- a/IkiWiki/Plugin/tla.pm +++ b/IkiWiki/Plugin/tla.pm @@ -18,6 +18,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub checkconfig () { @@ -284,4 +285,8 @@ sub rcs_getctime ($) { return $date; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for tla\n"; # TODO +} + 1 diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index e98888d76..e1cb68462 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -365,14 +365,26 @@ sub find_new_files ($) { } else { push @new, $file; - if ($config{getctime} && -e "$config{srcdir}/$file") { + if ($config{gettime} && -e "$config{srcdir}/$file") { eval { - my $time=rcs_getctime("$config{srcdir}/$file"); - $pagectime{$page}=$time; + my $ctime=rcs_getctime("$config{srcdir}/$file"); + if ($ctime > 0) { + $pagectime{$page}=$ctime; + } }; if ($@) { print STDERR $@; } + my $mtime; + eval { + my $mtime=rcs_getmtime("$config{srcdir}/$file"); + }; + if ($@) { + print STDERR $@; + } + elsif ($mtime > 0) { + utime($mtime, $mtime, "$config{srcdir}/$file"); + } } } $pagecase{lc $page}=$page; diff --git a/debian/changelog b/debian/changelog index 737d73655..615d5916f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -44,6 +44,11 @@ ikiwiki (3.20100415) UNRELEASED; urgency=low * conditional: Fix bug that forced "all" mode off by default. * calendarmonth.tmpl: The month calendar is now put in a sidebar. * calendar: Improved display of arrows. + * 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. -- Joey Hess Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn index 6ce576db1..6b7739fd0 100644 --- a/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn +++ b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn @@ -20,15 +20,17 @@ Do I have it right? > Some VCS, like git, set the file mtimes to the current time > when making a new checkout, so they will be lost if you do that. > The creation times can be retrived using the `--getctime` option. -> I suppose it might be nice if there were a `--getmtime` that pulled -> true modification times out of the VCS, but I haven't found it a big -> deal in practice for the last modification times to be updated to the -> current time when rebuilding a wiki like this. --[[Joey]] +> --[[Joey]] > > > Thanks for the clarification. I ran some tests of my own to make sure I understand it right, and I'm satisfied > > that the order of posts in my blog can be retrieved from the VCS using the `--getctime` option, at least if I > > choose to order my posts by creation time rather than modification time. But I now know that I can't rely on > > page modification times in ikiwiki as these can be lost permanently. +> +> > > Update: It's now renamed to `--gettime`, and pulls both the creation +> > > and modification times. Also, per [[todo/auto_getctime_on_fresh_build]], +> > > this is now done automatically the first time ikiwiki builds a +> > > srcdir. So, no need to worry about this any more! --[[Joey]] > > > > I would suggest that there should at least be a `--getmtime` option like you describe, and perhaps that > > `--getctime` and `--getmtime` be _on by default_. In my opinion the creation times and modification times of @@ -91,19 +93,6 @@ Do I have it right? > A quick workaround for me to get modification times right is the following > little zsh script, which unfortunately only works for git: - #!/usr/bin/env zsh - - set +x - - for FILE in **/*(.); do - TIMES="`git log --pretty=format:%ai $FILE`" - MTIME="`echo $TIMES | head -n1`" - - if [ ! -z $MTIME ]; then - echo touch -m -d "$MTIME" $FILE - touch -m -d "$MTIME" $FILE - fi - - done +>> Elided; no longer needed since --gettime does that, and much faster! --[[Joey]] > --[[David_Riebenbauer]] diff --git a/doc/forum/Migrating_old_repository_to_new_ikiwiki_system__63__.mdwn b/doc/forum/Migrating_old_repository_to_new_ikiwiki_system__63__.mdwn index fe67e6aba..d7a33b526 100644 --- a/doc/forum/Migrating_old_repository_to_new_ikiwiki_system__63__.mdwn +++ b/doc/forum/Migrating_old_repository_to_new_ikiwiki_system__63__.mdwn @@ -20,10 +20,6 @@ How do I set up an ikiwiki system using a pre-existing repository (instead of cr > recreate the ikiwiki srcdir > 3. `git clone` from the bare git repository a second time, > to create a checkout you can manually edit (optional) -> 4. run `ikiwiki --getctime --setup your.setup` -> The getctime will ensure page creation times are accurate -> by putting the info out of the git history, -> and only needs to be done once. > > If you preserved your repository, but not the setup file, > the easiest way to make one is probably to run diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 707622956..cf7044b2c 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -1085,6 +1085,13 @@ it up in the history. It's ok if this is not implemented, and throws an error. +#### `rcs_getmtime($)` + +This is used to get the page modification time for a file from the RCS, by +looking it up in the history. + +It's ok if this is not implemented, and throws an error. + #### `rcs_receive()` This is called when ikiwiki is running as a pre-receive hook (or diff --git a/doc/rcs.mdwn b/doc/rcs.mdwn index 4e7a8d2a6..b5bfc2414 100644 --- a/doc/rcs.mdwn +++ b/doc/rcs.mdwn @@ -14,8 +14,10 @@ use, some advanced or special features are not supported in all of them. Lack of support in [[ikiwiki-makerepo]] or auto.setup can make it harder to set up a wiki using that revision control system. The `rcs_commit_staged` hook is needed to use [[attachments|plugins/attachment]] or -[[plugins/comments]]. And so on. The table below summarises this for each -revision control system and links to more information about each. +[[plugins/comments]]. `rcs_getctime` may be implemented in a fast way +(ie, one log lookup for all files), or very slowly (one lookup per file). +And so on. The table below summarises this for each revision control +system and links to more information about each. [[!table data=""" feature |[[git]]|[[svn]]|[[bzr]] |[[monotone]]|[[mercurial]]|[[darcs]]|[[tla]] |[[cvs]] @@ -25,6 +27,8 @@ auto.setup |yes |yes |incomplete|yes |incomplete |yes `rcs_rename` |yes |yes |yes |yes |no |yes |no |yes `rcs_remove` |yes |yes |yes |yes |no |yes |no |yes `rcs_diff` |yes |yes |yes |yes |no |yes |yes |yes +`rcs_getctime` |fast |slow |slow |slow |slow |slow |slow |slow +`rcs_getmtime` |fast |no |no |no |no |no |no |no anonymous push |yes |no |no |no |no |no |no |no conflict handling |yes |yes |yes |buggy |yes |yes |yes |yes """]] diff --git a/doc/tips/Importing_posts_from_Wordpress.mdwn b/doc/tips/Importing_posts_from_Wordpress.mdwn index 59330caa4..8774c9723 100644 --- a/doc/tips/Importing_posts_from_Wordpress.mdwn +++ b/doc/tips/Importing_posts_from_Wordpress.mdwn @@ -1,6 +1,6 @@ Use case: You want to move away from Wordpress to Ikiwiki as your blogging/website platform, but you want to retain your old posts. -[This](http://git.chris-lamb.co.uk/?p=ikiwiki-wordpress-import.git) is a simple tool that generates [git-fast-import](http://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html)-compatible data from a WordPress export XML file. It retains creation time of each post, so you can use Ikiwiki's --getctime to get the preserve creation times on checkout. +[This](http://git.chris-lamb.co.uk/?p=ikiwiki-wordpress-import.git) is a simple tool that generates [git-fast-import](http://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html)-compatible data from a WordPress export XML file. It retains creation time of each post, so you can use Ikiwiki's --gettime to get the preserve creation times on checkout. WordPress categories are mapped onto Ikiwiki tags. The ability to import comments is planned. diff --git a/doc/tips/inside_dot_ikiwiki/discussion.mdwn b/doc/tips/inside_dot_ikiwiki/discussion.mdwn index 34d5b9252..69df369ec 100644 --- a/doc/tips/inside_dot_ikiwiki/discussion.mdwn +++ b/doc/tips/inside_dot_ikiwiki/discussion.mdwn @@ -6,14 +6,15 @@ My database appears corrupted: No idea how this happened. I've blown it away and recreated it but, for future reference, is there any less violent way to recover from this situation? I miss having the correct created and last edited times. --[[sabr]] > update: fixed ctimes and mtimes using [these instructions](http://u32.net/Mediawiki_Conversion/Git_Import/#Correct%20Creation%20and%20Last%20Edited%20time) --[[sabr]] -> That's overly complex. Just run `ikiwiki -setup your.setup -getctime`. +> That's overly complex. Just run `ikiwiki -setup your.setup -gettime`. > BTW, I'd be interested in examining such a corrupt storable file to try > to see what happened to it. --[[Joey]] ->> --getctime appears to only set the last edited date. It's not supposed to set the creation date, is it? The only place that info is stored is in the git repo. +>> --gettime appears to only set the last edited date. It's not supposed to set the creation date, is it? The only place that info is stored is in the git repo. >>> Pulling the page creation date out of the git history is exactly what ->>> --getctime does. --[[Joey]] +>>> --gettime does. (It used to be called --getctime, and only do that; now +>>> it also pulls out the last modified date). --[[Joey]] >> Alas, I seem to have lost the bad index file to periodic /tmp wiping; I'll send it to you if it happens again. --[[sabr]] diff --git a/doc/todo/auto_getctime_on_fresh_build.mdwn b/doc/todo/auto_getctime_on_fresh_build.mdwn index ea95fb8c9..760c56fa1 100644 --- a/doc/todo/auto_getctime_on_fresh_build.mdwn +++ b/doc/todo/auto_getctime_on_fresh_build.mdwn @@ -1,9 +1,13 @@ [[!tag wishlist]] -It might be a good idea to enable --getctime when `.ikiwiki` does not +It might be a good idea to enable --gettime when `.ikiwiki` does not exist. This way a new checkout of a `srcdir` would automatically get -ctimes right. (Running --getctime whenever a rebuild is done would be too +ctimes right. (Running --gettime whenever a rebuild is done would be too slow.) --[[Joey]] Could this be too annoying in some cases, eg, checking out a large wiki that needs to get set up right away? --[[Joey]] + +> Not for git with the new, optimised --getctime. For other VCS.. well, +> pity they're not as fast as git ;), but it is a one-time expense... +> [[done]] --[[Joey]] diff --git a/doc/usage.mdwn b/doc/usage.mdwn index db1e36a10..553fef01e 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -320,13 +320,11 @@ also be configured using a setup file. intercepted. If you enable this option then you must run at least the CGI portion of ikiwiki over SSL. -* --getctime +* --gettime - Pull creation time for each new page out of the revision control - system. This rarely used option provides a way to get the real creation - times of items in weblogs, such as when building a wiki from a new - VCS checkout. It is unoptimised and quite slow. It is best used - with --rebuild, to force ikiwiki to get the ctime for all pages. + Extract creation and modification times for each new page from the + the revision control's log. This is done automatically when building a + wiki for the first time, so you normally do not need to use this option. * --set var=value diff --git a/ikiwiki.in b/ikiwiki.in index 38e4d3201..801ff9a0b 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -44,7 +44,8 @@ sub getconfig () { "wrappergroup=s" => \$config{wrappergroup}, "usedirs!" => \$config{usedirs}, "prefix-directives!" => \$config{prefix_directives}, - "getctime" => \$config{getctime}, + "getctime" => \$config{gettime}, + "gettime" => \$config{gettime}, "numbacklinks=i" => \$config{numbacklinks}, "rcs=s" => \$config{rcs}, "no-rcs" => sub { $config{rcs}="" }, diff --git a/mtime-to-git b/mtime-to-git deleted file mode 100755 index 9875af5d7..000000000 --- a/mtime-to-git +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# Sets mtimes of all files in the tree their last change date -# based on git's log. Useful to avoid too new dates after a -# fresh checkout, which lead to ikiwiki unnecessarily rebuilding -# basewiki files on upgrade. -if [ -d .git ]; then - for file in $(git ls-files); do - date="$(git log -1 --date=rfc "$file" | grep ^Date: | sed -e 's/Date://')" - if [ -n "$date" ]; then - echo "$date $file" - touch -d"$date" $file - fi - done -fi -- cgit v1.2.3 From e31b1b27f83f47da10b2775f192eb8eefcfc68a2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 16 Apr 2010 19:25:25 -0400 Subject: remove note about needing --gettime; automatically run on first build now --- doc/tips/Importing_posts_from_Wordpress.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/Importing_posts_from_Wordpress.mdwn b/doc/tips/Importing_posts_from_Wordpress.mdwn index 8774c9723..ecc6ae505 100644 --- a/doc/tips/Importing_posts_from_Wordpress.mdwn +++ b/doc/tips/Importing_posts_from_Wordpress.mdwn @@ -1,6 +1,6 @@ Use case: You want to move away from Wordpress to Ikiwiki as your blogging/website platform, but you want to retain your old posts. -[This](http://git.chris-lamb.co.uk/?p=ikiwiki-wordpress-import.git) is a simple tool that generates [git-fast-import](http://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html)-compatible data from a WordPress export XML file. It retains creation time of each post, so you can use Ikiwiki's --gettime to get the preserve creation times on checkout. +[This](http://git.chris-lamb.co.uk/?p=ikiwiki-wordpress-import.git) is a simple tool that generates [git-fast-import](http://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html)-compatible data from a WordPress export XML file. WordPress categories are mapped onto Ikiwiki tags. The ability to import comments is planned. -- cgit v1.2.3 From 7e79da76332b93214a7d9a5c91bc046db4219ee2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 23 Apr 2010 16:10:46 -0400 Subject: template docu reorg Remove wikitemplates page; fold its contents into templates page. Update all backlinks. Document new ability to put templates inside srcdir. --- doc/bugs/SSI_include_stripped_from_mdwn.mdwn | 2 +- doc/bugs/login_page_non-obvious_with_openid.mdwn | 4 +- doc/features.mdwn | 2 +- doc/freesoftware.mdwn | 2 +- doc/ikiwiki-calendar.mdwn | 2 +- doc/ikiwiki/directive/edittemplate.mdwn | 2 +- doc/ikiwiki/directive/pagetemplate.mdwn | 8 +- doc/ikiwiki/directive/template.mdwn | 8 +- doc/plugins/autoindex.mdwn | 2 +- doc/plugins/map/discussion.mdwn | 2 +- doc/plugins/pagetemplate.mdwn | 6 +- doc/plugins/template.mdwn | 4 +- doc/plugins/write.mdwn | 4 +- doc/templates.mdwn | 91 +++++++++++++++++++--- doc/tips/comments_feed.mdwn | 2 +- ...o-create_tag_pages_according_to_a_template.mdwn | 2 +- doc/todo/auto_rebuild_on_template_change.mdwn | 2 +- doc/todo/html.mdwn | 2 +- doc/todo/multiple_templates.mdwn | 2 +- doc/usage.mdwn | 5 +- doc/wikitemplates.mdwn | 52 ------------- doc/wikitemplates/discussion.mdwn | 46 ----------- 22 files changed, 111 insertions(+), 141 deletions(-) delete mode 100644 doc/wikitemplates.mdwn delete mode 100644 doc/wikitemplates/discussion.mdwn (limited to 'doc/tips') diff --git a/doc/bugs/SSI_include_stripped_from_mdwn.mdwn b/doc/bugs/SSI_include_stripped_from_mdwn.mdwn index 5519e45c6..270da86d3 100644 --- a/doc/bugs/SSI_include_stripped_from_mdwn.mdwn +++ b/doc/bugs/SSI_include_stripped_from_mdwn.mdwn @@ -10,7 +10,7 @@ If I have a <--#include virtual="foo" --> in some file, it gets stripped, > Anyway, it makes sense for the htmlscrubber to strip server-side > includes because otherwise your wiki could be attacked > by them being added to it. If you want to use both the htmlscrubber and -> SSI together, I'd suggest you modify the [[wikitemplates]] +> SSI together, I'd suggest you modify the [[templates]] > and put the SSI on there. > > Ie, `page.tmpl` has a diff --git a/doc/bugs/login_page_non-obvious_with_openid.mdwn b/doc/bugs/login_page_non-obvious_with_openid.mdwn index 1d087985a..9aa702037 100644 --- a/doc/bugs/login_page_non-obvious_with_openid.mdwn +++ b/doc/bugs/login_page_non-obvious_with_openid.mdwn @@ -36,7 +36,7 @@ If you want to keep it as one form, then perhaps using some javascript to disabl > that allows modifying that form, but does not allow creating a separate > form. The best way to make it obvious how to use it currently is to just > disable password auth, then it's nice and simple. :-) Javascript is an -> interesting idea. It's also possible to write a custom [[signin.tmpl wikitemplates]] that +> interesting idea. It's also possible to write a custom [[templates]] that > is displayed instead of the regular signin form, and it should be > possible to use that to manually lay it out better than FormBuilder > manages with its automatic layout. --[[Joey]] @@ -44,4 +44,4 @@ If you want to keep it as one form, then perhaps using some javascript to disabl > I've improved the form, I think it's more obvious now that the openid > stuff is separate. Good enough to call this [[done]]. I think. --[[Joey]] ->> Looks good, thanks! :-) -- [[AdamShand]] \ No newline at end of file +>> Looks good, thanks! :-) -- [[AdamShand]] diff --git a/doc/features.mdwn b/doc/features.mdwn index ab521213d..07ce648ea 100644 --- a/doc/features.mdwn +++ b/doc/features.mdwn @@ -72,7 +72,7 @@ you would care to syndicate. Ikiwiki aims to produce [valid XHTML 1.0](http://validator.w3.org/check?url=referer). Ikiwiki -generates html using [[templates|wikitemplates]], and uses [[css]], so you +generates html using [[templates]], and uses [[css]], so you can change the look and layout of all pages in any way you would like. ## [[Plugins]] diff --git a/doc/freesoftware.mdwn b/doc/freesoftware.mdwn index 7ac1ac6b4..2243d9b1f 100644 --- a/doc/freesoftware.mdwn +++ b/doc/freesoftware.mdwn @@ -4,7 +4,7 @@ ikiwiki, and this documentation wiki, are licensed under the terms of the GNU [[GPL]], version 2 or later. The parts of ikiwiki that become part of your own wiki (the [[basewiki]] -pages (but not the smilies) and the [[templates|wikitemplates]]) are licensed +pages (but not the smilies) and the [[templates]]) are licensed as follows: > Redistribution and use in source and compiled forms, with or without diff --git a/doc/ikiwiki-calendar.mdwn b/doc/ikiwiki-calendar.mdwn index c1f4d7267..03cbdd86c 100644 --- a/doc/ikiwiki-calendar.mdwn +++ b/doc/ikiwiki-calendar.mdwn @@ -43,7 +43,7 @@ An example crontab: # TEMPLATES -This command uses two [[template|wikitemplates]] to generate +This command uses two [[templates]] to generate the pages, `calendarmonth.tmpl` and `calendaryear.tmpl`. # AUTHOR diff --git a/doc/ikiwiki/directive/edittemplate.mdwn b/doc/ikiwiki/directive/edittemplate.mdwn index d731bdb47..c486e821b 100644 --- a/doc/ikiwiki/directive/edittemplate.mdwn +++ b/doc/ikiwiki/directive/edittemplate.mdwn @@ -21,7 +21,7 @@ something like: Details: The template page can also contain [[!cpan HTML::Template]] directives, -similar to other ikiwiki [[templates]]. Currently only one variable is +like other ikiwiki [[templates]]. Currently only one variable is set: `` is replaced with the name of the page being created. diff --git a/doc/ikiwiki/directive/pagetemplate.mdwn b/doc/ikiwiki/directive/pagetemplate.mdwn index 8ad901c1a..401b38099 100644 --- a/doc/ikiwiki/directive/pagetemplate.mdwn +++ b/doc/ikiwiki/directive/pagetemplate.mdwn @@ -1,17 +1,13 @@ The `pagetemplate` directive is supplied by the [[!iki plugins/pagetemplate desc=pagetemplate]] plugin. -This directive allows a page to be displayed using a different template than -the default `page.tmpl` template. +This directive allows a page to be displayed using a different +[[template|templates]] than the default `page.tmpl` template. The page text is inserted into the template, so the template controls the overall look and feel of the wiki page. This is in contrast to the [[ikiwiki/directive/template]] directive, which allows inserting templates _into_ the body of a page. -This directive can only reference templates that are already installed -by the system administrator, typically into the -`/usr/share/ikiwiki/templates` directory. Example: - \[[!pagetemplate template="my_fancy.tmpl"]] [[!meta robots="noindex, follow"]] diff --git a/doc/ikiwiki/directive/template.mdwn b/doc/ikiwiki/directive/template.mdwn index ae71ba5b5..052ca7873 100644 --- a/doc/ikiwiki/directive/template.mdwn +++ b/doc/ikiwiki/directive/template.mdwn @@ -1,7 +1,11 @@ The `template` directive is supplied by the [[!iki plugins/template desc=template]] plugin. -[[Templates]] are files that can be filled out and inserted into pages in the -wiki, by using the template directive. The directive has an `id` parameter +The template directive allows wiki pages to be used as templates. +These templates can be filled out and inserted into other pages in the +wiki using the directive. The [[templates]] page lists templates +that can be used with this directive. + +The directive has an `id` parameter that identifies the template to use. The remaining parameters are used to fill out the template. diff --git a/doc/plugins/autoindex.mdwn b/doc/plugins/autoindex.mdwn index d1133e4f5..7c4e40419 100644 --- a/doc/plugins/autoindex.mdwn +++ b/doc/plugins/autoindex.mdwn @@ -3,5 +3,5 @@ This plugin searches for [[SubPages|ikiwiki/subpage]] with a missing parent page, and generates the parent pages. The generated page content is -controlled by the `autoindex.tmpl` [[template|wikitemplates]], which by +controlled by the `autoindex.tmpl` [[template|templates]], which by default, uses a [[map]] to list the SubPages. diff --git a/doc/plugins/map/discussion.mdwn b/doc/plugins/map/discussion.mdwn index 2f7b140d6..54c921b0f 100644 --- a/doc/plugins/map/discussion.mdwn +++ b/doc/plugins/map/discussion.mdwn @@ -1,7 +1,7 @@ I'm wanting a [[map]] (with indentation levels) showing page _titles_ instead of page 'names'. As far as I can see, this is not an option with existing plugins - I can get a list of pages using [[inline]] and -appropriate [[wikitemplates]], but that has no indentation and therefore +appropriate [[templates]], but that has no indentation and therefore doesn't show structure well. The quick way is to modify the map plugin to have a 'titles' option. The diff --git a/doc/plugins/pagetemplate.mdwn b/doc/plugins/pagetemplate.mdwn index 53f069d0d..8254e14c5 100644 --- a/doc/plugins/pagetemplate.mdwn +++ b/doc/plugins/pagetemplate.mdwn @@ -3,8 +3,4 @@ This plugin provides the [[ikiwiki/directive/pagetemplate]] [[ikiwiki/directive]], which allows a page to be displayed -using a different [[template|wikitemplates]] than the default. - -This plugin can only use templates that are already installed in -`/usr/share/ikiwiki/templates` (or wherever ikiwiki is configured to look for -them). You can choose to use any .tmpl files in that directory. +using a different [[template|templates]] than the default. diff --git a/doc/plugins/template.mdwn b/doc/plugins/template.mdwn index da775f232..8d17e2825 100644 --- a/doc/plugins/template.mdwn +++ b/doc/plugins/template.mdwn @@ -3,5 +3,5 @@ This plugin provides the [[ikiwiki/directive/template]] [[ikiwiki/directive]]. With this plugin, you can set up templates, and cause them to be filled out -and inserted into pages in the wiki. It's documented and existing templates -are listed in the [[templates]] page. +and inserted into pages in the wiki. Existing templates are listed in the +[[templates]] page. diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 00b54bdd3..9128c7f54 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -297,7 +297,7 @@ value is ignored. hook(type => "pagetemplate", id => "foo", call => \&pagetemplate); -[[Templates|wikitemplates]] are filled out for many different things in +[[Templates]] are filled out for many different things in ikiwiki, like generating a page, or part of a blog page, or an rss feed, or a cgi. This hook allows modifying the variables available on those templates. The function is passed named parameters. The "page" and @@ -313,7 +313,7 @@ a new custom parameter to the template. hook(type => "templatefile", id => "foo", call => \&templatefile); -This hook allows plugins to change the [[template|wikitemplates]] that is +This hook allows plugins to change the [[template|templates]] that is used for a page in the wiki. The hook is passed a "page" parameter, and should return the name of the template file to use (relative to the template directory), or undef if it doesn't want to change the default diff --git a/doc/templates.mdwn b/doc/templates.mdwn index f2b581d2f..f7b3adae5 100644 --- a/doc/templates.mdwn +++ b/doc/templates.mdwn @@ -1,17 +1,88 @@ -[[!meta robots="noindex, follow"]] -[[!if test="enabled(template)" -then="This wiki has templates **enabled**." -else="This wiki has templates **disabled**." -]] +[[Ikiwiki]] uses many templates for many purposes. By editing its templates, +you can fully customise this site. -Templates are files that can be filled out and inserted into pages in the -wiki. +[[!if test="enabled(template)" then=""" +## The template directive +The template directive allows wiki pages to be used as templates. +These templates can be filled out and inserted into other pages in the +wiki using the directive. +"""]] [[!if test="enabled(template) and enabled(inline)" then=""" - -These templates are available for use with the template directive. - [[!inline pages="templates/* and !*/discussion" feeds=no archive=yes sort=title template=titlepage rootpage=templates postformtext="Add a new template named:"]] """]] + +[[!if test="enabled(edittemplate)" then=""" +## The edittemplate directive + +The edittemplate directive can be used to make new pages default to +containing text from a template, which can be filled as out the page is +edited. +"""]] + +## Wiki templates + +These templates are used to build the wiki. The aim is to keep almost all +html out of ikiwiki and in the templates. + +* `page.tmpl` - Used for displaying all regular wiki pages. +* `misc.tmpl` - Generic template used for any page that doesn't + have a custom template. +* `editpage.tmpl` - Create/edit page. +* `change.tmpl` - Used to create a page describing a change made to the wiki. +* `passwordmail.tmpl` - Not a html template, this is used to + generate a mail with an url the user can use to reset their password. +* `rsspage.tmpl` - Used for generating rss feeds for [[blogs|blog]]. +* `rssitem.tmpl` - Used for generating individual items on rss feeds. +* `atompage.tmpl` - Used for generating atom feeds for blogs. +* `atomitem.tmpl` - Used for generating individual items on atom feeds. +* `inlinepage.tmpl` - Used for adding a page inline in a blog + page. +* `archivepage.tmpl` - Used for listing a page in a blog archive page. +* `microblog.tmpl` - Used for showing a microblogging post inline. +* `blogpost.tmpl` - Used for a form to add a post to a blog (and a rss/atom links) +* `feedlink.tmpl` - Used to add rss/atom links if blogpost.tmpl is not used. +* `aggregatepost.tmpl` - Used by the [[plugins/aggregate]] plugin to create + a page for a post. +* `searchform.tmpl` - Used by the [[plugins/search]] plugin to add a search + form to wiki pages. +* `searchquery.tmpl` - This is an omega template, used by the + [[plugins/search]] plugin. +* `comment.tmpl` - This template is used to display a comment + by the [[plugins/comments]] plugin. +* `editcomment.tmpl` - This template is the comment post form for the + [[plugins/comments]] plugin. +* `commentmoderation.tmpl` - This template is used to produce the comment + moderation form. +* `recentchanges.tmpl` - This template is used for listing a change + on the RecentChanges page. + +[[!if test="enabled(pagetemplate)" then=""" +## The pagetemplate directive + +The pagetemplate directive can allow individual pages to use a +different template than `page.tmpl`. +"""]] + +## Template locations + +Templates are located in `/usr/share/ikiwiki/templates` by default; +the `templatedir` setting can be used to make another directory be +searched first. Customized templates can also be placed inside the +"templates/" directory in your wiki's source. + +## Template syntax + +Ikiwiki uses the HTML::Template module as its template engine. This +supports things like conditionals and loops in templates and is pretty easy +to learn. All you really need to know are a few things: + +* To insert the value of a template variable, use ``. +* To make a block of text conditional on a variable being set use + `text`. +* To use one block of text if a variable is set and a second if it's not, + use `textother text` + +[[!meta robots="noindex, follow"]] diff --git a/doc/tips/comments_feed.mdwn b/doc/tips/comments_feed.mdwn index 6f8137256..6d4dbb803 100644 --- a/doc/tips/comments_feed.mdwn +++ b/doc/tips/comments_feed.mdwn @@ -6,5 +6,5 @@ add a feed that contains all the comments posted to any page. Here's how: \[[!inline pages="internal(*/comment_*)" template=comment]] The special [[ikiwiki/PageSpec]] matches all comments. The -[[template|wikitemplates]] causes the comments to be displayed formatted +[[template|templates]] causes the comments to be displayed formatted nicely. diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index f6d444890..7eb404910 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -17,7 +17,7 @@ The new tag file is then complied during the change phase. *see git history of this page if you want the patch --[[smcv]]* -This uses a [[template|wikitemplates]] called `autotagpage.tmpl`, here is my template file: +This uses a [[template|templates]] called `autotagpage.tmpl`, here is my template file: \[[!inline pages="link()" archive="yes"]] diff --git a/doc/todo/auto_rebuild_on_template_change.mdwn b/doc/todo/auto_rebuild_on_template_change.mdwn index a112cb9da..838d15c1a 100644 --- a/doc/todo/auto_rebuild_on_template_change.mdwn +++ b/doc/todo/auto_rebuild_on_template_change.mdwn @@ -6,7 +6,7 @@ This would allow setting: templatedir => "$srcdir/templates", -.. and then the [[wikitemplates]] are managed like other wiki files; and +.. and then the [[templates]] are managed like other wiki files; and like other wiki files, a change to them automatically updates dependent pages. diff --git a/doc/todo/html.mdwn b/doc/todo/html.mdwn index 44f20c876..4f4542be2 100644 --- a/doc/todo/html.mdwn +++ b/doc/todo/html.mdwn @@ -1,6 +1,6 @@ Create some nice(r) stylesheets. Should be doable w/o touching a single line of code, just -editing the [[wikitemplates]] and/or editing [[style.css]]. +editing the [[templates]] and/or editing [[style.css]]. [[done]] ([[css_market]] ..) diff --git a/doc/todo/multiple_templates.mdwn b/doc/todo/multiple_templates.mdwn index 72783c556..30fb8d6ee 100644 --- a/doc/todo/multiple_templates.mdwn +++ b/doc/todo/multiple_templates.mdwn @@ -1,4 +1,4 @@ -> Another useful feature might be to be able to choose a different [[template|wikitemplates]] +> Another useful feature might be to be able to choose a different [[template|templates]] > file for some pages; [[blog]] pages would use a template different from the > home page, even if both are managed in the same repository, etc. diff --git a/doc/usage.mdwn b/doc/usage.mdwn index 2e12517ea..9cf61cc6c 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -120,10 +120,11 @@ also be configured using a setup file. * --templatedir dir - Specify the directory that the page [[templates|wikitemplates]] are stored in. + Specify the directory that [[templates|templates]] are stored in. Default is `/usr/share/ikiwiki/templates`, or another location as configured at build time. If the templatedir is changed, missing templates will still - be searched for in the default location as a fallback. + be searched for in the default location as a fallback. Templates can also be + placed in the "templates/" subdirectory of the srcdir. Note that if you choose to copy and modify ikiwiki's templates, you will need to be careful to keep them up to date when upgrading to new versions of diff --git a/doc/wikitemplates.mdwn b/doc/wikitemplates.mdwn deleted file mode 100644 index 6e5a7261d..000000000 --- a/doc/wikitemplates.mdwn +++ /dev/null @@ -1,52 +0,0 @@ -ikiwiki uses the HTML::Template module as its template engine. This -supports things like conditionals and loops in templates and is pretty easy -to learn. - -The aim is to keep almost all html out of ikiwiki and in the templates. - -It ships with some basic templates which can be customised. These are -located in `/usr/share/ikiwiki/templates` by default; the `templatedir` -setting can be used to make another directory be searched first. - -* `page.tmpl` - Used for displaying all regular wiki pages. -* `misc.tmpl` - Generic template used for any page that doesn't - have a custom template. -* `editpage.tmpl` - Create/edit page. -* `change.tmpl` - Used to create a page describing a change made to the wiki. -* `passwordmail.tmpl` - Not a html template, this is used to - generate a mail with an url the user can use to reset their password. -* `rsspage.tmpl` - Used for generating rss feeds for [[blogs|blog]]. -* `rssitem.tmpl` - Used for generating individual items on rss feeds. -* `atompage.tmpl` - Used for generating atom feeds for blogs. -* `atomitem.tmpl` - Used for generating individual items on atom feeds. -* `inlinepage.tmpl` - Used for adding a page inline in a blog - page. -* `archivepage.tmpl` - Used for listing a page in a blog archive page. -* `microblog.tmpl` - Used for showing a microblogging post inline. -* `blogpost.tmpl` - Used for a form to add a post to a blog (and a rss/atom links) -* `feedlink.tmpl` - Used to add rss/atom links if blogpost.tmpl is not used. -* `aggregatepost.tmpl` - Used by the [[plugins/aggregate]] plugin to create - a page for a post. -* `searchform.tmpl` - Used by the [[plugins/search]] plugin to add a search - form to wiki pages. -* `searchquery.tmpl` - This is an omega template, used by the - [[plugins/search]] plugin. -* `comment.tmpl` - This template is used to display a comment - by the [[plugins/comments]] plugin. -* `editcomment.tmpl` - This template is the comment post form for the - [[plugins/comments]] plugin. -* `commentmoderation.tmpl` - This template is used to produce the comment - moderation form. -* `recentchanges.tmpl` - This template is used for listing a change - on the RecentChanges page. - -The [[plugins/pagetemplate]] plugin can allow individual pages to use a -different template than `page.tmpl`. - -The [[plugins/template]] plugin also uses templates, though those -[[templates]] are typically stored as pages in the wiki, and are inserted -into pages. - -The [[plugins/edittemplate]] plugin is used to make new pages default to -containing text from a template, which can be filled as out the page is -edited. diff --git a/doc/wikitemplates/discussion.mdwn b/doc/wikitemplates/discussion.mdwn deleted file mode 100644 index f97444e5f..000000000 --- a/doc/wikitemplates/discussion.mdwn +++ /dev/null @@ -1,46 +0,0 @@ -## Place for local templates -Where does one put any locally modified templates for an individual ikiwiki? --Ivan Z. - -> You can put them whereever you like; the `templatedir` controls -> where ikiwiki looks for them. --[[Joey]] - -Thank you for your response! My question arose out of my intention to make -custom templates for a wiki--specifically suited for the kind of content -it will have--so, that would mean I would want to distribute them through -git together with other content of the wiki. So, for this case the -separation of conceptually ONE thing (the content, the templates, and the -config option which orders to use these templates) into THREE separate -files/repos (the main content repo, the repo with templates, and the config -file) is not convenient: instead of distributing a single repo, I have to -tell people to take three things if they want to replicate this wiki. How -would you solve this inconvenience? Perhaps, a default location of the -templates *inside* the source repo would do?--Ivan Z. - -> I would avoid putting the templates in a subdirectory of the ikiwiki srcdir. -> (I'd also avoid putting the ikiwiki setup file there.) -> While it's safe to do either in some cases, there are configurations where -> it's unsafe. For example, a malicious user could use attachment handling to -> replace those files with their own, bad versions. -> -> So, two ideas for where to put the templatedir and ikiwiki setup. - -> * The easiest option is to put your wiki content in a subdirectory -> ("wiki", say) and point `srcdir` at that. -> then you can have another subdirectory for the wikitemplates, -> and put the setup file at the top. -> * Another option if using git would be to have a separate branch, -> in the same git repository, that holds wikitemplates and the setup file. -> Then you check out the repository once to make the `srcdir` available, -> and have a second checkout, of the other branch, to make the other stuff -> available. -> -> Note that with either of these methods, you have to watch out if -> giving other direct commit access to the repository. They could -> still edit the setup file and templates, so only trusted users should -> be given access. (It is, however, perfectly safe to let people edit -> the wiki via the web, and is even safe to configure -> [[tips/untrusted_git_push]] to such a repository.) --[[Joey]] - -Thanks, that's a nice and simple idea: to have a subdirectory! I'll try it. --Ivan Z. - -A [[!taglink wish|wishlist]]: the ikiwiki program could be improved so that it follows the same logic as git in looking for its config: it could ascend directories until it finds an `.ikiwiki/` directory with `.ikiwiki/setup` and then uses that configuration. Now I'm tired to always type `ikiwiki --setup path/to/the/setup --refresh` when working in my working clone of the sources; I'd like to simply type `ikiwiki` instead, and let it find the setup file. The default location to look for templates could also be made to be a sibling of the setup file: `.ikiwiki/templates/`. --Ivan Z. -- cgit v1.2.3 From 86484c109d30c0062c5a5056f4adf41c0581b5e9 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" Date: Mon, 26 Apr 2010 15:14:08 +0000 Subject: table name for querying the mediawiki mysql db --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index 9719d9a7e..db1a1745c 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -59,7 +59,13 @@ specific prefix: e.g. `Category:` will be stripped off. ### Querying the database If you have access to the relational database in which your mediawiki data is -stored, it is possible to derive a list of page names from this. +stored, it is possible to derive a list of page names from this. With mediawiki's +MySQL backend, the page table is, appropriately enough, called `table`: + + SELECT page_namespace, page_title FROM page; + +As with the previous method, you will need to do some filtering based on the +namespace. ## Step 2: fetching the page data -- cgit v1.2.3 From 60481cad90d61a4d1abe2dc5e69eee69ce938992 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" Date: Mon, 26 Apr 2010 15:19:04 +0000 Subject: move list of namespaces to its own section --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index db1a1745c..fe0fd46b0 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -48,10 +48,7 @@ in HTML, you may need to add further processing to the last line. Note that by default, `Special:Allpages` will only list pages in the main namespace. You need to add a `&namespace=XX` argument to get pages in a -different namespace. The following numbers correspond to common namespaces: - - * 10 - templates (`Template:foo`) - * 14 - categories (`Category:bar`) +different namespace. (See below for the default list of namespaces) Note that the page names obtained this way will not include any namespace specific prefix: e.g. `Category:` will be stripped off. @@ -67,6 +64,12 @@ MySQL backend, the page table is, appropriately enough, called `table`: As with the previous method, you will need to do some filtering based on the namespace. +### namespaces + +The list of default namespaces in mediawiki is available from , reproduced here for convenience: + +[[mediawiki_namespaces]] + ## Step 2: fetching the page data Once you have a list of page names, you can fetch the data for each page. -- cgit v1.2.3 From 76e8e4ea838516ebdb8e981fff47efa6af836079 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" Date: Mon, 26 Apr 2010 15:24:50 +0000 Subject: insert table of common namespaces --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index fe0fd46b0..3a266bc8b 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -66,9 +66,18 @@ namespace. ### namespaces -The list of default namespaces in mediawiki is available from , reproduced here for convenience: - -[[mediawiki_namespaces]] +The list of default namespaces in mediawiki is available from . Here are reproduced the ones you are most likely to encounter if you are running a small mediawiki install for your own purposes: + +[[!table data=""" +Index | Name | Example +0 | Main | Foo +1 | Talk | Talk:Foo +2 | User | User:Jon +3 | User talk | User_talk:Jon +6 | File | File:Barack_Obama_signature.svg +10 | Template | Template:Prettytable +14 | Category | Category:Pages_needing_review +"""]] ## Step 2: fetching the page data -- cgit v1.2.3 From d3c994d980c2f52102c78c0157ce06140c639bc6 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" Date: Mon, 26 Apr 2010 15:29:04 +0000 Subject: fix indent --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index 3a266bc8b..38de01109 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -59,7 +59,7 @@ If you have access to the relational database in which your mediawiki data is stored, it is possible to derive a list of page names from this. With mediawiki's MySQL backend, the page table is, appropriately enough, called `table`: - SELECT page_namespace, page_title FROM page; + SELECT page_namespace, page_title FROM page; As with the previous method, you will need to do some filtering based on the namespace. -- cgit v1.2.3 From a6bd053638c67e5410c4a0a3742ba3825320b344 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 26 Apr 2010 16:31:00 -0400 Subject: remove manual file remove instructions Since that was written, ikiwiki got fixed to track old rendered files across --rebuild and remove them. --- doc/tips/switching_to_usedirs.mdwn | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'doc/tips') diff --git a/doc/tips/switching_to_usedirs.mdwn b/doc/tips/switching_to_usedirs.mdwn index 183ce00ac..92871439f 100644 --- a/doc/tips/switching_to_usedirs.mdwn +++ b/doc/tips/switching_to_usedirs.mdwn @@ -8,9 +8,7 @@ to usedirs, or edit your setup file and turn usedirs back off. or manually. * Since usedirs is enabled, ikiwiki will have created a bunch of new html files. Where before ikiwiki generated a `dest/foo.html`, now it will - generate `dest/foo/index.html`. But, the old html files will still be - present too. Remove them: - find dest -name \*.html -not -name index.html -exec rm {} \; + generate `dest/foo/index.html`. The old html files will be removed. * If you have a blog that is aggregated on a Planet or similar, all the items in the RSS or atom feed will seem like new posts, since their URLs have changed. See [[howto_avoid_flooding_aggregators]] for a workaround. -- cgit v1.2.3 From 0c7d2cf9b2773bd17c0ec549ed1ba833ff1913e1 Mon Sep 17 00:00:00 2001 From: albertlash Date: Thu, 29 Apr 2010 03:44:27 +0000 Subject: --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index 683a3f8ac..31110f3c6 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -1,3 +1,11 @@ +20100428 - I just wrote a simple ruby script which will connect to a mysql server and then recreate the pages and their revision histories with Grit. It also does one simple conversion of equals titles to pounds. Enjoy! + +http://github.com/docunext/mediawiki2gitikiwiki + +-- [[users/Albert]] + +---- + The u32 page is excellent, but I wonder if documenting the procedure here would be worthwhile. Who knows, the remote site might disappear. But also there are some variations on the approach that might be useful: -- cgit v1.2.3 From ebde1ee2fd814e45e0e108bb1a9ba81499d86c87 Mon Sep 17 00:00:00 2001 From: albertlash Date: Thu, 29 Apr 2010 03:44:52 +0000 Subject: --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index 31110f3c6..592a06a5b 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -1,6 +1,6 @@ 20100428 - I just wrote a simple ruby script which will connect to a mysql server and then recreate the pages and their revision histories with Grit. It also does one simple conversion of equals titles to pounds. Enjoy! -http://github.com/docunext/mediawiki2gitikiwiki + -- [[users/Albert]] -- cgit v1.2.3 From d57d2ecca722cb7c43d2b14ed31f38c3e204079c Mon Sep 17 00:00:00 2001 From: simonraven Date: Thu, 29 Apr 2010 16:18:15 +0000 Subject: YA URI to another mediawiki to git project --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index 592a06a5b..8a2261543 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -657,3 +657,6 @@ page.--[[users/Chadius]] > on mediawiki in general. It seems to produce output that could be > used by the [[plugins/contrib/mediawiki]] plugin, if the filenames > were fixed to use the right extension. --[[Joey]] + +>> Here's another I found while browsing around starting from the link you gave Joey
+>> -- cgit v1.2.3 From f7f1dd3a3852ef158a577387faee2c34c4f9cfad Mon Sep 17 00:00:00 2001 From: simonraven Date: Thu, 29 Apr 2010 16:24:23 +0000 Subject: more to add on my comment --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc/tips') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index 8a2261543..d67a9131b 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -659,4 +659,7 @@ page.--[[users/Chadius]] > were fixed to use the right extension. --[[Joey]] >> Here's another I found while browsing around starting from the link you gave Joey
->> +>>
+>> As I don't run mediawiki anymore, but I still have my xz/gzip-compressed XML dumps, +>> it's certainly easier for me to do it this way; also a file or a set of files is easier to lug +>> around on some medium than a full mysqld or postgres master and relevant databases. -- cgit v1.2.3 From 34076e398cb7662e3bf0659d591faa4208679882 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 2 May 2010 17:16:15 -0400 Subject: html5 bug closure, and documentation --- doc/bugs/html5_support.mdwn | 6 ++++++ doc/features.mdwn | 2 +- doc/roadmap.mdwn | 2 +- doc/tips/html5.mdwn | 25 +++++++++++++++++++++++++ 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 doc/tips/html5.mdwn (limited to 'doc/tips') diff --git a/doc/bugs/html5_support.mdwn b/doc/bugs/html5_support.mdwn index 0b15e64f6..3d1689301 100644 --- a/doc/bugs/html5_support.mdwn +++ b/doc/bugs/html5_support.mdwn @@ -106,3 +106,9 @@ As a workaround: ## tidy plugin Will reformat html5 to html4. + +---- + + +Ok, I consider this [[done]], at least as a first pass. Html5 mode +is experimental, but complete enough. --[[Joey]] diff --git a/doc/features.mdwn b/doc/features.mdwn index 215c1cecd..1f8168703 100644 --- a/doc/features.mdwn +++ b/doc/features.mdwn @@ -72,7 +72,7 @@ you would care to syndicate. Ikiwiki aims to produce [valid XHTML 1.0](http://validator.w3.org/check?url=referer). -(Experimental HTML5 support is also available.) +(Experimental [[tips/HTML5]] support is also available.) Ikiwiki generates html using [[templates]], and uses [[css]], so you can change the look and layout of all pages in any way you would like. diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn index 4b5f01c45..e257c21a2 100644 --- a/doc/roadmap.mdwn +++ b/doc/roadmap.mdwn @@ -80,7 +80,7 @@ Probably incomplete list: * YADA format setup files per default? * Enable tagbase by default (so that tag autocreation will work by default). Note that this is already done for wikis created by `auto-blog.setup`. -* html5 on by default (some day..) +* [[tips/html5]] on by default (some day..) In general, we try to use [[ikiwiki-transition]] or forced rebuilds on upgrade to deal with changes that break compatability. Some things that diff --git a/doc/tips/html5.mdwn b/doc/tips/html5.mdwn new file mode 100644 index 000000000..9321aa401 --- /dev/null +++ b/doc/tips/html5.mdwn @@ -0,0 +1,25 @@ +First, if you just want to embed videos using the html5 `