summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/bugs/Aggregated_Atom_feeds_are_double-encoded.mdwn22
-rw-r--r--doc/bugs/Allow_overriding_of_symlink_restriction.mdwn6
-rw-r--r--doc/bugs/CGI__44___formbuilder__44___non-existent_field_address.mdwn59
-rw-r--r--doc/bugs/Can__39__t_create_root_page.mdwn4
-rw-r--r--doc/bugs/Comments_link_is_to_index.html_if_usedirs_is_on.mdwn5
-rw-r--r--doc/bugs/Error:_Your_login_session_has_expired._.mdwn44
-rw-r--r--doc/bugs/Git:_web_commit_message_not_utf-8.mdwn17
-rw-r--r--doc/bugs/INC_location_not_set_correctly_in_make_test.mdwn24
-rw-r--r--doc/bugs/IkiWiki::Wrapper_should_use_destdir.mdwn23
-rw-r--r--doc/bugs/IkiWiki::Wrapper_should_use_destdir/discussion.mdwn4
-rw-r--r--doc/bugs/Insecure_dependency_in_eval_while_running_with_-T_switch.mdwn4
-rw-r--r--doc/bugs/Meta_plugin_does_not_respect_htmlscrubber__95__skip_setting.___40__patch__41__.mdwn11
-rw-r--r--doc/bugs/Monotone_rcs_support.mdwn2
-rw-r--r--doc/bugs/No_link_for_blog_items_when_filename_contains_a_colon.mdwn8
-rw-r--r--doc/bugs/PNG_triggers_UTF-8_error_in_MimeInfo.pm.mdwn25
-rw-r--r--doc/bugs/Problem_with_toc.pm_plug-in.mdwn4
-rw-r--r--doc/bugs/Problems_with_graphviz.pm_plug-in.mdwn14
-rw-r--r--doc/bugs/RecentChanges_broken_with_empty_svnpath.mdwn2
-rw-r--r--doc/bugs/SVG_files_not_recognized_as_images.mdwn29
-rw-r--r--doc/bugs/Spaces_in_link_text_for_ikiwiki_links.mdwn2
-rw-r--r--doc/bugs/Titles_are_lower-cased_when_creating_a_page.mdwn2
-rw-r--r--doc/bugs/URLs_with_parentheses_displayed_badly.mdwn19
-rw-r--r--doc/bugs/Use_install__40__1__41___instead_of_cp__40__1__41___for_installing_files.mdwn7
-rw-r--r--doc/bugs/Warns_about_use_of_uninitialized_value_if_prefix__95__directives_is_on_and_a_directive_does_not_contain_a_space.mdwn4
-rw-r--r--doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn5
-rw-r--r--doc/bugs/beautify__95__urlpath_will_add_.__47___even_if_it_is_already_present.mdwn3
-rw-r--r--doc/bugs/bugfix_for:___34__mtn:_operation_canceled:_Broken_pipe__34_____40__patch__41__.mdwn24
-rw-r--r--doc/bugs/bzr_RecentChanges_dates_start_from_1969.mdwn16
-rw-r--r--doc/bugs/bzr_plugin_does_not_define_rcs__95__diff.mdwn27
-rw-r--r--doc/bugs/cannot_preview_shortcuts.mdwn17
-rw-r--r--doc/bugs/cannot_reliably_use_meta_in_template.mdwn18
-rw-r--r--doc/bugs/comments_produce_broken_links_in_RecentChanges.mdwn9
-rw-r--r--doc/bugs/disabling_backlinks.mdwn2
-rw-r--r--doc/bugs/dumpsetup_does_not_save_destdir.mdwn3
-rw-r--r--doc/bugs/entirely_negated_pagespec_matches_internal_pages.mdwn4
-rw-r--r--doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn2.mdwn7
-rw-r--r--doc/bugs/git_stderr_output_causes_problems.mdwn2
-rw-r--r--doc/bugs/gitweb_deficiency_w.r.t._log_messages.mdwn4
-rw-r--r--doc/bugs/gitweb_deficiency_w.r.t._newly_created_pages.mdwn3
-rw-r--r--doc/bugs/html5_support.mdwn47
-rw-r--r--doc/bugs/http_proxy_for_openid.mdwn34
-rw-r--r--doc/bugs/images_in_inlined_pages_have_wrong_relative_URL.mdwn2
-rw-r--r--doc/bugs/img_plugin_should_pass_through_class_attribute.mdwn4
-rw-r--r--doc/bugs/inline_sort-by-title_issues.mdwn2
-rw-r--r--doc/bugs/inline_sort_order_and_meta_date_value.mdwn314
-rw-r--r--doc/bugs/links_misparsed_in_CSV_files.mdwn27
-rw-r--r--doc/bugs/lockedit_plugin_should_alert_user_about_an_invalid_pagespec_in_preferences.mdwn6
-rw-r--r--doc/bugs/login_page_should_note_cookie_requirement.mdwn33
-rw-r--r--doc/bugs/markdown_bug:_email_escaping_and_plus_addresses.mdwn2
-rw-r--r--doc/bugs/mercurial_fail_to_add.mdwn2
-rw-r--r--doc/bugs/messed_up_repository.mdwn21
-rw-r--r--doc/bugs/methodResponse_in_add__95__plugins.mdwn2
-rw-r--r--doc/bugs/multiple_pages_with_same_name.mdwn6
-rw-r--r--doc/bugs/output_of_successful_rename_should_list_the_full_path_to_affected_pages.mdwn14
-rw-r--r--doc/bugs/pagespec_parsing_chokes_on_function__40____41__.mdwn2
-rw-r--r--doc/bugs/pagetitle_function_does_not_respect_meta_titles.mdwn230
-rw-r--r--doc/bugs/prune_causing_taint_mode_failures.mdwn4
-rw-r--r--doc/bugs/quieten_mercurial.mdwn4
-rw-r--r--doc/bugs/recentchanges_feed_links.mdwn13
-rw-r--r--doc/bugs/relative_date_weird_results.mdwn4
-rw-r--r--doc/bugs/remove_orphaned_sparkline-php_from_Suggests.mdwn20
-rw-r--r--doc/bugs/rst_tweak.mdwn14
-rw-r--r--doc/bugs/search_for_locale_data_in_the_installed_location.mdwn2
-rw-r--r--doc/bugs/shortcut_plugin_will_not_work_without_shortcuts.mdwn.mdwn33
-rw-r--r--doc/bugs/ssl_certificates_not_checked_with_openid.mdwn19
-rw-r--r--doc/bugs/stray___60____47__p__62___tags.mdwn15
-rw-r--r--doc/bugs/support_for_openid2_logins.mdwn10
-rw-r--r--doc/bugs/table_external_file_links.mdwn9
-rw-r--r--doc/bugs/tags__44___backlinks_and_3.x.mdwn34
-rw-r--r--doc/bugs/tbasewiki__95__brokenlinks.t_broken.mdwn6
-rw-r--r--doc/bugs/textile_plugin_dies_if_input_has_a_non-utf8_character.mdwn2
-rw-r--r--doc/bugs/txt_plugin_having_problems_with_meta_directives.mdwn19
-rw-r--r--doc/bugs/unicode_chars_in_wikiname_break_auth.mdwn20
-rw-r--r--doc/bugs/user_links_on_recentchanges_pages_problem.mdwn12
-rw-r--r--doc/contact.mdwn3
-rw-r--r--doc/convert.mdwn7
-rw-r--r--doc/css_market.mdwn15
-rw-r--r--doc/css_market/actiontabs.css122
-rw-r--r--doc/css_market/discussion.mdwn9
-rw-r--r--doc/css_market/zack.css224
-rw-r--r--doc/download.mdwn13
-rw-r--r--doc/examples/blog.mdwn21
-rw-r--r--doc/examples/blog/index.mdwn11
-rw-r--r--doc/examples/blog/posts/first_post.mdwn2
-rw-r--r--doc/examples/softwaresite/index.mdwn2
-rw-r--r--doc/forum.mdwn2
-rw-r--r--doc/forum/Adding_new_markup_to_markdown.mdwn11
-rw-r--r--doc/forum/Darcs_as_the_RCS___63__.mdwn11
-rw-r--r--doc/forum/How_does_ikiwiki_remember_times__63__.mdwn89
-rw-r--r--doc/forum/How_to_fix___34__does_not_map_to_Unicode__34___errors__63__.mdwn20
-rw-r--r--doc/forum/Is_there_a_pagespec_for_creation_dates_relative_to_today__63__.mdwn6
-rw-r--r--doc/forum/Migrating_old_repository_to_new_ikiwiki_system__63__.mdwn58
-rw-r--r--doc/forum/What_is_wrong_with_my_recentchange_page___63__.mdwn13
-rw-r--r--doc/forum/chinese_character_problem.mdwn21
-rw-r--r--doc/forum/discussion.mdwn7
-rw-r--r--doc/forum/ikiwiki__39__s_notion_of_time.mdwn35
-rw-r--r--doc/forum/managing_todo_lists.mdwn44
-rw-r--r--doc/forum/multi-user_setup_of_ikiwiki__44___gitosis_and_apache2_in_Debian_Sid.mdwn2
-rw-r--r--doc/forum/usedirs___38___indexpages_using_problem.mdwn17
-rw-r--r--doc/forum/wiki_name_in_page_titles.mdwn26
-rw-r--r--doc/freesoftware/discussion.mdwn3
-rw-r--r--doc/git.mdwn41
-rw-r--r--doc/ikiwiki-makerepo.mdwn15
-rw-r--r--doc/ikiwiki-transition.mdwn36
-rw-r--r--doc/ikiwiki/directive.mdwn16
-rw-r--r--doc/ikiwiki/directive/cutpaste.mdwn10
-rw-r--r--doc/ikiwiki/directive/format.mdwn21
-rw-r--r--doc/ikiwiki/directive/inline.mdwn14
-rw-r--r--doc/ikiwiki/directive/inline/discussion.mdwn11
-rw-r--r--doc/ikiwiki/directive/linkmap.mdwn2
-rw-r--r--doc/ikiwiki/directive/meta.mdwn9
-rw-r--r--doc/ikiwiki/directive/pagestats/discussion.mdwn10
-rw-r--r--doc/ikiwiki/directive/tag.mdwn4
-rw-r--r--doc/ikiwiki/directive/testpagespec/discussion.mdwn6
-rw-r--r--doc/ikiwiki/markdown.mdwn4
-rw-r--r--doc/ikiwiki/pagespec.mdwn24
-rw-r--r--doc/ikiwiki/pagespec/attachment.mdwn2
-rw-r--r--doc/ikiwiki/pagespec/discussion.mdwn27
-rw-r--r--doc/ikiwiki/wikilink/discussion.mdwn15
-rw-r--r--doc/ikiwikiusers.mdwn33
-rw-r--r--doc/ikiwikiusers/discussion.mdwn4
-rw-r--r--doc/index/discussion.mdwn4
-rw-r--r--doc/index/openid/discussion.mdwn29
-rw-r--r--doc/install.mdwn9
-rw-r--r--doc/install/discussion.mdwn59
-rw-r--r--doc/news/code_swarm.mdwn2
-rw-r--r--doc/news/git_push_to_this_wiki.mdwn3
-rw-r--r--doc/news/git_push_to_this_wiki/discussion.mdwn37
-rw-r--r--doc/news/ikiwiki_version_3.0.mdwn42
-rw-r--r--doc/news/openid.mdwn2
-rw-r--r--doc/news/openid/discussion.mdwn2
-rw-r--r--doc/news/version_2.62.1.mdwn3
-rw-r--r--doc/news/version_2.63.mdwn21
-rw-r--r--doc/news/version_2.64.mdwn25
-rw-r--r--doc/news/version_2.65.mdwn25
-rw-r--r--doc/news/version_2.66.mdwn39
-rw-r--r--doc/news/version_2.68.mdwn44
-rw-r--r--doc/news/version_2.69.mdwn24
-rw-r--r--doc/news/version_2.70.mdwn3
-rw-r--r--doc/news/version_2.71.mdwn28
-rw-r--r--doc/news/version_2.72.mdwn9
-rw-r--r--doc/news/version_3.09.mdwn16
-rw-r--r--doc/pagehistory.mdwn3
-rw-r--r--doc/plugins/404.mdwn20
-rw-r--r--doc/plugins/aggregate.mdwn42
-rw-r--r--doc/plugins/aggregate/discussion.mdwn2
-rw-r--r--doc/plugins/anonok.mdwn5
-rw-r--r--doc/plugins/autoindex/discussion.mdwn7
-rw-r--r--doc/plugins/blogspam.mdwn26
-rw-r--r--doc/plugins/calendar.mdwn2
-rw-r--r--doc/plugins/calendar/discussion.mdwn4
-rw-r--r--doc/plugins/comments.mdwn52
-rw-r--r--doc/plugins/comments/discussion.mdwn163
-rw-r--r--doc/plugins/contrib.mdwn2
-rw-r--r--doc/plugins/contrib/default_content_for___42__copyright__42___and___42__license__42__.mdwn4
-rw-r--r--doc/plugins/contrib/gallery.mdwn2
-rw-r--r--doc/plugins/contrib/headinganchors.mdwn8
-rw-r--r--doc/plugins/contrib/highlightcode.mdwn3
-rw-r--r--doc/plugins/contrib/linguas.mdwn3
-rw-r--r--doc/plugins/contrib/mediawiki.mdwn5
-rw-r--r--doc/plugins/contrib/opml.mdwn11
-rw-r--r--doc/plugins/contrib/opml/discussion.mdwn4
-rw-r--r--doc/plugins/contrib/po.mdwn386
-rw-r--r--doc/plugins/contrib/siterel2pagerel.mdwn8
-rw-r--r--doc/plugins/contrib/sourcehighlight.mdwn18
-rw-r--r--doc/plugins/contrib/unixauth.mdwn24
-rw-r--r--doc/plugins/contrib/unixauth/discussion.mdwn4
-rw-r--r--doc/plugins/creole.mdwn8
-rw-r--r--doc/plugins/creole/discussion.mdwn4
-rw-r--r--doc/plugins/cutpaste.mdwn2
-rw-r--r--doc/plugins/ddate.mdwn1
-rw-r--r--doc/plugins/discussion.mdwn9
-rw-r--r--doc/plugins/embed.mdwn8
-rw-r--r--doc/plugins/format.mdwn9
-rw-r--r--doc/plugins/format/discussion.mdwn15
-rw-r--r--doc/plugins/goodstuff.mdwn2
-rw-r--r--doc/plugins/google/discussion.mdwn6
-rw-r--r--doc/plugins/googlecalendar.mdwn20
-rw-r--r--doc/plugins/goto.mdwn10
-rw-r--r--doc/plugins/htmlbalance.mdwn9
-rw-r--r--doc/plugins/htmlbalance/discussion.mdwn10
-rw-r--r--doc/plugins/htmlscrubber.mdwn8
-rw-r--r--doc/plugins/htmltidy.mdwn3
-rw-r--r--doc/plugins/img/discussion.mdwn5
-rw-r--r--doc/plugins/lockedit.mdwn6
-rw-r--r--doc/plugins/mdwn/discussion.mdwn7
-rw-r--r--doc/plugins/meta.mdwn2
-rw-r--r--doc/plugins/pagecount.mdwn4
-rw-r--r--doc/plugins/passwordauth/discussion.mdwn68
-rw-r--r--doc/plugins/pingee.mdwn2
-rw-r--r--doc/plugins/prettydate.mdwn2
-rw-r--r--doc/plugins/relativedate.mdwn16
-rw-r--r--doc/plugins/repolist.mdwn17
-rw-r--r--doc/plugins/rst.mdwn2
-rw-r--r--doc/plugins/shortcut/discussion.mdwn11
-rw-r--r--doc/plugins/tag.mdwn3
-rw-r--r--doc/plugins/tag/discussion.mdwn6
-rw-r--r--doc/plugins/textile/discussion.mdwn1
-rw-r--r--doc/plugins/type/date.mdwn1
-rw-r--r--doc/plugins/underlay.mdwn14
-rw-r--r--doc/plugins/wmd.mdwn16
-rw-r--r--doc/plugins/write.mdwn169
-rw-r--r--doc/plugins/write/discussion.mdwn4
-rw-r--r--doc/plugins/write/external.mdwn7
-rw-r--r--doc/plugins/write/tutorial.mdwn2
-rw-r--r--doc/rcs/details.mdwn3
-rw-r--r--doc/rcs/git.mdwn41
-rw-r--r--doc/rcs/mercurial.mdwn6
-rw-r--r--doc/rcs/monotone.mdwn5
-rw-r--r--doc/roadmap.mdwn53
-rw-r--r--doc/robots.txt2
-rw-r--r--doc/sandbox.mdwn32
-rw-r--r--doc/sandbox/Omgwtf_a_blof_post__33____33____33____33____33__1__33__1__33__11111__33____33____33__1__33__1__33____33__1five.html31
-rw-r--r--doc/sandbox/castle/discussion/jon_tests_too.mdwn2
-rw-r--r--doc/sandbox/foobak.mdwn1
-rw-r--r--doc/sandbox/한글.mdwn1
-rw-r--r--doc/sandbox/한글페이지.mdwn2
-rw-r--r--doc/security.mdwn10
-rw-r--r--doc/setup.mdwn249
-rw-r--r--doc/setup/byhand.mdwn190
-rw-r--r--doc/setup/discussion.mdwn27
-rw-r--r--doc/style.css27
-rw-r--r--doc/tips/DreamHost.mdwn2
-rw-r--r--doc/tips/Git_repository_and_web_server_on_different_hosts.mdwn61
-rw-r--r--doc/tips/Google_custom_search.mdwn5
-rw-r--r--doc/tips/apache_cgi.mdwn25
-rw-r--r--doc/tips/comments_feed.mdwn10
-rw-r--r--doc/tips/convert_MoinMoin_and_TWiki_to_ikiwiki.mdwn3
-rw-r--r--doc/tips/convert_mediawiki_to_ikiwiki.mdwn4
-rw-r--r--doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn612
-rw-r--r--doc/tips/dot_cgi.mdwn57
-rw-r--r--doc/tips/emacs_syntax_highlighting.mdwn3
-rw-r--r--doc/tips/embedding_content.mdwn35
-rw-r--r--doc/tips/github.mdwn64
-rw-r--r--doc/tips/howto_avoid_flooding_aggregators.mdwn16
-rw-r--r--doc/tips/inside_dot_ikiwiki.mdwn25
-rw-r--r--doc/tips/inside_dot_ikiwiki/discussion.mdwn47
-rw-r--r--doc/tips/laptop_wiki_with_git.mdwn2
-rw-r--r--doc/tips/laptop_wiki_with_git/discussion.mdwn5
-rw-r--r--doc/tips/lighttpd_cgi.mdwn15
-rw-r--r--doc/tips/markdown_and_eclipse.mdwn4
-rw-r--r--doc/tips/nearlyfreespeech.mdwn3
-rw-r--r--doc/tips/untrusted_git_push.mdwn122
-rw-r--r--doc/tips/untrusted_git_push/discussion.mdwn33
-rw-r--r--doc/tips/upgrade_to_3.0.mdwn95
-rw-r--r--doc/tips/using_the_web_interface_with_a_real_text_editor.mdwn7
-rw-r--r--doc/tips/vim_syntax_highlighting.mdwn6
-rw-r--r--doc/tips/vim_syntax_highlighting/discussion.mdwn9
-rw-r--r--doc/tips/vim_syntax_highlighting/ikiwiki.vim2
-rw-r--r--doc/todo/Add_DATE_parameter_for_use_in_templates.mdwn14
-rw-r--r--doc/todo/Add_camelcase_exclusions.mdwn23
-rw-r--r--doc/todo/Add_showdown_GUI_input__47__edit.mdwn2
-rw-r--r--doc/todo/Add_support_for_latest_Text::Markdown_as_found_on_CPAN.mdwn2
-rw-r--r--doc/todo/Allow_change_of_wiki_file_types.mdwn8
-rw-r--r--doc/todo/Allow_disabling_edit_and_preferences_links.mdwn54
-rw-r--r--doc/todo/Allow_edittemplate_to_set_file_type.mdwn8
-rw-r--r--doc/todo/Allow_filenames_that_are_all_type.mdwn41
-rw-r--r--doc/todo/Bestdir_along_with_bestlink_in_IkiWiki.pm.mdwn8
-rw-r--r--doc/todo/Default_text_for_new_pages.mdwn8
-rw-r--r--doc/todo/Feature_parity_with_Trac.mdwn5
-rw-r--r--doc/todo/Gallery.mdwn8
-rw-r--r--doc/todo/Give_access_to_more_TMPL__95__VAR_variables_in_templates_inserted_by_the_template_plugin.mdwn2
-rw-r--r--doc/todo/Improve_display_of_OpenIDs.mdwn5
-rw-r--r--doc/todo/Inline_plugin_option_to_show_full_page_path.mdwn2
-rw-r--r--doc/todo/Move_teximg_latex_preamble_to_config_file.mdwn10
-rw-r--r--doc/todo/New_preprocessor_directive_syntax/discussion.mdwn17
-rw-r--r--doc/todo/Option_to_make_title_an_h1__63__.mdwn6
-rw-r--r--doc/todo/RecentChanges_page_links_without_cgi_wrapper.mdwn26
-rw-r--r--doc/todo/Set_arbitrary_date_to_be_used_by_calendar_plugin.mdwn12
-rw-r--r--doc/todo/Silence_monotone_warning.mdwn2
-rw-r--r--doc/todo/Support_wildcard_inside_of_link__40____41___within_a_pagespec.mdwn4
-rw-r--r--doc/todo/Untrusted_push_in_Monotone.mdwn28
-rw-r--r--doc/todo/Wrapper_config_with_multiline_regexp.mdwn4
-rw-r--r--doc/todo/add_forward_age_sorting_option_to_inline.mdwn2
-rw-r--r--doc/todo/allow_disabling_backlinks.mdwn18
-rw-r--r--doc/todo/anti-spam_protection.mdwn11
-rw-r--r--doc/todo/apache_404_ErrorDocument_handler.mdwn25
-rw-r--r--doc/todo/applydiff_plugin.mdwn56
-rw-r--r--doc/todo/auto-create_tag_pages_according_to_a_template.mdwn99
-rw-r--r--doc/todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion.mdwn333
-rw-r--r--doc/todo/avatar.mdwn47
-rw-r--r--doc/todo/avoid_thrashing.mdwn22
-rw-r--r--doc/todo/blogpost_plugin.mdwn20
-rw-r--r--doc/todo/bzr.mdwn28
-rw-r--r--doc/todo/cas_authentication.mdwn14
-rw-r--r--doc/todo/clear_page_to_delete.mdwn33
-rw-r--r--doc/todo/color_plugin.mdwn20
-rw-r--r--doc/todo/comments.mdwn170
-rw-r--r--doc/todo/configurable_timezones.mdwn5
-rw-r--r--doc/todo/darcs.mdwn28
-rw-r--r--doc/todo/datearchives-plugin.mdwn8
-rw-r--r--doc/todo/different_search_engine.mdwn40
-rw-r--r--doc/todo/directive_docs.mdwn12
-rw-r--r--doc/todo/discussion_page_as_blog.mdwn2
-rw-r--r--doc/todo/dynamic_rootpage.mdwn7
-rw-r--r--doc/todo/enable-htaccess-files.mdwn2
-rw-r--r--doc/todo/firm_up_plugin_interface.mdwn4
-rw-r--r--doc/todo/format_escape.mdwn16
-rw-r--r--doc/todo/fortune:_select_options_via_environment.mdwn4
-rw-r--r--doc/todo/generic___39__do__61__goto__39___for_CGI.mdwn35
-rw-r--r--doc/todo/httpauth_feature_parity_with_passwordauth.mdwn28
-rw-r--r--doc/todo/index.html_allowed.mdwn10
-rw-r--r--doc/todo/inline:_numerical_ordering_by_title.mdwn24
-rw-r--r--doc/todo/inline_plugin:_ability_to_override_feed_name.mdwn29
-rw-r--r--doc/todo/inline_plugin:_hide_feed_buttons_if_empty.mdwn7
-rw-r--r--doc/todo/inline_postform_autotitles.mdwn52
-rw-r--r--doc/todo/language_definition_for_the_meta_plugin.mdwn4
-rw-r--r--doc/todo/latex.mdwn3
-rw-r--r--doc/todo/location_of_external_plugins.mdwn24
-rw-r--r--doc/todo/location_of_ikiwiki-w3m.cgi.mdwn3
-rw-r--r--doc/todo/mbox.mdwn3
-rw-r--r--doc/todo/mdwn_preview.mdwn305
-rw-r--r--doc/todo/mercurial.mdwn60
-rw-r--r--doc/todo/meta_rcsid.mdwn2
-rw-r--r--doc/todo/missingparents.pm.mdwn44
-rw-r--r--doc/todo/modify_page_filename_in_plugin.mdwn8
-rw-r--r--doc/todo/natural_sorting.mdwn21
-rw-r--r--doc/todo/need_global_renamepage_hook.mdwn115
-rw-r--r--doc/todo/overriding_displayed_modification_time.mdwn27
-rw-r--r--doc/todo/pagespec_relative_to_a_target.mdwn16
-rw-r--r--doc/todo/pingback_support.mdwn39
-rw-r--r--doc/todo/plugin.mdwn4
-rw-r--r--doc/todo/provide_inline_diffs_in_recentchanges.mdwn5
-rw-r--r--doc/todo/provide_sha1_for_git_diffurl.mdwn26
-rw-r--r--doc/todo/rcs_updates_needed.mdwn (renamed from doc/todo/rcs_updates_needed_for_rename_and_remove.mdwn)5
-rw-r--r--doc/todo/redirect_automatically_after_rename.mdwn10
-rw-r--r--doc/todo/relative_pagespec_deficiency.mdwn8
-rw-r--r--doc/todo/replace_HTML::Template_with_Template_Toolkit.mdwn4
-rw-r--r--doc/todo/require_CAPTCHA_to_edit.mdwn22
-rw-r--r--doc/todo/rewrite_ikiwiki_in_haskell.mdwn68
-rw-r--r--doc/todo/rewrite_ikiwiki_in_haskell/discussion.mdwn14
-rw-r--r--doc/todo/source_link.mdwn16
-rw-r--r--doc/todo/structured_page_data.mdwn50
-rw-r--r--doc/todo/support_creole_markup.mdwn2
-rw-r--r--doc/todo/supporting_comments_via_disussion_pages.mdwn17
-rw-r--r--doc/todo/syntax_highlighting.mdwn133
-rw-r--r--doc/todo/syntax_highlighting/discussion.mdwn26
-rw-r--r--doc/todo/tag_pagespec_function.mdwn34
-rw-r--r--doc/todo/tidy_git__39__s_ctime_debug_output.mdwn2
-rw-r--r--doc/todo/tla.mdwn3
-rw-r--r--doc/todo/tmplvars_plugin.mdwn12
-rw-r--r--doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn3
-rw-r--r--doc/todo/tracking_bugs_with_dependencies.mdwn58
-rw-r--r--doc/todo/turn_edittemplate_verbosity_off_by_default.mdwn6
-rw-r--r--doc/todo/using_meta_titles_for_parentlinks.html116
-rw-r--r--doc/todo/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup.mdwn8
-rw-r--r--doc/todo/wiki-formatted_comments_with_syntax_plugin.mdwn5
-rw-r--r--doc/todo/wikiwyg.mdwn5
-rw-r--r--doc/usage.mdwn45
-rw-r--r--doc/users/Edward_Betts.mdwn4
-rw-r--r--doc/users/StevenBlack.mdwn5
-rw-r--r--doc/users/ajt.mdwn20
-rw-r--r--doc/users/alexander.mdwn1
-rw-r--r--doc/users/cfm.mdwn1
-rw-r--r--doc/users/hb/discussion.mdwn3
-rw-r--r--doc/users/intrigeri.mdwn2
-rw-r--r--doc/users/jasonblevins.mdwn106
-rw-r--r--doc/users/jelmer.mdwn1
-rw-r--r--doc/users/jon.mdwn20
-rw-r--r--doc/users/jondowland.mdwn5
-rw-r--r--doc/users/joshtriplett.mdwn13
-rw-r--r--doc/users/jrblevin.mdwn1
-rw-r--r--doc/users/jwalzer.mdwn3
-rw-r--r--doc/users/neale.mdwn10
-rw-r--r--doc/users/nolan.mdwn1
-rw-r--r--doc/users/seanh.mdwn1
-rw-r--r--doc/users/simonraven.mdwn3
-rw-r--r--doc/users/smcv.mdwn11
-rw-r--r--doc/users/smcv/gallery.mdwn342
-rw-r--r--doc/users/svend.mdwn4
-rw-r--r--doc/users/weakish.mdwn1
-rw-r--r--doc/users/weakishjiang.mdwn4
-rw-r--r--doc/users/xma.mdwn28
-rw-r--r--doc/users/xma/discussion.mdwn18
-rw-r--r--doc/wikiicons/openidlogin-bg.gifbin142 -> 336 bytes
-rw-r--r--doc/wikitemplates.mdwn6
376 files changed, 8413 insertions, 1340 deletions
diff --git a/doc/bugs/Aggregated_Atom_feeds_are_double-encoded.mdwn b/doc/bugs/Aggregated_Atom_feeds_are_double-encoded.mdwn
new file mode 100644
index 000000000..fbdc58d5d
--- /dev/null
+++ b/doc/bugs/Aggregated_Atom_feeds_are_double-encoded.mdwn
@@ -0,0 +1,22 @@
+The Atom feed from <http://planet.collabora.co.uk/>
+get "double-encoded" (UTF-8 is decoded as Latin-1 and re-encoded as
+UTF-8) when aggregated with IkiWiki on Debian unstable. The RSS 1.0
+and RSS 2.0 feeds from the same Planet are fine. All three files
+are in fact correct UTF-8, but IkiWiki mis-parses the Atom.
+
+This turns out to be a bug in XML::Feed, or (depending on your point
+of view) XML::Feed failing to work around a design flaw in XML::Atom.
+When parsing RSS it returns Unicode strings, but when parsing Atom
+it delegates to XML::Atom's behaviour, which by default is to strip
+the UTF8 flag from strings that it outputs; as a result, they're
+interpreted by IkiWiki as byte sequences corresponding to the UTF-8
+encoding. IkiWiki then treats these as if they were Latin-1 and
+encodes them into UTF-8 for output.
+
+I've filed a bug against XML::Feed on CPAN requesting that it sets
+the right magical variable to change this behaviour. IkiWiki can
+also apply the same workaround (and doing so should be harmless even
+when XML::Feed is fixed); please consider merging my 'atom' branch,
+which does so. --[[smcv]]
+
+[[!tag patch done]]
diff --git a/doc/bugs/Allow_overriding_of_symlink_restriction.mdwn b/doc/bugs/Allow_overriding_of_symlink_restriction.mdwn
index 07badd646..efdd9004e 100644
--- a/doc/bugs/Allow_overriding_of_symlink_restriction.mdwn
+++ b/doc/bugs/Allow_overriding_of_symlink_restriction.mdwn
@@ -34,9 +34,9 @@ Is there a huge objection to this patch?
index 990fcaa..0fb78ba 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
- @@ -260,13 +260,15 @@ sub prune ($) { #{{{
+ @@ -260,13 +260,15 @@ sub prune ($) {
- sub refresh () { #{{{
+ sub refresh () {
# security check, avoid following symlinks in the srcdir path
- my $test=$config{srcdir};
- while (length $test) {
@@ -108,7 +108,7 @@ like this being accepted before I bothered.
use IkiWiki;
+use File::Spec;
- sub gen_wrapper () { #{{{
+ sub gen_wrapper () {
- $config{srcdir}=abs_path($config{srcdir});
- $config{destdir}=abs_path($config{destdir});
- my $this=abs_path($0);
diff --git a/doc/bugs/CGI__44___formbuilder__44___non-existent_field_address.mdwn b/doc/bugs/CGI__44___formbuilder__44___non-existent_field_address.mdwn
new file mode 100644
index 000000000..ef74deb91
--- /dev/null
+++ b/doc/bugs/CGI__44___formbuilder__44___non-existent_field_address.mdwn
@@ -0,0 +1,59 @@
+Error received when clicking on the "edit" link:
+
+> `Error: [CGI::FormBuilder::AUTOLOAD] Fatal: Attempt to address
+> non-existent field 'text' by name at
+> /home/tealart/bin/share/perl/5.8.4/IkiWiki/CGI.pm line 112`
+
+Error received when following a "Create New Page" (eg. ?) link:
+
+> `Error: [CGI::FormBuilder::AUTOLOAD] Fatal: Attempt to address
+> non-existent field 'param' by name at
+> /home/tealart/bin/share/perl/5.8.4/IkiWiki/Plugin/editpage.pm line 122`
+
+I could probably find several other flavors of this error if I went
+looking, but I trust you get the idea.
+
+The CGI starts to render (this isn't the "you forgot to set the
+permissions/turn on the CGI" error) and then fails.
+
+Further details:
+
+- Running on shared hosting (dreamhost; but everything compiles,
+ dependencies installed, the site generates perfectly, other CGIs
+ work, the file permissions work).
+
+- It's running perl 5.8.4, but I did upgrade gettext to 0.17
+
+- the server is running gcc v3.3.5 (at this point, this is the main
+ difference between the working system and my box.)
+
+- I've removed the locale declarations from both the config file and
+ the environment variable.
+
+- I've also modified the page template and have my templates in a non
+ standard location. The wiki compiles fine, with the template, but
+ might this be an issue? The CGI script doesn't (seem) to load under
+ the new template, but I'm not sure how to address this issue.
+
+- All of the required/suggested module dependencies are installed
+ (finally) to the latest version including (relevantly)
+ CGI::FormBuilder 3.0501.
+
+- I'm running ikiwiki v3.08. Did I mention that it works perfectly in
+ nearly every other way that I've managed to test thusfar?
+
+----
+
+> I suspect that your perl is too old and is incompatible with the version of CGI::FormBuilder you have installed.
+>
+> Is so, it seems likely that the same error message can be reproduced by running a simple command like this at the command line:
+>
+> perl -e 'use warnings; use strict; use CGI::FormBuilder; my $form=CGI::FormBuilder->new; $form->text("boo")'
+>
+> --[[Joey]]
+
+> > nope, that command produces no output. :/
+> >
+> > I considered downgrading CGI::FormBuilder but I saw evidence of previous versions being incompatible with ikiwiki so I decided against that.
+> >
+> > -- [[tychoish]]
diff --git a/doc/bugs/Can__39__t_create_root_page.mdwn b/doc/bugs/Can__39__t_create_root_page.mdwn
index 60cbcd530..91c2eae60 100644
--- a/doc/bugs/Can__39__t_create_root_page.mdwn
+++ b/doc/bugs/Can__39__t_create_root_page.mdwn
@@ -33,7 +33,7 @@ This type of page name (with leading slash) also gets created by the aggregate p
index 99cead6..23d9616 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
- @@ -305,9 +305,11 @@ sub cgi_editpage ($$) { #{{{
+ @@ -305,9 +305,11 @@ sub cgi_editpage ($$) {
my $page=$form->field('page');
$page=possibly_foolish_untaint($page);
if (! defined $page || ! length $page ||
@@ -46,7 +46,7 @@ This type of page name (with leading slash) also gets created by the aggregate p
my $baseurl=$config{url}."/".htmlpage($page);
- @@ -425,6 +427,7 @@ sub cgi_editpage ($$) { #{{{
+ @@ -425,6 +427,7 @@ sub cgi_editpage ($$) {
$from ne $form->field('from') ||
file_pruned($from, $config{srcdir}) ||
$from=~/^\// ||
diff --git a/doc/bugs/Comments_link_is_to_index.html_if_usedirs_is_on.mdwn b/doc/bugs/Comments_link_is_to_index.html_if_usedirs_is_on.mdwn
new file mode 100644
index 000000000..6df3ccd9c
--- /dev/null
+++ b/doc/bugs/Comments_link_is_to_index.html_if_usedirs_is_on.mdwn
@@ -0,0 +1,5 @@
+When a page links to its own #comments anchor you get a link like
+"index.html#comments" rather than "./#comments". Fixed in commit 0844bd0b
+on my 'comments' branch. --[[smcv]]
+
+[[!tag patch done]]
diff --git a/doc/bugs/Error:_Your_login_session_has_expired._.mdwn b/doc/bugs/Error:_Your_login_session_has_expired._.mdwn
new file mode 100644
index 000000000..046d6e10d
--- /dev/null
+++ b/doc/bugs/Error:_Your_login_session_has_expired._.mdwn
@@ -0,0 +1,44 @@
+I keep getting:
+
+ Error: Your login session has expired.
+
+Whilst trying to edit http://hugh.vm.bytemark.co.uk/ikiwiki.cgi via OpenID. Any ideas?
+
+
+ iki@hugh:~$ dpkg -l | grep openid
+ ii libnet-openid-consumer-perl 0.14-4 library for consumers of OpenID iden
+ tities
+ iki@hugh:~$
+
+> This error occurs if ikiwiki sees something that looks like a CSRF
+> attack. It checks for such an attack by embedding your session id on the
+> page edit form, and comparing that id with the session id used to post
+> the form.
+>
+> So, somehow your session id has changed between opening the edit form and
+> posting it. A few ways this could happen:
+>
+> * Genuine CSRF attack (unlikely)
+> * If you logged out and back in, in another tab, while the edit form was
+> open.
+> * If `.ikiwiki/sessions.db` was deleted/corrupted while you were in the
+> midst of the edit.
+> * If some bug in CGI::Session caused your session not to be saved to the
+> database somehow.
+> * If your browser didn't preserve the session cookie across the edit
+> process, for whatever local reason.
+> * If you were using a modified version of `editpage.tmpl`, and
+> it did not include `FIELD-SID`.
+> * If you upgraded from an old version of ikiwiki, before `FIELD-SID` was
+> added (<= 2.41), and had an edit form open from that old version, and
+> tried to save it using the new.
+>
+> I don't see the problem editing the sandbox there myself, FWIW.
+> (BTW, shouldn't you enable the meta plugin so RecentChanges displays
+> better?)
+> --[[joey]]
+
+
+Thanks for you excellent analysis. The bug was due to old pre-3.0 **templates** laying about. After deleting them, ikiwiki defaults to its own templates. Clever. :-)
+
+[[bugs/done]]
diff --git a/doc/bugs/Git:_web_commit_message_not_utf-8.mdwn b/doc/bugs/Git:_web_commit_message_not_utf-8.mdwn
new file mode 100644
index 000000000..08247dded
--- /dev/null
+++ b/doc/bugs/Git:_web_commit_message_not_utf-8.mdwn
@@ -0,0 +1,17 @@
+The message generated for web commits:
+
+> web commit by mädduck
+
+is not utf-8 encoded before passed to Git (which uses utf-8 as default encoding for commit messages). This causes a wrongly-encoded log entry, and makes ikiwiki spew warnings as it creates `recentchanges`:
+
+ utf8 "\xF6" does not map to Unicode at /usr/share/perl5/IkiWiki/Rcs/git.pm line 36, <$OUT> line 57.
+ Malformed UTF-8 character (unexpected non-continuation byte 0x6e, immediately after start byte 0xf6) in pattern match (m//) at /usr/share/perl5/IkiWiki/Rcs/git.pm line 393.
+ utf8 "\xF6" does not map to Unicode at /usr/share/perl5/IkiWiki/Rcs/git.pm line 36, <$OUT> line 5.
+
+(This is version 2.53.3~bpo40+1 for lack of a newer backport for sarge)
+
+Please make sure that commit messages for Git are always utf-8.
+
+This is a change by user `mädduck` to trigger the error.
+
+> [[Fixed|done]] both on the commit and log sides. --[[Joey]]
diff --git a/doc/bugs/INC_location_not_set_correctly_in_make_test.mdwn b/doc/bugs/INC_location_not_set_correctly_in_make_test.mdwn
new file mode 100644
index 000000000..1d396c85b
--- /dev/null
+++ b/doc/bugs/INC_location_not_set_correctly_in_make_test.mdwn
@@ -0,0 +1,24 @@
+'make test' has the following errors:
+
+Can't locate Locale/gettext.pm in @INC (@INC contains: /home/turian/utils//lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /home/turian/utils//lib/perl5/site_perl/5.8.8 . /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8) at (eval 254) line 2.
+
+What's weird is that I already have gettext.pm:
+ /home/turian/utils/lib/perl5/lib/i386-linux-thread-multi/Locale/gettext.pm
+
+That directory should be part of @INC, because I have:
+ export PERL5LIB="$PERL5LIB:$UTILS/lib/perl5/lib/i386-linux-thread-multi/"
+in my .bashrc. However, /home/turian/utils/lib/perl5/lib/i386-linux-thread-multi/ does not appear in that @INC line.
+
+How do I get the proper @INC locations set?
+
+> Nothing in ikiwiki touches whatever PERL5DIR setting you may have,
+> so AFAICS, this must be some sort of local configuration problem.
+> How do
+> `/home/turian/utils//lib/perl5/site_perl/5.8.8/i386-linux-thread-multi`
+> and `/home/turian/utils//lib/perl5/site_perl/5.8.8` get into the
+> displayed `@INC`? The likely way seems to be that something in your
+> system sets PERL5LIB to contain those directories, clobbering
+> the earlier setting in your `.bashrc`.
+> --[[Joey]]
+
+[[!tag done]]
diff --git a/doc/bugs/IkiWiki::Wrapper_should_use_destdir.mdwn b/doc/bugs/IkiWiki::Wrapper_should_use_destdir.mdwn
new file mode 100644
index 000000000..6b02c4186
--- /dev/null
+++ b/doc/bugs/IkiWiki::Wrapper_should_use_destdir.mdwn
@@ -0,0 +1,23 @@
+In IkiWiki/Wrapper.pm, the gen_wrapper function finds out what srcdir and
+destdir are set to in the config, but does not use them.
+
+Later in the sub, when a new wiki.cgi wrapper is being created when calling
+ikiwiki --setup /path/to/setup, it will only work if cgi\_wrapper in the
+config file is set to the full path. Otherwise, it creates wiki.cgi in the
+current working directory. It works with the other wrapper it sets up in
+my config - post\_update (using git), as that shows in the config with a
+full path.
+
+One workaround would be to mention in the setup file that cgi_wrapper has
+to be the full path, not just the file name, but that seems silly when
+destdir is also specified in that file and that's where it should go, and
+$config{destdir} is a known value in the Wrapper.pm file.
+
+> Nowhere in any documentation does
+> it say that cgi\_wrapper is relative to the destdir.
+> As noted in [[discussion]], there are web server setups
+> that require the cgi be located elsewhere.
+> [[done]] --[[Joey]]
+
+>> A comment in the generated setup file that all paths should be full
+>> would prevent my (admittedly dumb) error without any drawbacks.
diff --git a/doc/bugs/IkiWiki::Wrapper_should_use_destdir/discussion.mdwn b/doc/bugs/IkiWiki::Wrapper_should_use_destdir/discussion.mdwn
new file mode 100644
index 000000000..870fa7a66
--- /dev/null
+++ b/doc/bugs/IkiWiki::Wrapper_should_use_destdir/discussion.mdwn
@@ -0,0 +1,4 @@
+Just as a point of information, I do not put my cgi wrapper in the dest
+directory. Instead I configure Apache to relate a specific URI to the cgi via
+ScriptAlias. I would not like things to be changed so that the cgi was put in
+the destdir, so I'd vote instead to comment in the `setup\_file`. -- [[Jon]]
diff --git a/doc/bugs/Insecure_dependency_in_eval_while_running_with_-T_switch.mdwn b/doc/bugs/Insecure_dependency_in_eval_while_running_with_-T_switch.mdwn
index 28b48e2c6..c3beb8219 100644
--- a/doc/bugs/Insecure_dependency_in_eval_while_running_with_-T_switch.mdwn
+++ b/doc/bugs/Insecure_dependency_in_eval_while_running_with_-T_switch.mdwn
@@ -53,7 +53,7 @@ I didn't apply your following old patch against `Ikiwiki.pm` file:
+ }
+
+ return eval $newpagespec;
- } #}}}
+ }
package IkiWiki::PageSpec;
@@ -83,7 +83,7 @@ to break the code I distribute in my backport ;)
+ my $ret=eval possibly_foolish_untaint(pagespec_translate($spec));
return IkiWiki::FailReason->new("syntax error") if $@;
return $ret;
- } #}}}
+ }
>> Thanks a lot, Joey! It works :)
>>
diff --git a/doc/bugs/Meta_plugin_does_not_respect_htmlscrubber__95__skip_setting.___40__patch__41__.mdwn b/doc/bugs/Meta_plugin_does_not_respect_htmlscrubber__95__skip_setting.___40__patch__41__.mdwn
new file mode 100644
index 000000000..0e40da551
--- /dev/null
+++ b/doc/bugs/Meta_plugin_does_not_respect_htmlscrubber__95__skip_setting.___40__patch__41__.mdwn
@@ -0,0 +1,11 @@
+I have been trying to include some meta info using the link setting something like the below
+
+ meta link="http://www.example.com/" rel="command" name="Example"
+
+This gets removed by the htmlscrubber as you would expect.
+
+Setting htmlscrubber_skip to the pagespec should stop this getting scrubbed but it does not.
+
+Below is a patch to fix that. It seams to work but I am not sure of it is the correct thing to do.
+
+> [[done]], thanks for the patch --[[Joey]]
diff --git a/doc/bugs/Monotone_rcs_support.mdwn b/doc/bugs/Monotone_rcs_support.mdwn
index 3d1388312..8687e7983 100644
--- a/doc/bugs/Monotone_rcs_support.mdwn
+++ b/doc/bugs/Monotone_rcs_support.mdwn
@@ -11,7 +11,7 @@ diff --git a/IkiWiki/Rcs/monotone.pm b/IkiWiki/Rcs/monotone.pm
index cde6029..34f8f96 100644
--- a/IkiWiki/Rcs/monotone.pm
+++ b/IkiWiki/Rcs/monotone.pm
-@@ -186,8 +186,9 @@ sub rcs_update () { #{{{
+@@ -186,8 +186,9 @@ sub rcs_update () {
check_config();
if (defined($config{mtnsync}) && $config{mtnsync}) {
diff --git a/doc/bugs/No_link_for_blog_items_when_filename_contains_a_colon.mdwn b/doc/bugs/No_link_for_blog_items_when_filename_contains_a_colon.mdwn
index 019970899..bb3f92f9c 100644
--- a/doc/bugs/No_link_for_blog_items_when_filename_contains_a_colon.mdwn
+++ b/doc/bugs/No_link_for_blog_items_when_filename_contains_a_colon.mdwn
@@ -38,19 +38,19 @@ At the moment I see two possible solutions:
+++ IkiWiki.pm 2008-07-21 20:41:35.000000000 +0200
@@ -477,13 +477,13 @@
- sub titlepage ($) { #{{{
+ sub titlepage ($) {
my $title=shift;
- $title=~s/([^-[:alnum:]:+\/.])/$1 eq ' ' ? '_' : "__".ord($1)."__"/eg;
+ $title=~s/([^-[:alnum:]+\/.])/$1 eq ' ' ? '_' : "__".ord($1)."__"/eg;
return $title;
- } #}}}
+ }
- sub linkpage ($) { #{{{
+ sub linkpage ($) {
my $link=shift;
- $link=~s/([^-[:alnum:]:+\/._])/$1 eq ' ' ? '_' : "__".ord($1)."__"/eg;
+ $link=~s/([^-[:alnum:]+\/._])/$1 eq ' ' ? '_' : "__".ord($1)."__"/eg;
return $link;
- } #}}}
+ }
What do you think about that? Does the patch have any side-effects I didn't see?
diff --git a/doc/bugs/PNG_triggers_UTF-8_error_in_MimeInfo.pm.mdwn b/doc/bugs/PNG_triggers_UTF-8_error_in_MimeInfo.pm.mdwn
new file mode 100644
index 000000000..0a1299993
--- /dev/null
+++ b/doc/bugs/PNG_triggers_UTF-8_error_in_MimeInfo.pm.mdwn
@@ -0,0 +1,25 @@
+If a PNG image matches the [[ikiwiki/PageSpec]] of an [[ikiwiki/directive/inline]] directive, the page throws the following error:
+
+> \[[!inline Error: Malformed UTF-8 character (fatal) at /usr/local/lib/perl5/site_perl/5.8.8/File/MimeInfo.pm line 120.]]
+
+Individual posts display fine, and moving the offending image outside the scope of the [[ikiwiki/directive/inline]] directive's PageSpec eliminates the error.
+
+> I tried to reproduce this with a random png and File::MimeInfo
+> version 0.15, but could not. The png was included in the generated feed
+> via an enclosure, as it should be; no warnings or errors.
+>
+> Looking at the source to File::MimeInfo and its changelog,
+> I'm pretty sure that this problem was fixed in version
+> 0.14:
+>> - Fixed bug with malformed utf8 chars in default() method
+>
+> The code involved in that fix looks like this:
+>
+>> no warnings; # warnings can be thrown when input not ascii
+>> if ($] < 5.008 or ! utf8::valid($line)) {
+>> use bytes; # avoid invalid utf8 chars
+>
+> I guess that your locally installed version of File::MimeInfo is older than
+> this. So closing this bug [[done]]. If you still see the problem with a current
+> version of File::MimeInfo, please reopen and include where I can get a png file
+> that triggers the problem. --[[Joey]]
diff --git a/doc/bugs/Problem_with_toc.pm_plug-in.mdwn b/doc/bugs/Problem_with_toc.pm_plug-in.mdwn
index 8ae347d42..6be5f89b5 100644
--- a/doc/bugs/Problem_with_toc.pm_plug-in.mdwn
+++ b/doc/bugs/Problem_with_toc.pm_plug-in.mdwn
@@ -9,7 +9,7 @@ Here is a patch for toc.pm for producing non-empty 'a' elements.
--- IkiWiki/Plugin/toc.pm.orig Thu Jun 7 11:53:53 2007
+++ IkiWiki/Plugin/toc.pm Thu Jun 7 13:00:00 2007
- @@ -47,7 +47,7 @@ sub format (@) { #{{{
+ @@ -47,7 +47,7 @@ sub format (@) {
if ($tagname =~ /^h(\d+)$/i) {
my $level=$1;
my $anchor="index".++$anchors{$level}."h$level";
@@ -18,7 +18,7 @@ Here is a patch for toc.pm for producing non-empty 'a' elements.
# Take the first header level seen as the topmost level,
# even if there are higher levels seen later on.
- @@ -90,6 +90,16 @@ sub format (@) { #{{{
+ @@ -90,6 +90,16 @@ sub format (@) {
"</a>\n";
$p->handler(text => undef);
}, "dtext");
diff --git a/doc/bugs/Problems_with_graphviz.pm_plug-in.mdwn b/doc/bugs/Problems_with_graphviz.pm_plug-in.mdwn
index 9a26e505a..c9f698158 100644
--- a/doc/bugs/Problems_with_graphviz.pm_plug-in.mdwn
+++ b/doc/bugs/Problems_with_graphviz.pm_plug-in.mdwn
@@ -15,7 +15,7 @@ It also generates image URLs relative to the page being rendered, which means th
--- IkiWiki/Plugin/graphviz.pm.orig 2007-07-27 11:35:05.000000000 +0200
+++ IkiWiki/Plugin/graphviz.pm 2007-07-27 11:36:02.000000000 +0200
- @@ -69,7 +69,12 @@ sub render_graph (\%) { #{{{
+ @@ -69,7 +69,12 @@ sub render_graph (\%) {
}
}
@@ -26,9 +26,9 @@ It also generates image URLs relative to the page being rendered, which means th
+ else {
+ return "<img src=\"".urlto($dest, $params{page})."\" />\n";
+ }
- } #}}}
+ }
- sub graph (@) { #{{{
+ sub graph (@) {
>> --[[HenrikBrixAndersen]]
@@ -38,7 +38,7 @@ The patch below fixes these two issues.
--- graphviz.pm.orig Thu Jun 7 15:45:16 2007
+++ graphviz.pm Fri Jun 8 12:03:38 2007
- @@ -41,7 +41,6 @@ sub render_graph (\%) { #{{{
+ @@ -41,7 +41,6 @@ sub render_graph (\%) {
$pid=open2(*IN, *OUT, "$params{prog} -Tpng");
# open2 doesn't respect "use open ':utf8'"
@@ -46,7 +46,7 @@ The patch below fixes these two issues.
binmode (OUT, ':utf8');
print OUT $src;
- @@ -70,7 +69,12 @@ sub render_graph (\%) { #{{{
+ @@ -70,7 +69,12 @@ sub render_graph (\%) {
}
}
@@ -57,6 +57,6 @@ The patch below fixes these two issues.
+ else {
+ return "<img src=\"".urlto($dest, $params{page})."\" />\n";
+ }
- } #}}}
+ }
- sub graph (@) { #{{{
+ sub graph (@) {
diff --git a/doc/bugs/RecentChanges_broken_with_empty_svnpath.mdwn b/doc/bugs/RecentChanges_broken_with_empty_svnpath.mdwn
index 836c39a71..c852df5e9 100644
--- a/doc/bugs/RecentChanges_broken_with_empty_svnpath.mdwn
+++ b/doc/bugs/RecentChanges_broken_with_empty_svnpath.mdwn
@@ -13,7 +13,7 @@ I can not see why this check is needed in the first place, so here's a patch for
diff -upr ikiwiki-1.49.orig/IkiWiki/Rcs/svn.pm ikiwiki-1.49/IkiWiki/Rcs/svn.pm
--- ikiwiki-1.49.orig/IkiWiki/Rcs/svn.pm Mon Apr 16 15:15:09 2007
+++ ikiwiki-1.49/IkiWiki/Rcs/svn.pm Mon Apr 16 15:15:47 2007
- @@ -176,7 +176,6 @@ sub rcs_recentchanges ($) { #{{{
+ @@ -176,7 +176,6 @@ sub rcs_recentchanges ($) {
}
foreach (keys %{$logentry->{paths}}) {
diff --git a/doc/bugs/SVG_files_not_recognized_as_images.mdwn b/doc/bugs/SVG_files_not_recognized_as_images.mdwn
new file mode 100644
index 000000000..207edd426
--- /dev/null
+++ b/doc/bugs/SVG_files_not_recognized_as_images.mdwn
@@ -0,0 +1,29 @@
+In ikiwiki 2.66, SVG images are not recognized as images. In ikiwiki.pm,
+the hardcoded list of image file extensions does not include ".svg", which
+it probably should unless there's some other issue about rendering SVGs?
+
+The 'img' plugin also seems to not support SVGs.
+
+> SVG images can only be included via an `<object>`, `<embed>`, or
+> `<iframe>` tag. Or, perhaps as [inline SVG](http://wiki.svg.org/Inline_SVG).
+> The [[plugins/htmlscrubber]] strips all three tags since they can easily
+> be used maliciously. If doing inline SVG, I'd worry that the svg file
+> could be malformed and mess up the html, or even inject javascript. So,
+> the only options seem to be only supporting svgs on wikis that do not
+> sanitize their html, or assuming that svgs are trusted content and
+> embedding them inline. None of which seem particularly palatable.
+>
+> I suppose the other option would be converting the svg file to a static
+> image (png). The img plugin could probably do that fairly simply.
+> --[[Joey]]
+
+>> I'm working on inline SVG and MathML support in ikiwiki and I've
+>> modified my htmlscrubber to sanitize SVG and MathML using the
+>> whitelists from html5lib. Here's a [patch][]. I've also made some
+>> notes about this here: [[todo/svg]].
+>>
+>> I suspect that this bug may have caught the eye of anyone interested
+>> in this sort of thing. I'll elaborate a bit on my user page to avoid
+>> getting off-topic here. --[[JasonBlevins]], October 21, 2008
+
+ [patch]: http://xbeta.org/gitweb/?p=xbeta/ikiwiki.git;a=blobdiff;f=IkiWiki/Plugin/htmlscrubber.pm;h=3c0ddc8f25bd8cb863634a9d54b40e299e60f7df;hp=3bdaccea119ec0e1b289a0da2f6d90e2219b8d66;hb=fe333c8e5b4a5f374a059596ee698dacd755182d;hpb=be0b4f603f918444b906e42825908ddac78b7073
diff --git a/doc/bugs/Spaces_in_link_text_for_ikiwiki_links.mdwn b/doc/bugs/Spaces_in_link_text_for_ikiwiki_links.mdwn
index f6dbacad7..8aea5cd29 100644
--- a/doc/bugs/Spaces_in_link_text_for_ikiwiki_links.mdwn
+++ b/doc/bugs/Spaces_in_link_text_for_ikiwiki_links.mdwn
@@ -44,7 +44,7 @@ reported in [[index/discussion#index11h1]].
>>
>> If there was ever a future, syntax-breaking major release of ikiwiki
>> (similar to python3000) I'd like to see this fixed as part of that.
->> --[[JonDowland]]
+>> --[[users/Jon]]
>>> You can enable `prefix_directives` and get the disambiguated behavior
>>> and spaces in wikilinks today. It will become the default in 3.0.
diff --git a/doc/bugs/Titles_are_lower-cased_when_creating_a_page.mdwn b/doc/bugs/Titles_are_lower-cased_when_creating_a_page.mdwn
index cc53c0aea..f2c60309b 100644
--- a/doc/bugs/Titles_are_lower-cased_when_creating_a_page.mdwn
+++ b/doc/bugs/Titles_are_lower-cased_when_creating_a_page.mdwn
@@ -6,7 +6,7 @@ If I click on "Czars in Russia", I'd like Ikiwiki to create "Czars\_in\_Russia.m
> --- a/IkiWiki.pm
> +++ b/IkiWiki.pm
-> @@ -584,7 +584,7 @@ sub htmllink ($$$;@) { #{{{
+> @@ -584,7 +584,7 @@ sub htmllink ($$$;@) {
> return "<span class=\"createlink\"><a href=\"".
> cgiurl(
> do => "create",
diff --git a/doc/bugs/URLs_with_parentheses_displayed_badly.mdwn b/doc/bugs/URLs_with_parentheses_displayed_badly.mdwn
new file mode 100644
index 000000000..59b67d493
--- /dev/null
+++ b/doc/bugs/URLs_with_parentheses_displayed_badly.mdwn
@@ -0,0 +1,19 @@
+I've noticed that Ikiwiki displays URLs with parentheses badly. The problem occurs
+in the latest version 3.00 and older versions. Please look at the link to following
+Polish entry about C programming language at Wikipedia (it seems that URLs with
+parentheses are popular there):
+
+[Język programowania C](http://pl.wikipedia.org/wiki/C_(j%C4%99zyk_programowania))
+
+I need to escape a closing parenthesis of the URL to fix the problem.
+
+[Język programowania C](http://pl.wikipedia.org/wiki/C_(j%C4%99zyk_programowania\))
+
+--[[Paweł|users/ptecza]]
+
+> This is a bug in markdown version 1. It is fixed in [[!cpan Text::Markdown]],
+> which ikiwiki will use if it's installed. [[done]] --[[Joey]]
+
+>> Thanks a lot for the hint, Joey! I've installed `libtext-markdown-perl` package
+>> (Aptitude has removed `markdown` package to satisfy dependencies) and now
+>> I don't need to escape Wikipedia URLs with parentheses :) --[[Paweł|users/ptecza]]
diff --git a/doc/bugs/Use_install__40__1__41___instead_of_cp__40__1__41___for_installing_files.mdwn b/doc/bugs/Use_install__40__1__41___instead_of_cp__40__1__41___for_installing_files.mdwn
index 88a187dfc..12c0ad07f 100644
--- a/doc/bugs/Use_install__40__1__41___instead_of_cp__40__1__41___for_installing_files.mdwn
+++ b/doc/bugs/Use_install__40__1__41___instead_of_cp__40__1__41___for_installing_files.mdwn
@@ -24,4 +24,9 @@ Here is a patch against ikiwiki-1.51 for using find(1) and install(1) instead of
>> No, apparently FreeBSD `install` does not support `-D`. See [the FreeBSD install manpage](http://www.freebsd.org/cgi/man.cgi?query=install&apropos=0&sektion=0&manpath=FreeBSD+6.2-RELEASE&format=html). --[[JoshTriplett]]
->> Patch applied; [[bugs/done]]. --[[JoshTriplett]]
+>> Patch applied; [[done]]. --[[JoshTriplett]]
+
+There are still/again "cp -a"s in the Makefile as of 3.00
+
+> It's a cp -a || install. Is that causing you a problem somehow?
+> --[[Joey]]
diff --git a/doc/bugs/Warns_about_use_of_uninitialized_value_if_prefix__95__directives_is_on_and_a_directive_does_not_contain_a_space.mdwn b/doc/bugs/Warns_about_use_of_uninitialized_value_if_prefix__95__directives_is_on_and_a_directive_does_not_contain_a_space.mdwn
index a30f110a4..efb5c70b8 100644
--- a/doc/bugs/Warns_about_use_of_uninitialized_value_if_prefix__95__directives_is_on_and_a_directive_does_not_contain_a_space.mdwn
+++ b/doc/bugs/Warns_about_use_of_uninitialized_value_if_prefix__95__directives_is_on_and_a_directive_does_not_contain_a_space.mdwn
@@ -6,7 +6,7 @@ In `IkiWiki::preprocess`, the last capturing group in the regex used to parse di
index 241a7c0..d2c35a2 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
- @@ -1167,7 +1167,8 @@ sub preprocess ($$$;$$) { #{{{
+ @@ -1167,7 +1167,8 @@ sub preprocess ($$$;$$) {
}sx;
}
@@ -14,6 +14,6 @@ In `IkiWiki::preprocess`, the last capturing group in the regex used to parse di
+ # $4 can be undef if the directive was \[[!foo]]
+ $content =~ s{$regex}{$handle->($1, $2, $3, ($4 or ""))}eg;
return $content;
- } #}}}
+ }
[[cherry-picked|done]] --[[Joey]]
diff --git a/doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn b/doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn
new file mode 100644
index 000000000..62931d8bc
--- /dev/null
+++ b/doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn
@@ -0,0 +1,5 @@
+[[plugins/meta]] is not enabled by default, yet some pages in the default basewiki include [[the_meta_directive|ikiwiki/directive/meta]], notably the [[ikiwiki]] heirarchy.
+
+This means that the default output of "ikiwiki src dest", for two empty directories src and dest, result in the meta directive being displayed inline with the page text.
+
+> [[done]], meta now enabled by default.
diff --git a/doc/bugs/beautify__95__urlpath_will_add_.__47___even_if_it_is_already_present.mdwn b/doc/bugs/beautify__95__urlpath_will_add_.__47___even_if_it_is_already_present.mdwn
new file mode 100644
index 000000000..8e96b1f56
--- /dev/null
+++ b/doc/bugs/beautify__95__urlpath_will_add_.__47___even_if_it_is_already_present.mdwn
@@ -0,0 +1,3 @@
+beautify_urlpath will prepend a useless "./" to the URL "./foo". Fixed in commit 5b1cf21a on my comments branch. --[[smcv]]
+
+[[!tag patch done]]
diff --git a/doc/bugs/bugfix_for:___34__mtn:_operation_canceled:_Broken_pipe__34_____40__patch__41__.mdwn b/doc/bugs/bugfix_for:___34__mtn:_operation_canceled:_Broken_pipe__34_____40__patch__41__.mdwn
new file mode 100644
index 000000000..b7f38fd29
--- /dev/null
+++ b/doc/bugs/bugfix_for:___34__mtn:_operation_canceled:_Broken_pipe__34_____40__patch__41__.mdwn
@@ -0,0 +1,24 @@
+When using monotone as revision control system, a "mtn: operation canceled: Broken pipe" message is printed. Reason is that, in a call to mtn, the pipe is closed before mtn has done all its output. This patch fixes the problem.
+
+ diff -up ikiwiki/IkiWiki/Plugin/monotone.pm.orig ikiwiki/IkiWiki/Plugin/monotone.pm
+ --- ikiwiki/IkiWiki/Plugin/monotone.pm.orig 2008-11-12 23:45:24.000000000 +0100
+ +++ ikiwiki/IkiWiki/Plugin/monotone.pm 2008-12-16 12:41:38.000000000 +0100
+ @@ -525,13 +525,12 @@ sub rcs_recentchanges ($) {
+ my $child = open(MTNLOG, "-|");
+ if (! $child) {
+ exec("mtn", "log", "--root=$config{mtnrootdir}", "--no-graph",
+ - "--brief") || error("mtn log failed to run");
+ + "--brief", "--last=$num") || error("mtn log failed to run");
+ }
+
+ - while (($num >= 0) and (my $line = <MTNLOG>)) {
+ + while (my $line = <MTNLOG>) {
+ if ($line =~ m/^($sha1_pattern)/) {
+ push @revs, $1;
+ - $num -= 1;
+ }
+ }
+ close MTNLOG || debug("mtn log exited $?");
+
+> Thanks for the patch, and for testing the monotone backend.
+> applied [[done]] --[[Joey]]
diff --git a/doc/bugs/bzr_RecentChanges_dates_start_from_1969.mdwn b/doc/bugs/bzr_RecentChanges_dates_start_from_1969.mdwn
new file mode 100644
index 000000000..fa6e45b47
--- /dev/null
+++ b/doc/bugs/bzr_RecentChanges_dates_start_from_1969.mdwn
@@ -0,0 +1,16 @@
+Using bzr, the dates for changes on the RecentChanges page all start
+slightly before the Unix epoch.
+
+Changing line 249 of bzr.pm from
+
+` when => time - str2time($info->{"timestamp"}),`
+
+to
+
+` when => str2time($info->{"timestamp"}),`
+
+fixed this for me.
+
+> Weird, I wonder why it was written to return an absolute time like that
+> in the first place? Can't have ever been right. Fixed, thanks. --[[Joey]]
+> [[done]]
diff --git a/doc/bugs/bzr_plugin_does_not_define_rcs__95__diff.mdwn b/doc/bugs/bzr_plugin_does_not_define_rcs__95__diff.mdwn
new file mode 100644
index 000000000..0294ec62e
--- /dev/null
+++ b/doc/bugs/bzr_plugin_does_not_define_rcs__95__diff.mdwn
@@ -0,0 +1,27 @@
+The bzr plugin does not seem to define the rcs_diff subroutine.
+I got the follow error after enabling recentchangesdiff:
+
+"Undefined subroutine &IkiWiki::Plugin::bzr::rcs_diff called at /usr/share/perl5/IkiWiki.pm line 1590."
+
+Grepping to verify absence of rcs_diff:
+
+ $ grep rcs_diff /usr/share/perl5/IkiWiki/Plugin/{git,bzr}.pm
+ /usr/share/perl5/IkiWiki/Plugin/git.pm: hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff);
+ /usr/share/perl5/IkiWiki/Plugin/git.pm:sub rcs_diff ($) {
+ /usr/share/perl5/IkiWiki/Plugin/bzr.pm: hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff);
+
+> I've added the minimal stub needed to avoid the crash, but for
+> recentchangesdiff to work, someone needs to implement `rcs_diff` for bzr.
+> This should be trivial if you know and use bzr. The function
+> is passed as a parameter the revno of interest and just needs
+> to ask bzr for the diff between that and the previous version. --[[Joey]]
+
+>> I'll see if I can make a patch. The bzr command to get the revision would
+>> look like this: bzr diff -r revno:$PREV:/path/to/src..revno:$REVNO:/path/to/src
+>> (where $PREV would be $REVNO minus one). --liw
+
+>> Sorry, that was not entirely correct, for some reason. I'll add a patch below that
+>> seems to work. I am unfortunately not ready to set up a git repository that you
+>> can pull from. --liw
+
+[[done]] --[[Joey]]
diff --git a/doc/bugs/cannot_preview_shortcuts.mdwn b/doc/bugs/cannot_preview_shortcuts.mdwn
new file mode 100644
index 000000000..d7045b2dc
--- /dev/null
+++ b/doc/bugs/cannot_preview_shortcuts.mdwn
@@ -0,0 +1,17 @@
+Shortcuts such as \[[!google foo]] do not work when previewing pages.
+--[[JasonBlevins]]
+
+> Broken during the setup dumping changes, now fixed. --[[Joey]] [[done]]
+
+>> Just a quick note that this fix interacts with the way the `listdirectives`
+>> directive gets its list of non-shortcut directives. At the moment it
+>> still works, but it relies on the fact that the `listdirectives` `checkconfig`
+>> hook is called before the `shortcut` `checkconfig` hook.
+>> -- [[Will]]
+
+>> The order plugins are loaded is effectively random. (`keys %hooks`).
+>> So I've made shortcuts pass a 'shortcut' parameter when registering
+>> them, which listdirectives can grep out of the full list of directives.
+>> That may not be the best name to give it, especially if other plugins
+>> generate directives too. Seemed better than forcing shortcut's
+>> checkconfig hook to run last tho. --[[Joey]]
diff --git a/doc/bugs/cannot_reliably_use_meta_in_template.mdwn b/doc/bugs/cannot_reliably_use_meta_in_template.mdwn
new file mode 100644
index 000000000..de6c227f6
--- /dev/null
+++ b/doc/bugs/cannot_reliably_use_meta_in_template.mdwn
@@ -0,0 +1,18 @@
+meta title cannot reliably be put inside a template used by the
+[[plugins/template]] plugin. Since meta title info is gathered in the scan
+pass, which does not look at the template a page includes, it will not be
+seen then, and so other pages that use the page title probably won't use
+it. (Barring luck with build order.)
+
+Update: This also affects using tags from templates.
+
+There is a simple fix for this, just add `scan => 1` when registering the
+preprocess hook for the template plugin.
+
+However, the overhead of this has to be considered. It means that, on every
+scan pass, every page containing a template will cause the template to be
+loaded and filled out. This can be some serious additional overhead.
+
+--[[Joey]]
+
+[[done]]
diff --git a/doc/bugs/comments_produce_broken_links_in_RecentChanges.mdwn b/doc/bugs/comments_produce_broken_links_in_RecentChanges.mdwn
new file mode 100644
index 000000000..dae00857b
--- /dev/null
+++ b/doc/bugs/comments_produce_broken_links_in_RecentChanges.mdwn
@@ -0,0 +1,9 @@
+Comments produce links like `sandbox/comment_1` in [[RecentChanges]], which,
+when clicked, redirect to a page that does not exist.
+
+The `recentchanges` branch in my repository contains one possible [[patch]],
+which causes the CGI to go to the [[ikiwiki/directive/meta]] `permalink`, if
+any, if the page is internal (comments do have a permalink).
+
+> [[done]].. I I had thought about not showing internal page changes at
+> all, but I like your approach better --[[Joey]]
diff --git a/doc/bugs/disabling_backlinks.mdwn b/doc/bugs/disabling_backlinks.mdwn
index ba96a4e2b..415708a50 100644
--- a/doc/bugs/disabling_backlinks.mdwn
+++ b/doc/bugs/disabling_backlinks.mdwn
@@ -28,3 +28,5 @@ auto-generated index is insufficient.
> tagged, I think you have larger problems than tags and backlinks being
> the same. Like keeping that list of links up to date as tags are added
> and changed. --[[Joey]]
+
+I see your point, Joey. I need to maintain that list manually, though, because the automatically generated list is too brief. \[[!map ...]] generates just a list of titles or descriptions. I need a list that contains both. See [[this_posting|ikiwiki/directive/map/discussion]] for more details. Until \[[!map]] can do that, I'm stuck with a manually maintained list. Which means that every link shows up in the backlinks.
diff --git a/doc/bugs/dumpsetup_does_not_save_destdir.mdwn b/doc/bugs/dumpsetup_does_not_save_destdir.mdwn
new file mode 100644
index 000000000..768c3fc5e
--- /dev/null
+++ b/doc/bugs/dumpsetup_does_not_save_destdir.mdwn
@@ -0,0 +1,3 @@
+Calling ikiwiki with a bunch of options, including the --dumpsetup somefile.setup option creates somefile.setup for later reuse with the --setup option. The destination dir however is not saved in the setup file, it has destdir => ''.
+
+> that broke in version 2.64 .. fixed [[done]] --[[Joey]]
diff --git a/doc/bugs/entirely_negated_pagespec_matches_internal_pages.mdwn b/doc/bugs/entirely_negated_pagespec_matches_internal_pages.mdwn
index 012fcec2c..02ce4e221 100644
--- a/doc/bugs/entirely_negated_pagespec_matches_internal_pages.mdwn
+++ b/doc/bugs/entirely_negated_pagespec_matches_internal_pages.mdwn
@@ -3,8 +3,8 @@ matches all other pages, including all internal pages. This can lead to
unexpected results, since it will match a bunch of recentchanges pages,
etc.
-Recall that internal-use pages are not matched by a glob. So "*" doesn't
-match them. So if the pagespec is "* and !foo and !bar", it won't match
+Recall that internal-use pages are not matched by a glob. So "\*" doesn't
+match them. So if the pagespec is "\* and !foo and !bar", it won't match
them. This is the much more common style.
There's an odd inconsistency with entirely negated pagespecs. If "!foo"
diff --git a/doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn2.mdwn b/doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn2.mdwn
new file mode 100644
index 000000000..6b8781a8c
--- /dev/null
+++ b/doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn2.mdwn
@@ -0,0 +1,7 @@
+[[!meta title="feedfile does the wrong thing from index"]]
+
+When I put the following !inline in my index.mdwn, it generate a file called index/graphics.rss. However, the link in the RSS button is to graphics.rss (i.e., not in the index/ directory).
+
+`\[[!inline pages="link(tags/graphics) and ./posts/* and !*/Discussion" show="10" feedfile=graphics feedonly=yes]]`
+
+[[done]] --[[Joey]]
diff --git a/doc/bugs/git_stderr_output_causes_problems.mdwn b/doc/bugs/git_stderr_output_causes_problems.mdwn
index 4146a5869..c25ef6927 100644
--- a/doc/bugs/git_stderr_output_causes_problems.mdwn
+++ b/doc/bugs/git_stderr_output_causes_problems.mdwn
@@ -6,7 +6,7 @@ Ikiwiki's git handling is sending a bunch of output to stderr. The following pa
index 425536f..5734bb2 100644
--- a/IkiWiki/Rcs/git.pm
+++ b/IkiWiki/Rcs/git.pm
- @@ -24,6 +24,7 @@ sub _safe_git (&@) { #{{{
+ @@ -24,6 +24,7 @@ sub _safe_git (&@) {
if (!$pid) {
# In child.
# Git commands want to be in wc.
diff --git a/doc/bugs/gitweb_deficiency_w.r.t._log_messages.mdwn b/doc/bugs/gitweb_deficiency_w.r.t._log_messages.mdwn
index c465bdd4a..564982ff3 100644
--- a/doc/bugs/gitweb_deficiency_w.r.t._log_messages.mdwn
+++ b/doc/bugs/gitweb_deficiency_w.r.t._log_messages.mdwn
@@ -8,3 +8,7 @@ cases of the one which was installed directly before the current commit.
> I don't see one, except for diffs that show all changes in the commit,
> rather than only changes to a single file. This feels like a bug in
> gitweb. --[[Joey]]
+
+This is fixed by using the new gitweb style urls. Which new gitweb
+requires, but is a manual change you have to make in your setup. So,
+[[done]] --[[Joey]]
diff --git a/doc/bugs/gitweb_deficiency_w.r.t._newly_created_pages.mdwn b/doc/bugs/gitweb_deficiency_w.r.t._newly_created_pages.mdwn
index 255d9cee7..0b4d70596 100644
--- a/doc/bugs/gitweb_deficiency_w.r.t._newly_created_pages.mdwn
+++ b/doc/bugs/gitweb_deficiency_w.r.t._newly_created_pages.mdwn
@@ -8,3 +8,6 @@ Going from *RecentChanges*, when viewing the diffs of newly created pages
> I don't see any way to make gitweb do that. You can click on the filename
> after the "diff -cc" to see the whole file output, but gitweb won't show
> a diff for a newly added file. --[[Joey]]
+
+>> happily this, too, is fixed by using the new style gitweb urls. [[done]]
+>> --[[Joey]]
diff --git a/doc/bugs/html5_support.mdwn b/doc/bugs/html5_support.mdwn
new file mode 100644
index 000000000..41f955e51
--- /dev/null
+++ b/doc/bugs/html5_support.mdwn
@@ -0,0 +1,47 @@
+Some elements of [HTML5](http://www.whatwg.org/specs/web-apps/current-work/multipage/) can be safely supported by ikiwiki. There are [several differences between HTML4 and HTMl5](http://www.w3.org/TR/html5-diff/). Unsupported new elements _should degrade gracefully_.
+
+> In the `origin/html` branch, there is an old work in progress to make
+> ikiwiki use html 4 instead of xhtml. If that could be brought forward and
+> finished then the plan has been to switch ikiwiki over to doing html 4.
+> I don't think it makes sense to try to make it support both xhtml and
+> html, it would complicate the code for no benefit.
+>
+> I think that is the best route toward supporting html 5 as well. Get
+> ikiwiki doing html 4 first and the changes needed to get to 5 from there
+> should be small. Probably just changing some doctypes and a few other
+> small changes which could be kept in a branch, or even shipped in ikiwiki
+> mainline as an alternate set of templates. Some of the changes, like
+> supporting new html 5 tags in the htmlscrubber, can be done in mainline.
+> (Like was already done for the html 5 video and audio tags.)
+>
+> This approach seems much more maintainable going foward than rolling a
+> html 5 branch immediatly and trying to keep that continually up-to-date
+> with mainline ikiwiki that is still using xhtml. --[[Joey]]
+
+However as an [early adopter](http://en.wikipedia.org/wiki/Early_adopter) I would like to start using HTML5 as much as possible. The more pragmatic solution would be to use elements supported by the browsers of your readership I guess. I'm following other early adopters like [Anne](http://annevankesteren.nl/) for clues on how to proceed.
+
+* [Initial patch](http://git.webconverger.org/?p=ikiwiki;a=commit;h=2e2bb3f74f5000b1269142d6f9bdf1bcb4075ca4)
+
+> I can't figure out how to pull from this repository.
+>> Sorry! I have fixed the cloneurl file to read `git clone git://webconverger.org/git/ikiwiki`
+
+I'm unsure how to turn off the test validation by the very old [wdg-html-validator](http://packages.qa.debian.org/w/wdg-html-validator.html). So I have been unable to test my initial patches as I can't build ikiwiki. I would like to know how to edit the rules/Makefile to temporarily disable this.
+
+> Don't run ¨make test" ... --[[Joey]]
+>> I don't quite grok debhelper7 [rules](http://git.ikiwiki.info/?p=ikiwiki;a=blob;f=debian/rules).
+
+>>> Well, ok :-) `rm t/html.t` or, add an empty `override_dh_auto_test` rule.
+>>> --[[Joey]]
+
+[validator.nu](http://validator.nu/) incidentally is **the** HTML5 validator, however it is almost impossible to sanely introduce as a build dependency because of its insane Java requirements. :( I test locally via [cURL](http://wiki.whatwg.org/wiki/IDE), though Debian packages cannot be built with a network dependency.
+
+# Notes
+
+* the [time element](http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-time-element) ideally needs the datatime= attribute set with iso8601 time
+* I suspect the migration to the new semantic elements of HTML5 like article, header & footer to take some time, due to browser support. Though they sure make the template code look much nicer.
+* `<br>` and too many `<div>`s usually indicates poor semantics.
+ > YMMV, but I tend to find that kind of concern counterproductive.
+ > --[[Joey]]
+
+* Many of the header `<span>`s should be proper [header elements](http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements)
+ > See [[todo/Option_to_make_title_an_h1__63__]] for why not. --[[Joey]]
diff --git a/doc/bugs/http_proxy_for_openid.mdwn b/doc/bugs/http_proxy_for_openid.mdwn
index e8f87f9c4..3d0c99b83 100644
--- a/doc/bugs/http_proxy_for_openid.mdwn
+++ b/doc/bugs/http_proxy_for_openid.mdwn
@@ -6,10 +6,42 @@ I have found if I add:
newenviron[i++]="HTTPS_PROXY=http://host.domain.com:3128";
-to IkiWiki/Wrapper.pm it solves the problem for https requests, however it obviously would be preferred if the proxy name is not configured.
+to IkiWiki/Wrapper.pm it solves the problem for https requests, however it obviously would be preferred if the proxy name is not hard coded.
Also, the ability to set HTTPS\_CA\_FILE and HTTPS\_CA\_DIR might benefit some people. Then again, it I can't see any evidence that the SSL certificate of the server is being checked. See the [[bug_report|ssl_certificates_not_checked_with_openid]] I filed on this separate issue.
Unfortunately, HTTP\_PROXY doesn't work for http requests, it looks like that library is different.
+---
+
+Update 2008-10-26:
+
+Better solution, one that works for both http and https, and uses config options. It appears to work...
+
+Note that using $ua->proxy(['https'], ...); won't work, you get a "Not Implemented" error, see <http://community.activestate.com/forum-topic/lwp-https-requests-proxy>. Also see [[!debbug 129528]].
+
+Also note that the proxy won't work with liblwpx-paranoidagent-perl, I had to remove liblwpx-paranoidagent-perl first.
+
+Please get the patch from the *.mdwn source.
+
+louie:/usr/share/perl5/IkiWiki/Plugin# diff -u openid.pm.old openid.pm
+--- openid.pm.old 2008-10-26 12:18:58.094489360 +1100
++++ openid.pm 2008-10-26 12:40:05.763429880 +1100
+@@ -165,6 +165,14 @@
+ $ua=LWP::UserAgent->new;
+ }
+
++ if (defined($config{"http_proxy"})) {
++ $ua->proxy(['http'], $config{"http_proxy"});
++ }
++
++ if (defined($config{"https_proxy"})) {
++ $ENV{HTTPS_PROXY} = $config{"https_proxy"};
++ }
++
+ # Store the secret in the session.
+ my $secret=$session->param("openid_secret");
+ if (! defined $secret) {
+
+
Brian May
diff --git a/doc/bugs/images_in_inlined_pages_have_wrong_relative_URL.mdwn b/doc/bugs/images_in_inlined_pages_have_wrong_relative_URL.mdwn
index 8cfd42e78..8cda7a70f 100644
--- a/doc/bugs/images_in_inlined_pages_have_wrong_relative_URL.mdwn
+++ b/doc/bugs/images_in_inlined_pages_have_wrong_relative_URL.mdwn
@@ -11,3 +11,5 @@ If I then inline that page, the (relative) URL no longer points to the right pla
>
> However, there is a simple way to avoid both problems: Use WikiLinks
> and/or the [[img_directive|ikiwiki/directive/img]]. --[[Joey]]
+
+[[!tag done]]
diff --git a/doc/bugs/img_plugin_should_pass_through_class_attribute.mdwn b/doc/bugs/img_plugin_should_pass_through_class_attribute.mdwn
index 2e67d6357..f72ecade2 100644
--- a/doc/bugs/img_plugin_should_pass_through_class_attribute.mdwn
+++ b/doc/bugs/img_plugin_should_pass_through_class_attribute.mdwn
@@ -26,7 +26,7 @@ And here's a patch to implement it. Will this survive markdown munging? It seems
index 7226231..3eb1ae7 100644
--- a/Plugin/img.pm
+++ b/Plugin/img.pm
- @@ -93,9 +93,15 @@ sub preprocess (@) { #{{{
+ @@ -93,9 +93,15 @@ sub preprocess (@) {
$imgurl="$config{url}/$imglink";
}
@@ -42,7 +42,7 @@ And here's a patch to implement it. Will this survive markdown munging? It seems
+ $result .= '/></a>';
+
+ return $result;
- } #}}}
+ }
1
--
diff --git a/doc/bugs/inline_sort-by-title_issues.mdwn b/doc/bugs/inline_sort-by-title_issues.mdwn
index 884846b32..ff4555067 100644
--- a/doc/bugs/inline_sort-by-title_issues.mdwn
+++ b/doc/bugs/inline_sort-by-title_issues.mdwn
@@ -23,7 +23,7 @@ And here is a [[patch]] for this. It makes `sort=title` actually sort on the ti
index 9c336e7..99f6de3 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
- @@ -185,9 +185,12 @@ sub preprocess_inline (@) { #{{{
+ @@ -185,9 +185,12 @@ sub preprocess_inline (@) {
}
}
diff --git a/doc/bugs/inline_sort_order_and_meta_date_value.mdwn b/doc/bugs/inline_sort_order_and_meta_date_value.mdwn
new file mode 100644
index 000000000..d4ec8f345
--- /dev/null
+++ b/doc/bugs/inline_sort_order_and_meta_date_value.mdwn
@@ -0,0 +1,314 @@
+I have a directory containing two files. f1 (<http://alcopop.org/~jon/repro2/src/blog/debgtd.html>) has
+
+ meta date="2008-07-02 14:13:17"
+
+f2 (<http://alcopop.org/~jon/repro2/src/blog/moving.html>) has
+
+ meta date="2008-07-02 21:04:21"
+
+They have both been modified recently:
+
+ >>> stat(f1)
+ (33188, 459250L, 65027L, 1, 1000, 1000, 1686L, 1227967177, 1227966706, 1227966706)
+ >>> stat(f2)
+ (33188, 458868L, 65027L, 1, 1000, 1000, 938L, 1227967187, 1227966705, 1227966705)
+
+Note that f1 is fractionally newer than f2 in terms of ctime and mtime, but f2 is much newer in terms of the meta information.
+
+Another page includes them both via inline:
+
+ inline pages="blog/*" show=5
+
+The resulting page is rendered with f1 above f2, seemingly not using the meta directive information: <http://alcopop.org/~jon/repro2/dest/blog/>. The footer in the inline pages does use the correct time e.g. <em>Posted Wed 02 Jul 2008 14:13:17 BST</em>.
+
+If I instead include them using creation_year in the pagespec, they are ordered correctly.
+
+<http://alcopop.org/~jon/repro2/> contains the src used to reproduce this, the precise ikiwiki invocation (inside Makefile) and the results (dest).
+
+-- [[users/Jon]]
+
+
+> On Ikiwiki 2.53.3 (Debian Lenny), my inlines are also sorted using mtime
+> by default -- despite what the [[documentation|/ikiwiki/directive/inline]]
+> says -- but setting the supposed default sort order manually produces the
+> correct results. For example, the following inline sorts my blog
+> entires using their meta date or ctime:
+>
+> inline pages="blog/*" show="10" sort="age"
+>
+> I'll try to look at the code this weekend and see if age is really the
+> default sort order.
+>
+> -- [David A. Harding](http://dtrt.org), 2008-12-20
+
+Here is the code. As you can see, sort="age" is equivilant to leaving
+out the sort option. --[[Joey]]
+
+ if (exists $params{sort} && $params{sort} eq 'title') {
+ @list=sort { pagetitle(basename($a)) cmp pagetitle(basename($b)) } @list;
+ }
+ elsif (exists $params{sort} && $params{sort} eq 'mtime') {
+ @list=sort { $pagemtime{$b} <=> $pagemtime{$a} } @list;
+ }
+ elsif (! exists $params{sort} || $params{sort} eq 'age') {
+ @list=sort { $pagectime{$b} <=> $pagectime{$a} } @list;
+ }
+ else {
+ return sprintf(gettext("unknown sort type %s"), $params{sort});
+ }
+
+> On further testing, I find that the bug is limited to the first time
+> creation time should be used and has nothing to do with setting the sort
+> parameter. Revised steps to reproduce: --[David A. Harding](http://dtrt.org), 2008-12-20
+>
+> 1. Create pages that sort different by mtime and ctime
+>
+> 2. inline pages="somepages/*"
+>
+> 3. ikiwiki --setup setup_file
+>
+> 4. Pages are output incorrectly in mtime order
+>
+> 5. ikiwiki --setup setup_file
+>
+> 6. Pages are output correctly in ctime order
+>
+> 7. Create new page in somepages/, set its ctime to earlier than another
+> page in sompages/
+>
+> 8. ikiwiki --setup setup_file
+>
+> 9. All previously sorted pages output correctly in ctime order but new
+> page is output incorrectly at the top as if its mtime was its ctime
+>
+> 10. ikiwiki --setup setup_file
+>
+> 11. All pages, including new page, are output correctly in ctime order
+
+You're confusing ctime and creation time. This is perhaps not suprising, as
+ikiwiki uses the term 'ctime' to refer to creation time. However, the unix
+ctime value is not the same thing. Unix ctime can change if a file changes
+owner, or in some cases, permissions. Unix ctime also always changes
+when the file is modified. Ikiwiki wants a first creation date of the file,
+and it accomplishes this by recording the initial ctime of a file the first
+time it processes it, and *preserving* that creation time forever, ignoring
+later ctime changes.
+
+I suspect that this, coupled with the fact that ikiwiki sorts newest pages
+first, explains everything you describe. If not, please send me a shell script
+test case I can run, as instructions like "Create pages that sort different by
+mtime and ctime" are not ones that I know how to follow (given that touch sets
+*both*). --[[Joey]]
+
+> Sorry. I conflated Unix ctime and ikiwiki's creation time because I
+> didn't think the difference was important to this case. I'm a writer,
+> and I should have known better -- I appologize. Revised steps to
+> reproduce are below; feel free to delete this whole misunderstanding
+> to make the bug report more concise.
+>
+> 1. Create pages in the srcdir that should sort in one order by
+> last-modification time and in a diffent order by original creation
+> time. For example:
+>
+> $ echo -e '\[[!meta date="2007-01-01"]]\nNew.' > test/new.mdwn
+> $ echo -e '\[[!meta date="2006-01-01"]]\nOld.' > test/old.mdwn
+>
+> 2. Create a page that includes the files. For example:
+>
+>
+> $ echo '\[[!inline pages="test/*"]]' > sort-test.mdwn
+>
+> 3. Run ikiwiki. For example `ikiwiki --setup setup_file`
+>
+> 4. Pages are output incorrectly in modification time order. For example,
+> actual partial HTML of the sort-test/index.html from commands used
+> above (whitespace-only lines removed; one whitespace-only line
+> added):
+>
+> <div class="inlinepage">
+> <span class="header">
+> <a href="./../test/old/">old</a>
+> </span>
+> <p>Old.</p>
+> <span class="pagedate">
+> Posted Sun 01 Jan 2006 12:00:00 AM EST
+> </span>
+> </div>
+>
+> <div class="inlinepage">
+> <span class="header">
+> <a href="./../test/new/">new</a>
+> </span>
+> <p>New.</p>
+> <span class="pagedate">
+> Posted Mon 01 Jan 2007 12:00:00 AM EST
+> </span>
+> </div>
+>
+> 5. Run ikiwiki again with the same command line. For example: `ikiwiki --setup setup_file`
+>
+> 6. Pages are output correctly in creation time order. For example,
+> actual partial HTML of the sort-test/index.html from commands used
+> above (whitespace-only lines removed; one whitespace-only line
+> added):
+>
+> <div class="inlinepage">
+> <span class="header">
+> <a href="./../test/new/">new</a>
+> </span>
+> <p>New.</p>
+> <span class="pagedate">
+> Posted Mon 01 Jan 2007 12:00:00 AM EST
+> </span>
+> </div>
+>
+> <div class="inlinepage">
+> <span class="header">
+> <a href="./../test/old/">old</a>
+> </span>
+> <p>Old.</p>
+> <span class="pagedate">
+> Posted Sun 01 Jan 2006 12:00:00 AM EST
+> </span>
+> </div>
+>
+> 7. Create a new page with the current Unix mtime and Unix ctime, but a
+> !meta date before the most recent creation date of another page.
+> For example:
+>
+> $ echo -e '\[[!meta date="2005-01-01"]]\nOlder.' > test/older.mdwn
+>
+> 8. Run ikiwiki again with the same command line. For example: `ikiwiki --setup setup_file`
+>
+> 9. All previously sorted pages output correctly in order of their
+> creation time, but the new page is output incorrectly at the top as
+> if its modification time was its creation time. For example,
+> actual partial HTML of the sort-test/index.html from commands used
+> above (whitespace-only lines removed; two whitespace-only
+> lines added):
+>
+> <div class="inlinepage">
+> <span class="header">
+> <a href="./../test/older/">older</a>
+> </span>
+> <p>Older.</p>
+> <span class="pagedate">
+> Posted Sat 01 Jan 2005 12:00:00 AM EST
+> </span>
+> </div>
+>
+> <div class="inlinepage">
+> <span class="header">
+> <a href="./../test/new/">new</a>
+> </span>
+> <p>New.</p>
+> <span class="pagedate">
+> Posted Mon 01 Jan 2007 12:00:00 AM EST
+> </span>
+> </div>
+>
+> <div class="inlinepage">
+> <span class="header">
+> <a href="./../test/old/">old</a>
+> </span>
+> <p>Old.</p>
+> <span class="pagedate">
+> Posted Sun 01 Jan 2006 12:00:00 AM EST
+> </span>
+> </div>
+>
+> 10. Run ikiwiki again with the same command line. For example: `ikiwiki --setup setup_file`
+>
+> 11. All pages, including new page, are output correctly in creation time
+> order. For example, actual partial HTML of the sort-test/index.html
+> from commands used above (whitespace-only lines removed; two
+> whitespace-only lines added):
+>
+> <div class="inlinepage">
+> <span class="header">
+> <a href="./../test/new/">new</a>
+> </span>
+> <p>New.</p>
+> <span class="pagedate">
+> Posted Mon 01 Jan 2007 12:00:00 AM EST
+> </span>
+> </div>
+>
+> <div class="inlinepage">
+> <span class="header">
+> <a href="./../test/old/">old</a>
+> </span>
+> <p>Old.</p>
+> <span class="pagedate">
+> Posted Sun 01 Jan 2006 12:00:00 AM EST
+> </span>
+> </div>
+>
+> <div class="inlinepage">
+> <span class="header">
+> <a href="./../test/older/">older</a>
+> </span>
+> <p>Older.</p>
+> <span class="pagedate">
+> Posted Sat 01 Jan 2005 12:00:00 AM EST
+> </span>
+> </div>
+>
+> File status after all the above actions:
+>
+> $ stat test/*
+> File: `test/new.mdwn'
+> Size: 33 Blocks: 8 IO Block: 4096 regular file
+> Device: ca20h/51744d Inode: 684160 Links: 1
+> Access: (0644/-rw-r--r--) Uid: ( 1000/ harding) Gid: ( 1000/ harding)
+> Access: 2008-12-20 21:48:32.000000000 -0500
+> Modify: 2008-12-20 21:27:03.000000000 -0500
+> Change: 2008-12-20 21:27:03.000000000 -0500
+> File: `test/older.mdwn'
+> Size: 35 Blocks: 8 IO Block: 4096 regular file
+> Device: ca20h/51744d Inode: 684407 Links: 1
+> Access: (0644/-rw-r--r--) Uid: ( 1000/ harding) Gid: ( 1000/ harding)
+> Access: 2008-12-20 21:48:32.000000000 -0500
+> Modify: 2008-12-20 21:42:10.000000000 -0500
+> Change: 2008-12-20 21:42:10.000000000 -0500
+> File: `test/old.mdwn'
+> Size: 33 Blocks: 8 IO Block: 4096 regular file
+> Device: ca20h/51744d Inode: 684161 Links: 1
+> Access: (0644/-rw-r--r--) Uid: ( 1000/ harding) Gid: ( 1000/ harding)
+> Access: 2008-12-20 21:48:32.000000000 -0500
+> Modify: 2008-12-20 21:27:09.000000000 -0500
+> Change: 2008-12-20 21:27:09.000000000 -0500
+>
+> My ikiwiki configuration file (being used to port a blog from pyblosxom
+> to ikiwiki):
+>
+> harding@mail:~$ sed 's/#.*//; /^[ ]*$/d' .ikiwiki/gnuisance.setup
+> use IkiWiki::Setup::Standard {
+> wikiname => "HardingBlog",
+> adminemail => 'dave@dtrt.org',
+> srcdir => "/srv/backup/git/gnuisance.net",
+> destdir => "/srv/test.dtrt.org",
+> url => "http://srv.dtrt.org",
+> wrappers => [
+> ],
+> atom => 1,
+> syslog => 0,
+> prefix_directives => 1,
+> add_plugins => [qw{goodstuff tag}],
+> disable_plugins => [qw{passwordauth}],
+> tagbase => "tag",
+> }
+>
+> --[David A. Harding](http://dtrt.org/), 2008-12-20
+
+Thank you for a textbook excellent reproduction recipe.
+
+What appears to be going on here is that meta directives are not processed
+until the leaf pages are rendered, and thus the ctime setting is not
+available at the time that they are inlined, and the newer unix ctime is
+used. On the second build, the meta data has already been recorded.
+
+This can probably be avoided by processing meta date at scan time.
+
+Verified, fix works. [[done]]
+--[[Joey]]
diff --git a/doc/bugs/links_misparsed_in_CSV_files.mdwn b/doc/bugs/links_misparsed_in_CSV_files.mdwn
new file mode 100644
index 000000000..27d2b7b1e
--- /dev/null
+++ b/doc/bugs/links_misparsed_in_CSV_files.mdwn
@@ -0,0 +1,27 @@
+If a link inside a CSV file contains two or more underscores (\_), then it will get mis-parsed by the table plugin.
+
+e.g. \[[single\_track\_lines]] becomes "em>lines".
+
+Links with only one underscore are OK.
+
+Update 2008-11-24: The problem only occurs if the CSV data is in an external file. If I load it using data="""...""" then it works fine.
+
+The problem appears to be the call to htmlize inside genrow. If the data is inline, then wikilinks get expanded before they get here, and are OK. If the data is from an external file, the wikilinks aren't expanded, and htmlize will expand \[[single\_track\_lines]] into \[[single&lt;em&gt;track&lt;/em&gt;lines]].
+
+Oh, wait, I see the problem. IkiWiki::linkify is only called if the external file doesn't exist. If I remove this check and always call IkiWiki::linkify, then the problem is solved.
+
+(this is inside /usr/share/perl5/IkiWiki/Plugin/table.pm).
+
+> To reproduce this bug, I had to install the old, broken markdown 1.0,
+> instead of the now-default Text::Markdown.
+>
+> Why is linkify not called for external files? Well, I checked the
+> history, and it's probably best to say "for historical reasons that no
+> longer apply". So, changed as you suggest. [[done]] --[[Joey]]
+
+I am rather confused what this check does, and the fact the comments are very different for CSV and DSV when the code is the same doesn't seem to help.
+
+> The code is not the same; two operations are run in different orders for
+> CSV and DSV, as the comments note. --[[Joey]]
+
+-- Brian May
diff --git a/doc/bugs/lockedit_plugin_should_alert_user_about_an_invalid_pagespec_in_preferences.mdwn b/doc/bugs/lockedit_plugin_should_alert_user_about_an_invalid_pagespec_in_preferences.mdwn
index c835d9f98..b8023ce87 100644
--- a/doc/bugs/lockedit_plugin_should_alert_user_about_an_invalid_pagespec_in_preferences.mdwn
+++ b/doc/bugs/lockedit_plugin_should_alert_user_about_an_invalid_pagespec_in_preferences.mdwn
@@ -1,4 +1,4 @@
-[[plugins/lockedit]] adds the form fields for a [[pagespec]] to preferences. This pagespec should be supplied "raw"; i.e., without quotes around it. Inexperienced users (such as [[myself|jondowland]]) may provide an invalid pagespec, such as one with quotes on it. This will be merrily accepted by the form, but will cause no locking to take place.
+[[plugins/lockedit]] adds the form fields for a [[pagespec]] to preferences. This pagespec should be supplied "raw"; i.e., without quotes around it. Inexperienced users (such as [[myself|users/jon]]) may provide an invalid pagespec, such as one with quotes on it. This will be merrily accepted by the form, but will cause no locking to take place.
Perhaps some validation should be performed on the pagespec and the form-submission return include "warning: this pagespec is invalid" or "warning: this pagespec does not match any existing pages" or similar.
@@ -15,3 +15,7 @@ Perhaps some validation should be performed on the pagespec and the form-submiss
> There are small classes of invalid pagespecs. For example, `(foo or bar`
> is invalid due to having unbalanced parens, while `foo or and bar`
> has invalid syntax. It's possible to detect these, I guess ... --[[Joey]]
+
+>> Having moved it to the .setup file makes things more obvious I think.
+>> Anyway I consider this [[done]], please de-done this if you disagree.
+>> --[[Jon]]
diff --git a/doc/bugs/login_page_should_note_cookie_requirement.mdwn b/doc/bugs/login_page_should_note_cookie_requirement.mdwn
new file mode 100644
index 000000000..96686053c
--- /dev/null
+++ b/doc/bugs/login_page_should_note_cookie_requirement.mdwn
@@ -0,0 +1,33 @@
+At the moment, you go through the login shuffle and then are told that cookies are needed, so you lose all your data and login again. It would be much slicker to note by the edit link, or at least on the login page, that cookies are required.
+
+> Hmm, it seems to me to be fairly obvious, since the vast majority of
+> websites that have a login require cookies. Such warnings used to be
+> common, but few sites bother with them anymore. --[[Joey]]
+
+>> Very few websites break without cookies. Even fewer lose data.
+>> Can ikiwiki avoid being below average by default? --[MJR](http://mjr.towers.org.uk)
+
+>>> Can we avoid engaging in hyperbole? (Hint: Your browser probably has a
+>>> back button. Hint 2: A username/password does not count as "lost data".
+>>> Hint 3: Now we're arguing, which is pointless.) --[[Joey]]
+
+Even better would be to only display the cookie note as a warning if the login page doesn't receive a session cookie.
+
+> I considered doing this before, but it would require running the cgi once
+> to attempt to set the cookie and then redirecting to the cgi a second
+> time to check if it took, which is both complicated and probably would
+> look bad.
+
+>> Might this be possible client-side with javascript? A quick google suggests it is possible:
+>> <http://www.javascriptkit.com/javatutors/cookiedetect.shtml>. MJR, want to try adding
+>> that? -- [[Will]]
+
+Best of all would be to use URL-based or hidden-field-based session tokens if cookies are not permitted.
+
+> This is not very doable since most of the pages the user browses are
+> static pages in a static location.
+
+>> The pages that lose data without cookies (the edit pages, primarily)
+>> don't look static. Are they really? --[MJR](http://mjr.towers.org.uk)
+
+>>> As soon as you post an edit page, you are back to a static website.
diff --git a/doc/bugs/markdown_bug:_email_escaping_and_plus_addresses.mdwn b/doc/bugs/markdown_bug:_email_escaping_and_plus_addresses.mdwn
index 5c04dce03..6fccc5c86 100644
--- a/doc/bugs/markdown_bug:_email_escaping_and_plus_addresses.mdwn
+++ b/doc/bugs/markdown_bug:_email_escaping_and_plus_addresses.mdwn
@@ -8,7 +8,7 @@ compare:
It seems putting a '+' in there throws it. Maybe it's a markdown bug, or maybe the obfuscation markdown applies to email-links is being caught by the HTML sanitizer.
- -- [[JonDowland]]
+ -- [[users/Jon]]
> It's a markdown bug. For some reason, markdown doesn't recognize the email with a '+' as an email:
>
diff --git a/doc/bugs/mercurial_fail_to_add.mdwn b/doc/bugs/mercurial_fail_to_add.mdwn
index dab40d684..3bbf4e5fd 100644
--- a/doc/bugs/mercurial_fail_to_add.mdwn
+++ b/doc/bugs/mercurial_fail_to_add.mdwn
@@ -6,7 +6,7 @@ Here is a patch that's seems to work, although I'm not quite sure what's wrong w
--- mercurial.pm 2007-03-24 16:14:35.000000000 +0100
+++ /home/hbernard/mercurial.pm 2007-04-19 19:05:47.000000000 +0200
@@ -95,7 +95,7 @@
- sub rcs_add ($) { # {{{
+ sub rcs_add ($) {
my ($file) = @_;
- my @cmdline = ("hg", "-q", "-R", "$config{srcdir}", "add", "$file");
diff --git a/doc/bugs/messed_up_repository.mdwn b/doc/bugs/messed_up_repository.mdwn
new file mode 100644
index 000000000..e245b84a8
--- /dev/null
+++ b/doc/bugs/messed_up_repository.mdwn
@@ -0,0 +1,21 @@
+I messed up my local clone of my repository.
+
+It appears that there is a special clone, which contains .ikiwiki, local.css, recentchanges, and the like.
+
+How can I create a new version of this clone?
+
+> No, there's the srcdir, which ikiwiki populates with some of those files
+> when run. Notably the .ikiwiki directory and all its contents, and the
+> recentchanges directory and its contents. But not local.css.
+>
+> If you've lost .ikiwiki and it contained user registration info
+> (passwords etc), you've lost that info. Everything else can be
+> regenerated by running `ikiwiki -setup your.setup`
+>
+> If you still have .ikiwiki, but the git clone is messed up somehow, you
+> can just make a new clone and move .ikiwiki into it before running
+> ikiwiki. --[[Joey]]
+
+> > Great, that worked. Thanks Joey!
+
+[[!tag done]]
diff --git a/doc/bugs/methodResponse_in_add__95__plugins.mdwn b/doc/bugs/methodResponse_in_add__95__plugins.mdwn
index 8a88f4eda..c82b532db 100644
--- a/doc/bugs/methodResponse_in_add__95__plugins.mdwn
+++ b/doc/bugs/methodResponse_in_add__95__plugins.mdwn
@@ -26,7 +26,7 @@
index e476521..d43abd4 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
- @@ -471,7 +471,11 @@ sub loadplugins () { #{{{
+ @@ -471,7 +471,11 @@ sub loadplugins () {
unshift @INC, possibly_foolish_untaint($config{libdir});
}
diff --git a/doc/bugs/multiple_pages_with_same_name.mdwn b/doc/bugs/multiple_pages_with_same_name.mdwn
index 5ddfb1f6b..20c38c062 100644
--- a/doc/bugs/multiple_pages_with_same_name.mdwn
+++ b/doc/bugs/multiple_pages_with_same_name.mdwn
@@ -28,14 +28,14 @@ Suggestions welcome.
index 4e4da11..853f905 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
- @@ -618,7 +618,7 @@ sub pagename ($) { #{{{
+ @@ -618,7 +618,7 @@ sub pagename ($) {
my $type=pagetype($file);
my $page=$file;
- $page=~s/\Q.$type\E*$// if defined $type;
+ $page=~s/\Q.$type\E*$// if defined $type && !$hooks{htmlize}{$type}{leavesuffix};
return $page;
- } #}}}
+ }
diff --git a/t/pagename.t b/t/pagename.t
index 96e6a87..58811b9 100755
@@ -61,7 +61,7 @@ I wonder if this patch will also be useful:
index 752d176..3f1b67b 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
- @@ -279,7 +279,11 @@ sub refresh () { #{{{
+ @@ -279,7 +279,11 @@ sub refresh () {
else {
$f=~s/^\Q$config{srcdir}\E\/?//;
push @files, $f;
diff --git a/doc/bugs/output_of_successful_rename_should_list_the_full_path_to_affected_pages.mdwn b/doc/bugs/output_of_successful_rename_should_list_the_full_path_to_affected_pages.mdwn
new file mode 100644
index 000000000..132d23463
--- /dev/null
+++ b/doc/bugs/output_of_successful_rename_should_list_the_full_path_to_affected_pages.mdwn
@@ -0,0 +1,14 @@
+I've just renamed a page and received the following as a result:
+
+<p>
+<b>Successfully renamed users/jondowland.mdwn to users/jon.mdwn.</b>
+</p>
+<p>
+
+The following pages have been automatically modified to update their links to users/jon.mdwn:
+<ul>
+<li><a href="./../../tips/convert_mediawiki_to_ikiwiki/discussion/">discussion</a></li><li><a href="./../../tips/untrusted_git_push/discussion/">discussion</a></li></ul>...
+
+In this situation I think the link to pages should be expanded to show the entire path, since there is quite likely to be a lot of things like "discussion". -- [[users/Jon]]
+
+[[done]]
diff --git a/doc/bugs/pagespec_parsing_chokes_on_function__40____41__.mdwn b/doc/bugs/pagespec_parsing_chokes_on_function__40____41__.mdwn
index a2eba694c..78fed0e5d 100644
--- a/doc/bugs/pagespec_parsing_chokes_on_function__40____41__.mdwn
+++ b/doc/bugs/pagespec_parsing_chokes_on_function__40____41__.mdwn
@@ -54,7 +54,7 @@ case the user is given to rebuilding the wiki by hand. --Ethan
+ }
return IkiWiki::FailReason->new("syntax error") if $@;
return $ret;
- } #}}}
+ }
</pre>
> Thanks, [[done]] --[[Joey]]
diff --git a/doc/bugs/pagetitle_function_does_not_respect_meta_titles.mdwn b/doc/bugs/pagetitle_function_does_not_respect_meta_titles.mdwn
index a30ab0fa3..4a83f9ec8 100644
--- a/doc/bugs/pagetitle_function_does_not_respect_meta_titles.mdwn
+++ b/doc/bugs/pagetitle_function_does_not_respect_meta_titles.mdwn
@@ -1,3 +1,233 @@
The `IkiWiki::pagetitle` function does not respect title changes via `meta.title`. It really should, so that links rendered with `htmllink` get the proper title in the link text.
--[[madduck]]
+
+----
+
+It is possible to set a Page-Title in the meta-plugin, but that one isn't
+reused in parentlinks. This [[patch]] may fix it.
+
+<ul>
+<li> I give pagetitle the full path to a page.
+<li> I redefine the 'pagetitle'-sub to deal with it.
+<li> to maintain compatibility for IkiWikis without the meta-plugin, i added a 'basename' to the Original-pagetitle.
+</ul>
+
+<pre>
+diff -c /usr/share/perl5/IkiWiki/Render.pm.distrib /usr/share/perl5/IkiWiki/Render.pm
+*** /usr/share/perl5/IkiWiki/Render.pm.distrib Wed Aug 6 07:34:55 2008
+--- /usr/share/perl5/IkiWiki/Render.pm Tue Aug 26 23:29:32 2008
+***************
+*** 102,108 ****
+ $template->param(
+ title => $page eq 'index'
+ ? $config{wikiname}
+! : pagetitle(basename($page)),
+ wikiname => $config{wikiname},
+ content => $content,
+ backlinks => $backlinks,
+--- 102,108 ----
+ $template->param(
+ title => $page eq 'index'
+ ? $config{wikiname}
+! : pagetitle($page),
+ wikiname => $config{wikiname},
+ content => $content,
+ backlinks => $backlinks,
+
+diff -c /usr/share/perl5/IkiWiki/Plugin/parentlinks.pm.distrib /usr/share/perl5/IkiWiki/Plugin/parentlinks.pm
+*** /usr/share/perl5/IkiWiki/Plugin/parentlinks.pm.distrib Wed Aug 6 07:34:55 2008
+--- /usr/share/perl5/IkiWiki/Plugin/parentlinks.pm Tue Aug 26 23:19:43 2008
+***************
+*** 44,50 ****
+ "height_$height" => 1,
+ };
+ $path.="/".$dir;
+! $title=IkiWiki::pagetitle($dir);
+ $i++;
+ }
+ return @ret;
+--- 44,50 ----
+ "height_$height" => 1,
+ };
+ $path.="/".$dir;
+! $title=IkiWiki::pagetitle($path);
+ $i++;
+ }
+ return @ret;
+
+diff -c /usr/share/perl5/IkiWiki.pm.distrib /usr/share/perl5/IkiWiki.pm
+*** /usr/share/perl5/IkiWiki.pm.distrib Wed Aug 6 07:48:34 2008
+--- /usr/share/perl5/IkiWiki.pm Tue Aug 26 23:47:30 2008
+***************
+*** 792,797 ****
+--- 792,799 ----
+ my $page=shift;
+ my $unescaped=shift;
+
++ $page=basename($page);
++
+ if ($unescaped) {
+ $page=~s/(__(\d+)__|_)/$1 eq '_' ? ' ' : chr($2)/eg;
+ }
+
+diff -c /usr/share/perl5/IkiWiki/Plugin/meta.pm.distrib /usr/share/perl5/IkiWiki/Plugin/meta.pm
+*** /usr/share/perl5/IkiWiki/Plugin/meta.pm.distrib Wed Aug 6 07:34:55 2008
+--- /usr/share/perl5/IkiWiki/Plugin/meta.pm Tue Aug 26 23:30:58 2008
+***************
+*** 3,8 ****
+--- 3,9 ----
+ package IkiWiki::Plugin::meta;
+
+ use warnings;
++ no warnings 'redefine';
+ use strict;
+ use IkiWiki 2.00;
+
+***************
+*** 289,294 ****
+--- 290,319 ----
+ }
+ }
+
++ sub IkiWiki::pagetitle ($;$) {
++ my $page=shift;
++ my $unescaped=shift;
++
++ if ($page =~ m#/#) {
++ $page =~ s#^/##;
++ $page =~ s#/index$##;
++ if ($pagestate{"$page/index"}{meta}{title}) {
++ $page = $pagestate{"$page/index"}{meta}{title};
++ } else {
++ $page = IkiWiki::basename($page);
++ }
++ }
++
++ if ($unescaped) {
++ $page=~s/(__(\d+)__|_)/$1 eq '_' ? ' ' : chr($2)/eg;
++ }
++ else {
++ $page=~s/(__(\d+)__|_)/$1 eq '_' ? ' ' : "&#$2;"/eg;
++ }
++
++ return $page;
++ }
++
+ package IkiWiki::PageSpec;
+
+ sub match_title ($$;@) {
+
+</pre>
+
+----
+
+> A few quick notes about it:
+
+> - Using <code>inline</code> would avoid the redefinition + code duplication.
+> - A few plugins would need to be upgraded.
+> - It may be necessary to adapt the testsuite in `t/pagetitle.t`, as well.
+>
+> --[[intrigeri]]
+>
+>> It was actually more complicated than expected. A working prototype is
+>> now in my `meta` branch, see my userpage for the up-to-date url.
+>> Thus tagging [[patch]]. --[[intrigeri]]
+>>
+>>> Joey, please consider merging my `meta` branch. --[[intrigeri]]
+
+So, looking at your meta branch: --[[Joey]]
+
+* Inter-page dependencies. If page A links to page B, and page B currently
+ has no title, then A will display the link as "B". Now page B is modified
+ and a title is added. Nothing updates "A".
+ The added overhead of rebuilding every page that links to B when B is
+ changed (as the `postscan` hook of the po plugin does) is IMHO a killer.
+ That could be hundreds or thousands of pages, making interactive editing
+ way slow. This is probably the main reason I had not attempted this whole
+ thing myself. IMHO this calls for some kind of intellegent dependency
+ handler that can detect when B's title has changed and only rebuild pages
+ that link to B in that case.
+* Looks like some plugins that use `pagetitle` to format it for display
+ were not changed to use `nicepagetitle` (for example, rename).
+ But most of those callers intend to display the page name
+ as a title, but including the parent directories in the path. (Ie,
+ "renaming foo/page title to bar/page title" --
+ you want to know it's moved from foo to bar.) `nicepagetitle` does not
+ allow doing that since it always takes the `basename`.
+* I don't like the name `nicepagetitle`. It's not very descriptive, is it?
+ And it seems very confusing to choose whether to use the "nice" or original
+ version. My hope is that adding a second function is unnecessary.
+ As I understand it, you added a new function for two reasons:
+ 1) It needs the full page name, not basename.
+ 2) `titlepage(pagetitle($page))` reversability.
+
+ 1) If you look at all the callers
+ Of `pagetitle` most of them pass a complete page name, not just the
+ basename. In most cases `pagetitle` is used to display the full name
+ of the page, including any subdirectory it's in. So why not just make
+ it consitently be given the full name of the page, with another argument
+ specifying if we want to get back just the base name.
+
+ 2) I can't find any code that actually uses the reversability like that.
+ The value passed to `titlepage` always comes from some external
+ source. Unless I missed one.
+* The use of `File::Spec->rel2abs` is a bit scary.
+* Does it really make sense to call `pagetitle` on the meta title
+ in meta's `nicepagetitle`? What if the meta title is something like
+ "foo_bar" -- that would be changed to "foo bar".
+* parentlinks is changed to use `nicepagetitle(bestlink($page, $path))`.
+ Won't `bestlink` return "" if the parent page in question does not exist?
+* `backlinks()` is changed to add an additional `title` field
+ to the hash returned, but AFAICS this is not used in the template.
+* Shouldn't `Render.pm` use nicepagetitle when getting the title for the
+ page template? Then meta would not need to override the title in the
+ `pagetemplate` hook. (Although this would eliminate handling of
+ `title_overridden` -- but that is little used and would not catch
+ all the other ways titles can be overridden with this patch anyway.)
+
+> I'm not a reviewer or anything, but can I chime in on changes to pagetitle?
+> I don't think having meta-titles in wikilinks and the parentlinks path by
+> default is necessarily a good thing. I don't consider the meta-title of a page
+> as used in `<title>` to be the same thing as the short title you
+> want in those contexts - IMO, the meta-title is the "formal" title of the page,
+> enough to identify it with no other context, and frequently too long to be used
+> as a link title or a parentlink, whereas the parentlinks title in particular
+> should be some abbreviated form that's enough to identify it in context.
+> [tbm](http://www.cyrius.com/) expressed a similar opinion when I was discussing
+> ikiwiki with him at the weekend.
+>
+> It's a matter of taste whether wikilinks are "like a parentlink" or "like a
+> `<title>`"; I could be persuaded either way on that one.
+>
+> An example from my site: [this page](http://www.pseudorandom.co.uk/2004/debian/ipsec/)
+> is the parent of [this page](http://www.pseudorandom.co.uk/2004/debian/ipsec/wifi/)
+> with a title too long to use in the latter's parentlinks; I think the titles of
+> both those pages are too long to use as wikilink text too. Similarly, tbm's page
+> about [Debian on Orion devices from Buffalo](http://www.cyrius.com/debian/orion/buffalo/)
+> can simply be called "Buffalo" in context.
+>
+> Having a `\[[!meta abbrev="..."]]` that took precedence over title
+> in parentlinks and possibly wikilinks might be a good way to fix this? Or if your
+> preference goes the other way, perhaps a `\[[!meta longtitle=""]]` could take
+> precedence when generating the `<title>` and the title that comes after the
+> parentlinks. --[[smcv]]
+
+>> I think you've convinced me. (I had always had some doubt in my mind as
+>> to whether using titles in all these other places would make sense.)
+>>
+>> Instead of meta abbrev, you could have a meta pagename that
+>> overrides the page name displayed everywhere (in turn overridden by
+>> meta title iff the page's title is being displayed). But is this complexity
+>> needed? We have meta redir, so if you want to change the name of a page,
+>> you can just rename it, and put in a stub redirection page so links
+>> still work.
+>>
+>> This leaves the [[plugins/contrib/po]] plugin, which really does need
+>> a way to change the displayed page name everywhere, and at least a
+>> subset of the changes in the meta branch are needed to support that.
+>>
+>> (This would also get around my concern about inter-page dependency
+>> handling, since po contains a workaround for that, and it's probably
+>> acceptable to use potentially slow methods to handle this case.)
+>> --[[Joey]]
diff --git a/doc/bugs/prune_causing_taint_mode_failures.mdwn b/doc/bugs/prune_causing_taint_mode_failures.mdwn
index 1876d9129..5fc1d8b75 100644
--- a/doc/bugs/prune_causing_taint_mode_failures.mdwn
+++ b/doc/bugs/prune_causing_taint_mode_failures.mdwn
@@ -11,7 +11,7 @@ I've no idea what's happening (hey, I'm a C programmer), but I've hacked prune()
<pre>
use Scalar::Util qw(tainted);
-sub prune ($) { #{{{
+sub prune ($) {
my $file=shift;
unlink($file);
@@ -25,7 +25,7 @@ sub prune ($) { #{{{
$dir = $1;
}
}
-} #}}}
+}
</pre>
> Old versions of perl are known to have bugs with taint checking.
diff --git a/doc/bugs/quieten_mercurial.mdwn b/doc/bugs/quieten_mercurial.mdwn
index 26f833e5f..3fd75ea1b 100644
--- a/doc/bugs/quieten_mercurial.mdwn
+++ b/doc/bugs/quieten_mercurial.mdwn
@@ -6,7 +6,7 @@ messages which are then taken for CGI output, causing errors and general trouble
@@ -55,7 +55,7 @@
}
- sub rcs_update () { #{{{
+ sub rcs_update () {
- my @cmdline = ("hg", "-R", "$config{srcdir}", "update");
+ my @cmdline = ("hg", "-q", "-R", "$config{srcdir}", "update");
if (system(@cmdline) != 0) {
@@ -22,7 +22,7 @@ messages which are then taken for CGI output, causing errors and general trouble
if (system(@cmdline) != 0) {
warn "'@cmdline' failed: $!";
@@ -92,7 +92,7 @@
- sub rcs_add ($) { # {{{
+ sub rcs_add ($) {
my ($file) = @_;
- my @cmdline = ("hg", "-R", "$config{srcdir}", "add", "$file");
diff --git a/doc/bugs/recentchanges_feed_links.mdwn b/doc/bugs/recentchanges_feed_links.mdwn
index 14f1c26ba..ef0f9d1c4 100644
--- a/doc/bugs/recentchanges_feed_links.mdwn
+++ b/doc/bugs/recentchanges_feed_links.mdwn
@@ -92,3 +92,16 @@ to turn on? --Chapman Flack
>>>>> required to compare `<id>`s as opaque strings.
>>>>>
>>>>> --[[smcv]]
+
+>>>>>> Here's my attempt at a [[patch]] for anchor-based change permalinks:
+>>>>>> <http://pastie.org/295016>.
+>>>>>> --[[JasonBlevins]], 2008-10-17
+
+[[JasonBlevins]] nailed it, [[done]] --[[Joey]]
+
+> Thanks for applying the patch (and improving it). There's still one small issue:
+> the old opening div tag still needs to be removed (it's hard to see the removed line
+> with the pastie color scheme).
+> --[[JasonBlevins]], 2008-10-18
+
+>> Thanks, missed that when I had to hand-apply the patch. --[[Joey]]
diff --git a/doc/bugs/relative_date_weird_results.mdwn b/doc/bugs/relative_date_weird_results.mdwn
new file mode 100644
index 000000000..9f35e47f7
--- /dev/null
+++ b/doc/bugs/relative_date_weird_results.mdwn
@@ -0,0 +1,4 @@
+I just submitted a new bug, and... after clicking "save", my brand new bug page displays, at the bottom: "Last edited 6 hours and 3 minutes ago". Timezone issue, I guess? (Hint: I'm in France) -- [[intrigeri]]
+
+> Yep, it wasn't including a timezone in the machine parseable time.
+> [[done]] --[[Joey]]
diff --git a/doc/bugs/remove_orphaned_sparkline-php_from_Suggests.mdwn b/doc/bugs/remove_orphaned_sparkline-php_from_Suggests.mdwn
new file mode 100644
index 000000000..b4e2a1501
--- /dev/null
+++ b/doc/bugs/remove_orphaned_sparkline-php_from_Suggests.mdwn
@@ -0,0 +1,20 @@
+Hi!
+
+How about to replace sparkline-php from Suggests by a better alternative?
+
+I would like to file a RM bug to get it out of archive. Do you have a better alternative for it? PHP has a lot of them..
+
+Thanks
+
+> sparline-php is orphaned *in Debian*. Upstream, is has seen activity as
+> recently as 11 months ago.
+>
+> I don't know of a better alternative. I looked at the perl sparkline
+> stuff in CPAN and is was bad enough that the pain of using php from this
+> perl program was a better alternative.
+>
+> Anyway, it works great; maintaining the sparkline-php package in Debian
+> would certianly be much less work than finding some alternative and
+> rewriting the ikiwiki code to use it, *and* packaging that alternative
+> and maintaining it in Debian. So your suggestion doesn't make a lot of
+> sense; Debian should just find a maintainer for sparkline-php. --[[Joey]]
diff --git a/doc/bugs/rst_tweak.mdwn b/doc/bugs/rst_tweak.mdwn
index 8c7d8134d..9d433e24e 100644
--- a/doc/bugs/rst_tweak.mdwn
+++ b/doc/bugs/rst_tweak.mdwn
@@ -27,3 +27,17 @@ Does the Perl version of this plugin still exist? There appears to be no "rst.p
> No, only the python version exists. It does have `raw_enabled` set.
> --[[Joey]]
+
+I am sorry, but I am confused. Does this mean that I can use Ikiwiki
+features that translate to HTML in rst files? For example, when I use a
+\[[pagename]]-style link in a rst file, the page generated by Ikiwiki's rst
+plugin says &lt;a href="./../pagename/">pagename&lt;/a> as text. The link
+is expanded correctly, but the result isn't interpreted as HTML. Is that
+what is supposed to happen? --Peter
+
+> `raw_enabled` allows you to use the
+> [raw directive](http://docutils.sourceforge.net/docs/ref/rst/directives.html),
+> but this is not used by ikiwiki for wikilinks or anything else.
+> That's why the [[plugin_page|plugins/rst]] has its note about
+> issues with wikilinks and directives. You'd have to put those inside
+> raw directives yourself to avoid rst escaping their result. --[[Joey]]
diff --git a/doc/bugs/search_for_locale_data_in_the_installed_location.mdwn b/doc/bugs/search_for_locale_data_in_the_installed_location.mdwn
index 0a2b1efea..dace2ca19 100644
--- a/doc/bugs/search_for_locale_data_in_the_installed_location.mdwn
+++ b/doc/bugs/search_for_locale_data_in_the_installed_location.mdwn
@@ -2,7 +2,7 @@ It seems like gettext only searches for locale information in /usr/share/locale,
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
- @@ -1057,6 +1057,7 @@ sub gettext { #{{{
+ @@ -1057,6 +1057,7 @@ sub gettext {
$gettext_obj=undef;
return shift;
}
diff --git a/doc/bugs/shortcut_plugin_will_not_work_without_shortcuts.mdwn.mdwn b/doc/bugs/shortcut_plugin_will_not_work_without_shortcuts.mdwn.mdwn
new file mode 100644
index 000000000..5cc669106
--- /dev/null
+++ b/doc/bugs/shortcut_plugin_will_not_work_without_shortcuts.mdwn.mdwn
@@ -0,0 +1,33 @@
+On my initial ikiwiki -setup auto.setup, I get the following error:
+
+ shortcut plugin will not work without shortcuts.mdwn
+ /home/turian/utils/etc/ikiwiki/auto.setup: ikiwiki --refresh --setup /home/turian/iki.setup failed at IkiWiki/Setup/Automator.pm line 105.
+
+
+This is using the latest git pull of ikiwiki.
+I am not sure why it is not finding shortcuts.mdwn. -- [[JosephTurian]]
+
+> The error, and the weird paths suggest to me that you
+> have installed ikiwiki in a strange way, and it is failing
+> to find its basewiki underlay. The `$installdir` is
+> hardcoded into IkiWiki.pm at build time, based on the PREFIX
+> setting (see README).
+>
+> If that's not set right, you'll have other problems than just this one,
+> so I suggest you check how you installed ikiwiki.
+>
+> Anyway, I've made the shortcut plugin only warn about this..
+> --[[Joey]]
+
+> > I have
+> > $installdir="/home/turian/utils/"
+> > and the underlay dir is set to:
+> > "$installdir/share/ikiwiki/basewiki",
+> > which does contain shortcuts.mdwn. So I am not sure why it is not finding it.
+> > I am grappling with installing ikiwiki in a user account, and would like to get the directories set up correctly.
+> > How can I debug this issue further?
+
+>>>> Why don't you strace it and look at where it's looking for
+>>>> shortcuts.mdwn. --[[Joey]]
+
+>>>>>> Hmm, so change the PERL5LIB seemed to fix this. [[Done]].
diff --git a/doc/bugs/ssl_certificates_not_checked_with_openid.mdwn b/doc/bugs/ssl_certificates_not_checked_with_openid.mdwn
index 2dc74a984..04ece0ae8 100644
--- a/doc/bugs/ssl_certificates_not_checked_with_openid.mdwn
+++ b/doc/bugs/ssl_certificates_not_checked_with_openid.mdwn
@@ -65,4 +65,21 @@ significantly harder than the network based attacks."
With regards to implementation, I am surprised that the libraries don't seem to
do this checking, already, and by default. Unfortunately, I am not sure how to test
-this adequately, see <http://bugs.debian.org/466055>. -- Brian May
+this adequately, see [[!debbug 466055]]. -- Brian May
+
+---
+
+I think [[!cpan Crypt::SSLeay]] already supports checking the certificate. The trick
+is to get [[!cpan LWP::UserAgent]], which is used by [[!cpan LWPx::ParanoidAgent]] to
+enable this checking.
+
+I think the trick is to set one of the the following environment variables before retrieving
+the data:
+
+$ENV{HTTPS\_CA\_DIR} = "/etc/ssl/certs/";
+$ENV{HTTPS\_CA\_FILE} = "/etc/ssl/certs/file.pem";
+
+Unfortunately I get weird results if the certificate verification fails, see [[!debbug 503440]].
+It still seems to work though, regardless.
+
+-- Brian May
diff --git a/doc/bugs/stray___60____47__p__62___tags.mdwn b/doc/bugs/stray___60____47__p__62___tags.mdwn
new file mode 100644
index 000000000..6e508ffda
--- /dev/null
+++ b/doc/bugs/stray___60____47__p__62___tags.mdwn
@@ -0,0 +1,15 @@
+When using the [[plugins/htmltidy]] plugin (and possibly in other circumstances), ikiwiki sometimes creates more `</p>` tags than `<p>` tags, causing unbalanced markup. I've previously noticed unbalanced tags when a `\[[!map]]` matches no pages. This is part of the reason I developed [[plugins/htmlbalance]].
+
+This is particularly noticeable if htmltidy is enabled when building the docwiki: on the 'contrib' plugin pages, the title becomes `foo </p> (third-party plugin)` (with the angle-brackets escaped - it seems the text gets sanitized but is then escaped anyway).
+
+I believe that this snippet in `IkiWiki.pm` might be the reason for the imbalance:
+
+ if ($oneline) {
+ # hack to get rid of enclosing junk added by markdown
+ # and other htmlizers
+ $content=~s/^<p>//i;
+ $content=~s/<\/p>$//i;
+ chomp $content;
+ }
+
+The fact that HTML in a `\[[!meta title]]` is added but then escaped might indicate that some other bug is involved.
diff --git a/doc/bugs/support_for_openid2_logins.mdwn b/doc/bugs/support_for_openid2_logins.mdwn
new file mode 100644
index 000000000..f78d50c3c
--- /dev/null
+++ b/doc/bugs/support_for_openid2_logins.mdwn
@@ -0,0 +1,10 @@
+I have several complaints that users cannot contribute to my ikiwiki instances since they only have OpenID logins that support OpenID2. E.g. Yahoo!'s OpenID only supports 2.0+
+
+This is not the fault of ikiwiki, though the problem lies within the [perl openid consumer](http://packages.qa.debian.org/libn/libnet-openid-consumer-perl.html) in Debian which is a 1.x implementation AFAIK.
+
+I've contacted JanRain who have pointed me to:
+
+* [OpenID4Perl](http://code.sxip.com/openid4perl/)
+* Some [work](http://code.sixapart.com/svn/openid/trunk/perl/) by David Recordon
+
+However both Perl OpenID 2.x implementations have not been released and are incomplete implementations. :(
diff --git a/doc/bugs/table_external_file_links.mdwn b/doc/bugs/table_external_file_links.mdwn
new file mode 100644
index 000000000..7b35383c5
--- /dev/null
+++ b/doc/bugs/table_external_file_links.mdwn
@@ -0,0 +1,9 @@
+If wikilinks are put in an external table file, those links are not seen at
+scan time, and so ikiwiki does not know to update the page containing the
+table when the pages the links point to change (are added, removed, etc).
+
+There seem only two solutions to that bug -- either really make wikilinks
+in an external table file not work (probably by escaping them),
+or run the preprocess code also in scan (expensive!). --[[Joey]]
+
+[[done]]
diff --git a/doc/bugs/tags__44___backlinks_and_3.x.mdwn b/doc/bugs/tags__44___backlinks_and_3.x.mdwn
new file mode 100644
index 000000000..4fe9a4723
--- /dev/null
+++ b/doc/bugs/tags__44___backlinks_and_3.x.mdwn
@@ -0,0 +1,34 @@
+I think there might be an issue in the backlinks calculation in ikiwiki 3.04.
+
+I've just migrated to 3.04. In doing so, the following pagespec
+
+> "log/* and !link(tag/aggregation) and !link(tag/draft) and !*/Discussion"
+
+...started matching pages which contained
+
+> \[\[!template draft\]\]
+
+The page templates/draft.mdwn contains (amongst some markup)
+
+> \[\[!tag draft \]\]
+
+Prior to migration, the pagespec definitely took effect post-transclusion.
+
+An example: <http://jmtd.net/log/too_much_debconf_a_bad_thing/> contains the
+template inclusion, which can be seen to have worked due to markup at the
+bottom of the page. It even includes a "Tags: draft" link at the bottom.
+
+Strangely, <http://jmtd.net/tag/draft/> does not contain backlinks to pages
+which are tagged using the procedure above.
+
+After the first rebuild, it's broken, after a subsequent refresh, it is fixed.
+I've reproduced this twice (but assumed I'd done something wrong the first
+time, so went ahead and migrated live, spamming planet debian in the process
+:(). I will try and put together a testcase. -- [[users/Jon]], 2009/02/17
+
+> Looks like the same problem as
+> [[cannot_reliably_use_meta_in_template]]. AFAIK, this has never worked
+> reliably, although the linked page has a simple, though potentially
+> expensive fix. --[[Joey]]
+
+> fix made, [[done]] --[[Joey]]
diff --git a/doc/bugs/tbasewiki__95__brokenlinks.t_broken.mdwn b/doc/bugs/tbasewiki__95__brokenlinks.t_broken.mdwn
index ac895896a..db3917d21 100644
--- a/doc/bugs/tbasewiki__95__brokenlinks.t_broken.mdwn
+++ b/doc/bugs/tbasewiki__95__brokenlinks.t_broken.mdwn
@@ -25,12 +25,12 @@ After some digging I found that HTML::Template is being required after the new s
filter => sub {
my $text_ref = shift;
@@ -857,6 +856,7 @@
- } #}}}
+ }
- sub template ($;@) { #{{{
+ sub template ($;@) {
+ require HTML::Template;
HTML::Template->new(template_params(@_));
- } #}}}
+ }
**That** gave me:
diff --git a/doc/bugs/textile_plugin_dies_if_input_has_a_non-utf8_character.mdwn b/doc/bugs/textile_plugin_dies_if_input_has_a_non-utf8_character.mdwn
index 7ec1edc4e..bdd07210e 100644
--- a/doc/bugs/textile_plugin_dies_if_input_has_a_non-utf8_character.mdwn
+++ b/doc/bugs/textile_plugin_dies_if_input_has_a_non-utf8_character.mdwn
@@ -9,6 +9,6 @@ The first two complaints happen if textile is not loaded, the third fatal one ha
0x92 is "single quote" in the evil windows default codepage. It would be nice to handle this gracefully and not abort ikiwiki at this point, or alternatively, die fatally but mention which input page caused the error.
-Interestingly enough, in my case, the input file has several other bad windows characters (0xFC, u-umlaut) which have not caused ikiwiki to abort. ikiwiki version 2.50. -- [[JonDowland]]
+Interestingly enough, in my case, the input file has several other bad windows characters (0xFC, u-umlaut) which have not caused ikiwiki to abort. ikiwiki version 2.50. -- [[users/Jon]]
> Fixed in git. [[done]] --[[Joey]]
diff --git a/doc/bugs/txt_plugin_having_problems_with_meta_directives.mdwn b/doc/bugs/txt_plugin_having_problems_with_meta_directives.mdwn
new file mode 100644
index 000000000..22224483e
--- /dev/null
+++ b/doc/bugs/txt_plugin_having_problems_with_meta_directives.mdwn
@@ -0,0 +1,19 @@
+When applying my usual copyright and licensing header to a [[plugins/txt]]
+page, garbled output is created.
+
+Here is the header:
+
+ \[[meta copyright="Copyright © 2001, 2002, 2003, 2004, 2005, 2008 Free
+ Software Foundation, Inc."]]
+
+ \[[meta license="""[[toggle id="license" text="GFDL 1.2+"]][[toggleable
+ id="license" text="Permission is granted to copy, distribute and/or modify
+ this document under the terms of the GNU Free Documentation License,
+ Version 1.2 or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+ A copy of the license is included in the section entitled
+ [[GNU_Free_Documentation_License|/fdl]]."]]"""]]
+
+--[[tschwinge]]
+
+> [[done]], made it less zealous about encoding html entities. --[[Joey]]
diff --git a/doc/bugs/unicode_chars_in_wikiname_break_auth.mdwn b/doc/bugs/unicode_chars_in_wikiname_break_auth.mdwn
new file mode 100644
index 000000000..472597c46
--- /dev/null
+++ b/doc/bugs/unicode_chars_in_wikiname_break_auth.mdwn
@@ -0,0 +1,20 @@
+I spent hours trying to understand why my wiki suddenly refused me to log in (using passwordauth).
+The failure message was always: `login failed, perhaps you need to turn on cookies?`
+
+Inspecting the cookie information (thanks to Iceweasel's webdeveloper add-on), I realized there were some weird-looking encoded chars in the cookie name.
+
+Replacing "·" with "-" in `wikiname` fixed this login issue.
+
+> Hmm, Recai sent me a patch a long time ago to handle utf-8 here by encoding
+> the wikiname. But it doesn't seem to work, somehow the encoded utf-8
+> value still doesn't make it through. (CGI::Session seems to have underermined utf-8
+> issues too.) Seems like I will have to possibly break some sessions and
+> entity-encode the wikiname in the cookie.. [[done]]. --[[Joey]]
+
+>> I confirm it fixes the bug for me. --[[intrigeri]]
+
+(BTW, such a char was replaced by -I don't remember what encoding thingie- in my setup file, when running `ikiwiki-transition setupformat`.)
+
+> Thanks for the heads up, fixed that too. --[[Joey]]
+
+>> I confirm it fixes the bug for me. --[[intrigeri]]
diff --git a/doc/bugs/user_links_on_recentchanges_pages_problem.mdwn b/doc/bugs/user_links_on_recentchanges_pages_problem.mdwn
new file mode 100644
index 000000000..d00f6815b
--- /dev/null
+++ b/doc/bugs/user_links_on_recentchanges_pages_problem.mdwn
@@ -0,0 +1,12 @@
+When I click on a linked username for commits on the recentchanges page (on
+the live ikiwiki.info) I get a link such as
+<http://ikiwiki.info/ikiwiki.cgi?page=users%2Fjoey&do=recentchanges_link>
+which returns something like
+
+ <a href="http://ikiwiki.info">ikiwiki</a>/ Error
+ <p class="error">Error: unknown do parameter
+
+-- [[Jon]]
+
+> That was fixed in 3.04 but ikiwiki.info had not been upgraded to it yet.
+> [[done]] --[[Joey]]
diff --git a/doc/contact.mdwn b/doc/contact.mdwn
index 37fb59071..486a4d186 100644
--- a/doc/contact.mdwn
+++ b/doc/contact.mdwn
@@ -7,4 +7,5 @@ developers monitor [[RecentChanges]] closely, via the webpage, email,
[CIA](http://cia.navi.cx), and IRC, and respond in a timely fashion.
You could also drop by the IRC channel `#ikiwiki` on
-[OFTC](http://www.oftc.net/) (`irc.oftc.net`).
+[OFTC](http://www.oftc.net/) (`irc.oftc.net`), or use the
+[identi.ca ikiwiki group](http://identi.ca/group/ikiwiki).
diff --git a/doc/convert.mdwn b/doc/convert.mdwn
new file mode 100644
index 000000000..871cd31fe
--- /dev/null
+++ b/doc/convert.mdwn
@@ -0,0 +1,7 @@
+Do you have an existing wiki or blog using other software, and would like
+to convert it to ikiwiki? Various tools and techniques have been developed
+to handle such conversions.
+
+* [[tips/convert_mediawiki_to_ikiwiki]]
+* [[tips/convert_MoinMoin_and_TWiki_to_ikiwiki]]
+* [[tips/convert_blogger_blogs_to_ikiwiki]]
diff --git a/doc/css_market.mdwn b/doc/css_market.mdwn
index 26720196f..15e147513 100644
--- a/doc/css_market.mdwn
+++ b/doc/css_market.mdwn
@@ -1,12 +1,15 @@
[[!meta title="CSS Market"]]
-User contributed stylesheet files for ikiwiki. Feel free to add your own
-stylesheets here. (Upload as wiki pages; wiki gnomes will convert them to css
-files..)
+User contributed stylesheet files for ikiwiki. Unless otherwise noted,
+these style sheets can be installed by copying them into your wiki's source
+dir with a filename of `local.css`.
+
+Feel free to add your own stylesheets here. (Upload as wiki pages; wiki
+gnomes will convert them to css files..)
* **[[css_market/zack.css]]**, contributed by [[StefanoZacchiroli]],
customized mostly for *blogging purposes*, can be seen in action on
- [zack's blog](http://www.bononia.it/~zack/blog/)
+ [zack's blog](http://upsilon.cc/~zack/blog/)
[[!meta stylesheet="zack"]]
* **[[css_market/kirkambar.css]]**, contributed by [[Roktas]]. This far from perfect
@@ -51,6 +54,10 @@ files..)
* **[contraste.css][4]**, contributed by [[Blanko]]. Can be seen on [Contraste Demo][5]. Local.css and templates available [here][6].
+* **[[css_market/actiontabs.css]]**, contributed by [[svend]]. This style sheet displays
+ the action list (Edit, RecentChanges, etc.) as tabs.
+ [[!meta stylesheet="actiontabs"]]
+
If your web browser allows selecting between multiple stylesheets, this
page can be viewed using many of the stylesheets above. For example, if
using Epiphany with the Select Stylesheet extension enabled, use View ->
diff --git a/doc/css_market/actiontabs.css b/doc/css_market/actiontabs.css
new file mode 100644
index 000000000..a1dc47e92
--- /dev/null
+++ b/doc/css_market/actiontabs.css
@@ -0,0 +1,122 @@
+/* ikiwiki local style sheet */
+
+/* Add local styling here, instead of modifying style.css. */
+
+a {
+ text-decoration: none;
+ color: #005a9c;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+
+hr {
+ border-style: none;
+ background-color: #999;
+ height: 1px;
+}
+
+code, pre {
+ background: #eee;
+}
+
+pre {
+ padding: .5em;
+}
+
+body {
+ margin: 0;
+ padding: 0;
+ font-family: sans-serif;
+ color: black;
+ background: white;
+}
+
+.pageheader {
+ margin: 0;
+ padding: 1em 2em 0 2em;
+ background: #eee;
+ border-color: #999;
+ border-style: none none solid none;
+ border-width: 1px;
+}
+
+.header {
+ font-size: 100%;
+ font-weight: normal;
+}
+
+.title {
+ display: block;
+ margin-top: .2em;
+ font: 140% sans-serif;
+ text-transform: capitalize;
+}
+
+.actions {
+ text-align: right;
+ padding: 0;
+}
+
+#content, #comments, #footer {
+ margin: 1em 2em;
+}
+
+#pageinfo {
+ border-color: #999;
+}
+
+.inlinepage {
+ margin: .4em 0;
+ padding: .4em 0;
+ border-style: none;
+ border-top: 1px solid #aaa;
+}
+
+.inlineheader {
+ font-size: 120%;
+ font-weight: normal;
+}
+
+h1 { font: 120% sans-serif }
+h2 { font: bold 100% sans-serif }
+h3 { font: italic 100% sans-serif }
+h4, h5, h6 { font: small-caps 100% sans-serif }
+
+/* Smaller headings for inline pages */
+.inlinepage h1 { font-size: 110% }
+.inlinepage h2 { font-size: 100% }
+.inlinepage h3 { font-size: 100% }
+
+.pageheader .actions ul {
+ border-style: none
+}
+
+.actions ul {
+ font-size: 75%;
+ padding: 0;
+ border-style: none;
+}
+
+.actions ul li a {
+ text-decoration: none;
+}
+
+.actions ul li {
+ margin: 0;
+ padding: .1em .5em 0 .5em;
+ background: white;
+ border-color: #999;
+ border-style: solid solid none solid;
+ border-width: 1px;
+}
+
+div.recentchanges {
+ border-style: none;
+}
+
+.pagecloud {
+ width: auto;
+}
diff --git a/doc/css_market/discussion.mdwn b/doc/css_market/discussion.mdwn
index cba13132e..f80053e38 100644
--- a/doc/css_market/discussion.mdwn
+++ b/doc/css_market/discussion.mdwn
@@ -5,3 +5,12 @@ What is the correct way to install the .tmpl files? -- [[JosephTurian]]
> ikiwiki's standard templates (in, eg `/usr/share/ikiwiki/templates`)
> --[[Joey]]
+----
+
+How can I update a .css file uploaded to the CSS market?
+My CSS has been updated to address comments (for the comments plugin), but I cannot find a way to update zack.css.
+The most recent version is always available at: <http://git.upsilon.cc/cgi-bin/gitweb.cgi?p=zack-homepage.git;a=blob_plain;f=local.css;hb=HEAD>
+
+-- [[StefanoZacchiroli]]
+
+> Just letting me know about the change works -- updated. --[[Joey]]
diff --git a/doc/css_market/zack.css b/doc/css_market/zack.css
index dbc2e5c44..5a0521d54 100644
--- a/doc/css_market/zack.css
+++ b/doc/css_market/zack.css
@@ -14,122 +14,180 @@
*/
body {
- font-family: sans;
- width: 760px;
- margin-left: 20px;
+ font-family: sans-serif;
+ font-size: medium;
}
+h1, h2, h3, h4 {
+ font-weight: normal;
+}
+h1 { font-size: 140%; }
+h2 { font-size: 120%; }
+h3 { font-size: 110%; }
+h4 { font-size: 105% }
-div#content {
- font-size: 11pt;
+a { text-decoration: none; }
+a:hover { text-decoration: underline; }
+
+.flow {
+ float: right;
+ margin-left: 10px;
+ margin-bottom: 10px;
+ text-align: center;
}
-.header span {
- font-size: 14pt;
- font-weight: normal;
+.attrib-caption {
+ font-size: xx-small;
+ font-style: italic;
}
-div.actions ul {
- font-size: 10pt;
+input {
+ border: solid 1px;
+ border-color: #aaa;
}
-h1 {
- font-weight: normal;
- font-size: 17pt;
+.header { font-weight: normal; }
+
+.selflink { text-decoration: underline; }
+
+.pageheader .actions ul,
+#sitemeta {
+ border-top: solid 1px;
+ border-bottom: solid 1px;
+ font-size: small;
+ border-color: #aaa;
+ background: #eee;
}
-h2 {
- font-weight: normal;
- font-size: 16pt;
+.actions ul {
+ padding: 1px;
+ margin-top: 5px;
}
-h3 {
- font-weight: normal;
- font-size: 15pt;
+#sitemeta {
+ padding: 0;
+ margin-bottom: 5px;
}
-h4 {
- font-weight: normal;
- font-size: 14pt;
+#backlinks,
+.tags {
+ margin-top: 0;
+ margin-bottom: 0;
}
-h5 {
- font-weight: normal;
- font-size: 13pt;
+
+#pageinfo {
+ border: none;
}
-h6 {
- font-weight: normal;
- font-size: 12pt;
+
+#searchform div:before {
+ font-size: small;
+ content: "search:";
+}
+#searchform input {
+ border-top: none;
+ border-bottom: none;
+ vertical-align: bottom;
+ margin-right: 7px;
}
-div.inlinepage > span.header > a {
- float: right;
- display: block;
- font-size: 11pt;
- font-weight: normal;
- margin: 0;
+#sidebar {
+ border: solid;
+ border-width: 1px;
padding: 0;
+ margin-top: 15px;
+ border: 1px solid;
+ border-color: #aaa;
+ background: #eee;
+ width: 16ex;
}
-div.inlinepage > span.header > a:before {
- content: "permalink: ";
- font-size: smaller;
- text-decoration: none;
- font-style: italic;
+#sidebar ul {
+ margin: 0;
+ padding-left: 1em;
+ list-style-type: none;
}
-
-div.inlinepage {
- margin-bottom: 10px;
+#sidebar ul ul {
+ padding-left: 1.5em;
+ font-size: 90%;
}
-div.inlinepage h1 {
- font-weight: normal;
- font-size: 14pt;
+#pageinfo,
+#footer {
margin: 0;
}
-div.inlinepage h2 {
- font-weight: normal;
- font-size: 13pt;
- margin: 0;
+#pageinfo {
+ font-size: small;
}
-div.inlinepage h3 {
- font-weight: normal;
- font-size: 12pt;
+.pagecopyright,
+.pagelicense,
+.pagedate {
margin: 0;
+ display: inline;
}
-div.inlinepage h4 {
- font-weight: normal;
- font-size: 11pt;
- margin: 0;
+#backlinks {
+ margin-top: 5px;
+ margin-bottom: 10px;
+ font-size: larger;
}
-div.inlinepage h5 {
- font-weight: normal;
- font-size: 11pt;
- margin: 0;
+.validation {
+ display: inline;
+ float: right;
}
-div.inlinepage h6 {
- font-weight: normal;
- font-size: 11pt;
- margin: 0;
+
+.pagecloud {
+ margin-left: 5px;
}
-div#blogform {
- padding: 0px 5px;
- margin-bottom: 10px;
+table.identikit tr th {
+ text-align: right;
+ vertical-align: top;
+}
+table.identikit tr th:after {
+ content: ":";
+}
+table.identikit tr td {
+ text-align: left;
+ vertical-align: top;
}
-pre {
- width: 90%;
- font-size: 10pt;
- font-family: monospace;
- background: #e1e1e1;
- margin-left: 4%;
- padding-top: 5px;
- padding-bottom: 5px;
+.doi_logo , .doi_logo a {
+ background: #3965bd;
+ color: white !important;
+ font-size: 80%;
+ text-decoration: none;
+ font-family: times;
+ font-weight: bold;
+ padding: 0px 1px 0px 2px;
}
-.pagecloud {
- width: 25%;
- border-top: 1px solid #aaa;
- border-bottom: 1px solid #aaa;
- background: #eee;
- color: black !important;
+#comments {
+ margin-top: 5ex;
+ border-top: solid 1px;
+ border-color: #aaa;
+ font-size: small;
+}
+
+#comments #feedlink {
+ text-align: right;
+}
+#comments #feedlink:before {
+ content: "comment feeds: ";
+}
+
+.addcomment {
+ padding: 5px;
+ font-style: italic;
+}
+
+.comment {
+ border: none;
+ background-color: #eee;
+ margin: 5px;
+ margin-top: 10px;
+}
+
+.comment-subject {
+ font-style: normal;
}
-.pagecloud a {
- text-decoration: none;
+.comment-header {
+ border-top: solid 1px;
+ border-color: #aaa;
+ text-align: right;
+ font-style: normal;
}
diff --git a/doc/download.mdwn b/doc/download.mdwn
index 6566dc122..507b250a5 100644
--- a/doc/download.mdwn
+++ b/doc/download.mdwn
@@ -10,12 +10,7 @@ Installation steps and requirements are listed on the [[install]] page.
## packages
-To install with apt, if using Debian (since 4.0), or Ubuntu (since 6.10):
-[[!template id=note text="""
-Note that Debian 4.0 and especially Ubuntu 6.10 contain older versions of
-ikiwiki, there have been lots of enhancements and bug fixes since those
-versions.
-"""]]
+To install with apt, if using Debian or Ubuntu:
apt-get install ikiwiki
@@ -24,7 +19,9 @@ Or download the deb from <http://packages.debian.org/unstable/web/ikiwiki>.
There is a backport of a recent version of ikiwiki for Debian 4.0 at
<http://packages.debian.org/etch-backports/ikiwiki>.
-There is also an unofficial backport of ikiwiki for Ubuntu Hardy, provided by
+Fedora versions 8 and newer have RPMs of ikiwiki available.
+
+There is also an unofficial backport of ikiwiki for Ubuntu Intrepid, provided by
[[Paweł_Tęcza|users/ptecza]],
at [http://gpa.net.icm.edu.pl/ubuntu/](http://gpa.net.icm.edu.pl/ubuntu/index-en.html).
@@ -38,6 +35,8 @@ Gentoo has an [ebuild](http://bugs.gentoo.org/show_bug.cgi?id=144453) in its bug
IkiWiki can be installed [from macports](http://www.macports.org/ports.php?by=name&substr=ikiwiki)
by running `sudo port install ikiwiki`.
+A [PKGBUILD for Arch Linux](http://aur.archlinux.org/packages.php?ID=12284) is in the AUR.
+
## revision control
Ikiwiki is developed in a [[git_repository|git]].
diff --git a/doc/examples/blog.mdwn b/doc/examples/blog.mdwn
index 3e89c4b99..2155d7fea 100644
--- a/doc/examples/blog.mdwn
+++ b/doc/examples/blog.mdwn
@@ -1,10 +1,11 @@
This is an [[example_blog|index]]. Just copy the blog subdirectory into
-your wiki to quickly get started blogging with ikiwiki.
+your wiki to quickly get started blogging with ikiwiki.
-Some additional configuration you might want to do:
+Or, run this command to set up a blog with ikiwiki.
+
+ % ikiwiki -setup /etc/ikiwiki/auto-blog.setup
-* Change the name of the blog, by editing `index.mdwn` and changing
- the `title`.
+Some additional configuration you might want to do:
* Make sure to configure ikiwiki to generate RSS or Atom feeds.
@@ -12,7 +13,13 @@ Some additional configuration you might want to do:
example of how to tag a post is:
\[[!tag tags/life]]
-* Enable the sidebar plugin to get a sidebar listing all the categories
- you've tagged posts with.
+* Enable the [[sidebar|plugins/sidebar]] plugin to get a sidebar listing all
+ the categories you've tagged posts with.
+
+* Enable the [[pagestats|plugins/pagestats]] plugin to get a tag cloud
+ to display on the [[index]].
+
+* Enable the [[comments|plugins/comments]] plugin and configure it to
+ enable comments to posts to the blog:
-* Enable the pagestats plugin to get a tag cloud display on the [[index]].
+ comments_pagespec => 'blog/posts/* and !*/Discussion',
diff --git a/doc/examples/blog/index.mdwn b/doc/examples/blog/index.mdwn
index 6daf9db50..84c732dd1 100644
--- a/doc/examples/blog/index.mdwn
+++ b/doc/examples/blog/index.mdwn
@@ -1,14 +1,13 @@
-[[!meta title="example blog"]]
-
[[!pagestats pages="./tags/*"]]
-Welcome to my blog. Have a look at the most recent posts below, or
-browse the tag cloud on the right. An archive of all [[posts]] is also
-available.
+Welcome to my blog.
+
+Have a look at the most recent posts below, or browse the tag cloud on the
+right. An archive of all [[posts]] is also available.
[[!inline pages="./posts/* and !*/Discussion" show="10"
actions=yes rootpage="posts"]]
----
-This wiki is powered by [ikiwiki](http://ikiwiki.info).
+This blog is powered by [ikiwiki](http://ikiwiki.info).
diff --git a/doc/examples/blog/posts/first_post.mdwn b/doc/examples/blog/posts/first_post.mdwn
index 3d7174ae8..d49432341 100644
--- a/doc/examples/blog/posts/first_post.mdwn
+++ b/doc/examples/blog/posts/first_post.mdwn
@@ -1,4 +1,4 @@
This is the first post to this example blog. To add new posts, just add
-files to the blog/posts/ subdirectory, or use the web form.
+files to the posts/ subdirectory, or use the web form.
[[!tag tags/tech]]
diff --git a/doc/examples/softwaresite/index.mdwn b/doc/examples/softwaresite/index.mdwn
index e2d180d1f..e03a969a0 100644
--- a/doc/examples/softwaresite/index.mdwn
+++ b/doc/examples/softwaresite/index.mdwn
@@ -1,7 +1,7 @@
FooBar is an amazing example program that does not exist. Use it for all
your example program needs. This is its wiki.
-* [[download]]
+* **[[download]]**
* [[news]]
* [[documentation|doc]]
* [[bugs]]
diff --git a/doc/forum.mdwn b/doc/forum.mdwn
index bab65cac6..729540774 100644
--- a/doc/forum.mdwn
+++ b/doc/forum.mdwn
@@ -5,4 +5,4 @@ _This is a bold experiment by me, since I have exactly such a question. This ove
## Current topics ##
[[!inline pages="forum/* and !forum/discussion and !forum/*/*"
-actions=yes rootpage="forum" postformtext="Add a new thread titled:" show=0]]
+archive=yes rootpage="forum" postformtext="Add a new thread titled:" show=0]]
diff --git a/doc/forum/Adding_new_markup_to_markdown.mdwn b/doc/forum/Adding_new_markup_to_markdown.mdwn
new file mode 100644
index 000000000..39d233add
--- /dev/null
+++ b/doc/forum/Adding_new_markup_to_markdown.mdwn
@@ -0,0 +1,11 @@
+I'm using ikiwiki to manage my personal wiki. One of the things I'm toying with is storing my grocery list in a wiki. The way I typically grocery-shop is to make one huge master list containing all the items I typically buy in a single cycle. Then, on any given trip, I make a subset list containing only the items I need. I'd like to streamline this process by making the master list a series of checkboxes. Before each trip, I load the list page on my phone, check off all the items I already have, then check off individual items as I get them.
+
+I'm not sure if there's a convenient way of adding checkboxes to wiki pages, and after a bit of thought I decided that "( )" would be a good markup for this. Ideally I'd like to still have access to other markdown conventions so I could, say, organize the list with headings and such when it grows large, so I don't want to create an entirely separate format, or a separate copy of the markdown plugin.
+
+Is there an existing means of, say, adding supersets to wiki markup? I suppose I could use an inline directive that inserts a multisellect HTML element, but I really like ( ). :)
+
+Ideal would be some sort of filter infrastructure. Plugins could register with a larger filter plugin that adds an inline directive. I could then invoke the checkbox filter at the top of my grocery list, and all instances of ( ) would be replaced with HTML. Might also make sense for the individual filters to specify whether or not they're invoked before or after the page template, or perhaps just always invoke them after. *shrug*
+
+Does something like this exist? I'd really like to avoid messing around with raw HTML or an inline for each of 40-50 list items. :)
+
+-- [[Nolan]]
diff --git a/doc/forum/Darcs_as_the_RCS___63__.mdwn b/doc/forum/Darcs_as_the_RCS___63__.mdwn
new file mode 100644
index 000000000..2635690f7
--- /dev/null
+++ b/doc/forum/Darcs_as_the_RCS___63__.mdwn
@@ -0,0 +1,11 @@
+Hi,
+
+I have successfully installed and set up my first instance of [[ikiwiki]] on my dedicated server. Following [[joey]]'s screencasts made this easy (thank you).
+
+Currently, I have set up the RCS to be git but I do not like this very much. I'd rather want darcs but if I replace rcs settings, it fails.
+
+What should I put in the configuration file to use darcs ?
+
+> Darcs is not yet supported. It's being [[worked_on|todo/darcs]].
+
+> > That's good news for me then ! Thank you.
diff --git a/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn
new file mode 100644
index 000000000..5522cbf45
--- /dev/null
+++ b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn
@@ -0,0 +1,89 @@
+This is similar to the last post in this forum. I want to know exactly how ikiwiki remembers the times associated with pages, especially when using it for blogging, so I know whether I can trust it or not. From that last thread, I think what ikiwiki does is this:
+
+* The created time of a file is when that file was first committed into the versioning repository (in my case git)
+
+ > If `--getctime` it used, yes. In normal operation, when new files
+ > are added, ikiwiki sets the creation time to the ctime of the file
+ > on disk, rather than bothering to ask the VCS. --[[Joey]]
+
+* The modified time of a file is what that file was last updated in the repository
+
+ > Almost right, the modified time is actually taken from the
+ > modification time of the file in disk. --[[Joey]]
+
+And with a blog, by default, the posts are ordered by creation time, although an option can order them by modified time.
+
+Okay. So this should mean that the times are safe if, for example, I delete my working copy and then clone another one from the bare git repository, or otherwise mess up the creation times and mtimes stored as file metadata on the filesystem.
+
+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]]
+>
+> > 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.
+> >
+> > 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
+> > pages in ikiwiki are part of the user's content and are important to protect, because the user may be relying
+> > on them, especially if they use blogging or lists of recently modified pages, etc. Right now the modification
+> > times can be lost permanently.
+> >
+> > Is there a typo in the description of `--getctime` in the man page?
+> >
+> > > --getctime
+> > > Pull **last changed 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 build‐
+> > > ing a wiki from a new Subversion checkout. It is unoptimised and
+> > > quite slow. It is best used with --rebuild, to force ikiwiki to
+> > > get the ctime for all pages.
+> >
+> > Surely it is not the _last changed time_ but the _first seen time_ of each page that is pulled out of the VCS?
+> > If the aim is to get the real creation times of items in weblogs, then the last times that the items were
+> > changed in the VCS is not going to help. -- [[seanh]]
+>>> Typo, fixed. --[[Joey]]
+
+> > > If you want to preserve the date of a page, the best way to do it is to
+> > > use [[ikiwiki/directive/meta]] date="foo". This will survive checkouts,
+> > > VCS migrations, etc. -- [[Jon]]
+> > >
+> > > > That's a good tip Jon. That would also survive renaming a page by renaming its mdwn file, which would
+> > > > normally lose the times also. (And in that case I think both times are irretrievable, even by
+> > > > `--getctime`). I might start using a simple script to make blog posts that creates a file for
+> > > > me, puts today's date in the file as a meta, and opens the file in my editor. -- [[seanh]]
+
+>>>>> I use a script that does that and also sets up templates and tags
+>>>>> for a new item:
+
+ #!/bin/sh
+ set -u
+ set -e
+
+ if [ $# -ne 1 ]; then
+ echo usage: $0 pagename >&2
+ exit 1
+ fi
+
+ pagename="$1"
+
+ if [ -e "$pagename" ]; then
+ echo error: "$pagename" exists >&2
+ exit 1
+ fi
+
+ date=$(date)
+ echo '\[[!template id=draft]]' >> "$pagename"
+ echo "\[[!meta date=\"$date\"]]" >> "$pagename"
+ echo "\[[!tag draft]]" >> "$pagename"
+ git add "$pagename"
+ $EDITOR "$pagename"
+
+>>>>> -- [[Jon]]
diff --git a/doc/forum/How_to_fix___34__does_not_map_to_Unicode__34___errors__63__.mdwn b/doc/forum/How_to_fix___34__does_not_map_to_Unicode__34___errors__63__.mdwn
new file mode 100644
index 000000000..0b3895357
--- /dev/null
+++ b/doc/forum/How_to_fix___34__does_not_map_to_Unicode__34___errors__63__.mdwn
@@ -0,0 +1,20 @@
+I'm getting a number of errors like this when running ikiwiki:
+
+ utf8 "\xA2" does not map to Unicode at /usr/local/share/perl/5.10.0/IkiWiki.pm line 739, <$in> chunk 1.
+
+I think it's because some of my files contain non-utf8, non-unicode, or somehow bad characters in them, probably fancy quotes and the like that have been copy-and-pasted from my web browser. The problem is that I have hundreds of files, I transferred them all over from pyblosxom to ikiwiki at once, and the error message doesn't tell me which file the error comes from. How can I fix this?
+
+Thanks
+-- seanh
+
+> Unfortunatly, these messages are logged by perl so there's no way to add
+> a filename to them.
+>
+> If you run the build in --verbose mode, you should see which page ikiwiki
+> is working on, and unless it inlines some other page, you can be pretty
+> sure that page contains invalid utf-8 if the message is then printed.
+>
+> Another option is to use the `isutf8` program from
+> moreutils](http://kitenet.net/~joey/code/moreutils/),
+> and run it on each file, it will tell you the line number
+> and character position that is invalid. --[[Joey]]
diff --git a/doc/forum/Is_there_a_pagespec_for_creation_dates_relative_to_today__63__.mdwn b/doc/forum/Is_there_a_pagespec_for_creation_dates_relative_to_today__63__.mdwn
index e88400cd4..53c70e50a 100644
--- a/doc/forum/Is_there_a_pagespec_for_creation_dates_relative_to_today__63__.mdwn
+++ b/doc/forum/Is_there_a_pagespec_for_creation_dates_relative_to_today__63__.mdwn
@@ -17,6 +17,10 @@ Paul
> somehow figure out that pages matched by it yesterday no longer match,
> and that pages containing the pagespec need to be rebuilt. Which means
> you'd also need a cron job.
->
+
+>> Thank you for the explanation.
+
> I suspect what you're trying to accomplish is
> [[todo/tagging_with_a_publication_date]]? --[[Joey]]
+
+>> Yeah, something like that. Thanks! --[[PaulePanter]]
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
new file mode 100644
index 000000000..fe67e6aba
--- /dev/null
+++ b/doc/forum/Migrating_old_repository_to_new_ikiwiki_system__63__.mdwn
@@ -0,0 +1,58 @@
+How do I setup an old ikiwiki repository on a new system?
+
+I have a git repository from an old ikiwiki system.
+I reformatted that hard drive, but saved the repository.
+
+I copied it the repository to my new system, which is now the "master" host.
+I installed ikiwiki on the new system.
+
+How do I set up an ikiwiki system using a pre-existing repository (instead of creating a new one)? --[[JosephTurian]]
+
+> Well, if you have:
+> * A git repository of the wiki
+> * A setup file for the wiki
+>
+> Then you should:
+>
+> 1. Manually set up a bare git repository, and push
+> your backed up repository to it.
+> 2. `git clone` from the bare git repository to
+> 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
+> `ikiwiki -dumpsetup` and edit the setup file. --[[Joey]]
+
+> > I get the following errors after running ikiwiki setup:
+
+ shortcut plugin will not work without shortcuts.mdwn
+ shortcut plugin will not work without shortcuts.mdwn
+ successfully generated /home/turian/public_html/iki/ikiwiki.cgi
+ shortcut plugin will not work without shortcuts.mdwn
+ successfully generated /home/turian/repos/iki.git/hooks/post-update
+ Can't stat /usr/share/ikiwiki/basewiki/../javascript: No such file or directory
+ at /home/turian/utils//lib/perl5/site_perl/5.8.8//IkiWiki/Plugin/autoindex.pm line 60
+ Can't stat /usr/share/ikiwiki/basewiki/../smiley: No such file or directory
+ at /home/turian/utils//lib/perl5/site_perl/5.8.8//IkiWiki/Plugin/autoindex.pm line 60
+ Can't stat /usr/share/ikiwiki/basewiki: No such file or directory
+ at /home/turian/utils//lib/perl5/site_perl/5.8.8//IkiWiki/Plugin/autoindex.pm line 60
+ Can't stat /usr/share/ikiwiki/basewiki/../javascript: No such file or directory
+ at /home/turian/utils//lib/perl5/site_perl/5.8.8//IkiWiki/Render.pm line 320
+ Can't stat /usr/share/ikiwiki/basewiki/../smiley: No such file or directory
+ at /home/turian/utils//lib/perl5/site_perl/5.8.8//IkiWiki/Render.pm line 320
+ Can't stat /usr/share/ikiwiki/basewiki: No such file or directory
+ at /home/turian/utils//lib/perl5/site_perl/5.8.8//IkiWiki/Render.pm line 320
+ internal error: smileys.mdwn cannot be found in /home/turian/iki or underlay
+
+> > How do I resolve these errors? I have my PERL5LIB location set correctly.
+
+>>> Well, that's unrelated to the original question, but
+>>> I guess you should set `underlaydir` in your setup file to
+>>> point to whereever you have installed the basewiki directory.
+>>> --[[Joey]]
diff --git a/doc/forum/What_is_wrong_with_my_recentchange_page___63__.mdwn b/doc/forum/What_is_wrong_with_my_recentchange_page___63__.mdwn
new file mode 100644
index 000000000..4914cba59
--- /dev/null
+++ b/doc/forum/What_is_wrong_with_my_recentchange_page___63__.mdwn
@@ -0,0 +1,13 @@
+Hi again,
+
+I have finally finished my setup *but* I still have a problem with RecentChanges page.
+
+Can somebody check it for me at [http://maillard.mobi/~xma/wiki/recentchanges/] and tell what is wrong ?
+
+Thank you.
+
+--[[xma]]
+
+> Looks to me like you don't have the meta plugin enabled. --[[Joey]]
+
+> > You are right. Now all is ok. --[[xma]]
diff --git a/doc/forum/chinese_character_problem.mdwn b/doc/forum/chinese_character_problem.mdwn
new file mode 100644
index 000000000..aea55703f
--- /dev/null
+++ b/doc/forum/chinese_character_problem.mdwn
@@ -0,0 +1,21 @@
+just finished setting up ikiwiki..
+
+I can type chinese, save and display it correctly in ikiwiki for the first time. However, when i try to edit the page again, the chinese character in the form is unrecognizable. you can see it here <http://ikiwiki.perlchina.org/>
+
+I am using the latest ikiwiki(manually installed as non-root user) and CGI::FormBuilder(3.0501) on Debian 4.0
+
+这个没问题 it is not a problem on ikiwiki website though.
+
+Thanks.
+
+
+> Is your system perhaps not configured with a utf-8 default locale? Or ikiwiki not configured to use it?
+> Make sure that some utf-8 locale is enabled (in /etc/locale.gen on Debian for example) and try setting `locale` in your > ikiwiki setup file. --[[Joey]]
+
+I have installed locales-all and locale -a shows that zh_CN.UTF-8 is installed(there is no /etc/local.gen file though). then I enabled this line "locale => 'zh_CN.UTF-8'" in my wiki setup and -setup again. but that generated lots error messages "Missing constant domain at (eval 30) line 3"
+
+sorry being a n00b on this thing what else can I do?
+
+> See [[bugs/Missing_constant_domain_at_IkiWiki.pm_line_842]].
+> Looks like you need to upgrade to a newer version of
+> [[!cpan Locale::gettext]] --[[Joey]]
diff --git a/doc/forum/discussion.mdwn b/doc/forum/discussion.mdwn
new file mode 100644
index 000000000..93cf4656e
--- /dev/null
+++ b/doc/forum/discussion.mdwn
@@ -0,0 +1,7 @@
+I like the idea of this forum heirarchy -- but I think a map would be clearer than inlining the sub-pages. -- [[users/Jon]]
+
+> The easier way to accomplish this is to set archive=yes in the inline.
+> Switching to archive view can be useful when there are a lot of long
+> posts and people tend to want to scan by title to find interesting ones
+> and not necessarily read them all, which probably fits this forum pretty
+> well --[[Joey]]
diff --git a/doc/forum/ikiwiki__39__s_notion_of_time.mdwn b/doc/forum/ikiwiki__39__s_notion_of_time.mdwn
new file mode 100644
index 000000000..ee564fcc9
--- /dev/null
+++ b/doc/forum/ikiwiki__39__s_notion_of_time.mdwn
@@ -0,0 +1,35 @@
+I'm having some difficulties with ikiwiki's notion of time.
+
+For (regular) pages, the *last edited* date is the one where the file
+was indeed last modified according to the file system information.
+The *created* date (commented out in the HTML) is, at least for
+`--getctime` operation, the date, where the file was last registered
+as changed with the VCS.
+
+Now, at least with git, the thing is that when you're checking out files,
+they'll get the checkout-time's current time stamp.
+
+What I strive for is the following: *created* be the date when the file
+(under its current name) was *first* registered with the VCS (which is
+more logical in my opinion), and *last edited* be the date the file was
+last registered as changed with the VCS, which is the current
+`--getctime` *created* date.
+
+This means that I can build the HTML files from different checkouts of the
+VCS and they won't differ in the time stamps they contain in the HTML.
+
+What is the rationale for ikiwiki's current behavior with respect to these
+time stamps?
+
+--[[tschwinge]]
+
+> Presumably it's the authors of the git and mercurial backends
+> not understanding the documentation for `rcs_getctime`,
+> which states:
+>
+>>This is used to get the page creation time for a file from the RCS, by
+>>looking it up in the history.
+>
+> I've fixed both broken implementations to correctly look
+> up the first, not the last, commit. Other VCS do not seem
+> to have the problem. --[[Joey]]
diff --git a/doc/forum/managing_todo_lists.mdwn b/doc/forum/managing_todo_lists.mdwn
new file mode 100644
index 000000000..0a69af805
--- /dev/null
+++ b/doc/forum/managing_todo_lists.mdwn
@@ -0,0 +1,44 @@
+I keep some TODO lists on ikiwiki pages. I'm half-tempted to write a plugin
+to make ticking items off and adding items easier via the web interface. I'm
+aware though that this is not really what ikiwiki is designed for. Would
+anyone else find this useful? -- [[users/jon]]
+
+----
+
+My subsequent thoughts about how to approach this are two-fold.
+
+Firstly, a filetype for todo lists, probably OPML, but I haven't looked to see
+if there is something more suitable. A plugin that converts this source into a
+traditional page output, i.e. a DOM tree of ul or ol and li elements.
+
+Secondly, some magic javascript to make editing the list via the web page
+more interactive: add items, strike items out, reorder items etc., without
+round-tripping to the cgi for each operation.
+
+Finally, a mechanism whereby the changes made to the page live can be
+committed back to the repository:
+
+ * ...perhaps the input → output conversion is reversible, and the HTML DOM
+ representing the list can be transformed back into the source and submitted
+ to the cgi like a regular edit: issues include the result of other
+ postprocessing: templates, wikilinks, etc.
+ * perhaps an embedded copy of the source is included in the output and the
+ javascript operates on that in tandem with the static copy
+ * perhaps the "output" is generated live by the JS at view time (with maybe
+ a plugin-generated rendered output for non JS environments)
+
+I envisage a button called "commit changes" appearing once some changes are
+made that submits the changes to the CGI, perhaps via a back channel. I'm not
+sure how to handle embeds or challenges from the CGI such as a login challenge
+(maybe the back channel would not be necessary in the first cut).
+
+> You might look at the [[plugins/hnb]] plugin. HNB supports checklists.
+> There's not a fancy web interface, but the hnb command-line program can
+> be used to edit them. --[[Joey]]
+
+>> thanks - I'll give it a look. I spent a few hours writing some javascript to manipulate a ul/li DOM tree in an outliner-fashion the other day. I might be able to join the puzzle pieces together sometime. [[Jon]]
+
+a solution for this could be similar to a solution for [[todo/structured page data]], as todo lists are definitely a form of structured data. (in both cases, the page's current content is rendered into a html form, whose result is then saved as the page's new contents) --[[chrysn]]
+
+> Thanks for the link: yup, there's definitely some common ground there.
+> -- [[Jon]]
diff --git a/doc/forum/multi-user_setup_of_ikiwiki__44___gitosis_and_apache2_in_Debian_Sid.mdwn b/doc/forum/multi-user_setup_of_ikiwiki__44___gitosis_and_apache2_in_Debian_Sid.mdwn
index d42a5c704..fa8b5010e 100644
--- a/doc/forum/multi-user_setup_of_ikiwiki__44___gitosis_and_apache2_in_Debian_Sid.mdwn
+++ b/doc/forum/multi-user_setup_of_ikiwiki__44___gitosis_and_apache2_in_Debian_Sid.mdwn
@@ -43,7 +43,7 @@ In the end, I did the following. I created a directory /srv/ikiwiki/ which is ow
## cgi_wrapper
-I do not understand those wrappers completely. The cgi is a script, which can be called by a webserver, e. g. [[Apache_2|/tips/apache_cgi]]. But www-data is normally not allowed to write to the source directory (which is owned by gitosis or push to the repository). Therefore it should be run as the user gitosis. And because cgi scripts can not be made suid, I wrapper (in this case a C program) is created (cgi\_wrapper) which can be made suid and therefore be run as the user gitosis. Is this correct?
+I do not understand those wrappers completely. The cgi is a script, which can be called by a webserver, e. g. [[Apache_2|/tips/dot_cgi]]. But www-data is normally not allowed to write to the source directory (which is owned by gitosis or push to the repository). Therefore it should be run as the user gitosis. And because cgi scripts can not be made suid, I wrapper (in this case a C program) is created (cgi\_wrapper) which can be made suid and therefore be run as the user gitosis. Is this correct?
> It seems to me like you understand the wrapper pretty well. It's main reson to exist is to safely be suid, yes.
diff --git a/doc/forum/usedirs___38___indexpages_using_problem.mdwn b/doc/forum/usedirs___38___indexpages_using_problem.mdwn
new file mode 100644
index 000000000..05c85e281
--- /dev/null
+++ b/doc/forum/usedirs___38___indexpages_using_problem.mdwn
@@ -0,0 +1,17 @@
+My ikiwiki setup file configed like:
+
+ usedirs => 0,
+ indexpages => 1,
+
+I create a directory and some .mdwn source file /Whatis/index.mdwn and /Whatis/OSS.mdwn . The html file ikiwiki generated is
+/Whatis/index.html and /Whatis/OSS.html .
+
+But in the page [OSS.html](http://atoz.org.cn/Whatis/OSS.html) , the auto generated link (on the page top)
+to “Whatis” is /Whatis.html file , not to /Whatis/index.html. So the link to “Whatis” is fail .
+
+Is it a bug , and how can I do for that ?
+
+> I suggest that you name your page `Whatis.mdwn`, and not
+> `Whatis/index.mdwn`. That will make ikiwiki's links work,
+> and allows you to link to the `Whatis` page by that name.
+> --[[Joey]]
diff --git a/doc/forum/wiki_name_in_page_titles.mdwn b/doc/forum/wiki_name_in_page_titles.mdwn
new file mode 100644
index 000000000..01ff8d817
--- /dev/null
+++ b/doc/forum/wiki_name_in_page_titles.mdwn
@@ -0,0 +1,26 @@
+I'd like to have the wiki name appear in page titles as in "WikiName:
+Page Title." If I use `<TMPL_VAR WIKINAME>: <TMPL_VAR TITLE>` in the
+template this works for all pages except the index page itself which
+will have title "WikiName: WikiName" as its title. Does anyone know
+of a template-based solution to this or do I need to write a plugin
+that provides a `IS_HOMEPAGE` template variable? --[[JasonBlevins]]
+
+> Hmm, one way to work around this is to put a meta title directive on the
+> index page. Then TITLE will be that, rather than WIKINAME, and your
+> template should work. --[[Joey]]
+
+>> I ended up writing a [path][] plugin since I had some other
+>> path-specific conditional things to include in my templates.
+>>
+>> So now I can do things like this:
+>>
+>> <title>
+>> <TMPL_VAR WIKINAME><TMPL_UNLESS IS_HOMEPAGE>: <TMPL_VAR TITLE></TMPL_UNLESS>
+>> </title>
+>>
+>> But also more complicated path-specific conditionals like
+>> `IN_DIR_SUBDIR` to indicate subpages of `/dir/subdir/`. I've got a
+>> few other small plugins brewing so I'll try to put up some contrib
+>> pages for them soon. --[[JasonBlevins]]
+
+[path]: http://code.jblevins.org/ikiwiki/plugins.git/plain/path.pm
diff --git a/doc/freesoftware/discussion.mdwn b/doc/freesoftware/discussion.mdwn
new file mode 100644
index 000000000..e71fd295d
--- /dev/null
+++ b/doc/freesoftware/discussion.mdwn
@@ -0,0 +1,3 @@
+And where is the code, please ?
+
+> [[download]] --[[Joey]]
diff --git a/doc/git.mdwn b/doc/git.mdwn
index e5fef6a5a..8a89546cf 100644
--- a/doc/git.mdwn
+++ b/doc/git.mdwn
@@ -1,5 +1,12 @@
-Ikiwiki is developed in a git repository and can be checked out
-like this:
+Ikiwiki, and this documentation wiki, are developed in a git repository and
+can be checked out like this:
+
+[[!template id=note text="""
+You can push changes back to ikiwiki's git repository over the `git://`
+transport, to update this wiki, if you'd like, instead of editing it on the
+web. Changes that could not be made via the web will be automatically
+rejected.
+"""]]
git clone git://git.ikiwiki.info/
@@ -9,16 +16,30 @@ Or like this if your firewall only passes http traffic (slow):
The gitweb is [here](http://git.ikiwiki.info/?p=ikiwiki).
-There is also a mirror [on github](http://github.com/joeyh/ikiwiki/tree/master).
-
Commits to this git repository are fed into [CIA](http://cia.vc), and can
be browsed, subscribed to etc on its
-[project page](http://cia.vc/stats/project/ikiwiki).
+[project page](http://cia.vc/stats/project/ikiwiki). They're also fed into
+[twitter](http://twitter.com/ikiwiki).
-## branches
+## personal git repositories
You are of course free to set up your own ikiwiki git repository with your
-own [[patches|patch]].
+own [[patches|patch]]. If you list it here, the `gitremotes` script will
+automatically add it to git remotes. Your repo will automatically be pulled
+into [[Joey]]'s working tree. This is recommended. :-)
+
+<!-- Machine-parsed format: * wikilink <git:url> -->
+
+* github `git://github.com/joeyh/ikiwiki.git`
+ ([browse](http://github.com/joeyh/ikiwiki/tree/master))
+ A mirror of the main repo, automatically updated.
+* [[smcv]] `git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git`
+* [[intrigeri]] `git://gaffer.ptitcanardnoir.org/ikiwiki.git`
+* [[gmcmanus]] `git://github.com/gmcmanus/ikiwiki.git`
+* [[jelmer]] `git://git.samba.org/jelmer/ikiwiki.git`
+* [[hendry]] `git://webconverger.org/git/ikiwiki`
+
+## branches
Some of the branches included in the main repository include:
@@ -30,9 +51,9 @@ Some of the branches included in the main repository include:
* `wikiwyg` adds [[todo/wikiwyg]] support. It is unmerged pending some
changes.
* `darcs` is being used to add darcs support.
-* `pristine-tar` contains deltas that
- [pristine-tar](http://kitenet.net/~joey/code/pristine-tar)
- can use to recreate released tarballs of ikiwiki
* `debian-stable` is used for updates to the old version included in
Debian's stable release, and `debian-testing` is used for updates to
Debian's testing release.
+* `pristine-tar` contains deltas that
+ [pristine-tar](http://kitenet.net/~joey/code/pristine-tar)
+ can use to recreate released tarballs of ikiwiki
diff --git a/doc/ikiwiki-makerepo.mdwn b/doc/ikiwiki-makerepo.mdwn
index d5034b2c7..3fbfbdc82 100644
--- a/doc/ikiwiki-makerepo.mdwn
+++ b/doc/ikiwiki-makerepo.mdwn
@@ -6,16 +6,17 @@ ikiwiki-makerepo - check an ikiwiki srcdir into revision control
ikiwiki-makerepo svn|git|monotone|darcs srcdir repository
-ikiwiki-makerepo mercurial|darcs srcdir
+ikiwiki-makerepo bzr|mercurial|darcs srcdir
# DESCRIPTION
`ikiwiki-makerepo` injects a `srcdir` directory, containing an ikiwiki wiki,
-into a `repository` that it creates. The repository can be a svn, git, or
-mercurial repository.
+into a `repository` that it creates. The repository can be created using
+any of a variety of revision control systems.
-Note that for mercurial, the srcdir is converted into a mercurial
-repository. There is no need to have a separate repository with mercurial.
+Note that for mercurial and bzr, the srcdir is converted into a
+repository. There is no need to have a separate repository with mercurial
+or bzr.
For darcs, the second (one-argument) form turns the given srcdir into a
darcs master repository with the (new) srcdir inside. Adjust your ikiwiki.setup
@@ -24,8 +25,8 @@ preconfigured to call a (hypothetical) ikiwiki wrapper. The command
reports the relevant file. Adjust it as needed or remove it if you don't use
the cgi script.
-Note that for monotone, you are assumed to already have run "mtn genkey" to generate
-key.
+Note that for monotone, you are assumed to already have run "mtn genkey"
+to generate key.
# AUTHOR
diff --git a/doc/ikiwiki-transition.mdwn b/doc/ikiwiki-transition.mdwn
index 8b7c3579f..18836d5f5 100644
--- a/doc/ikiwiki-transition.mdwn
+++ b/doc/ikiwiki-transition.mdwn
@@ -8,24 +8,23 @@ ikiwiki-transition type ...
# DESCRIPTION
-`ikiwiki-transition` aids in converting wiki pages when
-there's a major change in ikiwiki syntax. It also handles other transitions
-not involving wiki pages.
+`ikiwiki-transition` aids in converting wiki pages when there's a major
+change in ikiwiki syntax. It also handles other transitions not involving
+wiki pages.
-# prefix_directives
+# prefix_directives your.setup
-The `prefix_directives` mode converts the specified ikiwiki page from
-the old preprocessor directive syntax, requiring a space, to the new
-syntax, prefixed by '!'.
+The `prefix_directives` mode converts all pages from the old preprocessor
+directive syntax, requiring a space, to the new syntax, prefixed by '!'.
Preprocessor directives which already use the new syntax will remain
unchanged.
-Note that if the page contains wiki links with spaces, which some
+Note that if a page contains wiki links with spaces, which some
older versions of ikiwiki accepted, the prefix_directives transition will
treat these as preprocessor directives and convert them.
-# setupformat
+# setupformat your.setup
The `setupformat` mode converts a setup file from using a single `wrappers` block
to using `cgi_wrapper`, `git_wrapper`, etc.
@@ -33,25 +32,30 @@ to using `cgi_wrapper`, `git_wrapper`, etc.
Note that all comments and any unusual stuff like perl code in the setup
file will be lost, as it is entirely rewritten by the transition.
-# aggregateinternal
+# aggregateinternal your.setup
The `aggregateinternal` mode moves pages aggregated by the aggregate plugin
so that the `aggregateinternal` option can be enabled.
-# indexdb
+# moveprefs your.setup
+
+Moves values that used to be admin preferences into the setup file.
+
+Note that all comments and any unusual stuff like perl code in the setup
+file will be lost, as it is entirely rewritten by the move.
+
+# indexdb srcdir
The `indexdb` mode handles converting a plain text `.ikiwiki/index` file to
-a binary `.ikiwiki/indexdb`. In this mode, you should specify the srcdir of
-the wiki as the second parameter. You do not normally need to run
+a binary `.ikiwiki/indexdb`. You do not normally need to run
`ikiwiki-transition indexdb`; ikiwiki will automatically run it as
necessary.
-# hashpassword
+# hashpassword srcdir
The `hashpassword` mode forces any plaintext passwords stored in the
`.ikiwiki/userdb` file to be replaced with password hashes. (The
-Authen::Passphrase perl module is needed to do this.) In this mode, you
-should specify the srcdir of the wiki as the second parameter.
+Authen::Passphrase perl module is needed to do this.)
If this is not done explicitly, a user's plaintext password will be
automatically converted to a hash when a user logs in for the first time
diff --git a/doc/ikiwiki/directive.mdwn b/doc/ikiwiki/directive.mdwn
index c4342dee8..fb88aa72d 100644
--- a/doc/ikiwiki/directive.mdwn
+++ b/doc/ikiwiki/directive.mdwn
@@ -28,15 +28,13 @@ of text with triple-quotes:
3. "baz"
"""]]
-ikiwiki also has an older syntax for directives, which requires a
-space in directives to distinguish them from [[wikilinks|ikiwiki/wikilink]].
-This syntax has several disadvantages: it requires a space after directives
-with no parameters (such as `\[[pagecount ]]`), and it prohibits spaces in
-[[wikilinks|ikiwiki/wikilink]]. ikiwiki now provides the `!`-prefixed syntax
-shown above as the preferred alternative. However, ikiwiki still supports
-wikis using the older syntax, if the `prefix_directives` option is not enabled.
-For backward compatibility with existing wikis, this option currently
-defaults to off, so ikiwiki supports the old syntax.
+ikiwiki also has an older syntax for directives, which requires a space in
+directives to distinguish them from [[wikilinks|ikiwiki/wikilink]]. This
+syntax has several disadvantages: it requires a space after directives with
+no parameters (such as `\[[pagecount ]]`), and it prohibits spaces in
+[[wikilinks|ikiwiki/wikilink]]. ikiwiki now provides the `!`-prefixed
+syntax shown above as default. However, ikiwiki still supports wikis using
+the older syntax, if the `prefix_directives` option is disabled.
[[!if test="enabled(listdirectives)" then="""
Here is a list of currently available directives in this wiki:
diff --git a/doc/ikiwiki/directive/cutpaste.mdwn b/doc/ikiwiki/directive/cutpaste.mdwn
index 012367bdf..ca580e54f 100644
--- a/doc/ikiwiki/directive/cutpaste.mdwn
+++ b/doc/ikiwiki/directive/cutpaste.mdwn
@@ -17,11 +17,11 @@ follow the paste directive that uses its text. In fact, this is quite useful
to postpone big blocks of text like long annotations and have a more natural
flow. For example:
- \[[!toggleable id="cut" text="\[[!paste id=cutlongdesc]]"]]
- \[[!toggleable id="copy" text="\[[!paste id=copylongdesc]]"]]
- \[[!toggleable id="paste" text="\[[!paste id=pastelongdesc]]"]]
+ \[[!toggleable id="cut" text="[[!paste id=cutlongdesc]]"]]
+ \[[!toggleable id="copy" text="[[!paste id=copylongdesc]]"]]
+ \[[!toggleable id="paste" text="[[!paste id=pastelongdesc]]"]]
- \[...some time later...]
+ [...some time later...]
\[[!cut id=cutlongdesc text="""
blah blah blah
@@ -40,7 +40,7 @@ Since you can paste without using double quotes, copy and paste can be used to
nest directives that require multiline parameters inside each other:
\[[!toggleable id=foo text="""
- \[[!toggleable id=bar text="\[[!paste id=baz]]"]]
+ [[!toggleable id=bar text="[[!paste id=baz]]"]]
"""]]
\[[!cut id=baz text="""
diff --git a/doc/ikiwiki/directive/format.mdwn b/doc/ikiwiki/directive/format.mdwn
new file mode 100644
index 000000000..94cf1b04f
--- /dev/null
+++ b/doc/ikiwiki/directive/format.mdwn
@@ -0,0 +1,21 @@
+The `format` directive is supplied by the [[!iki plugins/format desc=format]]
+plugin.
+
+The directive allows formatting a chunk of text using any available page
+format. It takes two parameters. First is the type of format to use,
+ie the extension that would be used for a standalone file of this type.
+Second is the text to format.
+
+For example, this will embed an otl outline inside a page using mdwn or
+some other format:
+
+ \[[!format otl """
+ foo
+ 1
+ 2
+ bar
+ 3
+ 4
+ """]]
+
+[[!meta robots="noindex, follow"]]
diff --git a/doc/ikiwiki/directive/inline.mdwn b/doc/ikiwiki/directive/inline.mdwn
index 9889cda11..f69d55de3 100644
--- a/doc/ikiwiki/directive/inline.mdwn
+++ b/doc/ikiwiki/directive/inline.mdwn
@@ -73,6 +73,8 @@ Here are some less often needed parameters:
configured to `allowatom`, set to "yes" to enable.
* `feeds` - controls generation of all types of feeds. Set to "no" to
disable generating any feeds.
+* `emptyfeeds` - Set to "no" to disable generation of empty feeds.
+ Has no effect if `rootpage` or `postform` is set.
* `template` - Specifies the template to fill out to display each inlined
page. By default the `inlinepage` template is used, while
the `archivepage` template is used for archives. Set this parameter to
@@ -85,7 +87,10 @@ Here are some less often needed parameters:
inlining page.
* `sort` - Controls how inlined pages are sorted. The default, "age" is to
sort newest created pages first. Setting it to "title" will sort pages by
- title, and "mtime" sorts most recently modified pages first.
+ title, and "mtime" sorts most recently modified pages first. If
+ [[!cpan Sort::Naturally]] is installed, `sort` can be set to "title_natural"
+ to sort by title with numbers treated as such ("1 2 9 10 20" instead of
+ "1 10 2 20 9").
* `reverse` - If set to "yes", causes the sort order to be reversed.
* `feedshow` - Specify the maximum number of matching pages to include in
the rss/atom feeds. The default is the same as the `show` value above.
@@ -97,11 +102,16 @@ Here are some less often needed parameters:
in the blog. The format string is passed to the strftime(3) function.
* `feedpages` - A [[PageSpec]] of inlined pages to include in the rss/atom
feeds. The default is the same as the `pages` value above, and only pages
- matches by that value are included, but some of those can be excluded by
+ matched by that value are included, but some of those can be excluded by
specifying a tighter [[PageSpec]] here.
* `guid` - If a URI is given here (perhaps a UUID prefixed with `urn:uuid:`),
the Atom feed will have this as its `<id>`. The default is to use the URL
of the page containing the `inline` directive.
+* `feedfile` - Can be used to change the name of the file generated for the
+ feed. This is particularly useful if a page contains multiple feeds.
+ For example, set "feedfile=feed" to cause it to generate `page/feed.atom`
+ and/or `page/feed.rss`. This option is not supported if the wiki is
+ configured not to use `usedirs`.
[[!meta robots="noindex, follow"]]
diff --git a/doc/ikiwiki/directive/inline/discussion.mdwn b/doc/ikiwiki/directive/inline/discussion.mdwn
index 91b2ff462..e301190bf 100644
--- a/doc/ikiwiki/directive/inline/discussion.mdwn
+++ b/doc/ikiwiki/directive/inline/discussion.mdwn
@@ -19,3 +19,14 @@ take it as far as implementing "replies" to other comments.
## More dynamic `rootpage` parameter of inline plugin?
(Moved to [[todo/dynamic_rootpage]])
+
+---
+
+## Excluding Images
+
+Is there a simple way to exclude images, stylesheets, and other
+"non-page" files other than a blacklist approach like
+`pages="* and !*.png and !*.css"`? --[[JasonBlevins]]
+
+> The [[plugins/filecheck]] plugin adds a 'ispage()' pagespec test that can do that.
+> --[[Joey]]
diff --git a/doc/ikiwiki/directive/linkmap.mdwn b/doc/ikiwiki/directive/linkmap.mdwn
index 8fdf40c9f..db79a1491 100644
--- a/doc/ikiwiki/directive/linkmap.mdwn
+++ b/doc/ikiwiki/directive/linkmap.mdwn
@@ -9,7 +9,7 @@ Only links between mapped pages will be shown; links pointing to or from
unmapped pages will be omitted. If the pages to include are not specified,
the links between all pages (and other files) in the wiki are mapped. For
best results, only a small set of pages should be mapped, since otherwise
-the map can become very large, unweildy, and complicated. Also, the map is
+the map can become very large, unwieldy, and complicated. Also, the map is
rebuilt whenever one of the mapped pages is changed, which can make the
wiki a bit slow.
diff --git a/doc/ikiwiki/directive/meta.mdwn b/doc/ikiwiki/directive/meta.mdwn
index 74db31943..f29a118bf 100644
--- a/doc/ikiwiki/directive/meta.mdwn
+++ b/doc/ikiwiki/directive/meta.mdwn
@@ -139,6 +139,15 @@ Supported fields:
pages unchanged and avoid_flooding_aggregators
(see [[!iki tips/howto_avoid_flooding_aggregators]]).
+* updated
+
+ Specifies a fake modification time for a page, to be output into RSS and
+ Atom feeds. This is useful to avoid flooding aggregators that sort by
+ modification time, like Planet: for instance, when editing an old blog post
+ to add tags, you could set `updated` to be one second later than the original
+ value. The date/time can be given in any format that
+ [[!cpan TimeDate]] can understand, just like the `date` field.
+
If the field is not one of the above predefined fields, the metadata will be
written to the generated html page as a &lt;meta&gt; header. However, this
won't be allowed if the [[!iki plugins/htmlscrubber desc=htmlscrubber]] plugin is enabled,
diff --git a/doc/ikiwiki/directive/pagestats/discussion.mdwn b/doc/ikiwiki/directive/pagestats/discussion.mdwn
new file mode 100644
index 000000000..3c9dc7104
--- /dev/null
+++ b/doc/ikiwiki/directive/pagestats/discussion.mdwn
@@ -0,0 +1,10 @@
+I am trying to create a tag cloud using:
+
+ \[[!pagestats pages="tags/*"]]
+
+Nothing shows up when I first used this directive. I found that I had to create a page for the tag for it to show up in pagestats.
+I would rather not find and create a page for every tag I have created or will create. Is there an easier way to create a list of tags?
+
+Thanks
+
+----
diff --git a/doc/ikiwiki/directive/tag.mdwn b/doc/ikiwiki/directive/tag.mdwn
index 267aee660..64736f8cd 100644
--- a/doc/ikiwiki/directive/tag.mdwn
+++ b/doc/ikiwiki/directive/tag.mdwn
@@ -21,6 +21,10 @@ located under a base directory, such as "tags/". This is a useful way to
avoid having to write the full path to tags, if you want to keep them
grouped together out of the way.
+Bear in mind that specifying a tagbase means you will need to incorporate it
+into the `link()` [[ikiwiki/PageSpec]] you use: e.g., if your tagbase is
+`tag`, you would match pages tagged "foo" with `link(tag/foo)`.
+
If you want to override the tagbase for a particular tag, you can use
something like this:
diff --git a/doc/ikiwiki/directive/testpagespec/discussion.mdwn b/doc/ikiwiki/directive/testpagespec/discussion.mdwn
new file mode 100644
index 000000000..66c9a9ca9
--- /dev/null
+++ b/doc/ikiwiki/directive/testpagespec/discussion.mdwn
@@ -0,0 +1,6 @@
+How does one test a user identity? I tried "pagename and user(username) for the match, and had a "no user specified" error.
+
+> You can't test them with this directive, because such pagespecs test to
+> see if logged in user, who is performing some action, matches. When the
+> page with the directive is built, the concept of a user being logged in
+> doesn't really apply. --[[Joey]]
diff --git a/doc/ikiwiki/markdown.mdwn b/doc/ikiwiki/markdown.mdwn
index a4190945f..684191929 100644
--- a/doc/ikiwiki/markdown.mdwn
+++ b/doc/ikiwiki/markdown.mdwn
@@ -4,9 +4,7 @@ is a minimal markup language that resembles plain text as used in
email messages. It is the markup language used by this wiki by default.
For documentation about the markdown syntax, see [[formatting]] and
-[Markdown: syntax](http://daringfireball.net/projects/markdown/syntax). A
-[markdown mode](http://jblevins.org/projects/markdown-mode/) for
-emacs can help in editing.
+[Markdown: syntax](http://daringfireball.net/projects/markdown/syntax).
Note that [[WikiLinks|WikiLink]] and [[directives|directive]] are not part
of the markdown syntax, and are the only bit of markup that this wiki
diff --git a/doc/ikiwiki/pagespec.mdwn b/doc/ikiwiki/pagespec.mdwn
index c78666c40..b476bde1f 100644
--- a/doc/ikiwiki/pagespec.mdwn
+++ b/doc/ikiwiki/pagespec.mdwn
@@ -25,6 +25,7 @@ match all pages except for Discussion pages and the SandBox:
Some more elaborate limits can be added to what matches using these functions:
* "`link(page)`" - match only pages that link to a given page (or glob)
+* "`tagged(tag)`" - match pages that are tagged or link to the given tag (or glob)
* "`backlink(page)`" - match only pages that a given page links to
* "`creation_month(month)`" - match only pages created on the given month
* "`creation_day(mday)`" - or day of the month
@@ -47,6 +48,8 @@ Some more elaborate limits can be added to what matches using these functions:
wiki admins.
* "`ip(address)`" - tests whether a modification is being made from the
specified IP address.
+* "`postcomment(glob)`" - matches only when comments are being
+ posted to a page matching the specified glob
For example, to match all pages in a blog that link to the page about music
and were written in 2005:
@@ -63,29 +66,10 @@ More complex expressions can also be created, by using parentheses for
grouping. For example, to match pages in a blog that are tagged with either
of two tags, use:
- blog/* and (link(tag/foo) or link(tag/bar))
+ blog/* and (tagged(foo) or tagged(bar))
Note that page names in PageSpecs are matched against the absolute
filenames of the pages in the wiki, so a pagespec "foo" used on page
"a/b" will not match a page named "a/foo" or "a/b/foo". To match
relative to the directory of the page containing the pagespec, you can
use "./". For example, "./foo" on page "a/b" matches page "a/foo".
-
-## Old syntax
-
-The old PageSpec syntax was called a "GlobList", and worked differently in
-two ways:
-
-1. "and" and "or" were not used; any page matching any item from the list
- matched.
-2. If an item was prefixed with "`!`", then no page matching that item
- matched, even if it matched an earlier list item.
-
-For example, here is the old way to match all pages except for the SandBox
-and Discussion pages:
-
- * !SandBox !*/Discussion
-
-Using this old syntax is still supported. However, the old syntax is
-deprecated and will be removed at some point, and using the new syntax is
-recommended.
diff --git a/doc/ikiwiki/pagespec/attachment.mdwn b/doc/ikiwiki/pagespec/attachment.mdwn
index 2d33db748..344a4a734 100644
--- a/doc/ikiwiki/pagespec/attachment.mdwn
+++ b/doc/ikiwiki/pagespec/attachment.mdwn
@@ -9,7 +9,7 @@ configuration setting.
For example, to limit arbitrary files to 50 kilobytes, but allow
larger mp3 files to be uploaded by joey into a specific directory, and
-check all attachments for virii, something like this could be used:
+check all attachments for viruses, something like this could be used:
virusfree() and ((user(joey) and podcast/*.mp3 and mimetype(audio/mpeg) and maxsize(15mb)) or (!ispage() and maxsize(50kb)))
diff --git a/doc/ikiwiki/pagespec/discussion.mdwn b/doc/ikiwiki/pagespec/discussion.mdwn
index 0733c90c8..4eed3722c 100644
--- a/doc/ikiwiki/pagespec/discussion.mdwn
+++ b/doc/ikiwiki/pagespec/discussion.mdwn
@@ -65,3 +65,30 @@ How can I fix this? --[[sabr]]
> I don't see why that wouldn't work. Can I download the source to your
> wiki from somewhere to investigate? --[[Joey]]
+
+----
+
+Should negation work with user(), with locked_pages in setup? I
+experimented with setting locked_pages => 'user(someuser)' and was able to
+edit as a different user. However, setting locked_pages =>
+'!user(someuser)' doesn't seem to allow edits for only 'someuser' - it
+locks out all users.
+
+> Negation works with anything in any PageSpec. I tested the case you
+> describe, and a negated pagespec worked for me; all users except the
+> listed user (and except wiki admins of course) were locked out.
+> --[[Joey]]
+
+>> It must be a local problem, then, cause I've tried it with two separate
+>> machines. Both are running the most recent release of ikiwiki in
+>> pkgsrc - 2.66. Perhaps an update to a newer version would solve the issue.
+
+----
+
+Is there a way to refer to all subpages of the current page, if the name of the
+current page is not known (i.e. the pagespec is used in a template)? The ./ syntax
+does not seem suitable for this, as
+
+> \[[!map pages="./*"]]
+
+also lists the current page and all its siblings.
diff --git a/doc/ikiwiki/wikilink/discussion.mdwn b/doc/ikiwiki/wikilink/discussion.mdwn
index b5cb848ed..0677ff7de 100644
--- a/doc/ikiwiki/wikilink/discussion.mdwn
+++ b/doc/ikiwiki/wikilink/discussion.mdwn
@@ -51,6 +51,19 @@ simply write [[wikilink]]s like `\[[../bar]]` (or even just `\[[..]]`?), but
this doesn't work, so I had to resort to using `\[[foo/bar]]` instead.
--[[tschwinge]]
+> I believe, that doesn't entirely solve the problem. Just assume, your hierarchy is `/foo/bar/foo/bar`.
+
+> How do you access from the page `/foo/bar/foo/bar` the `/foo/bar` and not `/foo/bar/foo/bar`?
+
+> Do we have a way to implement `\[[../..]]` or `\[[/foo/bar]]`?
+
+> Even worse, trying to link from `/foo/bar` to `/foo/bar/foo/bar` ... this will probably need `\[[./foo/bar]]` --[[Jan|jwalzer]]
+
+>> There is no ".." syntax in wikilinks, but if the link begins with "/" it
+>> is rooted at the top of the wiki, as documented in
+>> [[subpage/linkingrules]]. Therefore, every example page name you listed
+>> above will work unchanged as a wikilink to that page! --[[Joey]]
+
----
How do I make images clickable? The obvious guess, \[[foo.png|/index]], doesn't work. --[[sabr]]
@@ -64,3 +77,5 @@ How do I make images clickable? The obvious guess, \[[foo.png|/index]], doesn't
Is it possible to refer to a page, say \[[foobar]], such that the link text is taken from foobar's title [[directive/meta]] tag? --Peter
> Not yet. :-) Any suggestion for a syntax for it? Maybe something like \[[|foobar]] ? --[[Joey]]
+
+I like your suggestion because it's short and conscise. However, it would be nice to be able to refer to more or less arbitrary meta tags in links, not just "title". To do that, the link needs two parameters: the page name and the tag name, i.e. \[[pagename!metatag]]. Any sufficiently weird separater can be used instead of '!', of course. I like \[[pagename->metatag]], too, because it reminds me of accessing a data member of a structure (which is what referencing a meta tag is, really). --Peter
diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn
index e5f978e12..94ae75046 100644
--- a/doc/ikiwikiusers.mdwn
+++ b/doc/ikiwikiusers.mdwn
@@ -1,8 +1,7 @@
-Projects
-========
+Projects & Organizations
+========================
* [This wiki](http://ikiwiki.info) (of course!)
-* [UK Software Patents info page](http://www.softwarepatents.co.uk/)
* [Planet Debian upstream](http://updo.debian.net/)
* The [ion window manager homepage](http://modeemi.fi/~tuomov/ion/)
* [Debian Mentors wiki](http://jameswestby.net/mentors/)
@@ -22,7 +21,7 @@ Projects
* The [Debian Packaging Handbook project](http://packaging-handbook.alioth.debian.org/wiki/)
* The [libkdtree project](http://libkdtree.alioth.debian.org)
* The [pcc](http://pcc.ludd.ltu.se/) (Portable C Compiler) project. (Simple rcs backend)
-* [The TOVA Company](http://www.tovatest.com) public site. We also use it for internal documentation and issue tracking, all with a [[rcs/Git]] backend.
+* [The TOVA Company](http://www.tovatest.com) public site. We also use it for internal documentation and issue tracking, all with a [[rcs/Git]] backend.
* Technical support websites for [Homebase](http://support.homebase.dk) and [Kaospilotene](http://support.kaospilot.no) (each with [source](http://source.homebase.dk/) [provided](http://source.kaospilot.no/))
* [CampusGrün Hamburg](http://www.campusgruen.org/)
* The [awesome window manager homepage](http://awesome.naquadah.org/)
@@ -39,10 +38,18 @@ Projects
* [Chaos Computer Club Düsseldorf](https://www.chaosdorf.de)
* [monkeysphere](http://web.monkeysphere.info/)
* [The Walden Effect](http://www.waldeneffect.org/)
+* The [Fortran Wiki](http://fortranwiki.org/)
+* [Monotone](http://monotone.ca/wiki/FrontPage/)
+* The support pages for [Trinity Centre for High Performance Computing](http://www.tchpc.tcd.ie/support/)
+* [St Hugh of Lincoln Catholic Primary School in Surrey](http://www.sthugh-of-lincoln.surrey.sch.uk/)
+* [Pigro Network](http://www.pigro.net) is running a hg based ikiwiki. (And provides ikiwiki hosting for $10/m.)
+* [Cosin Homepage](http://cosin.ch) uses an Ikiwiki with a subversion repository.
+* [Bosco Free Orienteering Software](http://bosco.durcheinandertal.ch)
Personal sites and blogs
========================
+* [Skirv's Wiki](http://wiki.killfile.org) - formerly Skirv's Homepage
* [[Joey]]'s [homepage](http://kitenet.net/~joey/), including his weblog
* [Kyle's MacLea Genealogy wiki](http://kitenet.net/~kyle/family/wiki) and [Livingstone and MacLea Emigration Registry](http://kitenet.net/~kyle/family/registry)
* [Ulrik's personal web page](http://kaizer.se/wiki/)
@@ -100,11 +107,23 @@ Personal sites and blogs
* [Olivier Berger's professional homepage](http://www-public.it-sudparis.eu/~berger_o/)
* [Andrey Tarantsov's homepage](http://www.tarantsov.com/)
* [Don Marti's blog](http://zgp.org/~dmarti/)
-* [[JonDowland]]'s [homepage](http://jmtd.net/)
-
+* [[users/Jon]]'s [homepage](http://jmtd.net/)
+* [[xma]] is using ikiwiki (<http://maillard.mobi/~xma/>)
+* [[JanWalzer|jwalzer]]'s [homepage](http://wa.lzer.net/) -- Work in Progress
+* [[Adam_Trickett|ajt]]'s home intranet/sanbox system ([Internet site & blog](http://www.iredale.net/) -- not ikiwiki yet)
+* [[Simon_McVittie|smcv]]'s [website](http://www.pseudorandom.co.uk/) and
+ [blog](http://smcv.pseudorandom.co.uk/)
+* Svend's [website](http://www.ciffer.net/~svend/) and [blog](http://www.ciffer.net/~svend/blog/)
+* [muammar's site](http://muammar.me)
+* [Per Bothner's blog](http://per.bothner.com/blog/)
+* [Bernd Zeimetz (bzed)](http://bzed.de/)
+* [Gaudenz Steinlin](http://gaudenz.durcheinandertal.ch)
+* [Simon Kjika'qawej C.](http://simonraven.kisikew.org/ikiwiki/) Please note it might change location at any time (likely wiki.k.o or under /wiki/ at simonraven.k.o).
+
+
Please feel free to add your own ikiwiki site!
-See also: [Debian ikiwiki popcon graph](http://people.debian.org/~igloo/popcon-graphs/index.php?packages=ikiwiki)
+See also: [Debian ikiwiki popcon graph](http://popcon.debian.org/~igloo/popcon-graphs/index.php?packages=ikiwiki)
and [google search for ikiwiki powered sites](http://www.google.com/search?q=%22powered%20by%20ikiwiki%22).
While nothing makes me happier than knowing that ikiwiki has happy users, dropping some change in the [[TipJar]] is a nice way to show extra appreciation.
diff --git a/doc/ikiwikiusers/discussion.mdwn b/doc/ikiwikiusers/discussion.mdwn
index 2da3668d4..39a9bb921 100644
--- a/doc/ikiwikiusers/discussion.mdwn
+++ b/doc/ikiwikiusers/discussion.mdwn
@@ -29,3 +29,7 @@ Thanks, --[[Chao]]
Thanks for the reply Joey! ikiwiki is a fantastic wiki complier, though I do
not have my own machine momentarily, i will pay close attention to its development.
Hopefully I will be one of the ikiwiki users one day :) cheers --[[Chao]]
+
+----
+
+Are there automated hosting sites for ikiwiki yet? If you know one, can you add one in a new section on [[ikiwikiusers]] please? If you don't know any and you're willing to pay to set one up (shouldn't be much more expensive than a single ikiwiki IMO), [contact me](http://www.ttllp.co.uk/contact.html) and let's talk. -- MJR
diff --git a/doc/index/discussion.mdwn b/doc/index/discussion.mdwn
index 89e12e6c2..d52cb0a2d 100644
--- a/doc/index/discussion.mdwn
+++ b/doc/index/discussion.mdwn
@@ -288,6 +288,10 @@ easily, perl is possible (but I'm not strong in perl).
>>> It appears the scripts were never posted? I recently imported my Mediawiki site into Iki. If it helps, my notes are here: <http://iki.u32.net/Mediawiki_Conversion> --[[sabr]]
+>>>>> The scripts have been posted now, see [[joshtriplett]]'s user page,
+>>>>> and I've pulled together all ways I can find to [[convert]] other
+>>>>> systems into ikiwiki. --[[Joey]]
+
----
# LaTeX support?
diff --git a/doc/index/openid/discussion.mdwn b/doc/index/openid/discussion.mdwn
new file mode 100644
index 000000000..ae614e5ac
--- /dev/null
+++ b/doc/index/openid/discussion.mdwn
@@ -0,0 +1,29 @@
+# OpenID discussion
+
+## No return_to in OpenID server
+
+Hi, there's no return_to from a designated OpenID server page, specs requires (I think a "should" or "must", can't recall exact wording) that it redirects back to the RP, in order to complete the registration and authentication. Unless I'm missing something, and the doc is incomplete, I'd consider this a bug. I don't expect to be of much use WRT coming up with a patch, but I'm willing to test ;-) .
+
+> If this is a bug, could you please explain:
+>
+> * What happens when the bug occurs?
+> * How can one reproduce the bug?
+>
+> PS, please file bugs under [[bugs]] in future. --[[Joey]]
+
+>> Oops, my bad, didn't know that existed at the time I wrote this.
+>>
+>> What happened is that the process wouldn't complete, therefore I couldn't login with my OpenID.
+>>
+>> reproducibility: every time
+>>
+>> Should probably move this page, eh? ;)
+>> I'd do that, but I dunno know other than using the SCM backend in question....
+
+Here's some actual output (with my OpenID URL stripped out):
+
+do=postsignin&oic.time=1238224497-1450566d93097caa707f&openid.assoc_handle=%7BHMAC-SHA1%7D%7B49cdce76%7D%7BBhuXXw%3D%3D%7D&openid.identity=|<==== MY OPENID URL GOES HERE ====>|&openid.mode=id_res&openid.op_endpoint=http%3A%2F%2Fwww.myopenid.com%2Fserver&openid.response_nonce=2009-03-28T07%3A15%3A02ZDUFmG3&openid.return_to=http%3A%2F%2Fsimonraven.kisikew.org%2Fbin%2Fikiwiki.cgi%3Fdo%3Dpostsignin%26oic.time%3D1238224497-1450566d93097caa707f&openid.sig=E51Xh6Gnjku%2B0se57qCyhHbT5QY%3D&openid.signed=assoc_handle%2Cidentity%2Cmode%2Cop_endpoint%2Cresponse_nonce%2Creturn_to%2Csigned
+
+The `return_to` arg should NOT be `signed`, it should be the originating URL where you initially logged in.
+
+Also, I dunno what the assoc_handle is doing spitting out an arg like `{HMAC-SHA1}{49cdce76}{BhuXXw%3D%3D}` it should be processed further. I have the needed perl packages installed (latest for Lenny). Hrm, would endianness matter?
diff --git a/doc/install.mdwn b/doc/install.mdwn
index d745737aa..cc3a4c29f 100644
--- a/doc/install.mdwn
+++ b/doc/install.mdwn
@@ -19,15 +19,6 @@ they are available.
Various [[plugins]] use other perl modules and utilities; see their individual
documentation for details.
-### Installing dependencies with yum
-
-Here's an example of how to install ikiwiki's dependencies using yum
-on Fedora 7:
-
- yum install perl-Text-Markdown perl-Mail-Sendmail perl-HTML-Scrubber \
- perl-XML-Simple perl-TimeDate perl-HTML-Template perl-CGI-FormBuilder \
- perl-CGI-Session perl-File-MimeInfo perl-gettext perl-Authen-Passphrase
-
### Installing dependencies by hand
If you want to install by hand from the tarball, you should make sure that
diff --git a/doc/install/discussion.mdwn b/doc/install/discussion.mdwn
index abe909a94..c1129a435 100644
--- a/doc/install/discussion.mdwn
+++ b/doc/install/discussion.mdwn
@@ -169,3 +169,62 @@ good. Date::Parse was already installed. --[[vibrog]]
usemymalloc=n, bincompat5005=undef
Not sure how to provide proper version information for you.--[[vibrog]]
+
+---
+
+I've tried a couple of times and my cpan has never recognised Bundle::IkiWiki. Is that section of the page still accurate? -- [[users/Jon]]
+
+> Are you running perl with the environemnt settings specified on the page?
+> Can you show how it fails to find the bundle? --[[Joey]]
+
+>> I was not. Next time I build I will have to try that (I'll need to tweak it as I already override PERL5LIB; also I need to specify http proxies). Thanks for your help! -- [[users/Jon]]
+
+---
+
+##Further problems with Bundle::IkiWiki
+I'm also having trouble with finding Bundle::IkiWiki. I've tried it with the environment settings and without them, and also using the interactive
+form of the cpan command. I've also gone to cpan.org and searched -- eg
+
+ http://search.cpan.org/search?query=ikiwiki&mode=all
+
+and no Bundle for IkiWiki comes up at all.
+
+The error I get from the various cpan attempts is basically always the same:
+
+ Warning: Cannot install Bundle::IkiWiki, don't know what it is.
+ Try the command
+
+ i /Bundle::IkiWiki/
+
+ to find objects with matching identifiers.
+
+When I try that command, BTW, it basically seems to find the same stuff I get when searching on the cpan web site.
+
+This happens both on Ubuntu 8.04 and CentOS 5.1
+
+Any help would be greatly appreciated... --kent
+
+> Bundle::IkiWiki is included in ikiwiki itself, so of course cpan.org
+> does not know about it.
+>
+> If you can show me exactly what command you ran (the tested, working
+> commands on the parent page?) and how it failed, I can try to debug
+> your problem.
+
+Just today I noticed the "Bundle" subdirectory. What a moron I am! :-) Also, I misunderstood the PERL5LIB=`pwd` part --
+I glibly thought it indicated the sink for the installation of the modules, rather than the source, and I was running
+the cpan command from another window in a different directory, and just spiraled down into error...
+
+> The real question in my mind is why you'd want to do this at all when
+> using Ubuntu, which incldues packages of ikiwiki and all its
+> dependencies. --[[Joey]]
+
+For ubuntu 8.04:
+
+ $ ikiwiki --version
+ ikiwiki version 2.32.3ubuntu2.1
+ $
+
+I was just trying to get the latest version.
+
+In any case, thanks for the help, and thanks for the superb software. I really like it a lot.
diff --git a/doc/news/code_swarm.mdwn b/doc/news/code_swarm.mdwn
index bdc373432..09b68523e 100644
--- a/doc/news/code_swarm.mdwn
+++ b/doc/news/code_swarm.mdwn
@@ -1,7 +1,7 @@
I've produced a [code_swarm](http://vis.cs.ucdavis.edu/~ogawa/codeswarm/)
visualization of the first 2+ years of ikiwiki's commit history.
-[[!img screenshot.png size="480x360"]]
+[[!img screenshot.png size="480x360" alt="screenshot"]]
* [15 mb avi](http://kitenet.net/~joey/screencasts/ikiwiki_swarm.avi)
* [stream on vimeo](http://vimeo.com/1324348)
diff --git a/doc/news/git_push_to_this_wiki.mdwn b/doc/news/git_push_to_this_wiki.mdwn
new file mode 100644
index 000000000..4b3fcbe69
--- /dev/null
+++ b/doc/news/git_push_to_this_wiki.mdwn
@@ -0,0 +1,3 @@
+Now you can use [[git]] to clone this wiki, and push your changes back,
+thanks to ikiwiki's new support for [[tips/untrusted_git_push]]. Enjoy
+working on the wiki while offline! --[[Joey]]
diff --git a/doc/news/git_push_to_this_wiki/discussion.mdwn b/doc/news/git_push_to_this_wiki/discussion.mdwn
new file mode 100644
index 000000000..33230c7ef
--- /dev/null
+++ b/doc/news/git_push_to_this_wiki/discussion.mdwn
@@ -0,0 +1,37 @@
+Thanks, Joey! This is awesome...I had to try it out :)
+--[[JasonBlevins]]
+
+I am really happy to hear of this new feature, that I was (more or less)
+secretly dreaming of. But - and that's why I'm still insanely editing
+this wiki inside a web browser - I wonder how I'll use it for real: my
+own master branch contains a few dozens merge commits, and one is created
+every time I `git pull` ikiwiki repository (or another clone of it, living
+on one of my other boxes that by chance had Internet access more recently).
+I do not want to clutter Joey's repository with these commits, so I guess
+I have to learn some more of Git everything-is-possible world (a nice thing
+is: I am not limited anymore to "Emacs can do it", and I'm now in a position
+to say "Git can do it" or "ikiwiki already does it", depending on the
+situation). Well, let's focus. Git wizards amongst us (let's use this wiki
+as if it were users@ikiwiki.info, ok?), what would you suggest? I was thinking
+of having a new branch in my cloned repository, dedicated to editing this wiki;
+I could use `rebase` instead of `fetch+merge` to get the new upstream commits
+into this special-purpose branch. I guess it would work nicely if I had only
+one offline box with not-yet-pushed changes at the same time, but would break
+in awful and various ways when it is not the case. Any alternative idea?
+--[[intrigeri]]
+
+> Not that I'm very careful to avoid pushing merge commits (see git log ;-),
+> but I sometimes use `git pull --rebase` to pull changes from a repo. That
+> will rebase your local changes on top of the changes pulled, avoiding the
+> merge commits. I'm sure more involved solutions are possible. --[[Joey]]
+
+> I decided to use my local `master` branch as a copy of `origin/master`
+> (kitenet) and move my local modifications to a separate branch. I'm using
+> `master` to edit the wiki but there is still the problem of new upstream
+> commits since the last pull. I already had this problem as Joey had pushed
+> some changes while I was editing locally. Not knowing about
+> `pull --rebase`, I took the long way out: branch, roll back HEAD, rebase,
+> and merge. That was too much work...It looks like `pull --rebase` is the
+> way to go. --[[JasonBlevins]]
+
+Awesome ! --[[xma]]
diff --git a/doc/news/ikiwiki_version_3.0.mdwn b/doc/news/ikiwiki_version_3.0.mdwn
new file mode 100644
index 000000000..7ca636cf2
--- /dev/null
+++ b/doc/news/ikiwiki_version_3.0.mdwn
@@ -0,0 +1,42 @@
+Ikiwiki has reached version 3.0 and entered a new phase in its
+[[development_cycle|roadmap]].
+
+The 3.0 release of ikiwiki changes several defaults and finishes
+some transitions. You will need to modify your wikis to work with
+ikiwiki 3.0. A document explaining the process is available
+in [[tips/upgrade_to_3.0]].
+
+The highlights of the changes in version 3.0 include:
+
+* Support for uploading [[attachments|plugins/attachment]].
+* Can [[plugins/rename]] and [[plugins/remove]] pages and files via the web.
+* [[Web_based_setup|plugins/websetup]].
+* Blog-style [[plugins/comments]] as an alternative to Discussion pages.
+* Many other new plugins including [[plugins/htmlbalance]], [[plugins/format]],
+ [[plugins/progress]], [[plugins/color]], [[plugins/autoindex]],
+ [[plugins/cutpaste]], [[plugins/hnb]], [[plugins/creole]], [[plugins/txt]],
+ [[plugins/amazon_s3]], [[plugins/pinger]], [[plugins/pingee]],
+ [[plugins/edittemplate]]
+* The RecentChanges page is compiled statically, not generated from the CGI.
+* Support for additional revision control systems: [[rcs/bzr]],
+ [[rcs/monotone]]
+* Support for [[tips/untrusted_git_push]].
+* A new version (3.00) of the plugin API, exporting additional
+ commonly used functions from `IkiWiki.pm`.
+* Nearly everything in ikiwiki is now a plugin, from WikiLinks to
+ page editing, to RecentChanges.
+* Far too many bug fixes, features, and enhancements to list here.
+
+Thanks to the many contributors to ikiwiki 3.0, including:
+
+ Jelmer Vernooij, Recai Oktaş, William Uther, Simon McVittie, Axel Beckert,
+ Bernd Zeimetz, Gabriel McManus, Paweł Tęcza, Peter Simons, Manoj
+ Srivastava, Patrick Winnertz, Jeremie Koenig, Josh Triplett, thm, Michael
+ Gold, Jason Blevins, Alexandre Dupas, Henrik Brix Andersen, Thomas Keller,
+ Enrico Zini, intrigeri, Scott Bronson, Brian May, Adeodato Simó, Brian
+ Downing, Nis Martensen. (And anyone I missed.)
+
+Also, thanks to the users, bug submitters, and documentation wiki editors.
+Without you, ikiwiki would just be a little thing I use for my home page.
+
+--[[Joey]]
diff --git a/doc/news/openid.mdwn b/doc/news/openid.mdwn
index ad76606aa..c2a871f0a 100644
--- a/doc/news/openid.mdwn
+++ b/doc/news/openid.mdwn
@@ -10,4 +10,4 @@ log back in, try out the OpenID signup process if you don't already have an
OpenID, and see how OpenID works for you. And let me know your feelings about
making such a switch. --[[Joey]]
-[[!poll 59 "Accept only OpenID for logins" 18 "Accept only password logins" 35 "Accept both"]]
+[[!poll 61 "Accept only OpenID for logins" 18 "Accept only password logins" 36 "Accept both"]]
diff --git a/doc/news/openid/discussion.mdwn b/doc/news/openid/discussion.mdwn
index 3d5e9dc22..aa9f3f0be 100644
--- a/doc/news/openid/discussion.mdwn
+++ b/doc/news/openid/discussion.mdwn
@@ -42,7 +42,7 @@ only Apache/iptables rules for this? Maybe it's related to
> Error: /srv/web/ikiwiki.info/todo/Configurable_minimum_length_of_log_message_for_web_edits/index.html independently created, not overwriting with version from todo/Configurable_minimum_length_of_log_message_for_web_edits
-[[jondowland]]
+[[users/jon]]
----
diff --git a/doc/news/version_2.62.1.mdwn b/doc/news/version_2.62.1.mdwn
deleted file mode 100644
index e82ccfa21..000000000
--- a/doc/news/version_2.62.1.mdwn
+++ /dev/null
@@ -1,3 +0,0 @@
-ikiwiki 2.62.1 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
- * filecheck: Fixed two bits broken in move from attachment."""]] \ No newline at end of file
diff --git a/doc/news/version_2.63.mdwn b/doc/news/version_2.63.mdwn
deleted file mode 100644
index 165f60ceb..000000000
--- a/doc/news/version_2.63.mdwn
+++ /dev/null
@@ -1,21 +0,0 @@
-ikiwiki 2.63 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
- * Set cookies HttpOnly.
- * Typo. Closes: #[497003](http://bugs.debian.org/497003)
- * Ignore failure to install files into /etc, in case install is running as
- non-root.
- * Work around perl $\_ scoping nonsense that caused breakage when loading
- external plugins.
- * style.css: Add missing semicolon. Closes: #[497176](http://bugs.debian.org/497176)
- * filecheck: Fall back to testing for binary or plain text files
- if no mime type is detected.
- * table: Support header=column to make the table header be the first
- column of the data. (AlexandreDupas)
- * For fine control over what characters are allowed, unescaped in
- source filenames, the wiki\_file\_chars setting is added. For example,
- set to "-[:alnum:]+/.\_" to disable colons from being used in source files
- (which can cause troubl om Windows).
- * po/Makefile: update po files when the pot file has changed.
- Closes: #[497951](http://bugs.debian.org/497951)
- * editpage: New core plugin factoring out page editing to allow disabling it
- if desired."""]] \ No newline at end of file
diff --git a/doc/news/version_2.64.mdwn b/doc/news/version_2.64.mdwn
deleted file mode 100644
index 137ca1a5c..000000000
--- a/doc/news/version_2.64.mdwn
+++ /dev/null
@@ -1,25 +0,0 @@
-ikiwiki 2.64 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
- * Avoid uninitialised value when --dumpsetup is used and no srcdir/destdir
- specified.
- * ddate: Stop clobbering timeformat when not enabled.
- * progress: New plugin to generate progress bars (willu)
- * Add allow\_symlinks\_before\_srcdir to config so websetup doesn't eat it.
- * img: Support sizes like 200x. Closes: #[475149](http://bugs.debian.org/475149)
- * goodstuff: Remove otl plugin from the bundle since it needs a significant
- external dependency and is not commonly used. If you use otl, make sure
- you explicitly enable it now.
- * goodstuff: Add more, progress, and table plugins to the bundle.
- * Improve error message if external plugin fails to load. Closes: #[498458](http://bugs.debian.org/498458)
- * Directive documentation broken out of the plugin documentation and into
- pages suitable to be used as an underlay. Thanks to Willu for doing most
- of the tedious work.
- * Move the directive documentation into its own underlay, separate from
- basewiki, since it's sorta large compared to the rest of basewiki.
- * listdirectives: Enable use of the directives underlay.
- * Removed the obsolete blog page from the basewiki. ikiwiki/blog still
- remains, but is now deprecated too.
- * Removed old redirecton pages from basewiki (helponformatting,
- markdown, openid, pagespec, preprocessordirective, subpage, wikilink).
- * inline: Treat rootpage as a link, so that it can refer to a subpage
- without hardcoding the path."""]] \ No newline at end of file
diff --git a/doc/news/version_2.65.mdwn b/doc/news/version_2.65.mdwn
deleted file mode 100644
index db6afd988..000000000
--- a/doc/news/version_2.65.mdwn
+++ /dev/null
@@ -1,25 +0,0 @@
-ikiwiki 2.65 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
- * aggregate: Expire excess or old items on the same pass that adds them,
- not only on subsequent passes.
- * editdiff: Broken since 2.62 due to wrong syntax, now fixed.
- * aggregate: Support atom feeds with only a summary element, and no content
- elements.
- * progress: Display an error if the progress cannot be parsed, and allow
- the percent parameter to only optionally end with "%".
- * Fix reversion in use of ikiwiki -verbose -setup with a setup file that
- enables syslog. Setup output is once again output to stdout in this
- case.
- * edittemplate: Default new page file type to the same type as the template.
- (willu)
- * edittemplate: Add "silent" parameter. (Willu)
- * edittemplate: Link to template, to allow creating it. (Willu)
- * editpage: Add a missing check that the page name contains only legal
- characters, in addition to the existing check for pruned filenames.
- * Print a debug message if a page has multiple source files.
- * Add keepextension parameter to htmlize hook. (Willu)
- * rename, remove: Don't rely on a form parameter to tell whether the page
- should be treated as an attachment.
- * rename: Add support for moving SubPages of a page when renaming it.
- (Sponsored by The TOVA Company.)
- * rename: Hide type field from rename form when renaming attachments."""]] \ No newline at end of file
diff --git a/doc/news/version_2.66.mdwn b/doc/news/version_2.66.mdwn
deleted file mode 100644
index 029c7a1b9..000000000
--- a/doc/news/version_2.66.mdwn
+++ /dev/null
@@ -1,39 +0,0 @@
-ikiwiki 2.66 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
- * recentchanges: Fix redirects to non-page files.
- * aggregate: Avoid uninitialized value warnings for pages with no recorded
- ctime.
- * attachment: Add admin() pagespec to test if the uploading user is a wiki
- admin.
- * git: Fix handling of utf-8 filenames in recentchanges.
- * tag: Make edit link for new tags ensure that the tags are created
- inside tagbase, when it's set.
- * template: Make edit link for new templates ensure the page is located
- under toplevel templates directory.
- * htmlscrubber: Add a config setting that can be used to disable the
- scrubber acting on a set of pages.
- * Expand usage message and add --help. Closes: #[500344](http://bugs.debian.org/500344)
- * Beautify urls used in various places. (smcv)
- * Export pagetitle, titlepage, linkpage.
- * htmltidy: Avoid returning undef if tidy fails. Also avoid returning the
- untidied content if tidy crashes. In either case, it seems best to tidy
- the content to nothing.
- * htmltidy: Avoid spewing tidy errors to stderr.
- * Reorganize index file, add a format version field. Upgrades to the new
- index format should be transparent.
- * Add %wikistate, which is like %pagestate except not specific to a given
- page, and is preserved across rebuilds.
- * editpage: Be more aggressive (and less buggy) about cleaning up
- temporary files rendered during page preview.
- * Add an indexpages option, which causes foo/index.mdwn to be the source
- for page foo when foo.mdwn doesn't exist. Also, when it's enabled,
- creating a new page will save it to foo/index.mdwn by default.
- Closes: #[474611](http://bugs.debian.org/474611)
- (Sponsored by The TOVA Company.)
- * httpauth: Document that ikiwiki.cgi has to be in a directory subject to
- authentication. Closes: #[500524](http://bugs.debian.org/500524)
- * inline: Fix handling of rootpage that doesn't exist.
- * attachment: Support adding attachments to pages even as they are being
- created.
- * remove, rename: Allow acting on attachments as a page is being created.
- * Updated French translation. Closes: #[500929](http://bugs.debian.org/500929)"""]] \ No newline at end of file
diff --git a/doc/news/version_2.68.mdwn b/doc/news/version_2.68.mdwn
new file mode 100644
index 000000000..b7e625026
--- /dev/null
+++ b/doc/news/version_2.68.mdwn
@@ -0,0 +1,44 @@
+ikiwiki 2.68 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+ * Add support for checking pushes from untrusted git committers. This can be
+ used to set up anonymous git pushes, and other similar things.
+ * format: New plugin, allows embedding differently formatted text inside a
+ page (ie, otl inside a mdwn page, or syntax highlighted code inside a
+ page).
+ * relativedate: New javascript-alicious plugin that makes all dates display
+ relative, in a very nice way, if I say so myself.
+ * Optimise the no-op post-commit hook, to speed up web edits by a fraction
+ of a second.
+ * git: Allow [[sha1\_commit]] to be used in the diffurl, to support cgit.
+ * shortcut: Fix display of shortcuts while previewing.
+ * Plugins that used to override displaytime should instead override
+ formattime. displaytime will call that, and may wrap markup around the
+ formatted time.
+ * Add an underlay for javascript, and add ikiwiki.js containing some utility
+ code.
+ * toggle: Stop embedding the full toggle code on each page using it, and
+ move it to toggle.js in the javascript underlay.
+ * recentchanges: Make feed links point back to anchors on the recentchanges
+ page. (JasonBlevins)
+ * Fix issue with utf-8 in wikiname breaking session cookies, by
+ entity-encoding the wikiname in the session cookie.
+ * Use the pure perl Data::Dumper when generating setup files to ensure that
+ utf-8 characters are written out as such, and not as the encoded perl
+ strings the C Data::Dumper produces.
+ * inline: Only the last feed link was put on the page, fix this to include
+ all feed links. So rss will be included along with atom, and pages with
+ multiple feeds will get links added for all feeds.
+ * tag: When tagpage is set, force the links created by tagging to point at
+ the toplevel tagpage, and not closer subpages. The html links already went
+ there, but internally the links were not recorded as absolute, which could
+ cause confusing backlinks etc.
+ * Add an inject function, that can be used by plugins that want to
+ replace one of ikiwiki's functions with their own version.
+ (This is a scary thing that grubs through the symbol table, and replaces
+ all exported occurances of a function with the injected version.)
+ * external: RPC functions can be injected to replace exported functions.
+ * Updated French translation. Closes: #[502694](http://bugs.debian.org/502694)
+ * Updated Spanish translation from the ever vigilant Victor Moral.
+ * Updated Danish translation from Jonas Smedegaard. Closes: #[503117](http://bugs.debian.org/503117)
+ * Preserve syslog setting when doing `ikiwiki -setup foo -dumpsetup bar`
+ * Several fixes to --render mode."""]] \ No newline at end of file
diff --git a/doc/news/version_2.69.mdwn b/doc/news/version_2.69.mdwn
new file mode 100644
index 000000000..a277541fe
--- /dev/null
+++ b/doc/news/version_2.69.mdwn
@@ -0,0 +1,24 @@
+ikiwiki 2.69 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+ * Avoid multiple ikiwiki cgi processes piling up, eating all memory,
+ and thrashing, by making the cgi wrapper wait on a cgilock.
+ If you had to set apache's MaxClients low to avoid ikiwiki thrashing your
+ server, you can now turn it up to a high value.
+ * Stop busy-waiting in lockwiki, as this could delay ikiwiki from waking up
+ for up to one second. The bailout code is no longer needed after above
+ change.
+ * Remove support for unused optional wait parameter from lockwiki.
+ * aggregate: Try to query XML::Feed for the base url when derelevatising
+ links. Since this needs the just released XML::Feed 0.3, as well
+ as a not yet released XML::RSS, it will fall back to the old method
+ if no xml:base info is available.
+ * meta: Plugin is now enabled by default since the basewiki uses it.
+ * txt: Do not encode quotes when filtering the txt, as that broke
+ later parsing of any directives on the page.
+ * Fix the link() pagespec to match links that are internally recorded as
+ absolute.
+ * Add rel=nofollow to recentchanges\_links for the same (weak) reasons it
+ was earlier added to edit links.
+ * tag: Normalize tagbase so leading/trailing slashes in it don't break
+ things.
+ * bzr: Fix dates for recentchanges."""]] \ No newline at end of file
diff --git a/doc/news/version_2.70.mdwn b/doc/news/version_2.70.mdwn
new file mode 100644
index 000000000..f0830efa1
--- /dev/null
+++ b/doc/news/version_2.70.mdwn
@@ -0,0 +1,3 @@
+ikiwiki 2.70 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+ * Avoid crash on malformed utf-8 discovered by intrigeri."""]] \ No newline at end of file
diff --git a/doc/news/version_2.71.mdwn b/doc/news/version_2.71.mdwn
new file mode 100644
index 000000000..2c8609988
--- /dev/null
+++ b/doc/news/version_2.71.mdwn
@@ -0,0 +1,28 @@
+ikiwiki 2.71 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+ * comments: Blog-style comment support, contributed by Simon McVittie.
+ * htmlbalance: New plugin contributed by Simon McVittie.
+ * Change deb dependencies to list Text::Markdown before markdown (really
+ this time).
+ * Improve escaping of wikilinks and preprocessor directives in content
+ produced by aggregate and recentchanges.
+ * French translation update from Philippe Batailler. Closes: #[506250](http://bugs.debian.org/506250)
+ * Spanish translation update from Victor Moral.
+ * Fix handling of wrappergroup option.
+ * Correct --dumpsetup to include the srcdir in the setup file.
+ * German translation update from Kai Wasserbäch. Closes: #[507056](http://bugs.debian.org/507056)
+ * inline: Support emptyfeeds=no option to skip generating empty feeds.
+ * inline: Support feedfile option to change the filename of the feed
+ generated.
+ * meta: Pass info to htmlscrubber so htmlscrubber\_skip can take effect.
+ * htmlbalance: don't compact whitespace, and set misc other options (smcv)
+ * rename: Fix double-escaping of page name in edit box.
+ * monotone: When getting the log, tell monotone how many entries
+ we want, rather than closing the pipe, which it dislikes. (thm)
+ * Coding style change: Remove explcit vim folding markers.
+ * aggregate: If a feed fails to be downloaded, try again immediatly
+ next time aggregation is run, even if the usual time has not passed.
+ Closes: #[508622](http://bugs.debian.org/508622) (Michael Gold)
+ * meta: Process meta date during scan pass so that the date will always
+ affect sorting in inlines.
+ * Improve display of some openids (smcv)"""]] \ No newline at end of file
diff --git a/doc/news/version_2.72.mdwn b/doc/news/version_2.72.mdwn
new file mode 100644
index 000000000..26274a3c8
--- /dev/null
+++ b/doc/news/version_2.72.mdwn
@@ -0,0 +1,9 @@
+ikiwiki 2.72 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+ * Avoid comments in recentchanges being broken links (smcv)
+ * Add deprecation warning for GlobLists, which will stop working in 3.0.
+ * camelcase: Add camelcase\_ignore setting.
+ * googlecalendar: Add runtime deprecation warning.
+ * comments: Deal with users entering unqualified or partial urls.
+ * inline: Run format hook first, to ensure other format hooks can affect
+ inlined content. Closes: #[509710](http://bugs.debian.org/509710)"""]] \ No newline at end of file
diff --git a/doc/news/version_3.09.mdwn b/doc/news/version_3.09.mdwn
new file mode 100644
index 000000000..d5e1a6545
--- /dev/null
+++ b/doc/news/version_3.09.mdwn
@@ -0,0 +1,16 @@
+ikiwiki 3.09 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+ * inline: Add title\_natural sort order, using Sort::Naturally
+ (chrysn)
+ * inline: Fix urls to feed when feedfile is used on an index page.
+ * git, mercurial: Fix --getctime to return file creation time,
+ not last commit time.
+ * Updated French translation (Jean-Luc Coulon). Closes: #[521072](http://bugs.debian.org/521072)
+ * css: Add clear: both to inlinefooter.
+ * comments: Fix too loose test for comments pages that matched
+ normal pages with "comment\_" in their name. Closes: #[521322](http://bugs.debian.org/521322)
+ * comments: Fix anchor ids to be legal xhtml. Closes: #[521339](http://bugs.debian.org/521339)
+ * Fix documentation of anonok\_pagespec. Closes: #[521793](http://bugs.debian.org/521793)
+ * Add missing suggests on libtext-textile-perl. Closes: #[522039](http://bugs.debian.org/522039)
+ * recentchanges: change to using do=goto links for user links.
+ * Fix git test suite to use a bare repo."""]] \ No newline at end of file
diff --git a/doc/pagehistory.mdwn b/doc/pagehistory.mdwn
index fc2a3f543..465062736 100644
--- a/doc/pagehistory.mdwn
+++ b/doc/pagehistory.mdwn
@@ -3,3 +3,6 @@ revison history of a page. This is enabled by the `historyurl` setting,
which is used to specify the URL to a web interface such as [[ViewVC]]
(for Subversion) or [[Gitweb]]. In that url, "\[[file]]" is replaced with
the name of the file to view.
+
+The [[plugins/repolist]] plugin can suppliment this information with
+urls to the underlying repository of the wiki.
diff --git a/doc/plugins/404.mdwn b/doc/plugins/404.mdwn
new file mode 100644
index 000000000..ad332ee04
--- /dev/null
+++ b/doc/plugins/404.mdwn
@@ -0,0 +1,20 @@
+[[!template id=plugin name=404 author="[[Simon_McVittie|smcv]]"]]
+[[!tag type/useful]]
+
+This plugin lets you use the IkiWiki CGI script as an Apache 404 handler,
+to give the behaviour of various other wiki engines where visiting a
+nonexistent page provides you with a link to create it.
+
+To achieve this, put something like this in the wiki's Apache configuration
+file:
+
+ ErrorDocument 404 /ikiwiki.cgi
+
+(The path here needs to be whatever the path is to the ikiwiki.cgi from
+the root of your web server.)
+
+Or put something like this in the wiki's Lighttpd (>=1.4.17) configuration file:
+
+ server.error-handler-404 = "/ikiwiki.cgi"
+
+
diff --git a/doc/plugins/aggregate.mdwn b/doc/plugins/aggregate.mdwn
index c40a6dc22..e2efcd83f 100644
--- a/doc/plugins/aggregate.mdwn
+++ b/doc/plugins/aggregate.mdwn
@@ -5,13 +5,9 @@ This plugin allows content from other feeds to be aggregated into the
wiki. To specify feeds to aggregate, use the
[[ikiwiki/directive/aggregate]] [[ikiwiki/directive]].
-New users of aggregate should enable the `aggregateinternal => 1` option in the
-.setup file. If you don't do so, you will need to enable the [[html]] plugin
-as well as aggregate itself, since feed entries will be stored as HTML.
-
-The [[meta]] and [[tag]] plugins are also recommended. The
-[[htmltidy]] plugin is suggested, since feeds can easily contain html
-problems, some of which tidy can fix.
+The [[meta]] and [[tag]] plugins are also recommended. Either the
+[[htmltidy]] or [[htmlbalance]] plugin is suggested, since feeds can easily
+contain html problems, some of which these plugins can fix.
You will need to run ikiwiki periodically from a cron job, passing it the
--aggregate parameter, to make it check for new posts. Here's an example
@@ -27,37 +23,19 @@ visit is `http://whatever/ikiwiki.cgi?do=aggregate_webtrigger`. Anyone
can visit the url to trigger an aggregation run, but it will only check
each feed if its `updateinterval` has passed.
-## internal pages and `aggregateinternal`
+## aggregated pages
This plugin creates a page for each aggregated item.
If the `aggregateinternal` option is enabled in the setup file (which is
-recommended), aggregated pages are stored in the source directory with a
+the default), aggregated pages are stored in the source directory with a
"._aggregated" extension. These pages cannot be edited by web users, and
do not generate first-class wiki pages. They can still be inlined into a
blog, but you have to use `internal` in [[PageSpecs|IkiWiki/PageSpec]],
like `internal(blog/*)`.
-For backward compatibility, the default is that these pages have the
-".html" extension, and are first-class wiki pages -- each one generates
-a separate HTML page in the output, and they can even be edited.
-
-That turns out to not be ideal for aggregated content, because publishing
-files for each of those pages is a waste of disk space and CPU, and you
-probably don't want to allow them to be edited. So, there is an alternative
-method that can be used (and is recommended), turned on by the
-`aggregateinternal` option in the setup file.
-
-If you are already using aggregate and want to enable `aggregateinternal`,
-you should follow this process:
-
-1. Update all [[PageSpecs|ikiwiki/PageSpec]] that refer to the aggregated
- pages -- such as those in inlines. Put "internal()" around globs
- in those PageSpecs. For example, if the PageSpec was `foo/*`, it should
- be changed to `internal(foo/*)`. This has to be done because internal
- pages are not matched by regular globs.
-2. Turn on `aggregateinternal` in the setup file.
-3. Use [[ikiwiki-transition]] to rename all existing aggregated `.html`
- files in the srcdir. The command to run is
- `ikiwiki-transition aggregateinternal $setupfile`,
-4. Refresh the wiki. (`ikiwiki -setup your.setup -refresh`)
+If `aggregateinternal` is disabled, you will need to enable the [[html]]
+plugin as well as aggregate itself, since feed entries will be stored as
+HTML, and as first-class wiki pages -- each one generates
+a separate HTML page in the output, and they can even be edited. This
+option is provided only for backwards compatability.
diff --git a/doc/plugins/aggregate/discussion.mdwn b/doc/plugins/aggregate/discussion.mdwn
index 1db6240d5..1a9844577 100644
--- a/doc/plugins/aggregate/discussion.mdwn
+++ b/doc/plugins/aggregate/discussion.mdwn
@@ -35,7 +35,7 @@ Two things aren't working as I'd expect:
> problem. You can see the feed validator complain about it here:
> <http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.davidj.org%2Frss.xml>
>
-> It's sorta unfortunate that [[cpan XML::Feed]] doesn't just assume the
+> It's sorta unfortunate that [[!cpan XML::Feed]] doesn't just assume the
> un-esxaped html is part of the description field. Probably other feed
> parsers are more lenient. --[[Joey]]
diff --git a/doc/plugins/anonok.mdwn b/doc/plugins/anonok.mdwn
index 2a8a922cd..a3fec4d89 100644
--- a/doc/plugins/anonok.mdwn
+++ b/doc/plugins/anonok.mdwn
@@ -7,3 +7,8 @@ by default.
The plugin also has a configuration setting, `anonok_pagespec`. This
[[PageSpec]] can be used to allow anonymous editing of matching pages.
+
+If you're using the [[comments]] plugin, you can allow anonymous comments
+to be posted by setting:
+
+ anonok_pagespec => "postcomment(*)"
diff --git a/doc/plugins/autoindex/discussion.mdwn b/doc/plugins/autoindex/discussion.mdwn
new file mode 100644
index 000000000..82e30aab1
--- /dev/null
+++ b/doc/plugins/autoindex/discussion.mdwn
@@ -0,0 +1,7 @@
+Would it be possible to add an option to only generate the index files
+for the html output and not place the markdown files in the wiki source?
+
+The reason being that I have a lot of directories which need to be autoindexed,
+but I would prefer if the index files didn't clutter up my git repository.
+
+even without that feature the plugin is a great help, thanks
diff --git a/doc/plugins/blogspam.mdwn b/doc/plugins/blogspam.mdwn
new file mode 100644
index 000000000..1d152faac
--- /dev/null
+++ b/doc/plugins/blogspam.mdwn
@@ -0,0 +1,26 @@
+[[!template id=plugin name=blogspam author="[[Joey]]"]]
+[[!tag type/auth]]
+
+This plugin adds antispam support to ikiwiki, using the
+[blogspam.net](http://blogspam.net/) API. Both page edits and
+[[comment|comments]] postings can be checked for spam. Page edits that
+appear to contain spam will be rejected; comments that look spammy will be
+stored in a queue for moderation by an admin.
+
+The plugin requires the [[!cpan RPC::XML]] perl module.
+
+You can control how content is tested via the `blogspam_options` setting.
+The list of options is [here](http://blogspam.net/api/testComment.html#options).
+By default, the options are configured in a way that is appropriate for
+wiki content. This includes turning off some of the more problimatic tests.
+
+The `blogspam_pagespec` setting is a [[ikiwiki/PageSpec]] that can be
+used to configure which pages are checked for spam. The default is to check
+all edits. If you only want to check [[comments]] (not wiki page edits),
+set it to "postcomment(*)".
+
+By default, the blogspam.net server is used to do the spam checking. To
+change this, the `blogspam_server` option can be set to the url for a
+different server implementing the same API. Note that content is sent
+unencrypted over the internet to the server, and the server sees
+the full text of the content.
diff --git a/doc/plugins/calendar.mdwn b/doc/plugins/calendar.mdwn
index c9e95ce7e..d695762b7 100644
--- a/doc/plugins/calendar.mdwn
+++ b/doc/plugins/calendar.mdwn
@@ -6,7 +6,7 @@ The directive displays a calendar, similar to the typical calendars shown on
some blogs.
Since ikiwiki is a wiki compiler, to keep the calendar up-to-date,
-wikis that include it need to be preiodically refreshes, typically by cron
+wikis that include it need to be periodically refreshes, typically by cron
at midnight. Example crontab:
0 0 * * * ikiwiki -setup ~/ikiwiki.setup -refresh
diff --git a/doc/plugins/calendar/discussion.mdwn b/doc/plugins/calendar/discussion.mdwn
index 65c2459c6..9d57b7a1e 100644
--- a/doc/plugins/calendar/discussion.mdwn
+++ b/doc/plugins/calendar/discussion.mdwn
@@ -1,2 +1,6 @@
It would be nice if the "month" type calendar could collect all of the
matching pages on a given date in some inline type way. --[[DavidBremner]]
+
+Is it possible to get the calendar to link to pages based not on their timestamp (as I understand that it does now, or have I misunderstood this?) and instead on for example their location in a directory hierarchy. That way the calendar could be used as a planning / timeline device which I think would be great. --[[Alexander]]
+
+I would like the ability to specify relative previous months. This way I could have a sidebar with the last three months by specifying no month, then 'month="-1"' and 'month="-2"'. Negative numbers for the month would otherwise be invalid, so this shouldn't produce any conflicts with expected behavior. (Right?) -- [[StevenBlack]]
diff --git a/doc/plugins/comments.mdwn b/doc/plugins/comments.mdwn
new file mode 100644
index 000000000..c13a6daa6
--- /dev/null
+++ b/doc/plugins/comments.mdwn
@@ -0,0 +1,52 @@
+[[!template id=plugin name=comments author="[[Simon_McVittie|smcv]]"]]
+[[!tag type/useful]]
+
+This plugin adds "blog-style" comments. Unlike the wiki-style freeform
+Discussion pages, these comments are posted by a simple form, cannot later
+be edited, and rss/atom feeds are provided of each page's comments.
+
+When using this plugin, you should also enable [[htmlscrubber]] and either
+[[htmltidy]] or [[htmlbalance]]. Directives are filtered out by default, to
+avoid commenters slowing down the wiki by causing time-consuming
+processing. As long as the recommended plugins are enabled, comment
+authorship should hopefully be unforgeable by CGI users.
+
+The intention is that on a non-wiki site (like a blog) you can lock all
+pages for admin-only access, then allow otherwise unprivileged (or perhaps
+even anonymous) users to comment on posts. See the documentation of the
+[[lockedit]] and [[anonok]] pages for details on locking down a wiki so
+users can only post comments.
+
+Individual comments are stored as internal-use pages named something like
+`page/comment_1`, `page/comment_2`, etc. These pages internally use a
+`\[[!_comment]]` [[ikiwiki/directive]].
+
+There are some global options for the setup file:
+
+* `comments_pagespec`: [[ikiwiki/PageSpec]] of pages where comments are
+ allowed. The default is not to allow comments on any pages. To allow
+ comments to all posts to a blog, you could use
+ `blog/posts/* and !*/Discussion`.
+* `comments_closed_pagespec`: [[ikiwiki/PageSpec]] of pages where
+ posting of new comments is closed, but any existing comments will still
+ be displayed. Often you will list a set of individual pages here.
+ For example: `blog/controversial or blog/flamewar`
+* `comments_pagename`: if this is e.g. `comment_` (the default), then
+ comment pages will be named something like `page/comment_12`
+* `comments_allowdirectives`: if true (default false), comments may
+ contain IkiWiki [[directives|ikiwiki/directive]]
+* `comments_commit`: if true (default true), comments will be committed to
+ the version control system
+* `comments_allowauthor`: if true (default false), anonymous commenters may
+ specify a name for themselves, and the \[[!meta author]] and
+ \[[!meta authorurl]] directives will not be overridden by the comments
+ plugin
+
+## comment moderation
+
+If you enable the [[blogspam]] plugin, comments that appear spammy will be
+held for moderation. Wiki admins can access the comment moderation queue
+via a button on their Preferences page.
+
+The comments are stored in `.ikiwiki/comments_pending/`, and can be
+deleted, or moved into the wiki's srcdir to be posted.
diff --git a/doc/plugins/comments/discussion.mdwn b/doc/plugins/comments/discussion.mdwn
new file mode 100644
index 000000000..3d7452b9a
--- /dev/null
+++ b/doc/plugins/comments/discussion.mdwn
@@ -0,0 +1,163 @@
+## Why internal pages? (unresolved)
+
+Comments are saved as internal pages, so they can never be edited through the CGI,
+only by direct committers.
+
+> So, why do it this way, instead of using regular wiki pages in a
+> namespace, such as `$page/comments/*`? Then you could use [[plugins/lockedit]] to
+> limit editing of comments in more powerful ways. --[[Joey]]
+
+>> Er... I suppose so. I'd assumed that these pages ought to only exist as inlines
+>> rather than as individual pages (same reasoning as aggregated posts), though.
+>>
+>> lockedit is actually somewhat insufficient, since `check_canedit()`
+>> doesn't distinguish between creation and editing; I'd have to continue to use
+>> some sort of odd hack to allow creation but not editing.
+>>
+>> I also can't think of any circumstance where you'd want a user other than
+>> admins (~= git committers) and possibly the commenter (who we can't check for
+>> at the moment anyway, I don't think?) to be able to edit comments - I think
+>> user expectations for something that looks like ordinary blog comments are
+>> likely to include "others can't put words into my mouth".
+>>
+>> My other objection to using a namespace is that I'm not particularly happy about
+>> plugins consuming arbitrary pieces of the wiki namespace - /discussion is bad
+>> enough already. Indeed, this very page would accidentally get matched by rules
+>> aiming to control comment-posting... :-) --[[smcv]]
+
+>>> Thinking about it, perhaps one way to address this would be to have the suffix
+>>> (e.g. whether commenting on Sandbox creates sandbox/comment1 or sandbox/c1 or
+>>> what) be configurable by the wiki admin, in the same way that recentchanges has
+>>> recentchangespage => 'recentchanges'? I'd like to see fewer hard-coded page
+>>> names in general, really - it seems odd to me that shortcuts and smileys
+>>> hard-code the name of the page to look at. Perhaps I could add
+>>> discussionpage => 'discussion' too? --[[smcv]]
+
+>>> (I've now implemented this in my branch. --[[smcv]])
+
+>> The best reason to keep the pages internal seems to me to be that you
+>> don't want the overhead of every comment spawning its own wiki page. --[[Joey]]
+
+## Formats (resolved)
+
+The plugin now allows multiple comment formats while still using internal
+pages; each comment is saved as a page containing one `\[[!comment]]` directive,
+which has a superset of the functionality of [[ikiwiki/directives/format]].
+
+## Access control (unresolved?)
+
+By the way, I think that who can post comments should be controllable by
+the existing plugins opendiscussion, anonok, signinedit, and lockedit. Allowing
+posting comments w/o any login, while a nice capability, can lead to
+spam problems. So, use `check_canedit` as at least a first-level check?
+--[[Joey]]
+
+> This plugin already uses `check_canedit`, but that function doesn't have a concept
+> of different actions. The hack I use is that when a user comments on, say, sandbox,
+> I call `check_canedit` for the pseudo-page "sandbox[postcomment]". The
+> special `postcomment(glob)` [[ikiwiki/pagespec]] returns true if the page ends with
+> "[postcomment]" and the part before (e.g. sandbox) matches the glob. So, you can
+> have postcomment(blog/*) or something. (Perhaps instead of taking a glob, postcomment
+> should take a pagespec, so you can have postcomment(link(tags/commentable))?)
+>
+> This is why `anonok_pagespec => 'postcomment(*)'` and `locked_pages => '!postcomment(*)'`
+> are necessary to allow anonymous and logged-in editing (respectively).
+>
+>> I changed that to move the flag out of the page name, and into a variable that the `match_postcomment`
+>> function checks for. Other ugliness still applies. :-) --[[Joey]]
+>
+> This is ugly - one alternative would be to add `check_permission()` that takes a
+> page and a verb (create, edit, rename, remove and maybe comment are the ones I
+> can think of so far), use that, and port the plugins you mentioned to use that
+> API too. This plugin could either call `check_can("$page/comment1", 'create')` or
+> call `check_can($page, 'comment')`.
+>
+> One odd effect of the code structure I've used is that we check for the ability to
+> create the page before we actually know what page name we're going to use - when
+> posting the comment I just increment a number until I reach an unused one - so
+> either the code needs restructuring, or the permission check for 'create' would
+> always be for 'comment1' and never 'comment123'. --[[smcv]]
+
+>> Now resolved, in fact --[[smcv]]
+
+> Another possibility is to just check for permission to edit (e.g.) `sandbox/comment1`.
+> However, this makes the "comments can only be created, not edited" feature completely
+> reliant on the fact that internal pages can't be edited. Perhaps there should be a
+> `editable_pages` pagespec, defaulting to `'*'`? --[[smcv]]
+
+## comments directive vs global setting (resolved?)
+
+When comments have been enabled generally, you still need to mark which pages
+can have comments, by including the `\[[!comments]]` directive in them. By default,
+this directive expands to a "post a comment" link plus an `\[[!inline]]` with
+the comments. [This requirement has now been removed --[[smcv]]]
+
+> I don't like this, because it's hard to explain to someone why they have
+> to insert this into every post to their blog. Seems that the model used
+> for discussion pages could work -- if comments are enabled, automatically
+> add the comment posting form and comments to the end of each page.
+> --[[Joey]]
+
+>> I don't think I'd want comments on *every* page (particularly, not the
+>> front page). Perhaps a pagespec in the setup file, where the default is "*"?
+>> Then control freaks like me could use "link(tags/comments)" and tag pages
+>> as allowing comments.
+>>
+>>> Yes, I think a pagespec is the way to go. --[[Joey]]
+
+>>>> Implemented --[[smcv]]
+
+>>
+>> The model used for discussion pages does require patching the existing
+>> page template, which I was trying to avoid - I'm not convinced that having
+>> every possible feature hard-coded there really scales (and obviously it's
+>> rather annoying while this plugin is on a branch). --[[smcv]]
+
+>>> Using the template would allow customising the html around the comments
+>>> which seems like a good thing? --[[Joey]]
+
+>>>> The \[[!comments]] directive is already template-friendly - it expands to
+>>>> the contents of the template `comments_embed.tmpl`, possibly with the
+>>>> result of an \[[!inline]] appended. I should change `comments_embed.tmpl`
+>>>> so it uses a template variable `INLINE` for the inline result rather than
+>>>> having the perl code concatenate it, which would allow a bit more
+>>>> customization (whether the "post" link was before or after the inline).
+>>>> Even if you want comments in page.tmpl, keeping the separate comments_embed.tmpl
+>>>> and having a `COMMENTS` variable in page.tmpl might be the way forward,
+>>>> since the smaller each templates is, the easier it will be for users
+>>>> to maintain a patched set of templates. (I think so, anyway, based on what happens
+>>>> with dpkg prompts in Debian packages with monolithic vs split
+>>>> conffiles.) --[[smcv]]
+
+>>>>> I've switched my branch to use page.tmpl instead; see what you think? --[[smcv]]
+
+## Raw HTML (resolved?)
+
+Raw HTML was not initially allowed by default (this was configurable).
+
+> I'm not sure that raw html should be a problem, as long as the
+> htmlsanitizer and htmlbalanced plugins are enabled. I can see filtering
+> out directives, as a special case. --[[Joey]]
+
+>> Right, if I sanitize each post individually, with htmlscrubber and either htmltidy
+>> or htmlbalance turned on, then there should be no way the user can forge a comment;
+>> I was initially wary of allowing meta directives, but I think those are OK, as long
+>> as the comment template puts the \[[!meta author]] at the *end*. Disallowing
+>> directives is more a way to avoid commenters causing expensive processing than
+>> anything else, at this point.
+>>
+>> I've rebased the plugin on master, made it sanitize individual posts' content
+>> and removed the option to disallow raw HTML. Sanitizing individual posts before
+>> they've been htmlized required me to preserve whitespace in the htmlbalance
+>> plugin, so I did that. Alternatively, we could htmlize immediately and always
+>> save out raw HTML? --[[smcv]]
+
+>>> There might be some use cases for other directives, such as img, in
+>>> comments.
+>>>
+>>> I don't know if meta is "safe" (ie, guaranteed to be inexpensive and not
+>>> allow users to do annoying things) or if it will continue to be in the
+>>> future. Hard to predict really, all that can be said with certainty is
+>>> all directives will contine to be inexpensive and safe enough that it's
+>>> sensible to allow users to (ab)use them on open wikis.
+>>> --[[Joey]]
diff --git a/doc/plugins/contrib.mdwn b/doc/plugins/contrib.mdwn
index 7a28edaba..e22b13f71 100644
--- a/doc/plugins/contrib.mdwn
+++ b/doc/plugins/contrib.mdwn
@@ -2,6 +2,6 @@ Contributed [[plugins]]:
(See [[install]] for installation help.)
-[[!inline pages="plugins/contrib/* !*/Discussion"
+[[!inline pages="plugins/contrib/* and !*/Discussion"
feedpages="created_after(plugins/contrib/navbar)" archive="yes"
rootpage="plugins/contrib" postformtext="Add a new plugin named:" show=0]]
diff --git a/doc/plugins/contrib/default_content_for___42__copyright__42___and___42__license__42__.mdwn b/doc/plugins/contrib/default_content_for___42__copyright__42___and___42__license__42__.mdwn
index b4a7cd5d6..adb414ffb 100644
--- a/doc/plugins/contrib/default_content_for___42__copyright__42___and___42__license__42__.mdwn
+++ b/doc/plugins/contrib/default_content_for___42__copyright__42___and___42__license__42__.mdwn
@@ -20,14 +20,14 @@ template variable somebody wants to use.
--[[bma]]
Copyright and license values are not "template values", they are values
-tracked by the meta plugin, and that various code compares and uses to fill
+tracked by the [[meta]] plugin, and that various code compares and uses to fill
out the templates. Something like varioki cannot do that. --[[Joey]]
Somewhat more detailed usage documentation would be appreciated. I tried to setup
those plugins with a current ikiwiki release, i.e. 2.61, but they appeared to do
nothing, really. Also, those example pages don't seem to use those plugins, even;
they set "copyright" and "license" properties using ordinary [[meta]] tags. Maybe
-I'm missing something terribly obvious? --[[Peter]]
+I'm missing something terribly obvious? --Peter
> Only obvious if you read the source :-). You need to put a file named "copyright.html"
>(respectively "license.html") in your wiki. Everything underneath that (in the wikilink sense) will use that
>content for the license or copyright. Saves putting \[[meta license="foo"]] in every page [[DavidBremner]]
diff --git a/doc/plugins/contrib/gallery.mdwn b/doc/plugins/contrib/gallery.mdwn
index 7148de3ef..72df13bd0 100644
--- a/doc/plugins/contrib/gallery.mdwn
+++ b/doc/plugins/contrib/gallery.mdwn
@@ -2,7 +2,7 @@
This plugin would create a nice looking gallery of the images. It has been build over the img plugin in Ikiwiki
-SVN repository of plugin is located at <http://ned.snow-crash.org:8080/svn/ikiwiki-gallery>
+GIT repo of the plugin is located at <http://github.com/joeyh/ikiwiki/tree/gallery>
USAGE :
diff --git a/doc/plugins/contrib/headinganchors.mdwn b/doc/plugins/contrib/headinganchors.mdwn
index ef2fa122a..c80cc0b49 100644
--- a/doc/plugins/contrib/headinganchors.mdwn
+++ b/doc/plugins/contrib/headinganchors.mdwn
@@ -12,9 +12,9 @@ rst and any other format that produces html. The code is available here:
use strict;
use IkiWiki 2.00;
- sub import { #{{{
+ sub import {
hook(type => "sanitize", id => "headinganchors", call => \&headinganchors);
- } # }}}
+ }
sub text_to_anchor {
my $str = shift;
@@ -26,11 +26,11 @@ rst and any other format that produces html. The code is available here:
return $str;
}
- sub headinganchors (@) { #{{{
+ sub headinganchors (@) {
my %params=@_;
my $content=$params{content};
$content=~s{<h([0-9])>([^>]*)</h([0-9])>}{'<h'.$1.' id="'.text_to_anchor($2).'">'.$2.'</h'.$3.'>'}gie;
return $content;
- } # }}}
+ }
1
diff --git a/doc/plugins/contrib/highlightcode.mdwn b/doc/plugins/contrib/highlightcode.mdwn
index 9b43a106c..8abb76583 100644
--- a/doc/plugins/contrib/highlightcode.mdwn
+++ b/doc/plugins/contrib/highlightcode.mdwn
@@ -1,3 +1,6 @@
+[[!template id=plugin name=highlightcode author="[[sabr]]"]]
+[[!tag type/format]]
+
A small plugin to allow Ikiwiki to display source files complete with syntax highlighting. Files with recognized extensions (i.e. my-file.cpp) are be rendered just like any other Ikiwiki page. You can even edit your source files with Ikiwiki's editor.
It uses the Syntax::Highlight::Engine::Kate Perl module to do the highlighting.
diff --git a/doc/plugins/contrib/linguas.mdwn b/doc/plugins/contrib/linguas.mdwn
index 0c3366846..bf502606e 100644
--- a/doc/plugins/contrib/linguas.mdwn
+++ b/doc/plugins/contrib/linguas.mdwn
@@ -10,7 +10,8 @@ Download: [linguas.pm](http://ettin.org/pub/ikiwiki/linguas.pm) (2006-08-21).
Note that even though it is still available for download, this plugin is no
longer actively maintained. If you are interested in multilingual wiki pages, you
-can also take a look at other approaches such as [[todo/l10n]] or Lars Wirzenius's
+can also take a look at other approaches such as [[todo/l10n]], [[plugins/contrib/po]],
+or Lars Wirzenius's
[Static website, with translations, using IkiWiki](http://liw.iki.fi/liw/log/2007-05.html#20070528b).
Usage
diff --git a/doc/plugins/contrib/mediawiki.mdwn b/doc/plugins/contrib/mediawiki.mdwn
new file mode 100644
index 000000000..c0a23254f
--- /dev/null
+++ b/doc/plugins/contrib/mediawiki.mdwn
@@ -0,0 +1,5 @@
+[[!template id=plugin name=mediawiki author="[[sabr]]"]]
+[[!tag type/format]]
+
+[The Mediawiki plugin](http://u32.net/Mediawiki_Plugin/) allows ikiwiki to
+process pages written using MediaWiki markup.
diff --git a/doc/plugins/contrib/opml.mdwn b/doc/plugins/contrib/opml.mdwn
new file mode 100644
index 000000000..3f98e8065
--- /dev/null
+++ b/doc/plugins/contrib/opml.mdwn
@@ -0,0 +1,11 @@
+[[!template id=plugin name=opml author="[[JanWalzer|jwalzer]]"]]
+[[!tag type/format]]
+
+The idea of this plugin is to parse in an OPML-File and output a linklist, maybe some customization.
+OPML-Files are xml-files that most RSS-Readers write out, to summarize their subscribes feedlist.
+
+I have a "dumb" perlscript running on my website, that tries to do a opml2mdwn transformation, but its quite bad on that.
+
+This Plugin is **NOT Ready** in any way. I'm just putting this page up as a hook, to discuss it.
+
+I intend to work on this, but I'd appreciate any help on this.
diff --git a/doc/plugins/contrib/opml/discussion.mdwn b/doc/plugins/contrib/opml/discussion.mdwn
new file mode 100644
index 000000000..3a145c79a
--- /dev/null
+++ b/doc/plugins/contrib/opml/discussion.mdwn
@@ -0,0 +1,4 @@
+If this is the wrong place for the development of the plugin, please mode it on to a more appropriate one.
+
+Currently I'm quite stuck with the perl-stuff itself. I'm trying to become comfortable with the language, but it seems, the language doesn't like me. I'm lost in complex datastructures, when trying to iterate through the output of XML::Simple. --[[Jan|jwalzer]]
+
diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn
new file mode 100644
index 000000000..61ec53ea8
--- /dev/null
+++ b/doc/plugins/contrib/po.mdwn
@@ -0,0 +1,386 @@
+I've been working on a plugin called "po", that adds support for multi-lingual wikis,
+translated with gettext, using [po4a](http://po4a.alioth.debian.org/).
+
+More information:
+
+* It can be found in my "po" branch:
+ `git clone git://gaffer.ptitcanardnoir.org/ikiwiki.git`
+* It is self-contained, *i.e.* it does not modify ikiwiki core at all.
+* It is documented (including TODO and plans for next work steps) in
+ `doc/plugins/po.mdwn`, which can be found in the same branch.
+* No public demo site is available so far, I'm working on this.
+
+My plan is to get this plugin clean enough to be included in ikiwiki.
+
+The current version is a proof-of-concept, mature enough for me to dare submitting it here,
+but I'm prepared to hear various helpful remarks, and to rewrite parts of it as needed.
+
+Any thoughts on this?
+
+> Well, I think it's pretty stunning what you've done here. Seems very
+> complete and well thought out. I have not read the code in great detail
+> yet.
+>
+> Just using po files is an approach I've never seen tried with a wiki. I
+> suspect it will work better for some wikis than others. For wikis that
+> just want translations that match the master language as closely as
+> possible and don't wander off and diverge, it seems perfect. (But what happens
+> if someone edits the Discussion page of a translated page?)
+>
+> Please keep me posted, when you get closer to having all issues solved
+> and ready for merging I can do a review and hopefully help with the
+> security items you listed. --[[Joey]]
+
+>> Thanks a lot for your quick review, it's reassuring to hear such nice words
+>> from you. I did not want to design and write a full translation system, when
+>> tools such as gettext/po4a already have all the needed functionality, for cases
+>> where the master/slave languages paradigm fits.
+>> Integrating these tools into ikiwiki plugin system was a pleasure.
+>>
+>> I'll tell you when I'm ready for merging, but in the meantime,
+>> I'd like you to review the changes I did to the core (3 added hooks).
+>> Can you please do this? If not, I'll go on and hope I'm not going to far in
+>> the wrong direction.
+>>
+>>> Sure.. I'm not completly happy with any of the hooks since they're very
+>>> special purpose, and also since `run_hooks` is not the best interface
+>>> for a hook that modifies a variable, where only the last hook run will
+>>> actually do anything. It might be better to just wrap
+>>> `targetpage`, `bestlink`, and `beautify_urlpath`. But, I noticed
+>>> the other day that such wrappers around exported functions are only visible by
+>>> plugins loaded after the plugin that defines them.
+>>>
+>>> Update: Take a look at the new "Function overriding" section of
+>>> [[plugins/write]]. I think you can just inject wrappers about a few ikiwiki
+>>> functions, rather than adding hooks. The `inject` function is pretty
+>>> insane^Wlow level, but seems to work great. --[[Joey]]
+>>>
+>>>> Thanks a lot, it seems to be a nice interface for what I was trying to achieve.
+>>>> I may be forced to wait two long weeks before I have a chance to confirm
+>>>> this. Stay tuned. --[[intrigeri]]
+>>>>
+>>>>> I've updated the plugin to use `inject`. It is now fully self-contained,
+>>>>> and does not modify the core anymore. --[[intrigeri]]
+>>
+>> The Discussion pages issue is something I am not sure about yet. But I will
+>> probably decide that "slave" pages, being only translations, don't deserve
+>> a discussion page: the discussion should happen in the language in which the
+>> pages are written for real, which is the "master" one. --[[intrigeri]]
+>>
+>> I think that's a good decision, you don't want to translate discussion,
+>> and if the discussion page turns out multilingual, well, se la vi. ;-)
+>>
+>> Relatedly, what happens if a translated page has a broken link, and you
+>> click on it to edit it? Seems you'd first have to create a master page
+>> and could only then translate it, right? I wonder if this will be clear
+>> though to the user.
+>>
+>>> Right: a broken link points to the URL that allows to create
+>>> a page that can either be a new master page or a non-translatable
+>>> page, depending on `po_translatable_pages` value. The best
+>>> solution I can thing of is to use [[plugins/edittemplate]] to
+>>> insert something like "Warning: this is a master page, that must
+>>> be written in $MASTER_LANGUAGE" into newly created master pages,
+>>> and maybe another warning message on newly created
+>>> non-translatable pages. It seems quite doable to me, but in order
+>>> to avoid breaking existing functionality, it implies to hack a bit
+>>> [[plugins/edittemplate]] so that multiple templates can be
+>>> inserted at page creation time. [[--intrigeri]]
+>>>
+>>>> I implemented such a warning using the formbuilder_setup hook.
+>>>> --[[intrigeri]]
+>>
+>> And also, is there any way to start a translation of a page into a new
+>> lanauge using the web interface?
+>>
+>>> When a new language is added to `po_slave_languages`, a rebuild is
+>>> triggered, and all missing PO files are created and checked into
+>>> VCS. An unpriviledged wiki user can not add a new language to
+>>> `po_slave_languages`, though. One could think of adding the needed
+>>> interface to translate a page into a yet-unsupported slave
+>>> language, and this would automagically add this new language to
+>>> `po_slave_languages`. It would probably be useful in some
+>>> usecases, but I'm not comfortable with letting unpriviledged wiki
+>>> users change the wiki configuration as a side effect of their
+>>> actions; if this were to be implemented, special care would be
+>>> needed. [[--intrigeri]]
+>>>
+>>>> Actually I meant into any of the currently supported languages.
+>>>> I guess that if the template modification is made, it will list those
+>>>> languages on the page, and if a translation to a language is missing,
+>>>> the link will allow creating it?
+>>>>
+>>>>> Any translation page always exist for every supported slave
+>>>>> language, even if no string at all have been translated yet.
+>>>>> This implies the po plugin is especially friendly to people who
+>>>>> prefer reading in their native language if available, but don't
+>>>>> mind reading in English else.
+>>>>>
+>>>>> While I'm at it, there is a remaining issue that needs to be
+>>>>> sorted out: how painful it could be for non-English speakers
+>>>>> (assuming the master language is English) to be perfectly able
+>>>>> to navigate between translation pages supposed to be written in
+>>>>> their own language, when their translation level is most
+>>>>> often low.
+>>>>>
+>>>>> (It is currently easy to display this status on the translation
+>>>>> page itself, but then it's too late, and how frustrating to load
+>>>>> a page just to realize it's actually not translated enough for
+>>>>> you. The "other languages" loop also allows displaying this
+>>>>> information, but it is generally not the primary
+>>>>> navigation tool.)
+>>>>>
+>>>>> IMHO, this is actually a social problem (i.e. it's no use adding
+>>>>> a language to the supported slave ones if you don't have the
+>>>>> manpower to actually do the translations), that can't be fully
+>>>>> solved by technical solutions, but I can think of some hacks
+>>>>> that would limit the negative impact: a given translation's
+>>>>> status (currently = percent translated) could be displayed next
+>>>>> to the link that leads to it; a color code could as well be used
+>>>>> ("just" a matter of adding a CSS id or class to the links,
+>>>>> depending on this variable). As there is already work to be done
+>>>>> to have the links text generation more customizable through
+>>>>> plugins, I could do both at the same time if we consider this
+>>>>> matter to be important enough. --[[intrigeri]]
+>>>>>
+>>>>>> The translation status in links is now implemented in my
+>>>>>> `po`branch. It requires my `meta` branch changes to
+>>>>>> work, though. I consider the latter to be mature enough to
+>>>>>> be merged. --[[intrigeri]]
+
+>> FWIW, I'm tracking your po branch in ikiwiki master git in the po
+>> branch. One thing I'd like to try in there is setting up a translated
+>> basewiki, which seems like it should be pretty easy to do, and would be
+>> a great demo! --[[Joey]]
+>>
+>>> I've merged your changes into my own branch, and made great
+>>> progress on the various todo items. Please note my repository
+>>> location has changed a few days ago, my user page was updated
+>>> accordingly, but I forgot to update this page at the same time.
+>>> Hoping it's not too complicated to relocated an existing remote...
+>>> (never done that, I'm a Git beginner as well as a Perl
+>>> newbie) --[[intrigeri]]
+>>>>
+>>>> Just a matter of editing .git/config, thanks for the heads up.
+>>>>>
+>>>>> Joey, please have a look at my branch, your help would be really
+>>>>> welcome for the security research, as I'm almost done with what
+>>>>> I am able to do myself in this area. --[[intrigeri]]
+>>>>>>
+>>>>>> I came up with a patch for the WrapI18N issue --[[Joey]]
+
+I've set this plugin development aside for a while. I will be back and
+finish it at some point in the first quarter of 2009. --[[intrigeri]]
+
+> Abstract: Joey, please have a look at my po and meta branches.
+>
+> Detailed progress report:
+>
+> * it seems the po branch in your repository has not been tracking my
+> own po branch for two months. any config issue?
+> * all the plugin's todo items have been completed, robustness tests
+> done
+> * I've finished the detailed security audit, and the fix for po4a
+> bugs has entered upstream CVS last week
+> * I've merged your new `checkcontent` hook with the `cansave` hook
+> I previously introduced in my own branch; blogspam plugin updated
+> accordingly
+> * the rename hook changes we discussed elsewhere are also part of my
+> branch
+> * I've introduced two new hooks (`canremove` and `canrename`), not
+> a big deal; IMHO, they extend quite logically the plugin interface
+> * as highlighted on [[bugs/pagetitle_function_does_not_respect_meta_titles]],
+> my `meta` branch contains a new feature that is really useful in a
+> translatable wiki
+>
+> As a conclusion, I'm feeling that my branches are ready to be
+> merged; only thing missing, I guess, are a bit of discussion and
+> subsequent adjustments.
+>
+> --[[intrigeri]]
+
+> I've looked it over and updated my branch with some (untested)
+> changes.
+>
+>> I've merged your changes into my branch. Only one was buggy.
+>
+> Sorry, I'd forgotten about your cansave hook.. sorry for the duplicate
+> work there.
+>
+> Reviewing the changes, mostly outside of `po.pm`, I have
+> the following issues.
+>
+> * renamepage to renamelink change would break the ikiwiki
+> 3.x API, which I've promised not to do, so needs to be avoided
+> somehow. (Sorry, I guess I dropped the ball on not getting this
+> API change in before cutting 3.0..)
+>>
+>> Fixed, see [[todo/need_global_renamepage_hook]].
+>>
+> * I don't understand the parentlinks code change and need to figure it
+> out. Can you explain what is going on there?
+>>
+>> I'm calling `bestlink` there so that po's injected `bestlink` is
+>> run. This way, the parent links of a page link to the parent page
+>> version in the proper language, depending on the
+>> `po_link_to=current` and `po_link_to=negotiated` settings.
+>> Moreover, when using my meta branch enhancements plus meta title to
+>> make pages titles translatable, this small patch is needed to get
+>> the translated titles into parentlinks.
+>>
+> * canrename's mix of positional and named parameters is way too
+> ugly to get into an ikiwiki API. Use named parameters
+> entirely. Also probably should just use named parameters
+> for canremove.
+> * `skeleton.pm.example`'s canrename needs fixing to use either
+> the current or my suggested parameters.
+>>
+>> Done.
+>>
+> * I don't like the exporting of `%backlinks` and `$backlinks_calculated`
+> (the latter is exported but not used).
+>>
+>> The commit message for 85f865b5d98e0122934d11e3f3eb6703e4f4c620
+>> contains the rationale for this change. I guess I don't understand
+>> the subtleties of `our` use, and perldoc does not help me a lot.
+>> IIRC, I actually did not use `our` to "export" these variables, but
+>> rather to have them shared between `Render.pm` uses.
+>>
+>>> My wording was unclear, I meant exposing. --[[Joey]]
+>>>
+>>>> I guess I still don't know Perl's `our` enough to understand clearly.
+>>>> No matter whether these variables are declared with `my` or `our`,
+>>>> any plugin can `use IkiWiki::Render` and then access
+>>>> `$IkiWiki::backlinks`, as already does e.g. the pagestat plugin.
+>>>> So I guess your problem is not with letting plugins use these
+>>>> variables, but with them being visible for every piece of
+>>>> (possibly external) code called from `Render.pm`. Am I right?
+>>>> If I understand clearly, using a brace block to lexically enclose
+>>>> these two `our` declarations, alongside with the `calculate_backlinks`
+>>>> and `backlinks` subs definitions, would be a proper solution, wouldn't
+>>>> it? --[[intrigeri]]
+>>>>
+>>>>> No, %backlinks and the backlinks() function are not the same thing.
+>>>>> The variable is lexically scoped; only accessible from inside
+>>>>> `Render.pm` --[[Joey]]
+>>>>
+> * What is this `IkiWiki::nicepagetitle` and why are you
+> injecting it into that namespace when only your module uses it?
+> Actually, I can't even find a caller of it in your module.
+>>
+>> I guess you should have a look to my `meta` branch and to
+>> [[bugs/pagetitle_function_does_not_respect_meta_titles]] in order
+>> to understand this :)
+>>
+>>> It would probably be good if I could merge this branch without
+>>> having to worry about also immediatly merging that one. --[[Joey]]
+>>>
+>>>> I removed all dependencies on my `meta` branch from the `po` one.
+>>>> This implied removing the `po_translation_status_in_links` and
+>>>> `po_strictly_refresh_backlinks` features, and every link text is now
+>>>> displayed in the master language. I believe the removed features really
+>>>> enhance user experience of a translatable wiki, that's why I was
+>>>> initially supposing the `meta` branch would be merged first.
+>>>> IMHO, we'll need to come back to this quite soon after `po` is merged.
+>>>> --[[intrigeri]]
+>>>>
+>>>> Maybe you should keep those features in a meta-po branch?
+>>>> I did a cursory review of your meta last night, have some issues with it,
+>>>> but this page isn't the place for a detailed review. --[[Joey]]
+>>>>
+>>>>> Done. --[[intrigeri]]
+>>>
+> * I'm very fearful of the `add_depends` in `postscan`.
+> Does this make every page depend on every page that links
+> to it? Won't this absurdly bloat the dependency pagespecs
+> and slow everything down? And since nicepagetitle is given
+> as the reason for doing it, and nicepagetitle isn't used,
+> why do it?
+>>
+>> As explained in the 85f865b5d98e0122934d11e3f3eb6703e4f4c620 log:
+>> this feature hits performance a bit. Its cost was quite small in my
+>> real-world use-cases (a few percents bigger refresh time), but
+>> could be bigger in worst cases. When using the po plugin with my
+>> meta branch changes (i.e. the `nicepagetitle` thing), and having
+>> enabled the option to display translation status in links, this
+>> maintains the translation status up-to-date in backlinks. Same when
+>> using meta title to make the pages titles translatable. It does
+>> help having a nice and consistent translated wiki, but as it can
+>> also involve problems, I just turned it into an option.
+>>
+>>> This has been completely removed for now due to the removal of
+>>> the dependency on my `meta` branch. --[[intrigeri]]
+>>
+> * The po4a Suggests should be versioned to the first version
+> that can be used safely, and that version documented in
+> `plugins/po.mdwn`.
+>>
+>> Done.
+>>
+>> --[[intrigeri]]
+>
+> --[[Joey]]
+
+I reverted the `%backlinks` and `$backlinks_calculated` exposing.
+The issue they were solving probably will arise again when I'll work
+on my meta branch again (i.e. when the simplified po one is merged),
+but the po thing is supposed to work without these ugly `our`.
+Seems like it was the last unaddressed item from Joey's review, so I'm
+daring a timid "please pull"... or rather, please review again :)
+--[[intrigeri]]
+
+> Ok, I've reviewed and merged into my own po branch. It's looking very
+> mergeable.
+>
+> * Is it worth trying to fix compatability with `indexpages`?
+>>
+>> Supporting `usedirs` being enabled or disabled was already quite
+>> hard IIRC, so supporting all four combinations of `usedirs` and
+>> `indexpages` settings will probably be painful. I propose we forget
+>> about it until someone reports he/she badly needs it, and then
+>> we'll see what can be done.
+>>
+> * Would it make sense to go ahead and modify `page.tmpl` to use
+> OTHERLANGUAGES and PERCENTTRANSLATED, instead of documenting how to modify it?
+>>
+>> Done in my branch.
+>>
+> * Would it be better to disable po support for pages that use unsupported
+> or poorly-supported markup languages?
+>
+>> I prefer keeping it enabled, as:
+>>
+>> * most wiki markups "almost work"
+>> * when someone needs one of these to be fully supported, it's not
+>> that hard to add dedicated support for it to po4a; if it were
+>> disabled, I fear the ones who could do this would maybe think
+>> it's blandly impossible and give up.
+>>
+
+> * What's the reasoning behind checking that the link plugin
+> is enabled? AFAICS, the same code in the scan hook should
+> also work when other link plugins like camelcase are used.
+> * In `pagetemplate` there is a comment that claims the code
+> relies on `genpage`, but I don't see how it does; it seems
+> to always add a discussion link?
+> * Is there any real reason not to allow removing a translation?
+> I'm imagining a spammy translation, which an admin might not
+> be able to fix, but could remove.
+> * Re the meta title escaping issue worked around by `change`.
+> I suppose this does not only affect meta, but other things
+> at scan time too. Also, handling it only on rebuild feels
+> suspicious -- a refresh could involve changes to multiple
+> pages and trigger the same problem, I think. Also, exposing
+> this rebuild to the user seems really ugly, not confidence inducing.
+>
+> So I wonder if there's a better way. Such as making po, at scan time,
+> re-run the scan hooks, passing them modified content (either converted
+> from po to mdwn or with the escaped stuff cheaply de-escaped). (Of
+> course the scan hook would need to avoid calling itself!)
+>
+> (This doesn't need to block the merge, but I hope it can be addressed
+> eventually..)
+>
+> --[[Joey]]
+>>
+>> --[[intrigeri]]
diff --git a/doc/plugins/contrib/siterel2pagerel.mdwn b/doc/plugins/contrib/siterel2pagerel.mdwn
index 956b6728f..9b09657bf 100644
--- a/doc/plugins/contrib/siterel2pagerel.mdwn
+++ b/doc/plugins/contrib/siterel2pagerel.mdwn
@@ -13,11 +13,11 @@ other format that produces html. The code is available here:
use strict;
use IkiWiki 2.00;
- sub import { #{{{
+ sub import {
hook(type => "sanitize", id => "siterel2pagerel", call => \&siterel2pagerel);
- } # }}}
+ }
- sub siterel2pagerel (@) { #{{{
+ sub siterel2pagerel (@) {
my %params=@_;
my $baseurl=IkiWiki::baseurl($params{page});
my $content=$params{content};
@@ -25,6 +25,6 @@ other format that produces html. The code is available here:
$content=~s/(<img(?:\s+(?:class|id|width|height)\s*="?\w+"?)*)\s+src=\s*"\/([^"]*)"/$1 src="$baseurl$2"/mig;
# FIXME: do <script and everything else that can have URLs in it
return $content;
- } # }}}
+ }
1
diff --git a/doc/plugins/contrib/sourcehighlight.mdwn b/doc/plugins/contrib/sourcehighlight.mdwn
index 2eb22e6ed..07ac2086f 100644
--- a/doc/plugins/contrib/sourcehighlight.mdwn
+++ b/doc/plugins/contrib/sourcehighlight.mdwn
@@ -10,13 +10,21 @@ where foo and bar are the (source-supported) languages you want to
highlight
### Issues
-- I would like to have a link to the raw source; using will_render() and then copying the file should work.
+- I would like to have a link to the raw source; using will_render() and then copying the file should work.
-- the common case of foo.c and foo.h breaks
-because they both generate page working/dir/foo.
-It looks to me like ikiwiki is hardcoded to strip the extension in `pagename()` (IkiWiki.pm).
-This problem with sourcehighlight needs to be fixed before it is very useful.
+> You might also like to look at the [[todo/source_link]] todo. -- [[Will]]
- Is there a way to configure the colors used by source-highlight (other than editing the globally installed "default.style" file)? It would help if I could pass the command arbitrary command-line arguments; then I could configure which config file it's supposed to use. For instance, I'm not a fan of hard-coding the colors into the HTML output. IMHO, css-style formatting should be preferred. All that can be set via the command line ... --Peter
> I don't really have time right now, but it should be easy to add, if you look at how src-lang is handled. Patches are welcome :-) --[[DavidBremner]]
+
+Note that [[Will]] wrote a plugin that uses source-highlight also. It's
+available
+[[here|todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion]].
+--[[Joey]]
+
+To be honest, [[Will]]'s version of this looks more polished. I will try his
+plugin and see if it can just replace mine. --[[DavidBremner]]
+
+
+*Updated* Now uses keepextension so multiple extensions should be OK
diff --git a/doc/plugins/contrib/unixauth.mdwn b/doc/plugins/contrib/unixauth.mdwn
index d91ed45f1..76a847744 100644
--- a/doc/plugins/contrib/unixauth.mdwn
+++ b/doc/plugins/contrib/unixauth.mdwn
@@ -22,7 +22,7 @@ __Security__: [As with passwordauth](/security/#index14h2), be wary of sending u
--- Wrapper.pm.orig 2008-07-29 00:09:10.000000000 -0400
+++ Wrapper.pm
- @@ -28,7 +28,7 @@ sub gen_wrapper () { #{{{
+ @@ -28,7 +28,7 @@ sub gen_wrapper () {
my @envsave;
push @envsave, qw{REMOTE_ADDR QUERY_STRING REQUEST_METHOD REQUEST_URI
CONTENT_TYPE CONTENT_LENGTH GATEWAY_INTERFACE
@@ -46,16 +46,16 @@ __Security__: [As with passwordauth](/security/#index14h2), be wary of sending u
use strict;
use IkiWiki 2.00;
- sub import { #{{{
+ sub import {
hook(type => "getsetup", id => "unixauth", call => \&getsetup);
hook(type => "formbuilder_setup", id => "unixauth",
call => \&formbuilder_setup);
hook(type => "formbuilder", id => "unixauth",
call => \&formbuilder);
hook(type => "sessioncgi", id => "unixauth", call => \&sessioncgi);
- } # }}}
+ }
- sub getsetup () { #{{{
+ sub getsetup () {
return
unixauth_type => {
type => "string",
@@ -83,10 +83,10 @@ __Security__: [As with passwordauth](/security/#index14h2), be wary of sending u
safe => 0,
rebuild => 1,
},
- } #}}}
+ }
# Checks if a string matches a user's password, and returns true or false.
- sub checkpassword ($$;$) { #{{{
+ sub checkpassword ($$;$) {
my $user=shift;
my $password=shift;
my $field=shift || "password";
@@ -131,9 +131,9 @@ __Security__: [As with passwordauth](/security/#index14h2), be wary of sending u
}
return $ret;
- } #}}}
+ }
- sub formbuilder_setup (@) { #{{{
+ sub formbuilder_setup (@) {
my %params=@_;
my $form=$params{form};
@@ -204,7 +204,7 @@ __Security__: [As with passwordauth](/security/#index14h2), be wary of sending u
}
}
- sub formbuilder (@) { #{{{
+ sub formbuilder (@) {
my %params=@_;
my $form=$params{form};
@@ -225,12 +225,12 @@ __Security__: [As with passwordauth](/security/#index14h2), be wary of sending u
my $user_name=$form->field('name');
}
}
- } #}}}
+ }
- sub sessioncgi ($$) { #{{{
+ sub sessioncgi ($$) {
my $q=shift;
my $session=shift;
- } #}}}
+ }
1
diff --git a/doc/plugins/contrib/unixauth/discussion.mdwn b/doc/plugins/contrib/unixauth/discussion.mdwn
index dfa4fe6cc..232649863 100644
--- a/doc/plugins/contrib/unixauth/discussion.mdwn
+++ b/doc/plugins/contrib/unixauth/discussion.mdwn
@@ -32,3 +32,7 @@ I've added support for [checkpassword](http://cr.yp.to/checkpwd/interface.html),
> to disentangle the two locks. --[[Joey]]
>> Ah, ok, I misunderstood your comment. I'll see what I can figure out. --[[schmonz]]
+
+>>> My time's been limited for this, but I just saw [[todo/avoid_thrashing]]. How does that interact with pwauth or checkpassword? --[[schmonz]]
+
+>>>> The DOS still happens, it just uses less memory. --[[Joey]]
diff --git a/doc/plugins/creole.mdwn b/doc/plugins/creole.mdwn
index c6491f754..6961e8d1d 100644
--- a/doc/plugins/creole.mdwn
+++ b/doc/plugins/creole.mdwn
@@ -13,4 +13,10 @@ wiki markup formats, so should be fairly easy to guess at. There is also a
Links are standard [[WikiLinks|ikiwiki/WikiLink]]. Links and
[[directives|ikiwiki/directive]] inside `{{{ }}}` blocks are still expanded,
-since this happens before the creole format is processed.
+since this happens before the creole format is processed. (You need to escape
+them manually, via \\\[[directives]], the ~ escaping of creole doesn't work on
+this.)
+
+The standard ikiwiki [[WikiLinks|ikiwiki/WikiLink]] is almost the same as Creole link, except that creole uses \[[pagename|description]] while ikiwiki uses \[[description|pagename]].
+
+
diff --git a/doc/plugins/creole/discussion.mdwn b/doc/plugins/creole/discussion.mdwn
index 36b7ba869..38ee2bd78 100644
--- a/doc/plugins/creole/discussion.mdwn
+++ b/doc/plugins/creole/discussion.mdwn
@@ -8,4 +8,8 @@ I've installed Text::WikiCreole 0.05 and enabled the plugin, but I get an error
>> I've added the patch to pkgsrc as well. Thanks. --[[schmonz]]
+>> Currently the creole plugin is included in ikiwiki but the ikiwiki deb (3.0.3) doesn't suggests libtext-wikicreole-perl. Why? --[[weakish]]
+
+>>> forgot, done now --[[Joey]]
+
I'm moving over a really stinkingly old UseMod and creole seems the nearest match. I've worked out that Bare /Subpage links need to become \[\[Subpage\]\], and Top/Sub links need to be \[\[Top/Sub\]\] (or \[\[Top/Sub|Top/Sub\]\], to display in exactly the same way), but I'm stuck on generic hyperlinks. The creole cheat sheet says I should be able to do \[\[http://url.path/foo|LinkText\]\], but that comes out as a link to create the "linktext" page, and Markdown-style \[Link Text\](http://url.path/foo) just gets rendered as is. Any suggestions? --[[schmonz]]
diff --git a/doc/plugins/cutpaste.mdwn b/doc/plugins/cutpaste.mdwn
index 1b78e60fc..f74f8a269 100644
--- a/doc/plugins/cutpaste.mdwn
+++ b/doc/plugins/cutpaste.mdwn
@@ -1,4 +1,4 @@
-[[!template id=plugin name=toggle author="[[Enrico]]"]]
+[[!template id=plugin name=cutpaste author="[[Enrico]]"]]
[[!tag type/chrome]]
This plugin provides the [[ikiwiki/directive/cut]],
diff --git a/doc/plugins/ddate.mdwn b/doc/plugins/ddate.mdwn
index e82760d88..741606a6e 100644
--- a/doc/plugins/ddate.mdwn
+++ b/doc/plugins/ddate.mdwn
@@ -1,5 +1,6 @@
[[!template id=plugin name=ddate author="[[Joey]]"]]
[[!tag type/fun]]
+[[!tag type/date]]
Enables use of Discordian dates. `--timeformat` can be used to change
the date format; see `ddate(1)`.
diff --git a/doc/plugins/discussion.mdwn b/doc/plugins/discussion.mdwn
index 70157f1e2..854307a98 100644
--- a/doc/plugins/discussion.mdwn
+++ b/doc/plugins/discussion.mdwn
@@ -34,12 +34,3 @@ Any objections to listing plugins alphabetically rather than by creation date?
>> "recently changed" list with the 10 most recently changed plugins
>> at the top. That would allow what you suggested, but still allow
>> the main list to be alphabetical. -- [[Will]]
-
-How about adding a deprecated tag in order to clean up the plugin list?
-
-> AFAIK it's currently the only one. --[[Joey]]
-
-For instance [[googlecalendar]] is listed as plugin but should probably be removed from Ikiwiki in a future major version (v3?).
-
--- [[AlexandreDupas]]
-
diff --git a/doc/plugins/embed.mdwn b/doc/plugins/embed.mdwn
index 1d43061e0..85592cb72 100644
--- a/doc/plugins/embed.mdwn
+++ b/doc/plugins/embed.mdwn
@@ -13,6 +13,14 @@ In the examples below, the parts of the html that you can change are denoted
with "XXX"; everything else must appear exactly as shown to be accepted by the
plugin.
+**This plugin is deprecated.** Rather than relying on these complex lists
+of safe content, which constantly fall out of date, you're recommended to
+configure the [[htmlscrubber]] to not scrub some pages, which only trusted
+users can edit. Then you can embed anything from anywhere on those pages.
+See [[tips/embedding_content]] for details and examples.
+This plugin's lists of safe embedded content will not be maintained, and
+the plugin will be removed in a future release.
+
## google maps
Use html like this to embed a map:
diff --git a/doc/plugins/format.mdwn b/doc/plugins/format.mdwn
new file mode 100644
index 000000000..91e707fcf
--- /dev/null
+++ b/doc/plugins/format.mdwn
@@ -0,0 +1,9 @@
+[[!template id=plugin name=format core=0 author="[[Joey]]"]]
+[[!tag type/format]]
+
+This plugin allows mixing different page formats together, by embedding
+text formatted one way inside a page formatted another way. This is done
+using the [[ikiwiki/directive/format]] [[ikiwiki/directive]].
+
+For example, it could be used to embed an [[otl]] outline inside a page
+that is formatted as [[mdwn]].
diff --git a/doc/plugins/format/discussion.mdwn b/doc/plugins/format/discussion.mdwn
new file mode 100644
index 000000000..df8448ed6
--- /dev/null
+++ b/doc/plugins/format/discussion.mdwn
@@ -0,0 +1,15 @@
+Is there any way to tell if an htmlize hook have been called from a format directive?
+
+I am currently modifying the [[contrib/highlightcode]] plugin by [[sabr]] and I wanted to have a different behavior depending on the fact that the htmlize hook is called from a format directive or not. For instance, this could disable the raw copy of the highlighted code. Since I have enabled the keepextension option, I tried to rely on the page extension to decide whenever I have to create the raw file or not but this does not seems a reliable approach.
+
+One possible solution is to add an optional parameter to the htmlize hook (and thus to htmlize function in IkiWiki.pm) which could tell if this is the format directive that called the function but I am not sure that is a good way to do this.
+
+> It's (probably) not just the format directive that has a potential problem here.
+> Imagine a syntax highlighted source code file that contains some other
+> directive, such as table or meta. Such a directive calls `htmlize` on the
+> parameters passed to it.
+>
+> There is one way to detect this ATM. If `%IkiWiki::preprocessing` has
+> anything in it, then ikiwiki is in the middle of handling a preprocessing
+> directive. So you could check that. It's getting into internals, so not
+> ideal.. --[[Joey]]
diff --git a/doc/plugins/goodstuff.mdwn b/doc/plugins/goodstuff.mdwn
index 83b60f4fa..ee1bffcfa 100644
--- a/doc/plugins/goodstuff.mdwn
+++ b/doc/plugins/goodstuff.mdwn
@@ -12,7 +12,6 @@ Currently included:
* [[brokenlinks]]
* [[img]]
* [[map]]
-* [[meta]]
* [[more]]
* [[orphans]]
* [[pagecount]]
@@ -25,5 +24,6 @@ Currently included:
* [[template]]
* [[toc]]
* [[toggle]]
+* [[repolist]]
New plugins will be added to this bundle from time to time.
diff --git a/doc/plugins/google/discussion.mdwn b/doc/plugins/google/discussion.mdwn
new file mode 100644
index 000000000..babc919d2
--- /dev/null
+++ b/doc/plugins/google/discussion.mdwn
@@ -0,0 +1,6 @@
+This plugin uses the googleform.tmpl
+which produces valid HTML but invalid XHTML.
+This is not very good since the default ikiwiki
+templates produce XHTML instead of HTML.
+
+> Fixed, thanks for the patch! --[[Joey]]
diff --git a/doc/plugins/googlecalendar.mdwn b/doc/plugins/googlecalendar.mdwn
deleted file mode 100644
index bca2ae74f..000000000
--- a/doc/plugins/googlecalendar.mdwn
+++ /dev/null
@@ -1,20 +0,0 @@
-[[!template id=plugin name=googlecalendar author="[[Joey]]"]]
-[[!tag type/special-purpose]]
-
-*Note*: This plugin is deprecated. Please switch to the [[embed]] plugin.
-
-This plugin allows embedding a google calendar iframe in the wiki.
-Normally, if the [[htmlscrubber]] is enabled, such iframes are scrubbed out
-of the wiki content since they're not very safe if created by malicious
-users. But some iframes are legitimate, and safe, if you trust the embedded
-content. This plugin is an example of how to deal with this in ikiwiki.
-
-Example use:
-
- \[[!googlecalendar html="""
- <iframe src="http://www.google.com/calendar/embed?src=adkrdken8mupngh13jshlbenoc%40group.calendar.google.com&title=OSEL%20Calendar&chrome=NAVIGATION&bgcolor=%2371d873&height=588" style=" border-width:0 " width="480" frameborder="0" height="588"></iframe>
- """]]
-
-The iframe should be the one provided by google. Note that it's used in a
-way that avoids cross-site scripting attacks, assuming you trust google's
-content.
diff --git a/doc/plugins/goto.mdwn b/doc/plugins/goto.mdwn
new file mode 100644
index 000000000..9c401c5d2
--- /dev/null
+++ b/doc/plugins/goto.mdwn
@@ -0,0 +1,10 @@
+[[!template id=plugin name=goto author="[[Simon_McVittie|smcv]]"]]
+[[!tag type/useful]]
+
+This plugin adds a `do=goto` mode for the IkiWiki CGI script. It's mainly
+for internal use by the [[404]], [[comments]] and [[recentchanges]]
+plugins, which enable it automatically.
+
+With this plugin enabled you can link to `ikiwiki.cgi?do=goto&page=some/where`
+to make a link that will redirect to the page `/some/where` if it exists, or
+offer a link to create it if it doesn't.
diff --git a/doc/plugins/htmlbalance.mdwn b/doc/plugins/htmlbalance.mdwn
new file mode 100644
index 000000000..f4e2298ee
--- /dev/null
+++ b/doc/plugins/htmlbalance.mdwn
@@ -0,0 +1,9 @@
+[[!template id=plugin name=htmlbalance author="[[Simon_McVittie|smcv]]"]]
+[[!tag type/html]]
+
+This plugin ensures that the HTML emitted by ikiwiki contains well-balanced
+HTML tags, by parsing it with [[!cpan HTML::TreeBuilder]] and re-serializing it. This
+acts as a lighter-weight alternative to [[plugins/htmltidy]]; it doesn't
+ensure validity, but it does at least ensure that formatting from a
+blog post pulled in by the [[ikiwiki/directive/inline]] directive doesn't
+leak into the rest of the page.
diff --git a/doc/plugins/htmlbalance/discussion.mdwn b/doc/plugins/htmlbalance/discussion.mdwn
new file mode 100644
index 000000000..c66528a4f
--- /dev/null
+++ b/doc/plugins/htmlbalance/discussion.mdwn
@@ -0,0 +1,10 @@
+Would it be possible to use [[!cpan HTML::Entities]] rather than
+`XML::Atom::Util` for encoding entities? The former is already an ikiwiki
+dependency (via [[!cpan HTML::Parser]]).
+
+> Now switched to HTML::Entities --[[Joey]]
+
+I also wonder if there's any benefit to using this plugin aside from with
+aggregate. Perhaps a small one but aggregate seems like the main case..
+wondering if it would be better to just have aggregate balanace the html
+automatically and do away with the separate plugin. --[[Joey]]
diff --git a/doc/plugins/htmlscrubber.mdwn b/doc/plugins/htmlscrubber.mdwn
index 7db372e1b..c59b46e14 100644
--- a/doc/plugins/htmlscrubber.mdwn
+++ b/doc/plugins/htmlscrubber.mdwn
@@ -32,10 +32,10 @@ other HTML-related functionality, such as whether [[meta]] allows
potentially unsafe HTML tags.
The `htmlscrubber_skip` configuration setting can be used to skip scrubbing
-of some pages. Set it to a [[PageSpec]], such as "!*/Discussion", and pages
-matching that can have all the evil CSS, JavsScript, and unsafe html
-elements you like. One safe way to use this is to use [[lockedit]] to lock
-those pages, so only admins can edit them.
+of some pages. Set it to a [[ikiwiki/PageSpec]], such as "!*/Discussion",
+and pages matching that can have all the evil CSS, JavsScript, and unsafe
+html elements you like. One safe way to use this is to use [[lockedit]] to
+lock those pages, so only admins can edit them.
----
diff --git a/doc/plugins/htmltidy.mdwn b/doc/plugins/htmltidy.mdwn
index f675a01ae..580e56f59 100644
--- a/doc/plugins/htmltidy.mdwn
+++ b/doc/plugins/htmltidy.mdwn
@@ -7,4 +7,5 @@ emitted by ikiwiki. Besides being nicely formatted, this helps ensure that
even if users enter suboptimal html, your wiki generates valid html.
Note that since tidy is an external program, that is run each time a page
-is built, this plugin will slow ikiwiki down somewhat.
+is built, this plugin will slow ikiwiki down somewhat. [[plugins/htmlbalance]]
+might provide a faster alternative.
diff --git a/doc/plugins/img/discussion.mdwn b/doc/plugins/img/discussion.mdwn
index 02d46e380..e1bb2d15b 100644
--- a/doc/plugins/img/discussion.mdwn
+++ b/doc/plugins/img/discussion.mdwn
@@ -5,3 +5,8 @@ logo link to \[[hurd/logo]] / <http://www.bddebian.com/~wiki/hurd/logo/>
instead of linking to the PNG image file. --[[tschwinge]]
> Done, use link=somepage --[[Joey]]
+
+It would be handy if the `class` and `id` tags were passed through to the surrounding `table` in the case of `caption` being present. Would this break anything? --[[neale]]
+
+> Seems unlikely to break *too* much. I can imagine css that styles the img
+> unexpectedly applying the table. --[[Joey]]
diff --git a/doc/plugins/lockedit.mdwn b/doc/plugins/lockedit.mdwn
index 71bf232ab..c8f64ea47 100644
--- a/doc/plugins/lockedit.mdwn
+++ b/doc/plugins/lockedit.mdwn
@@ -4,7 +4,7 @@
This plugin allows the administrator of a wiki to lock some pages, limiting
who can edit them using the online interface. This doesn't prevent anyone
who can commit to the underlying revision control system from editing the
-pages, however.
+pages, however. (Unless you set up [[tips/untrusted_git_push]].)
The `locked_pages` setting configures what pages are locked. It is a
[[ikiwiki/PageSpec]], so you have lots of control over what kind of pages
@@ -17,6 +17,10 @@ One handy thing to do if you're using ikiwiki for your blog is to lock
posts in your blog, while still letting them comment via the Discussion
pages.
+Alternatively, if you're using the [[comments]] plugin, you can lock
+"!postcomment(*)" to allow users to comment on pages, but not edit anything
+else.
+
Wiki administrators can always edit locked pages. The [[ikiwiki/PageSpec]]
can specify that some pages are not locked for some users. For example,
"important_page and !user(joey)" locks `important_page` while still
diff --git a/doc/plugins/mdwn/discussion.mdwn b/doc/plugins/mdwn/discussion.mdwn
new file mode 100644
index 000000000..4b05e7f4e
--- /dev/null
+++ b/doc/plugins/mdwn/discussion.mdwn
@@ -0,0 +1,7 @@
+Unlike other format, ikiwiki is somehow depends
+on mdwn, since the underlay dir
+is written in mdwn. If you want to disable mdwn,
+you need to overwrite the underlay
+dir (set underlaydir in ikiwiki.setup
+to your own underlay dir or replace underlay pages
+in your $SRC).
diff --git a/doc/plugins/meta.mdwn b/doc/plugins/meta.mdwn
index afd554993..e49bdcc50 100644
--- a/doc/plugins/meta.mdwn
+++ b/doc/plugins/meta.mdwn
@@ -1,4 +1,4 @@
-[[!template id=plugin name=meta author="[[Joey]]"]]
+[[!template id=plugin name=meta core=1 author="[[Joey]]"]]
[[!tag type/meta]]
This plugin provides the [[ikiwiki/directive/meta]] [[ikiwiki/directive]],
diff --git a/doc/plugins/pagecount.mdwn b/doc/plugins/pagecount.mdwn
index 6235963d3..a56027e60 100644
--- a/doc/plugins/pagecount.mdwn
+++ b/doc/plugins/pagecount.mdwn
@@ -6,5 +6,5 @@ This plugin provides the [[ikiwiki/directive/pagecount]]
currently in the wiki.
If it is turned on it can tell us that this wiki includes
-[[!pagecount pages="* and !recentchanges"]]
-pages, of which [[!pagecount pages="*/Discussion"]] are discussion pages.
+[[!pagecount ]] pages, of which
+[[!pagecount pages="*/Discussion"]] are discussion pages.
diff --git a/doc/plugins/passwordauth/discussion.mdwn b/doc/plugins/passwordauth/discussion.mdwn
index f4e7ae7a1..672970c21 100644
--- a/doc/plugins/passwordauth/discussion.mdwn
+++ b/doc/plugins/passwordauth/discussion.mdwn
@@ -9,3 +9,71 @@ the *Preferences -- Subscriptions*. --[[tschwinge]]
>> Aha, then the problem is Firefox, which is automatically filling the
>> *Password* field with its previous value, but not filling the
>> *Confirm Password* one. --[[tschwinge]]
+
+## easy access to the userdb for apache auth?
+
+My use case is:
+
+* restricted ikiwiki
+* read/edit only allowed from the local network (done with apache restrictions)
+* edit only for people authenticated (done with vanilla ikiwiki passwordauth)
+
+I would like to allow people to read/edit the wiki from outside of the
+local network, if and only if they already have an ikiwiki account.
+
+[[httpauth]] doesn't fit since it doesn't allow anonymous local users
+to create their own account. I want a single, local, simple auth
+database.
+
+My (naïve?) idea would be:
+
+* keep the [[passwordauth]] system
+* provide a way for Apache to use the userdb for authentication if
+people want to connect from outside
+
+I looked at the various auth modules for apache2. It seems that none
+can use a "perl Storable data" file. So, I think some solutions could
+be:
+
+* use a sqlite database instead of a perl Storable file
+ * can be used with
+ [mod_auth_dbd](http://httpd.apache.org/docs/2.2/mod/mod_authn_dbd.html)
+ * requires a change in ikiwiki module [[passwordauth]]
+* use an external program to read the userdb and talk with
+ [mod_auth_external](http://unixpapa.com/mod_auth_external.html)
+ * requires the maintainance of this external auth proxy over ikiwiki
+ userdb format changes
+ * (I don't know perl)
+* include this wrapper in ikiwiki
+ * something like `ikiwiki --auth user:pass:userdb` check the
+ `user:pass` pair in `userdb` and returns an Accept/Reject flag to
+ Apache
+ * requires a change in ikiwiki core
+ * still requires
+ [mod_auth_external](http://unixpapa.com/mod_auth_external.html)
+* do it with Apache perl sections
+ * (I don't know perl)
+
+Any opinion/suggestion/solution to this is welcome and appreciated.
+
+--
+[[NicolasLimare]]
+
+For a similar use case, I've been intending to implement
+[[todo/httpauth_feature_parity_with_passwordauth]], but your idea may
+actually be the way to go. IMHO, the Perl sections idea is the
+easiest to setup, but on the long run, I'd prefer ikiwiki to optionnally
+use a userdb storage backend supported at least by Apache and lighttpd.
+--[[intrigeri]]
+
+Tons of CPAN modules may help, but most of them are specific to `mod_perl`,
+and AFAIK, ikiwiki is generally not run with `mod_perl`. It's not clear to me
+wether these modules depend on the webapp to be run with `mod_perl` set
+as the script handler, or only on `mod_perl` to be installed and loaded.
+
+* CPAN's `Apache::AuthenHook` allows to plug arbitrary Perl handlers as
+ Apache authentication providers.
+* CPAN's `Apache::Authen::Program` (`mod_perl`)
+* [http://www.openfusion.com.au/labs/mod_auth_tkt/](mod_auth_tkt) along with CPAN's
+ `Apache::AuthTkt`
+--[[intrigeri]]
diff --git a/doc/plugins/pingee.mdwn b/doc/plugins/pingee.mdwn
index d012004f9..6156c235f 100644
--- a/doc/plugins/pingee.mdwn
+++ b/doc/plugins/pingee.mdwn
@@ -3,7 +3,7 @@
This plugin causes ikiwiki to listen for pings, typically delivered from
another ikiwiki instance using the [[pinger]] plugin. When a ping is
-recieved, ikiwiki will update the wiki, the same as if `ikiwiki --refresh`
+received, ikiwiki will update the wiki, the same as if `ikiwiki --refresh`
were ran at the command line.
An url such as the following is used to trigger a ping:
diff --git a/doc/plugins/prettydate.mdwn b/doc/plugins/prettydate.mdwn
index 9a67f5dca..11ad4252f 100644
--- a/doc/plugins/prettydate.mdwn
+++ b/doc/plugins/prettydate.mdwn
@@ -1,5 +1,5 @@
[[!template id=plugin name=prettydate author="[[Joey]]"]]
-[[!tag type/format]]
+[[!tag type/date]]
Enabling this plugin changes the dates displayed on pages in the wiki to
a format that is nice and easy to read. Examples: "late Wednesday evening,
diff --git a/doc/plugins/relativedate.mdwn b/doc/plugins/relativedate.mdwn
new file mode 100644
index 000000000..3ada0864b
--- /dev/null
+++ b/doc/plugins/relativedate.mdwn
@@ -0,0 +1,16 @@
+[[!template id=plugin name=relativedate author="[[Joey]]"]]
+[[!tag type/date]]
+
+This plugin lets dates be displayed in relative form. Examples: "2 days ago",
+"1 month and 3 days ago", "30 minutes ago". Hovering over the date will
+cause a tooltip to pop up with the absolute date.
+
+This only works in browsers with javascript enabled; other browsers will
+show the absolute date instead. Also, this plugin can be used with other
+plugins like [[prettydate]] that change how the absolute date is displayed.
+
+If this plugin is enabled, you may also add relative dates to pages in the
+wiki, by using html elements in the "relativedate" class. For example, this
+will display as a relative date:
+
+ <span class="relativedate">Tue Jan 20 12:00:00 EDT 2009</span>
diff --git a/doc/plugins/repolist.mdwn b/doc/plugins/repolist.mdwn
new file mode 100644
index 000000000..9b3a7575e
--- /dev/null
+++ b/doc/plugins/repolist.mdwn
@@ -0,0 +1,17 @@
+[[!template id=plugin name=repolist author="[[Joey]]"]]
+[[!tag type/useful]]
+
+This plugin allows you to configure ikiwiki with the location of
+[[rcs]] repositories for your wiki's source. This is done via the
+"repositories" setting in the setup file. Once you tell it where the source
+to your wiki can be downloaded from, this information can be published on
+your wiki in various ways.
+
+This plugin supports the [rel-vcs-*](http://kitenet.net/~joey/rfc/rel-vcs/)
+microformat, and uses it to embed the repository location information in
+every wiki page.
+
+By using this plugin, you will make [[Joey]] very happy, as he will be able
+to easily check out the source of your wiki, for purposes of debugging and
+general curiosity. More generally, making it easy for others to find the
+repository for your wiki is just a Plain Good Idea(TM).
diff --git a/doc/plugins/rst.mdwn b/doc/plugins/rst.mdwn
index 9355597ac..5e97e2d80 100644
--- a/doc/plugins/rst.mdwn
+++ b/doc/plugins/rst.mdwn
@@ -11,7 +11,7 @@ ikiwiki. Limitations include:
* There are issues with inserting raw html into documents, as ikiwiki
does with [[WikiLinks|ikiwiki/WikiLink]] and many
- preprocessor [[directives|ikiwiki/directive]].
+ [[directives|ikiwiki/directive]].
So while you may find this useful for importing old files into your wiki,
using this as your main markup language in ikiwiki isn't recommended at
diff --git a/doc/plugins/shortcut/discussion.mdwn b/doc/plugins/shortcut/discussion.mdwn
index 8b1378917..4e11ce08c 100644
--- a/doc/plugins/shortcut/discussion.mdwn
+++ b/doc/plugins/shortcut/discussion.mdwn
@@ -1 +1,12 @@
+The plugin depends on [[mdwn]]. If you have
+disabled [[mdwn]], to get [[shortcut]] work, you need
+commit in a shortcuts.ext (ext is `rcs|creole|html|txt|etc`),
+and edit/patch [[shortcut]].
+
+Maybe use the `default_pageext` is better than hardcode .mdwn?
+
+--[[weakish]]
+
+> done, it will use `default_pageext` now --[[Joey]]
+
diff --git a/doc/plugins/tag.mdwn b/doc/plugins/tag.mdwn
index 17bb086a1..8ff70a069 100644
--- a/doc/plugins/tag.mdwn
+++ b/doc/plugins/tag.mdwn
@@ -5,6 +5,9 @@ This plugin provides the [[ikiwiki/directive/tag]] and
[[ikiwiki/directive/taglink]] [[directives|ikiwiki/directive]].
These directives allow tagging pages.
+It also provides the `tagged()` [[ikiwiki/PageSpec]], which can be used to
+match pages that are tagged with a specific tag.
+
[[!if test="enabled(tag)" then="""
This wiki has the tag plugin enabled, so you'll see a note below that this
page is tagged with the "tags" tag.
diff --git a/doc/plugins/tag/discussion.mdwn b/doc/plugins/tag/discussion.mdwn
index 7e7b88bc5..b6dab5358 100644
--- a/doc/plugins/tag/discussion.mdwn
+++ b/doc/plugins/tag/discussion.mdwn
@@ -22,3 +22,9 @@ AOLMODE=true echo "I too would really like this feature, which would make cgi fr
better" --[[DavidBremner]]
Please make the actual text used a template some way or another. I may want `map` instead of `inline`. --[[madduck]]
+
+
+See [[todo/auto-create tag pages according to a template]]
+
+-- Jeremy Schultz <jeremy.schultz@uleth.ca>
+
diff --git a/doc/plugins/textile/discussion.mdwn b/doc/plugins/textile/discussion.mdwn
deleted file mode 100644
index 945c9b46d..000000000
--- a/doc/plugins/textile/discussion.mdwn
+++ /dev/null
@@ -1 +0,0 @@
-. \ No newline at end of file
diff --git a/doc/plugins/type/date.mdwn b/doc/plugins/type/date.mdwn
new file mode 100644
index 000000000..eae1226da
--- /dev/null
+++ b/doc/plugins/type/date.mdwn
@@ -0,0 +1 @@
+These plugins control how ikiwiki displays dates.
diff --git a/doc/plugins/underlay.mdwn b/doc/plugins/underlay.mdwn
new file mode 100644
index 000000000..09d096a6e
--- /dev/null
+++ b/doc/plugins/underlay.mdwn
@@ -0,0 +1,14 @@
+[[!template id=plugin name=underlay author="[[Simon_McVittie|smcv]]"]]
+[[!tag type/useful]]
+
+This plugin adds an `add_underlays` option to the `.setup` file.
+Its value is a list of underlay directories whose content is added to the wiki.
+
+Multiple underlays are normally set up automatically by other plugins (for
+instance, the images used by the [[plugins/smiley]] plugin), but they can also be
+used as a way to pull in external files that you don't want in revision control,
+like photos or software releases.
+
+Directories in `add_underlays` should usually be absolute. If relative, they're
+interpreted as relative to the parent directory of the basewiki underlay, which
+is probably not particularly useful in this context.
diff --git a/doc/plugins/wmd.mdwn b/doc/plugins/wmd.mdwn
new file mode 100644
index 000000000..dc9a30703
--- /dev/null
+++ b/doc/plugins/wmd.mdwn
@@ -0,0 +1,16 @@
+[[!template id=plugin name=wmd author="[[Will]]"]]
+[[!tag type/chrome]]
+
+[WMD](http://wmd-editor.com/) is a What You See Is What You Mean editor for
+[[mdwn]]. This plugin makes WMD be used for editing pages in the wiki.
+
+To use the plugin, you will need to install WMD. Download the [WMD
+source](http://wmd-editor.com/downloads/wmd-1.0.1.zip). In that zip file
+you'll find a few example html files, a readme and `wmd` directory. Create
+a 'wmd' subdirectory in the ikiwiki `underlaydir` directory (ie `sudo mkdir
+/usr/share/ikiwiki/wmd`). Move the `wmd` directory into the directory you
+made. You should now have a `wmd/wmd/wmd.js` file as well as some other
+javascript files and an images directory in the same place.
+
+Note that the WMD plugin does **not** handle ikiwiki directives. For this
+reason the normal `preview` button remains.
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn
index 1b78f5900..696bc6bc3 100644
--- a/doc/plugins/write.mdwn
+++ b/doc/plugins/write.mdwn
@@ -19,7 +19,7 @@ that can be fleshed out to make a useful plugin.
`IkiWiki::Plugin::pagecount` is another simple example. All perl plugins
should `use IkiWiki` to import the ikiwiki plugin interface. It's a good
idea to include the version number of the plugin interface that your plugin
-expects: `use IkiWiki 2.00`.
+expects: `use IkiWiki 3.00`.
An external plugin is an executable program. It can be written in any
language. Its interface to ikiwiki is via XML RPC, which it reads from
@@ -55,8 +55,8 @@ plugin, and a "call" parameter, which tells what function to call for the
hook.
An optional "last" parameter, if set to a true value, makes the hook run
-after all other hooks of its type. Useful if the hook depends on some other
-hook being run first.
+after all other hooks of its type, and an optional "first" parameter makes
+it run first. Useful if the hook depends on some other hook being run first.
## Types of hooks
@@ -107,7 +107,7 @@ adding or removing files from it.
This hook is called early in the process of building the wiki, and is used
as a first pass scan of the page, to collect metadata about the page. It's
-mostly used to scan the page for WikiLinks, and add them to `%links`.
+mostly used to scan the page for [[WikiLinks|ikiwiki/WikiLink]], and add them to `%links`.
Present in IkiWiki 2.40 and later.
The function is passed named parameters "page" and "content". Its return
@@ -168,7 +168,7 @@ htmlize the page) along with the rest of the page.
hook(type => "linkify", id => "foo", call => \&linkify);
-This hook is called to convert [[WikiLinks|WikiLink]] on the page into html
+This hook is called to convert [[WikiLinks|ikiwiki/WikiLink]] on the page into html
links. The function is passed named parameters "page", "destpage", and
"content". It should return the linkified content. Present in IkiWiki 2.40
and later.
@@ -189,14 +189,18 @@ The function is passed named parameters: "page" and "content" and should
return the htmlized content.
If `hook` is passed an optional "keepextension" parameter, set to a true
-value, then this extension will not be stripped from the source filename when
+value, then the extension will not be stripped from the source filename when
generating the page.
+If `hook` is passed an optional "noextension" parameter, set to a true
+value, then the id parameter specifies not a filename extension, but
+a whole filename that can be htmlized. This is useful for files
+like `Makefile` that have no extension.
+
### pagetemplate
hook(type => "pagetemplate", id => "foo", call => \&pagetemplate);
-
[[Templates|wikitemplates]] 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
@@ -304,7 +308,7 @@ can check if the session object has a "name" parameter set.
### canedit
- hook(type => "canedit", id => "foo", call => \&pagelocked);
+ hook(type => "canedit", id => "foo", call => \&canedit);
This hook can be used to implement arbitrary access methods to control when
a page can be edited using the web interface (commits from revision control
@@ -322,6 +326,26 @@ This hook should avoid directly redirecting the user to a signin page,
since it's sometimes used to test to see which pages in a set of pages a
user can edit.
+### checkcontent
+
+ hook(type => "checkcontent", id => "foo", call => \&checkcontent);
+
+This hook is called to check the content a user has entered on a page,
+before it is saved, and decide if it should be allowed.
+
+It is passed named parameters: `content`, `page`, `cgi`, and `session`. If
+the content the user has entered is a comment, it may also be passed some
+additional parameters: `author`, `url`, and `subject`. The `subject`
+parameter may also be filled with the user's comment about the change.
+
+Note: When the user edits an existing wiki page, the passed `content` will
+include only the lines that they added to the page, or modified.
+
+The hook should return `undef` on success. If the content is disallowed, it
+should return a message stating what the problem is, or a function
+that can be run to perform whatever action is necessary to allow the user
+to post the content.
+
### editcontent
hook(type => "editcontent", id => "foo", call => \&editcontent);
@@ -415,7 +439,7 @@ describes the plugin as a whole. For example:
* `example` can be set to an example value.
* `description` is a short description of the option.
* `link` is a link to further information about the option. This can either
- be a wikilink, or an url.
+ be a [[ikiwiki/WikiLink]], or an url.
* `advanced` can be set to true if the option is more suitable for advanced
users.
* `safe` should be false if the option should not be displayed in unsafe
@@ -432,7 +456,7 @@ describes the plugin as a whole. For example:
To import the ikiwiki plugin interface:
- use IkiWiki '2.00';
+ use IkiWiki '3.00';
This will import several variables and functions into your plugin's
namespace. These variables and functions are the ones most plugins need,
@@ -487,7 +511,7 @@ use the following hashes, using a page name as the key:
destination file.
* `%pagesources` contains the name of the source file for each page.
-Also, the %IkiWiki::version variable contains the version number for the
+Also, the `%IkiWiki::version` variable contains the version number for the
ikiwiki program.
### Library functions
@@ -610,6 +634,16 @@ A failure to write the file will result in it dying with an error.
If the destination directory doesn't exist, it will first be created.
+The filename and directory are separate parameters because of
+some security checks done to avoid symlink attacks. Before writing a file,
+it checks to make sure there's not a symlink with its name, to avoid
+following the symlink. If the filename parameter includes a subdirectory
+to put the file in, it also checks if that subdirectory is a symlink, etc.
+The directory parameter, however, is not checked for symlinks. So,
+generally the directory parameter is a trusted toplevel directory like
+the srcdir or destdir, and any subdirectories of this are included in the
+filename parameter.
+
#### `will_render($$)`
Given a page name and a destination file name (not including the base
@@ -651,7 +685,7 @@ a wiki page name.
#### `linkpage($)`
This converts text that could have been entered by the user as a
-[[WikiLink]] into a wiki page name.
+[[ikiwiki/WikiLink]] into a wiki page name.
#### `srcfile($;$)`
@@ -697,11 +731,15 @@ This can be called when creating a new page, to determine what filename
to save the page to. It's passed a page name, and its type, and returns
the name of the file to create, relative to the srcdir.
-#### `targetpage($$)`
+#### `targetpage($$;$)`
Passed a page and an extension, returns the filename that page will be
rendered to.
+Optionally, a third parameter can be passed, to specify the preferred
+filename of the page. For example, `targetpage("foo", "rss", "feed")`
+will yield something like `foo/feed.rss`.
+
## Miscellaneous
### Internal use pages
@@ -712,7 +750,7 @@ are collected together to form the RecentChanges page, for example.
To make an internal use page, register a filename extension that starts
with "_". Internal use pages cannot be edited with the web interface,
-generally shouldn't contain wikilinks or preprocessor directives (use
+generally shouldn't contain [[WikiLinks|ikiwiki/WikiLink]] or preprocessor directives (use
either on them with extreme caution), and are not matched by regular
PageSpecs glob patterns, but instead only by a special `internal()`
[[ikiwiki/PageSpec]].
@@ -821,6 +859,30 @@ 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
+equivalent), and is testing if changes pushed into the RCS from an
+untrusted user should be accepted. This is optional, and doesn't make
+sense to implement for all RCSs.
+
+It should examine the incoming changes, and do any sanity
+checks that are appropriate for the RCS to limit changes to safe file adds,
+removes, and changes. If something bad is found, it should exit
+nonzero, to abort the push. Otherwise, it should return a list of
+files that were changed, in the form:
+
+ {
+ file => # name of file that was changed
+ action => # either "add", "change", or "remove"
+ path => # temp file containing the new file content, only
+ # needed for "add"/"change", and only if the file
+ # is an attachment, not a page
+ }
+
+The list will then be checked to make sure that each change is one that
+is allowed to be made via the web interface.
+
### PageSpec plugins
It's also possible to write plugins that add new functions to
@@ -847,3 +909,82 @@ to a hash containing all the config items. They should also implement a
By the way, to parse a ikiwiki setup file and populate `%config`, a
program just needs to do something like:
`use IkiWiki::Setup; IkiWiki::Setup::load($filename)`
+
+### Function overriding
+
+Sometimes using ikiwiki's pre-defined hooks is not enough. Your plugin
+may need to replace one of ikiwiki's own functions with a modified version,
+or wrap one of the functions.
+
+For example, your plugin might want to override `displaytime`, to change
+the html markup used when displaying a date. Or it might want to override
+`IkiWiki::formattime`, to change how a date is formatted. Or perhaps you
+want to override `bestlink` and change how ikiwiki deals with [[WikiLinks|ikiwiki/WikiLink]].
+
+By venturing into this territory, your plugin is becoming tightly tied to
+ikiwiki's internals. And it might break if those internals change. But
+don't let that stop you, if you're brave.
+
+Ikiwiki provides an `inject()` function, that is a powerful way to replace
+any function with one of your own. This even allows you to inject a
+replacement for an exported function, like `bestlink`. Everything that
+imports that function will get your version instead. Pass it the name of
+the function to replace, and a new function to call.
+
+For example, here's how to replace `displaytime` with a version using HTML 5
+markup:
+
+ inject(name => 'IkiWiki::displaytime', call => sub {
+ return "<time>".formattime(@_)."</time>";
+ });
+
+Here's how to wrap `bestlink` with a version that tries to handle
+plural words:
+
+ my $origbestlink=\&bestlink;
+ inject(name => 'IkiWiki::bestlink', call => \&mybestlink);
+
+ sub deplural ($) {
+ my $word=shift;
+ $word =~ s/e?s$//; # just an example :-)
+ return $word;
+ }
+
+ sub mybestlink ($$) {
+ my $page=shift;
+ my $link=shift;
+ my $ret=$origbestlink->($page, $link);
+ if (! length $ret) {
+ $ret=$origbestlink->($page, deplural($link));
+ }
+ return $ret;
+ }
+
+### Javascript
+
+Some plugins use javascript to make ikiwiki look a bit more web-2.0-ish.
+
+All javascript code should be put in `.js` files in the `javascript`
+underlay, and plugins using those files can enable use of the underlay by
+calling `add_underlay("javascript");` in their `import` function.
+
+You'll have to arrange for `<script>` tags to be added to the pages that
+use your javascript. This can be done using a `format` hook.
+
+Ikiwiki provides some utility functions in `ikiwiki.js`, for use by other
+javascript code. These include:
+
+#### `getElementsByClass(cls, node, tag)`
+
+Returns an array of elements with the given class. The node and tag are
+optional and define what document node and element names to search.
+
+#### `hook(name, call)`
+
+The function `call` will be run as part of the hook named `name`.
+
+Note that to hook into `window.onload`, you can use the `onload' hook.
+
+#### `run_hooks(name)`
+
+Runs the hooks with the specified name.
diff --git a/doc/plugins/write/discussion.mdwn b/doc/plugins/write/discussion.mdwn
index 039775b79..24a556ffe 100644
--- a/doc/plugins/write/discussion.mdwn
+++ b/doc/plugins/write/discussion.mdwn
@@ -40,3 +40,7 @@ distributed wiki.
>
> OTOH, if something can be added to the documentation that encourages
> good behavior, that'd be a good thing ... --[[Joey]]
+
+---
+
+I would find this page clearer split up into sub-pages. Does anyone agree/disagree? -- [[users/Jon]]
diff --git a/doc/plugins/write/external.mdwn b/doc/plugins/write/external.mdwn
index 272f74a7c..e30bf2ff3 100644
--- a/doc/plugins/write/external.mdwn
+++ b/doc/plugins/write/external.mdwn
@@ -96,14 +96,13 @@ the sentinal.
## Function injection
-Some parts of ikiwiki are extensible by adding functions. For example, the
-RCS interface relies on plugins providing several IkiWiki::rcs_* functions.
+Some parts of ikiwiki are extensible by adding or overriding functions.
It's actually possible to do this from an external plugin too.
-To make your external plugin provide an `IkiWiki::rcs_update` function, for
+To make your external plugin override the `IkiWiki::formattime` function, for
example, make an RPC call to `inject`. Pass it named parameters "name" and
"call", where "name" is the name of the function to inject into perl (here
-"Ikiwiki::rcs_update" and "call" is the RPC call ikiwiki will make whenever
+"Ikiwiki::formattime" and "call" is the RPC call ikiwiki will make whenever
that function is run.
If the RPC call is memoizable, you can also pass a "memoize" parameter, set
diff --git a/doc/plugins/write/tutorial.mdwn b/doc/plugins/write/tutorial.mdwn
index e1b34b800..5345f71f2 100644
--- a/doc/plugins/write/tutorial.mdwn
+++ b/doc/plugins/write/tutorial.mdwn
@@ -27,7 +27,7 @@ important one is the IkiWiki module.
use warnings;
use strict;
- use IkiWiki 2.00;
+ use IkiWiki 3.00;
Ok, boilerplate is out of the way. Now to add the one function that ikiwiki
expects to find in any module: `import`. The import function is called when
diff --git a/doc/rcs/details.mdwn b/doc/rcs/details.mdwn
index e62f3ef49..089221cab 100644
--- a/doc/rcs/details.mdwn
+++ b/doc/rcs/details.mdwn
@@ -280,6 +280,9 @@ Here is a how a commit from a remote repository works:
* git-commit in the remote repository
* git-push, pushes the commit to the master repo on the server
+* (Optionally, the master repo's pre-receive hook runs, and checks that the
+ update only modifies files that the pushing user is allowed to update.
+ If not, it aborts the receive.)
* the master repo's post-update hook notices this update, and runs ikiwiki
* ikiwiki notices the modifies page source, and compiles it
diff --git a/doc/rcs/git.mdwn b/doc/rcs/git.mdwn
index b210af825..000eb0b3c 100644
--- a/doc/rcs/git.mdwn
+++ b/doc/rcs/git.mdwn
@@ -20,9 +20,9 @@ working clones (with working directories) as leaf nodes. The root
working clones.
One of the leaf node clone repositories is special; it has working
-directory which is used to compile the wiki from, and is also used by the
+directory which is used to compile the wiki, and is also used by the
[[cgi]] to commit changes made via the web interface. It is special
-since the `post-commit` hook for the bare root repository is used to
+since the `post-update` hook for the bare root repository is used to
trigger an update of this repository, and then an ikiwiki refresh
updates the published wiki itself.
@@ -43,9 +43,9 @@ repositories:
repositories will push to/pull from. It is a bare repository, since
there are problems pushing to a repository that has a working
directory. This is called _repository_ in [[ikiwiki-makerepo]]'s
- manual page. Nominally, this bare repository has a `post-commit` hook
+ manual page. Nominally, this bare repository has a `post-update` hook
that either is or calls ikiwiki's git wrapper, which changes to the
- working directory for ikiwiki, does a _git pull_, and refreshes ikiwiki
+ working directory for ikiwiki, does a `git pull`, and refreshes ikiwiki
to regenerate the wiki with any new content. The [[setup]] page describes
how to do this.
@@ -64,7 +64,7 @@ repositories:
hack on your wiki. you can commit local changes to the version on
the laptop, perhaps while offline. Any new content should be pushed to the
bare master repository when you are ready to publish it, and then
- the post-commit hook of the bare repository will ensure that the
+ the post-update hook of the bare repository will ensure that the
ikiwiki's source directory is updated, and the ikiwiki refreshed
with the new content.
@@ -79,7 +79,7 @@ It is **paramount** that you **never** push to the non-bare repository
Instead, clone the bare repository as mentioned above, and push
**only** to the bare repository.
-The ikiwiki `post-commit` hook should be put in the bare repository.
+The ikiwiki `post-update` hook should be put in the bare repository.
## git repository with multiple committers
@@ -100,6 +100,33 @@ repository, should only be writable by the wiki's admin, and *not* by the
group. Take care that ikiwiki uses a umask that does not cause files in
the srcdir to become group writable. (umask 022 will work.)
+## git repository with untrusted committers
+
+By default, anyone who can commit to the git repository can modify any file
+on the wiki however they like. A `pre-receive` hook can be set up to limit
+incoming commits from untrusted users. Then the same limits that are placed
+on edits via the web will be in effect for commits to git for the users.
+They will not be allowed to edit locked pages, they will only be able to
+delete pages that the [[plugins/remove]] configuration allows them to
+remove, and they will only be allowed to add non-page attachments that the
+[[plugins/attachment]] configuration allows.
+
+To enable this, you need to set up the git repository to have multiple
+committers. Trusted committers, including the user that ikiwiki runs as,
+will not have their commits checked by the `pre-receive` hook. Untrusted
+committers will have their commits checked. The configuration settings to
+enable are `git_test_receive_wrapper`, which enables generation of a
+`pre-receive` hook, and `untrusted_committers`, which is a list of
+usernames of the untrusted committers.
+
+Note that when the `pre-receive` hook is checking incoming changes, it
+ignores the git authorship information, and uses the username of the unix
+user who made the commit. Then tests including the `locked_pages` [[PageSpec]]
+are checked to see if that user can edit the pages in the commit.
+
+You can even set up an [[anonymous_user|tips/untrusted_git_push]], to allow
+anyone to push changes in via git rather than using the web interface.
+
## Optionally using a local wiki to preview changes
When working on the "working clones" to add content to your wiki,
@@ -120,7 +147,7 @@ is the normal behaviour of ikiwiki, set the configuration of the local wiki:
gitorigin_branch => "",
## git post-commit wrapper
- wrapper => "/working/dir/.git/hooks/post-commit",
+ git_wrapper => "/working/dir/.git/hooks/post-commit",
Then just committing should refresh the private ikiwiki on the local
host. Now just run `ikiwiki -setup localwiki.setup -getctime` and
diff --git a/doc/rcs/mercurial.mdwn b/doc/rcs/mercurial.mdwn
index b4baf07f4..ebfc35202 100644
--- a/doc/rcs/mercurial.mdwn
+++ b/doc/rcs/mercurial.mdwn
@@ -10,9 +10,9 @@ commits edited pages, and uses the Mercurial history to generate the
Example for a `.hg/hgrc` file in `$SRCDIR`:
[hooks]
- post-commit = /home/abe/bin/rebuildwiki
- incoming = /home/abe/bin/rebuildwiki
+ post-commit = ikiwiki --setup /path/to/ikiwiki.setup --post-commit
+ incoming = ikiwiki --setup /path/to/ikiwiki.setup --post-commit
-Do not use `commit` or `precommit` hooks or ikiwiki will run into a dead lock when committing in `$SRCDIR`
+Do not use `commit` or `precommit` hooks or ikiwiki will run into a dead lock when committing in `$SRCDIR`. Also note that `--post-commit` and not `--refresh` must be used to avoid dead locking when editing the pages via CGI interface.
See also [[todo/mercurial|todo/mercurial]]
diff --git a/doc/rcs/monotone.mdwn b/doc/rcs/monotone.mdwn
index babd5cf01..2cfcdfbf5 100644
--- a/doc/rcs/monotone.mdwn
+++ b/doc/rcs/monotone.mdwn
@@ -17,3 +17,8 @@ There is also a mismatch between the way Ikiwiki handles conflicts and the
way Monotone handles conflicts. At present, if there is a conflict, then
Ikiwiki will commit a revision with conflict markers before presenting it
to the user. This is ugly, but there is no clean way to fix it at present.
+
+Also note that not all recent ikiwiki features have been implemented in the
+monotone plugin. At the moment we're missing:
+
+ * [[todo/Untrusted_push_in_Monotone]]
diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn
index 488e2dec8..2f79f7978 100644
--- a/doc/roadmap.mdwn
+++ b/doc/roadmap.mdwn
@@ -7,10 +7,7 @@ This is the roadmap for ikiwiki development.
Released 29 April 2006.
-The 1.x series changed a great deal over the more than 50 releases in its
-lifetime. It is now in maintenance mode, only security issues or really bad
-bugs will be fixed in 1.x going forward. 1.x will stop being supported with
-the release of 3.0.
+The 1.x series is no longer supported.
----
@@ -32,27 +29,43 @@ the release of 3.0.
Released 30 April 2007.
-The 2.x series is expected to undergo continuing development for some time,
-adding improvements and new features, but avoiding changes that break
-backwards compatability.
+The 2.x series is now in maintenance mode. Only security fixes and fixes for
+really bad bugs will be applied going forward.
----
# 3.0
-Version 3.0 will be an opportunity to make significant transitions.
-
-* Default to using `prefix_directives`.
-* Default to using `aggregateinternal`.
-* Remove deprecated prefs form settings for `allowed_attachments` and
- `locked_pages`.
-* Finalise a new version of the plugin API, exporting additional commonly
- used functions from IkiWiki.pm. See [[todo/firm_up_plugin_interface]]
-
-It will include a vast number of new features, bugfixes, and other
-improvements, far too many to list here.
-
-Release is planned for fall, 2008.
+Version 3.0 is an opportunity to make significant transitions.
+Read [[tips/upgrade_to_3.0]] for the steps you will need to
+follow when upgrading your wiki to this version.
+
+The highlights of the changes in version 3.0 include:
+
+* Support for uploading [[attachments|plugins/attachment]].
+* Can [[plugins/rename]] and [[plugins/remove]] pages and files via the web.
+* [[Web_based_setup|plugins/websetup]].
+* Blog-style [[plugins/comments]] as an alternative to Discussion pages.
+* Many other new plugins including [[plugins/htmlbalance]], [[plugins/format]],
+ [[plugins/progress]], [[plugins/color]], [[plugins/autoindex]],
+ [[plugins/cutpaste]], [[plugins/hnb]], [[plugins/creole]], [[plugins/txt]],
+ [[plugins/amazon_s3]], [[plugins/pinger]], [[plugins/pingee]],
+ [[plugins/edittemplate]]
+* The RecentChanges page is compiled statically, not generated from the CGI.
+* Support for additional revision control systems: [[rcs/bzr]],
+ [[rcs/monotone]]
+* Support for [[tips/untrusted_git_push]].
+* A new version (3.00) of the plugin API, exporting additional
+ commonly used functions from `IkiWiki.pm`.
+* Nearly everything in ikiwiki is now a plugin, from WikiLinks to page
+ editing, to RecentChanges.
+* Far too many bug fixes, features, and enhancements to list here.
+
+Released 31 December, 2008.
+
+The 3.x series is expected to undergo continuing development for some time,
+adding improvements and new features, but avoiding changes that break
+backwards compatability.
----
diff --git a/doc/robots.txt b/doc/robots.txt
new file mode 100644
index 000000000..7be87f9bd
--- /dev/null
+++ b/doc/robots.txt
@@ -0,0 +1,2 @@
+User-Agent: *
+Disallow: /ikiwiki.cgi
diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn
index 9e709172a..1e5fba304 100644
--- a/doc/sandbox.mdwn
+++ b/doc/sandbox.mdwn
@@ -1,8 +1,12 @@
-This is the SandBox, a page anyone can edit to try out ikiwiki.
+This is the [[SandBox]], a page anyone can edit to try out ikiwiki (version [[!version ]]).
----
+misc test
-Here's a paragraph. สวัสดี
+test more test
+[[中文显示]]
+
+Here's a paragraph.
The following code block is pre-formatted:
@@ -51,10 +55,6 @@ Bulleted list
* four
* five
-* a new list
- * with sub heads
- * like this
-
----
[[!template id=note text="this is generated by the [[plugins/haiku]] plugin"]]
@@ -74,12 +74,26 @@ The haiku will change after every save, mind you.
* [![ikiwiki logo](http://ikiwiki.info/logo/ikiwiki.png)](http://ikiwiki.info)
* <a href="http://www.google.com/">plain old html link</a>
* [[foo]]
-* WikiLink
-
-Test
-----
This SandBox is also a [[blog]]!
[[!inline pages="sandbox/* and !*/Discussion" rootpage="sandbox" show="4" archive="yes"]]
+
+--------
+
+This gives an example of inline code: `tar | netcat` is a nice way to transfer bulk files over the net
+
+But, of course, rsync is better.
+
+----
+
+Let's see what happens... ~~
+
+測試的啦
+
+----
+
+
+testing
diff --git a/doc/sandbox/Omgwtf_a_blof_post__33____33____33____33____33__1__33__1__33__11111__33____33____33__1__33__1__33____33__1five.html b/doc/sandbox/Omgwtf_a_blof_post__33____33____33____33____33__1__33__1__33__11111__33____33____33__1__33__1__33____33__1five.html
new file mode 100644
index 000000000..fc1757d6e
--- /dev/null
+++ b/doc/sandbox/Omgwtf_a_blof_post__33____33____33____33____33__1__33__1__33__11111__33____33____33__1__33__1__33____33__1five.html
@@ -0,0 +1,31 @@
+<math xmlns="http://www.w3.org/1998/Math/MathML">
+ <mrow>
+ <msup>
+ <mfenced open="(" close=")">
+ <mrow>
+ <mi>a</mi>
+ <mo>+</mo>
+
+ <mi>b</mi>
+ </mrow>
+ </mfenced>
+ <mn>2</mn>
+ </msup>
+ <mo>-</mo>
+ <msub>
+
+ <mfenced open="{" close="}">
+ <mrow>
+ <mi>x</mi>
+ <mo>+</mo>
+ <mi>y</mi>
+ </mrow>
+ </mfenced>
+
+ <mi>i</mi>
+ </msub>
+ </mrow>
+</math>
+<br>
+test <b>test</b><abbr title="test">T.</abbr> <h1>test</h1>
+<a href="https://bugzilla.mozilla.org">øđ</a>
diff --git a/doc/sandbox/castle/discussion/jon_tests_too.mdwn b/doc/sandbox/castle/discussion/jon_tests_too.mdwn
index 864f38c0d..bc051b008 100644
--- a/doc/sandbox/castle/discussion/jon_tests_too.mdwn
+++ b/doc/sandbox/castle/discussion/jon_tests_too.mdwn
@@ -1,3 +1,3 @@
-I recall testing this too, but I'm not sure where the test went. Let's try again. -- [[JonDowland]]
+I recall testing this too, but I'm not sure where the test went. Let's try again. -- [[users/Jon]]
Context: [[todo/discussion_page_as_blog/discussion/castle]]
diff --git a/doc/sandbox/foobak.mdwn b/doc/sandbox/foobak.mdwn
new file mode 100644
index 000000000..c0b526f73
--- /dev/null
+++ b/doc/sandbox/foobak.mdwn
@@ -0,0 +1 @@
+Foobaka bakfoo.
diff --git a/doc/sandbox/한글.mdwn b/doc/sandbox/한글.mdwn
new file mode 100644
index 000000000..e0ba32639
--- /dev/null
+++ b/doc/sandbox/한글.mdwn
@@ -0,0 +1 @@
+~를 어떻게 할까~
diff --git a/doc/sandbox/한글페이지.mdwn b/doc/sandbox/한글페이지.mdwn
new file mode 100644
index 000000000..4fac7976c
--- /dev/null
+++ b/doc/sandbox/한글페이지.mdwn
@@ -0,0 +1,2 @@
+
+Wow test
diff --git a/doc/security.mdwn b/doc/security.mdwn
index 0841abf49..939d65d01 100644
--- a/doc/security.mdwn
+++ b/doc/security.mdwn
@@ -407,3 +407,13 @@ discovered on 30 May 2008 and fixed the same day. ([[!cve CVE-2008-0169]])
I recommend upgrading to 2.48 immediatly if your wiki allows both password
and openid logins.
+
+## Malformed UTF-8 DOS
+
+Feeding ikiwiki page sources containing certian forms of malformed UTF-8
+can cause it to crash. This can potentially be used for a denial of service
+attack.
+
+intrigeri discovered this problem on 12 Nov 2008 and a patch put in place
+later that day, in version 2.70. The fix was backported to testing as version
+2.53.3, and to stable as version 1.33.7.
diff --git a/doc/setup.mdwn b/doc/setup.mdwn
index 1b8e4b12a..89444c9a8 100644
--- a/doc/setup.mdwn
+++ b/doc/setup.mdwn
@@ -2,205 +2,132 @@ This tutorial will walk you through setting up a wiki with ikiwiki.
[[!toc ]]
-## [[Download]] and [[install]] ikiwiki.
+## Install ikiwiki
If you're using Debian or Ubuntu, ikiwiki is an `apt-get install ikiwiki` away.
If you're not, see the [[download]] and [[install]] pages.
-## Quick start
+## Create your wiki
-If you'd like to set up a wiki now, and learn more later, and you have
-ikiwiki 2.60 or better installed, just run this command and answer a couple
-of questions.
+All it takes to create a fully functional wiki using ikiwiki is running
+one command.
+[[!template id=note text="""
+For more control, advanced users may prefer to set up a wiki
+[[by_hand|byhand]].
+"""]]
% ikiwiki -setup /etc/ikiwiki/auto.setup
- What will the wiki be named? mywiki
- What revision control system to use? git
- What wiki user (or openid) will be wiki admin? joey
-Wait for it to tell you an url for your new wiki.. Done!
+Or, set up a blog with ikiwiki, run this command instead.
-(If the CGI doesn't seem to let you edit pages, you might need to
-[[configure_apache|tips/apache_cgi]] or [[configure_lighttpd|tips/lighttpd_cgi]].)
+ % ikiwiki -setup /etc/ikiwiki/auto-blog.setup
-## Decide where your wiki's files will go.
-
-As a wiki compiler, ikiwiki builds a wiki from files in a source directory,
-and outputs the files to a destination directory. If you keep your wiki in
-a version control system, the source directory will contain a working copy
-checked out from the version control system.
+Either way, it will ask you a couple of questions.
-For the purposes of this tutorial, we'll set shell variables
-for these locations, and use those variables in the commands that follow.
+ What will the wiki be named? foo
+ What revision control system to use? git
+ What wiki user (or openid) will be admin? joey
+ Choose a password:
- SRCDIR=~/wikiwc
- DESTDIR=~/public_html/wiki/
+Then, wait for it to tell you an url for your new site..
-Note that ikiwiki owns the working copy directory; do not perform your own
-edits in ikiwiki's working copy.
+ Successfully set up foo:
+ url: http://example.com/~joey/foo
+ srcdir: ~/foo
+ destdir: ~/public_html/foo
+ repository: ~/foo.git
+ To modify settings, edit ~/foo.setup and then run:
+ ikiwiki -setup ~/foo.setup
-## Create the beginnings of your wiki.
+Done!
-This will create a simple main page for the wiki.
+## Using the web interface
- mkdir $SRCDIR
- cd $SRCDIR
- $EDITOR index.mdwn
+Now you can go to the url it told you, and edit pages in your new wiki
+using the web interface.
-In the editor, you could start by entering a simple page like
-[[!toggle id=page text="this one"]].
-[[!toggleable id=page text="""
- Welcome to your new wiki.
+(If the web interface doesn't seem to allow editing or login, you may
+need to configure [[configure_the_web_server|tips/dot_cgi]].)
- All wikis are supposed to have a \[[SandBox]],
- so this one does too.
+## Checkout and edit wiki source
- ----
+Part of the fun of using ikiwiki is not being limited to using the
+web for editing pages, and instead using your favorite text editor and
+[[Revision_Control_System|rcs]].
- This wiki is powered by [ikiwiki](http://ikiwiki.info).
-"""]]
-
-See [[ikiwiki/formatting]] for details about the markup language.
+To do this, you need to check out a copy of the source to your wiki.
+(You should avoid making changes directly to the `srcdir`, as that
+checkout is reserved for use by ikiwiki itself.)
-Note that several [[standard_wiki_pages|basewiki]] will be added to your
-wiki, from files in `/usr/share/ikiwiki/basewiki/`, so your wiki will
-automatically get a [[SandBox]], and some other useful pages.
+Depending on which [[Revision_Control_System|rcs]] you chose to use,
+you can run one of these commands to check out your own copy of your wiki's
+source. (Remember to replace "foo" with the real directory name.)
-## Build your wiki for the first time.
+ git clone foo.git foo.src
+ svn checkout file://`pwd`/foo.svn/trunk foo.src
+ bzr clone foo foo.src
+ hg clone foo foo.src
+ # TODO monotone, tla
- ikiwiki --verbose $SRCDIR $DESTDIR --url=http://example.org/~you/wiki/
+Now to edit pages by hand, go into the directory you checked out (ie,
+"foo.src"), and fire up your text editor to edit `index.mdwn` or whatever
+other page you want to edit. If you chose to set up a blog, there is even a
+sample first post in `posts/first_post.mdwn` that you can edit.
-Replace the url with the real url to your wiki. You should now
-be able to visit the url and see your wiki.
+Once you've edited a page, use your revision control system to commit
+the changes. For distributed revision control systems, don't forget to push
+your commit.
-## Add content to your wiki.
+Once the commit reaches the repository, ikiwiki will notice it, and
+automatically update the wiki with your changes.
-Continue editing or adding pages and rebuilding the wiki.
-
-To quickly get started on a common task like blogging with ikiwiki, you
-can copy in files from the [[examples]]. The examples are located in
-`doc/examples/` in the ikiwiki source package.
+## Customizing the wiki
-You can experiment with other ikiwiki parameters such as `--wikiname`
-and `--rebuild` too. Get comfortable with its command line (see
-[[usage]]).
+There are lots of things you can configure to customize your wiki.
+These range from changing the wiki's name, to enabling [[plugins]],
+to banning users and locking pages.
-## Add a setup file.
+If you log in as the admin user you configured earlier, and go to
+your Preferences page, you can click on "Wiki Setup" to customize many
+wiki settings and plugins.
-By now you should be getting tired of typing in all the command line
-options each time you change something in your wiki's setup. Time to
-introduce setup files.
+Some settings cannot be configured on the web, for security reasons or
+because misconfiguring them could break the wiki. To change these settings,
+you can manually edit the setup file, which is named something like
+"foo.setup". The file lists all available configuration settings
+and gives a brief description of each.
-To generate a setup file, use `ikiwiki --dumpsetup`. You can pass
-all the options have you been including at the command line, and they
-will be stored in the setup file.
+After making changes to this file, you need to tell ikiwiki to use it:
- ikiwiki $SRCDIR $DESTDIR --url=http://example.org/~you/wiki/ --dumpsetup ikiwiki.setup
+ % ikiwiki -setup foo.setup
-Note that this file should *not* be put in your wiki's directory with
-the rest of the files. A good place to put it is in a ~/.ikiwiki/
-subdirectory.
-
-Most of the options, like `wikiname` in the setup file are the same as
-ikiwiki's command line options (documented in [[usage]]. `srcdir` and
-`destdir` are the two directories you specify when running ikiwiki by
-hand. Make sure that these are pointing to the right directories, and
-read through and configure the rest of the file to your liking.
+## Customizing file locations
-When you're satisfied, run `ikiwiki --setup ikiwiki.setup`, and it
-will set everything up.
+As a wiki compiler, ikiwiki builds a wiki from files in a source directory,
+and outputs the files to a destination directory. The source directory is
+a working copy checked out from the version control system repository.
-## Turn on additional features.
+When you used `auto.setup`, ikiwiki put the source directory, destination
+directory, and repository in your home directory, and told you the location
+of each. Those locations were chosen to work without customization, but you
+might want to move them to different directories.
-Now you have a basic wiki with a setup file. Time to experiment
-with ikiwiki's many features.
+First, move the destination directory and repository around.
-Let's first enable a key wiki feature and set up [[CGI]] to allow
-editing the wiki from the web. Just edit ikiwiki.setup, uncomment the
-settings for the `cgi_wrapper`, make sure the filename for the cgi wrapper
-is ok, run `ikiwiki --setup ikiwiki.setup`, and you're done!
-
-There are lots of other configuration options in ikiwiki.setup that you
-can uncomment, configure, and enable by re-running
-`ikiwiki --setup ikiwiki.setup`. Be sure to browse through all the
-[[plugins]]..
-
-## Put your wiki in revision control.
-
-At this point you might want to check your wiki in to a revision control
-system so you can keep track of changes and revert edits. Depending
-on the revision control system you choose, the way this is done varies.
-
-Note that the .ikiwiki subdirectory is where ikiwiki keeps its state, and
-should be preserved, but not checked into revision control.
+ % mv public_html/foo /srv/web/foo.com
+ % mv foo.git /srv/git/foo.git
-The [[ikiwiki-makerepo]] command automates setting up a wiki in
-revision control.
-
-[[!toggle id=subversion text="Subversion"]]
-[[!toggleable id=subversion text="""
- REPOSITORY=~/wikirepo
- ikiwiki-makerepo svn $SRCDIR $REPOSITORY
-"""]]
-
-[[!toggle id=git text="Git"]]
-[[!toggleable id=git text="""
- REPOSITORY=~/wiki.git
- ikiwiki-makerepo git $SRCDIR $REPOSITORY
-
-Please see [[rcs/git]] for detailed documentation about how
-ikiwiki uses git repositories, and some important caveats
-about using the git repositories.
-"""]]
-
-[[!toggle id=mercurial text="Mercurial"]]
-[[!toggleable id=mercurial text="""
- REPOSITORY=$SRCDIR
- ikiwiki-makerepo mercurial $SRCDIR
-"""]]
-
-[[!toggle id=bazaar text="Bazaar"]]
-[[!toggleable id=bazaar text="""
- REPOSITORY=$SRCDIR
- ikiwiki-makerepo bzr $SRCDIR
-"""]]
-
-[[!toggle id=tla text="TLA"]]
-[[!toggleable id=tla text="""
- REPOSITORY=~/wikirepo
- tla make-archive me@localhost--wiki $REPOSITORY
- tla my-id "<me@localhost>"
- cd $SRCDIR
- tla archive-setup me@localhost--wiki/wiki--0
- tla init-tree me@localhost--wiki/wiki--0
- # Edit {arch}/=tagging-method and change the precious
- # line to add the .ikiwiki directory to the regexp.
- tla add *
- tla import
-"""]]
-
-[[!toggle id=monotone text="Monotone"]]
-[[!toggleable id=monotone text="""
- # This assumes that you have already used "mtn genkey you@hostname".
- REPOSITORY=~/wiki.monotone
- ikiwiki-makerepo monotone $SRCDIR $REPOSITORY
-"""]]
+If you moved the repository to a new location, checkouts pointing at the
+old location won't work, and the easiest way to deal with this is to delete
+them and re-checkout from the new repository location.
+
+ % rm -rf foo
+ % git clone /src/git/foo.git
-## Configure ikiwiki to use revision control.
-
-Once your wiki is checked in to the revision control system, you should
-configure ikiwiki to use revision control. Edit your ikiwiki.setup, set
-`rcs` to the the revision control system you chose to use. Be sure to set
-`svnrepo` to the directory for your repository, if using subversion.
-Uncomment the configuration for the wrapper for your revision control
-system, and configure the wrapper path appropriately (for Git, it should be
-the path to `hooks/post-update` inside the bare git repository).
-
-Once it's all set up, run `ikiwiki --setup ikiwiki.setup` once more.
-Now you should be able to edit files in $SRCDIR, and use your revision
-control system to commit them, and the wiki will automatically update.
-And in the web interface, RecentChanges should work, and files changed
-by web users will also be committed using revision control.
+Finally, edit the setup file. Modify the settings for `srcdir`, `destdir`,
+`url`, `cgiurl`, `cgi_wrapper`, `git_wrapper`, etc to reflect where
+you moved things. Remember to run `ikiwiki -setup` after editing the
+setup file.
## Enjoy your new wiki!
diff --git a/doc/setup/byhand.mdwn b/doc/setup/byhand.mdwn
new file mode 100644
index 000000000..0184d3d2a
--- /dev/null
+++ b/doc/setup/byhand.mdwn
@@ -0,0 +1,190 @@
+This tutorial will walk you through setting up a wiki with ikiwiki,
+doing everything by hand. [[Setup]] has an easier method, but with less
+control.
+
+[[!toc ]]
+
+## Decide where your wiki's files will go.
+
+As a wiki compiler, ikiwiki builds a wiki from files in a source directory,
+and outputs the files to a destination directory. If you keep your wiki in
+a version control system, the source directory will contain a working copy
+checked out from the version control system.
+
+For the purposes of this tutorial, we'll set shell variables
+for these locations, and use those variables in the commands that follow.
+
+ SRCDIR=~/wikiwc
+ DESTDIR=~/public_html/wiki/
+
+Note that ikiwiki owns the working copy directory; do not perform your own
+edits in ikiwiki's working copy.
+
+## Create the beginnings of your wiki.
+
+This will create a simple main page for the wiki.
+
+ mkdir $SRCDIR
+ cd $SRCDIR
+ $EDITOR index.mdwn
+
+In the editor, you could start by entering a simple page like
+[[!toggle id=page text="this one"]].
+[[!toggleable id=page text="""
+ Welcome to your new wiki.
+
+ All wikis are supposed to have a \[[SandBox]],
+ so this one does too.
+
+ ----
+
+ This wiki is powered by [ikiwiki](http://ikiwiki.info).
+"""]]
+
+See [[ikiwiki/formatting]] for details about the markup language.
+
+Note that several [[standard_wiki_pages|basewiki]] will be added to your
+wiki, from files in `/usr/share/ikiwiki/basewiki/`, so your wiki will
+automatically get a [[SandBox]], and some other useful pages.
+
+## Build your wiki for the first time.
+
+ ikiwiki --verbose $SRCDIR $DESTDIR --url=http://example.org/~you/wiki/
+
+Replace the url with the real url to your wiki. You should now
+be able to visit the url and see your wiki.
+
+## Add content to your wiki.
+
+Continue editing or adding pages and rebuilding the wiki.
+
+To quickly get started on a common task like blogging with ikiwiki, you
+can copy in files from the [[examples]]. The examples are located in
+`doc/examples/` in the ikiwiki source package.
+
+You can experiment with other ikiwiki parameters such as `--wikiname`
+and `--rebuild` too. Get comfortable with its command line (see
+[[usage]]).
+
+## Add a setup file.
+
+By now you should be getting tired of typing in all the command line
+options each time you change something in your wiki's setup. Time to
+introduce setup files.
+
+To generate a setup file, use `ikiwiki --dumpsetup`. You can pass
+all the options have you been including at the command line, and they
+will be stored in the setup file.
+
+ ikiwiki $SRCDIR $DESTDIR --url=http://example.org/~you/wiki/ --dumpsetup ikiwiki.setup
+
+Note that this file should *not* be put in your wiki's directory with
+the rest of the files. A good place to put it is in a ~/.ikiwiki/
+subdirectory.
+
+Most of the options, like `wikiname` in the setup file are the same as
+ikiwiki's command line options (documented in [[usage]]. `srcdir` and
+`destdir` are the two directories you specify when running ikiwiki by
+hand. Make sure that these are pointing to the right directories, and
+read through and configure the rest of the file to your liking.
+
+When you're satisfied, run `ikiwiki --setup ikiwiki.setup`, and it
+will set everything up.
+
+## Turn on additional features.
+
+Now you have a basic wiki with a setup file. Time to experiment
+with ikiwiki's many features.
+
+Let's first enable a key wiki feature and set up [[CGI]] to allow
+editing the wiki from the web. Just edit ikiwiki.setup, uncomment the
+settings for the `cgi_wrapper`, make sure the filename for the cgi wrapper
+is ok, run `ikiwiki --setup ikiwiki.setup`, and you're done!
+
+There are lots of other configuration options in ikiwiki.setup that you
+can uncomment, configure, and enable by re-running
+`ikiwiki --setup ikiwiki.setup`. Be sure to browse through all the
+[[plugins]]..
+
+## Put your wiki in revision control.
+
+At this point you might want to check your wiki in to a revision control
+system so you can keep track of changes and revert edits. Depending
+on the revision control system you choose, the way this is done varies.
+
+Note that the .ikiwiki subdirectory is where ikiwiki keeps its state, and
+should be preserved, but not checked into revision control.
+
+The [[ikiwiki-makerepo]] command automates setting up a wiki in
+revision control.
+
+[[!toggle id=subversion text="Subversion"]]
+[[!toggleable id=subversion text="""
+ REPOSITORY=~/wikirepo
+ ikiwiki-makerepo svn $SRCDIR $REPOSITORY
+"""]]
+
+[[!toggle id=git text="Git"]]
+[[!toggleable id=git text="""
+ REPOSITORY=~/wiki.git
+ ikiwiki-makerepo git $SRCDIR $REPOSITORY
+
+Please see [[rcs/git]] for detailed documentation about how
+ikiwiki uses git repositories, and some important caveats
+about using the git repositories.
+"""]]
+
+[[!toggle id=mercurial text="Mercurial"]]
+[[!toggleable id=mercurial text="""
+ REPOSITORY=$SRCDIR
+ ikiwiki-makerepo mercurial $SRCDIR
+"""]]
+
+[[!toggle id=bazaar text="Bazaar"]]
+[[!toggleable id=bazaar text="""
+ REPOSITORY=$SRCDIR
+ ikiwiki-makerepo bzr $SRCDIR
+"""]]
+
+[[!toggle id=tla text="TLA"]]
+[[!toggleable id=tla text="""
+ REPOSITORY=~/wikirepo
+ tla make-archive me@localhost--wiki $REPOSITORY
+ tla my-id "<me@localhost>"
+ cd $SRCDIR
+ tla archive-setup me@localhost--wiki/wiki--0
+ tla init-tree me@localhost--wiki/wiki--0
+ # Edit {arch}/=tagging-method and change the precious
+ # line to add the .ikiwiki directory to the regexp.
+ tla add *
+ tla import
+"""]]
+
+[[!toggle id=monotone text="Monotone"]]
+[[!toggleable id=monotone text="""
+ # This assumes that you have already used "mtn genkey you@hostname".
+ REPOSITORY=~/wiki.monotone
+ ikiwiki-makerepo monotone $SRCDIR $REPOSITORY
+"""]]
+
+## Configure ikiwiki to use revision control.
+
+Once your wiki is checked in to the revision control system, you should
+configure ikiwiki to use revision control. Edit your ikiwiki.setup, set
+`rcs` to the the revision control system you chose to use. Be careful,
+you may need to use the 'fullname'. For example, 'hg' doesn't work, you
+should use mercurial. Be sure to set `svnrepo` to the directory for your
+repository, if using subversion. Uncomment the configuration for the wrapper
+for your revision control system, and configure the wrapper path appropriately
+(for Git, it should be the path to `hooks/post-update` inside the bare git repository).
+
+Once it's all set up, run `ikiwiki --setup ikiwiki.setup` once more.
+Now you should be able to edit files in $SRCDIR, and use your revision
+control system to commit them, and the wiki will automatically update.
+And in the web interface, RecentChanges should work, and files changed
+by web users will also be committed using revision control.
+
+## Enjoy your new wiki!
+
+Add yourself to [[IkiWikiUsers]]. And check out
+the [[tips]] to find out how to get more out of ikiwiki.
diff --git a/doc/setup/discussion.mdwn b/doc/setup/discussion.mdwn
index 7d8c525e7..89114d7a2 100644
--- a/doc/setup/discussion.mdwn
+++ b/doc/setup/discussion.mdwn
@@ -138,3 +138,30 @@ Thanks for your response. You're right. Ubuntu does have ikiwiki, except that it
Anyway, I think I might be able to install it from the tarball I downloaded. I've been reading the discussions, had a look at your screencasts, etc. I will give it another bash. -- [[WillDioneda]]
----
+
+How do I set up cgi editing? In setup I have:
+
+ * cgiurl => 'http://wiki.had.co.nz/edit.cgi'
+ * cgi_wrapper => 'edit.cgi'
+
+But I don't get an edit link on my pages? What am I doing wrong?
+
+> Assuming you don't have the editpage plugin disabled, all you should need
+> to so is re-run `ikiwiki -setup` with the above config and it should
+> rebuild your wiki and add the edit links to pages. --[[Joey]]
+
+----
+
+I setup ikiwiki on a fedora 10 machine and I am using apache as my http server. Faced a few difficulties while setting it up as the default setup program left some suid files and group writeable directories on the system. It took some time to get it working and documented what I did at http://flyingtux.blogspot.com/2009/03/installing-ikiwiki.html. Thought it might be useful to someone here. (The version installed is 2.72)
+
+> ikiwiki makes wrappers suid by default, because this ensures that when
+> the ikiwiki.cgi is run by your web server, it runs as the user who owns
+> your wiki, and can thus write to it. ikiwiki is designed to run securely
+> suid. If your webserver uses some
+> mechanism to run the ikiwiki.cgi as the user who owns it, without the
+> suid bit being set, you *could* modify `cgi_wrappermode` in your setup
+> file to drop the suid bit.
+>
+> ikiwiki respects the umask, so if your umask is one that causes things to
+> be group writable, they will by. If you want to override that, there is
+> also a `umask ` setting in your setup file. --[[Joey]]
diff --git a/doc/style.css b/doc/style.css
index 5787ef65e..98a28f347 100644
--- a/doc/style.css
+++ b/doc/style.css
@@ -12,7 +12,7 @@
display: block;
}
-.author {
+.inlineheader .author {
margin: 0;
font-size: 18px;
font-weight: bold;
@@ -23,6 +23,8 @@
margin: 0;
padding: 6px;
list-style-type: none;
+}
+.pageheader .actions ul {
border-bottom: 1px solid #000;
}
@@ -42,6 +44,9 @@ div.inlinecontent {
.pagefooter {
clear: both;
}
+.inlinefooter {
+ clear: both;
+}
.tags {
}
@@ -339,11 +344,6 @@ input#searchbox {
border: 2px solid;
background-color: #dee;
color: black;
-
- /* Nonstandard, but very nice. */
- opacity: 0.95;
- -moz-opacity: 0.95;
- filter: alpha(opacity=95);
}
/* Formbuilder styling */
@@ -372,3 +372,18 @@ legend {
span.color {
padding: 2px;
}
+
+.comment-header {
+ font-style: italic;
+ margin-top: .3em;
+}
+.comment .author {
+ font-weight: bold;
+}
+.comment-subject {
+ font-weight: bold;
+}
+.comment {
+ border: 1px solid #aaa;
+ padding: 3px;
+}
diff --git a/doc/tips/DreamHost.mdwn b/doc/tips/DreamHost.mdwn
index 6670f8090..070638e3e 100644
--- a/doc/tips/DreamHost.mdwn
+++ b/doc/tips/DreamHost.mdwn
@@ -150,6 +150,8 @@ Next, add your installed Perl module directory to the *libdir* parameter. It sh
libdir => "/home/.server/user/site/perl/lib/perl5/",
# CGI Wrapper
+The CGI wrapper file will be created automatically by "ikiwiki --setup path/to/setup", as long as you have inserted a valid filename to be created into the setup file. On DreamHost, be careful not to put the ikiwiki.cgi file in a directory that has different owner/group than the file itself (such as the main site.domain.tld/ directory): this will cause suexec to fail.
+
The wrapper mode of "06755" doesn't seem to work. "755" appears to. However, this may be completely insecure and/or buggy, so if you know better than I, edit this doc and add it here.
# Pre-created SVN repository
diff --git a/doc/tips/Git_repository_and_web_server_on_different_hosts.mdwn b/doc/tips/Git_repository_and_web_server_on_different_hosts.mdwn
new file mode 100644
index 000000000..58940b89f
--- /dev/null
+++ b/doc/tips/Git_repository_and_web_server_on_different_hosts.mdwn
@@ -0,0 +1,61 @@
+One may want to provide ikiwiki hosting with [[rcs/git]]+ssh access and web
+server located at different hosts. Here's a description for such
+a setup, using password-less SSH as a way of communication between
+these two hosts.
+
+Git server
+==========
+
+Let's create a user called `ikiwiki_example`. This user gets SSH
+access restricted to GIT pull/push, using `git-shell` as a shell.
+
+The root (bare) repository:
+
+- is stored in `~ikiwki_example/ikiwiki_example.git`
+- is owned by `ikiwiki_example:ikiwiki_example`
+- has permissions 0700
+
+The master repository's post-update hook connects via SSH to
+`webserver` as user `ikiwiki_example`, in order to run
+`~/bin/ikiwiki.update` on `webserver`; this post-update hook, located
+in `~ikiwki_example/ikiwiki_example.git/hooks/post-update`, is
+executable and contains:
+
+ #!/bin/sh
+ /usr/bin/ssh ikiwiki_example@webserver bin/ikiwiki.update
+
+Password-less SSH must be setup to make this possible; one can
+restrict `gitserver:ikiwiki_example` to be able to run only the needed
+command on the web server, using such a line in
+`webserver:~ikiwiki_example/.ssh/authorized_keys`:
+
+ command="bin/ikiwiki.update",from="gitserver.example.com",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa ...
+
+Web server
+==========
+
+Let's create a user called `ikiwiki_example` on `webserver`. She needs
+to have write permission to the destination directory.
+
+The working tree repository (`srcdir`):
+
+- is stored in `~ikiwki_example/src`
+- is owned by `ikiwiki_example:ikiwiki_example`
+- has permissions 0700
+- has the following origin: `ikiwiki_example@gitserver:ikiwiki_example.git`
+
+The CGI wrapper is generated with ownership set to
+`ikiwiki_example:ikiwiki_example` and permissions `06755`.
+
+Password-less SSH must be setup so that `ikiwiki_example@webserver` is
+allowed to push to the master repository. As told earlier, SSH access
+to `ikiwiki_example@gitserver` is restricted to GIT pull/push, which
+is just what we need.
+
+The Git wrapper is generated in `~ikiwiki_example/bin/ikiwiki.update`:
+
+ git_wrapper => '/home/ikiwiki_example/bin/ikiwiki.update'
+
+As previously explained, this wrapper is run over SSH by the master
+repository's post-update hook; it pulls updates from the master
+repository and triggers a wiki refresh.
diff --git a/doc/tips/Google_custom_search.mdwn b/doc/tips/Google_custom_search.mdwn
index 7e8ac951c..1093029f5 100644
--- a/doc/tips/Google_custom_search.mdwn
+++ b/doc/tips/Google_custom_search.mdwn
@@ -5,3 +5,8 @@ Instead of the [[plugins/search]] plugin you could embed [Google Custom Search](
Once you've created your "custom search engine", just drop in the search box html like I've done in my [Debian tips and tricks](http://dabase.com/tips/) [source](http://git.webconverger.org/?p=faq.git;a=blob;f=tips.mdwn).
If you have odd "save failed" error messages in Google's CSE's control panel, try `/usr/lib/WebKit/GtkLauncher` from [webkit](http://packages.qa.debian.org/w/webkit.html).
+
+
+# Alternatively
+
+You could use the [[Google_plugin|plugins/google]] from version 2.67.
diff --git a/doc/tips/apache_cgi.mdwn b/doc/tips/apache_cgi.mdwn
deleted file mode 100644
index f10baed2e..000000000
--- a/doc/tips/apache_cgi.mdwn
+++ /dev/null
@@ -1,25 +0,0 @@
-Many ikiwiki examples name the [[cgi]] "ikiwiki.cgi", and put it somewhere
-like `~/public_html/ikiwiki.cgi`, or `/var/www/wiki/ikiwiki.cgi`.
-
-If you follow those examples, you may find that when trying to edit a page
-in your wiki, you see the raw contents of the ikiwiki.cgi program. Or get a
-permission denied problem.
-
-This is because apache is generally not configured to run cgi scripts
-unless they're in `/usr/lib/cgi-bin/`. While you can put ikiwiki.cgi in
-there if you like, here's how to configure apache (version 2) to run `.cgi`
-programs from anywhere.
-
-These instructions are for Debian systems, but the basic apache
-configuration should work anywhere.
-
-* Edit /etc/apache2/apache2.conf and add a line like this:
-
- AddHandler cgi-script .cgi
-
-* Find the "Options" line for the directory where you've put the
- ikiwiki.cgi, and add "ExecCGI" to the list of options. For example, if
- ikiwiki.cgi is in /var/www/, edit `/etc/apache2/sites-enabled/000-default`
- and add it to the "Options" line in the "Directory /var/www/" stanza.
- Or, if you've put it in a `~/public_html`, edit
- `/etc/apache2/mods-available/userdir.conf`.
diff --git a/doc/tips/comments_feed.mdwn b/doc/tips/comments_feed.mdwn
new file mode 100644
index 000000000..6f8137256
--- /dev/null
+++ b/doc/tips/comments_feed.mdwn
@@ -0,0 +1,10 @@
+You've enabled the [[plugins/comments]] plugin, so a set of pages on your
+blog can have comments added to them. Pages with comments even have special
+feeds that can be used to subscribe to those comments. But you'd like to
+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
+nicely.
diff --git a/doc/tips/convert_MoinMoin_and_TWiki_to_ikiwiki.mdwn b/doc/tips/convert_MoinMoin_and_TWiki_to_ikiwiki.mdwn
new file mode 100644
index 000000000..5565dbd8a
--- /dev/null
+++ b/doc/tips/convert_MoinMoin_and_TWiki_to_ikiwiki.mdwn
@@ -0,0 +1,3 @@
+[[JoshTriplett]] has developed scripts to convert MoinMoin and TWiki wikis
+to ikiwikis backed by a git repository, including full history. For
+details, see [[his_user_page|JoshTriplett]].
diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn
new file mode 100644
index 000000000..f03703b46
--- /dev/null
+++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn
@@ -0,0 +1,4 @@
+[[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.
diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn
new file mode 100644
index 000000000..15ddccb92
--- /dev/null
+++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn
@@ -0,0 +1,612 @@
+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:
+
+ * using a python script and the dom library to extract the page names from
+ Special:Allpages (such as
+ <http://www.staff.ncl.ac.uk/jon.dowland/unix/docs/get_pagenames.py>)
+ * Or, querying the mysql back-end to get the names
+ * using WWW::MediaWiki for importing/exporting pages from the wiki, instead
+ of Special::Export
+
+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]]
+
+
+The iki-fast-load ruby script from the u32 page is given below:
+
+ #!/usr/bin/env ruby
+
+ # This script is called on the final sorted, de-spammed revision
+ # XML file.
+ #
+ # It doesn't currently check for no-op revisions... I believe
+ # that git-fast-load will dutifully load them even though nothing
+ # happened. I don't care to solve this by adding a file cache
+ # to this script. You can run iki-diff-next.rb to highlight any
+ # empty revisions that need to be removed.
+ #
+ # This turns each node into an equivalent file.
+ # It does not convert spaces to underscores in file names.
+ # This would break wikilinks.
+ # I suppose you could fix this with mod_speling or mod_rewrite.
+ #
+ # It replaces nodes in the Image: namespace with the files themselves.
+
+
+ require 'rubygems'
+ require 'node-callback'
+ require 'time'
+ require 'ostruct'
+
+
+ # pipe is the stream to receive the git-fast-import commands
+ # putfrom is true if this branch has existing commits on it, false if not.
+ def format_git_commit(pipe, f)
+ # Need to escape backslashes and double-quotes for git?
+ # No, git breaks when I do this.
+ # For the filename "path with \\", git sez: bad default revision 'HEAD'
+ # filename = '"' + filename.gsub('\\', '\\\\\\\\').gsub('"', '\\"') + '"'
+
+ # In the calls below, length must be the size in bytes!!
+ # TODO: I haven't figured out how this works in the land of UTF8 and Ruby 1.9.
+ pipe.puts "commit #{f.branch}"
+ pipe.puts "committer #{f.username} <#{f.email}> #{f.timestamp.rfc2822}"
+ pipe.puts "data #{f.message.length}\n#{f.message}\n"
+ pipe.puts "from #{f.branch}^0" if f.putfrom
+ pipe.puts "M 644 inline #{f.filename}"
+ pipe.puts "data #{f.content.length}\n#{f.content}\n"
+ pipe.puts
+ end
+
+
+Mediawiki.pm - A plugin which supports mediawiki format.
+
+ #!/usr/bin/perl
+ # By Scott Bronson. Licensed under the GPLv2+ License.
+ # Extends Ikiwiki to be able to handle Mediawiki markup.
+ #
+ # To use the Mediawiki Plugin:
+ # - Install Text::MediawikiFormat
+ # - Turn of prefix_directives in your setup file.
+ # (TODO: we probably don't need to do this anymore?)
+ # prefix_directives => 1,
+ # - Add this plugin on Ikiwiki's path (perl -V, look for @INC)
+ # cp mediawiki.pm something/IkiWiki/Plugin
+ # - And enable it in your setup file
+ # add_plugins => [qw{mediawiki}],
+ # - Finally, turn off the link plugin in setup (this is important)
+ # disable_plugins => [qw{link}],
+ # - Rebuild everything (actually, this should be automatic right?)
+ # - Now all files with a .mediawiki extension should be rendered properly.
+
+
+ package IkiWiki::Plugin::mediawiki;
+
+ use warnings;
+ use strict;
+ use IkiWiki 2.00;
+ use URI;
+
+
+ # This is a gross hack... We disable the link plugin so that our
+ # linkify routine is always called. Then we call the link plugin
+ # directly for all non-mediawiki pages. Ouch... Hopefully Ikiwiki
+ # will be updated soon to support multiple link plugins.
+ require IkiWiki::Plugin::link;
+
+ # Even if T:MwF is not installed, we can still handle all the linking.
+ # The user will just see Mediawiki markup rather than formatted markup.
+ eval q{use Text::MediawikiFormat ()};
+ my $markup_disabled = $@;
+
+ # Work around a UTF8 bug in Text::MediawikiFormat
+ # http://rt.cpan.org/Public/Bug/Display.html?id=26880
+ unless($markup_disabled) {
+ no strict 'refs';
+ no warnings;
+ *{'Text::MediawikiFormat::uri_escape'} = \&URI::Escape::uri_escape_utf8;
+ }
+
+ my %metaheaders; # keeps track of redirects for pagetemplate.
+ my %tags; # keeps track of tags for pagetemplate.
+
+
+ sub import { #{{{
+ hook(type => "checkconfig", id => "mediawiki", call => \&checkconfig);
+ hook(type => "scan", id => "mediawiki", call => \&scan);
+ hook(type => "linkify", id => "mediawiki", call => \&linkify);
+ hook(type => "htmlize", id => "mediawiki", call => \&htmlize);
+ hook(type => "pagetemplate", id => "mediawiki", call => \&pagetemplate);
+ } # }}}
+
+
+ sub checkconfig
+ {
+ return IkiWiki::Plugin::link::checkconfig(@_);
+ }
+
+
+ my $link_regexp = qr{
+ \[\[(?=[^!]) # beginning of link
+ ([^\n\r\]#|<>]+) # 1: page to link to
+ (?:
+ \# # '#', beginning of anchor
+ ([^|\]]+) # 2: anchor text
+ )? # optional
+
+ (?:
+ \| # followed by '|'
+ ([^\]\|]*) # 3: link text
+ )? # optional
+ \]\] # end of link
+ ([a-zA-Z]*) # optional trailing alphas
+ }x;
+
+
+ # Convert spaces in the passed-in string into underscores.
+ # If passed in undef, returns undef without throwing errors.
+ sub underscorize
+ {
+ my $var = shift;
+ $var =~ tr{ }{_} if $var;
+ return $var;
+ }
+
+
+ # Underscorize, strip leading and trailing space, and scrunch
+ # multiple runs of spaces into one underscore.
+ sub scrunch
+ {
+ my $var = shift;
+ if($var) {
+ $var =~ s/^\s+|\s+$//g; # strip leading and trailing space
+ $var =~ s/\s+/ /g; # squash multiple spaces to one
+ }
+ return $var;
+ }
+
+
+ # Translates Mediawiki paths into Ikiwiki paths.
+ # It needs to be pretty careful because Mediawiki and Ikiwiki handle
+ # relative vs. absolute exactly opposite from each other.
+ sub translate_path
+ {
+ my $page = shift;
+ my $path = scrunch(shift);
+
+ # always start from root unless we're doing relative shenanigans.
+ $page = "/" unless $path =~ /^(?:\/|\.\.)/;
+
+ my @result = ();
+ for(split(/\//, "$page/$path")) {
+ if($_ eq '..') {
+ pop @result;
+ } else {
+ push @result, $_ if $_ ne "";
+ }
+ }
+
+ # temporary hack working around http://ikiwiki.info/bugs/Can__39__t_create_root_page/index.html?updated
+ # put this back the way it was once this bug is fixed upstream.
+ # This is actually a major problem because now Mediawiki pages can't link from /Git/git-svn to /git-svn. And upstream appears to be uninterested in fixing this bug. :(
+ # return "/" . join("/", @result);
+ return join("/", @result);
+ }
+
+
+ # Figures out the human-readable text for a wikilink
+ sub linktext
+ {
+ my($page, $inlink, $anchor, $title, $trailing) = @_;
+ my $link = translate_path($page,$inlink);
+
+ # translate_path always produces an absolute link.
+ # get rid of the leading slash before we display this link.
+ $link =~ s#^/##;
+
+ my $out = "";
+ if($title) {
+ $out = IkiWiki::pagetitle($title);
+ } else {
+ $link = $inlink if $inlink =~ /^\s*\//;
+ $out = $anchor ? "$link#$anchor" : $link;
+ if(defined $title && $title eq "") {
+ # a bare pipe appeared in the link...
+ # user wants to strip namespace and trailing parens.
+ $out =~ s/^[A-Za-z0-9_-]*://;
+ $out =~ s/\s*\(.*\)\s*$//;
+ }
+ # A trailing slash suppresses the leading slash
+ $out =~ s#^/(.*)/$#$1#;
+ }
+ $out .= $trailing if defined $trailing;
+ return $out;
+ }
+
+
+ sub tagpage ($)
+ {
+ my $tag=shift;
+
+ if (exists $config{tagbase} && defined $config{tagbase}) {
+ $tag=$config{tagbase}."/".$tag;
+ }
+
+ return $tag;
+ }
+
+
+ # Pass a URL and optional text associated with it. This call turns
+ # it into fully-formatted HTML the same way Mediawiki would.
+ # Counter is used to number untitled links sequentially on the page.
+ # It should be set to 1 when you start parsing a new page. This call
+ # increments it automatically.
+ sub generate_external_link
+ {
+ my $url = shift;
+ my $text = shift;
+ my $counter = shift;
+
+ # Mediawiki trims off trailing commas.
+ # And apparently it does entity substitution first.
+ # Since we can't, we'll fake it.
+
+ # trim any leading and trailing whitespace
+ $url =~ s/^\s+|\s+$//g;
+
+ # url properly terminates on > but must special-case &gt;
+ my $trailer = "";
+ $url =~ s{(\&(?:gt|lt)\;.*)$}{ $trailer = $1, ''; }eg;
+
+ # Trim some potential trailing chars, put them outside the link.
+ my $tmptrail = "";
+ $url =~ s{([,)]+)$}{ $tmptrail .= $1, ''; }eg;
+ $trailer = $tmptrail . $trailer;
+
+ my $title = $url;
+ if(defined $text) {
+ if($text eq "") {
+ $text = "[$$counter]";
+ $$counter += 1;
+ }
+ $text =~ s/^\s+|\s+$//g;
+ $text =~ s/^\|//;
+ } else {
+ $text = $url;
+ }
+
+ return "<a href='$url' title='$title'>$text</a>$trailer";
+ }
+
+
+ # Called to handle bookmarks like [[#heading]] or <span class="createlink"><a href="http://u32.net/cgi-bin/ikiwiki.cgi?page=%20text%20&amp;from=Mediawiki_Plugin%2Fmediawiki&amp;do=create" rel="nofollow">?</a>#a</span>
+ sub generate_fragment_link
+ {
+ my $url = shift;
+ my $text = shift;
+
+ my $inurl = $url;
+ my $intext = $text;
+ $url = scrunch($url);
+
+ if(defined($text) && $text ne "") {
+ $text = scrunch($text);
+ } else {
+ $text = $url;
+ }
+
+ $url = underscorize($url);
+
+ # For some reason Mediawiki puts blank titles on all its fragment links.
+ # I don't see why we would duplicate that behavior here.
+ return "<a href='$url'>$text</a>";
+ }
+
+
+ sub generate_internal_link
+ {
+ my($page, $inlink, $anchor, $title, $trailing, $proc) = @_;
+
+ # 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: [[
+ if($inlink eq '..') {
+ # Mediawiki doesn't touch links like [[..#hi|ho]].
+ return "[[" . $inlink . ($anchor?"#$anchor":"") .
+ ($title?"|$title":"") . "]]" . $trailing;
+ }
+
+ my($linkpage, $linktext);
+ if($inlink =~ /^ (:?) \s* Category (\s* \: \s*) ([^\]]*) $/x) {
+ # Handle category links
+ my $sep = $2;
+ $inlink = $3;
+ $linkpage = IkiWiki::linkpage(translate_path($page, $inlink));
+ if($1) {
+ # Produce a link but don't add this page to the given category.
+ $linkpage = tagpage($linkpage);
+ $linktext = ($title ? '' : "Category$sep") .
+ linktext($page, $inlink, $anchor, $title, $trailing);
+ $tags{$page}{$linkpage} = 1;
+ } else {
+ # Add this page to the given category but don't produce a link.
+ $tags{$page}{$linkpage} = 1;
+ &$proc(tagpage($linkpage), $linktext, $anchor);
+ return "";
+ }
+ } else {
+ # It's just a regular link
+ $linkpage = IkiWiki::linkpage(translate_path($page, $inlink));
+ $linktext = linktext($page, $inlink, $anchor, $title, $trailing);
+ }
+
+ return &$proc($linkpage, $linktext, $anchor);
+ }
+
+
+ sub check_redirect
+ {
+ my %params=@_;
+
+ my $page=$params{page};
+ my $destpage=$params{destpage};
+ my $content=$params{content};
+
+ return "" if $page ne $destpage;
+
+ if($content !~ /^ \s* \#REDIRECT \s* \[\[ ( [^\]]+ ) \]\]/x) {
+ # this page isn't a redirect, render it normally.
+ return undef;
+ }
+
+ # The rest of this function is copied from the redir clause
+ # in meta::preprocess and actually handles the redirect.
+
+ my $value = $1;
+ $value =~ s/^\s+|\s+$//g;
+
+ my $safe=0;
+ if ($value !~ /^\w+:\/\//) {
+ # it's a local link
+ my ($redir_page, $redir_anchor) = split /\#/, $value;
+
+ add_depends($page, $redir_page);
+ my $link=bestlink($page, underscorize(translate_path($page,$redir_page)));
+ if (! length $link) {
+ return "<b>Redirect Error:</b> <nowiki>[[$redir_page]] not found.</nowiki>";
+ }
+
+ $value=urlto($link, $page);
+ $value.='#'.$redir_anchor if defined $redir_anchor;
+ $safe=1;
+
+ # redir cycle detection
+ $pagestate{$page}{mediawiki}{redir}=$link;
+ my $at=$page;
+ my %seen;
+ while (exists $pagestate{$at}{mediawiki}{redir}) {
+ if ($seen{$at}) {
+ return "<b>Redirect Error:</b> cycle found on <nowiki>[[$at]]</nowiki>";
+ }
+ $seen{$at}=1;
+ $at=$pagestate{$at}{mediawiki}{redir};
+ }
+ } else {
+ # it's an external link
+ $value = encode_entities($value);
+ }
+
+ my $redir="<meta http-equiv=\"refresh\" content=\"0; URL=$value\" />";
+ $redir=scrub($redir) if !$safe;
+ push @{$metaheaders{$page}}, $redir;
+
+ return "Redirecting to $value ...";
+ }
+
+
+ # Feed this routine a string containing <nowiki>...</nowiki> sections,
+ # this routine calls your callback for every section not within nowikis,
+ # collecting its return values and returning the rewritten string.
+ sub skip_nowiki
+ {
+ my $content = shift;
+ my $proc = shift;
+
+ my $result = "";
+ my $state = 0;
+
+ for(split(/(<nowiki[^>]*>.*?<\/nowiki\s*>)/s, $content)) {
+ $result .= ($state ? $_ : &$proc($_));
+ $state = !$state;
+ }
+
+ return $result;
+ }
+
+
+ # Converts all links in the page, wiki and otherwise.
+ sub linkify (@)
+ {
+ my %params=@_;
+
+ my $page=$params{page};
+ my $destpage=$params{destpage};
+ my $content=$params{content};
+
+ my $file=$pagesources{$page};
+ my $type=pagetype($file);
+ my $counter = 1;
+
+ if($type ne 'mediawiki') {
+ return IkiWiki::Plugin::link::linkify(@_);
+ }
+
+ my $redir = check_redirect(%params);
+ return $redir if defined $redir;
+
+ # this code was copied from MediawikiFormat.pm.
+ # Heavily changed because MF.pm screws up escaping when it does
+ # this awful hack: $uricCheat =~ tr/://d;
+ my $schemas = [qw(http https ftp mailto gopher)];
+ my $re = join "|", map {qr/\Q$_\E/} @$schemas;
+ my $schemes = qr/(?:$re)/;
+ # And this is copied from URI:
+ my $reserved = q(;/?@&=+$,); # NOTE: no colon or [] !
+ my $uric = quotemeta($reserved) . $URI::unreserved . "%#";
+
+ my $result = skip_nowiki($content, sub {
+ $_ = shift;
+
+ # Escape any anchors
+ #s/<(a[\s>\/])/&lt;$1/ig;
+ # Disabled because this appears to screw up the aggregate plugin.
+ # I guess we'll rely on Iki to post-sanitize this sort of stuff.
+
+ # Replace external links, http://blah or [http://blah]
+ s{\b($schemes:[$uric][:$uric]+)|\[($schemes:[$uric][:$uric]+)([^\]]*?)\]}{
+ generate_external_link($1||$2, $3, \$counter)
+ }eg;
+
+ # Handle links that only contain fragments.
+ s{ \[\[ \s* (\#[^|\]'"<>&;]+) (?:\| ([^\]'"<>&;]*))? \]\] }{
+ generate_fragment_link($1, $2)
+ }xeg;
+
+ # Match all internal links
+ s{$link_regexp}{
+ generate_internal_link($page, $1, $2, $3, $4, sub {
+ my($linkpage, $linktext, $anchor) = @_;
+ return htmllink($page, $destpage, $linkpage,
+ linktext => $linktext,
+ anchor => underscorize(scrunch($anchor)));
+ });
+ }eg;
+
+ return $_;
+ });
+
+ return $result;
+ }
+
+
+ # Find all WikiLinks in the page.
+ sub scan (@)
+ {
+ my %params = @_;
+ my $page=$params{page};
+ my $content=$params{content};
+
+ my $file=$pagesources{$page};
+ my $type=pagetype($file);
+
+ if($type ne 'mediawiki') {
+ return IkiWiki::Plugin::link::scan(@_);
+ }
+
+ skip_nowiki($content, sub {
+ $_ = shift;
+ while(/$link_regexp/g) {
+ generate_internal_link($page, $1, '', '', '', sub {
+ my($linkpage, $linktext, $anchor) = @_;
+ push @{$links{$page}}, $linkpage;
+ return undef;
+ });
+ }
+ return '';
+ });
+ }
+
+
+ # Convert the page to HTML.
+ sub htmlize (@)
+ {
+ my %params=@_;
+ my $page = $params{page};
+ my $content = $params{content};
+
+
+ return $content if $markup_disabled;
+
+ # Do a little preprocessing to babysit Text::MediawikiFormat
+ # If a line begins with tabs, T:MwF won't convert it into preformatted blocks.
+ $content =~ s/^\t/ /mg;
+
+ my $ret = Text::MediawikiFormat::format($content, {
+
+ allowed_tags => [#HTML
+ # MediawikiFormat default
+ qw(b big blockquote br caption center cite code dd
+ div dl dt em font h1 h2 h3 h4 h5 h6 hr i li ol p
+ pre rb rp rt ruby s samp small strike strong sub
+ sup table td th tr tt u ul var),
+ # Mediawiki Specific
+ qw(nowiki),
+ # Our additions
+ qw(del ins), # These should have been added all along.
+ qw(span), # Mediawiki allows span but that's rather scary...?
+ qw(a), # this is unfortunate; should handle links after rendering the page.
+ ],
+
+ allowed_attrs => [
+ qw(title align lang dir width height bgcolor),
+ qw(clear), # BR
+ qw(noshade), # HR
+ qw(cite), # BLOCKQUOTE, Q
+ qw(size face color), # FONT
+ # For various lists, mostly deprecated but safe
+ qw(type start value compact),
+ # Tables
+ qw(summary width border frame rules cellspacing
+ cellpadding valign char charoff colgroup col
+ span abbr axis headers scope rowspan colspan),
+ qw(id class name style), # For CSS
+ # Our additions
+ qw(href),
+ ],
+
+ }, {
+ extended => 0,
+ absolute_links => 0,
+ implicit_links => 0
+ });
+
+ return $ret;
+ }
+
+
+ # This is only needed to support the check_redirect call.
+ sub pagetemplate (@)
+ {
+ my %params = @_;
+ my $page = $params{page};
+ my $destpage = $params{destpage};
+ my $template = $params{template};
+
+ # handle metaheaders for redirects
+ if (exists $metaheaders{$page} && $template->query(name => "meta")) {
+ # avoid duplicate meta lines
+ my %seen;
+ $template->param(meta => join("\n", grep { (! $seen{$_}) && ($seen{$_}=1) } @{$metaheaders{$page}}));
+ }
+
+ $template->param(tags => [
+ map {
+ link => htmllink($page, $destpage, tagpage($_), rel => "tag")
+ }, sort keys %{$tags{$page}}
+ ]) if exists $tags{$page} && %{$tags{$page}} && $template->query(name => "tags");
+
+ # It's an rss/atom template. Add any categories.
+ if ($template->query(name => "categories")) {
+ if (exists $tags{$page} && %{$tags{$page}}) {
+ $template->param(categories => [map { category => $_ },
+ sort keys %{$tags{$page}}]);
+ }
+ }
+ }
+
+ 1
diff --git a/doc/tips/dot_cgi.mdwn b/doc/tips/dot_cgi.mdwn
new file mode 100644
index 000000000..04d7a9721
--- /dev/null
+++ b/doc/tips/dot_cgi.mdwn
@@ -0,0 +1,57 @@
+It's common to name the [[cgi]] "ikiwiki.cgi", and put it somewhere
+like `~/public_html/ikiwiki.cgi`, or `/var/www/wiki/ikiwiki.cgi`.
+
+If you do that, you may find that when trying to edit a page in your wiki,
+you see the raw contents of the ikiwiki.cgi program. Or get a permission
+denied problem.
+
+This is because web servers are generally not configured to run cgi scripts
+unless they're in `/usr/lib/cgi-bin/`. While you can put ikiwiki.cgi in
+there if you like, it's better to configure your web server to
+run `.cgi` programs from anywhere.
+
+These instructions are for Debian systems, but the basic
+configuration changes should work anywhere.
+
+## apache 2
+
+* Edit /etc/apache2/apache2.conf and add a line like this:
+
+ AddHandler cgi-script .cgi
+
+* Find the "Options" line for the directory where you've put the
+ ikiwiki.cgi, and add "ExecCGI" to the list of options. For example, if
+ ikiwiki.cgi is in /var/www/, edit `/etc/apache2/sites-enabled/000-default`
+ and add it to the "Options" line in the "Directory /var/www/" stanza.
+ Or, if you've put it in a `~/public_html`, edit
+ `/etc/apache2/mods-available/userdir.conf`.
+
+* You may also want to enable the [[plugins/404]] plugin.
+ To make apache use it, the apache config file will need a further
+ modification to make it use ikiwiki's CGI as the apache 404 handler.
+ Something like this, with the path adjusted to where you've put the CGI:
+
+ ErrorDocument 404 /cgi-bin/ikiwiki.cgi
+
+## lighttpd
+
+Here is how to enable cgi on [lighttpd](http://www.lighttpd.net/) and
+configure it in order to execute ikiwiki.cgi wherever it is located.
+
+* Activate cgi by linking `/etc/lighttpd/conf-available/10-cgi.conf` into `/etc/lighttpd/conf-enabled` ([doc](http://trac.lighttpd.net/trac/wiki/Docs%3AModCGI)).
+
+* Create `/etc/lighttpd/conf-available/90-ikiwiki-cgi.conf` and add a line like this:
+
+ cgi.assign = ( "ikiwiki.cgi" => "", )
+
+* Activate ikiwiki-cgi by linking `/etc/lighttpd/conf-available/90-ikiwiki-cgi.conf` into `/etc/lighttpd/conf-enabled`.
+
+* Restart lighttpd server with something like `/etc/init.d/lighttpd restart`.
+
+Note that the first part enables cgi server wide but depending on default
+configuration, it may be not enough. The second part creates a specific
+rule that allow `ikiwiki.cgi` to be executed.
+
+**Warning:** I only use this on my development 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.
diff --git a/doc/tips/emacs_syntax_highlighting.mdwn b/doc/tips/emacs_syntax_highlighting.mdwn
new file mode 100644
index 000000000..941cf5415
--- /dev/null
+++ b/doc/tips/emacs_syntax_highlighting.mdwn
@@ -0,0 +1,3 @@
+A [markdown mode](http://jblevins.org/projects/markdown-mode/) for
+emacs can help in editing of ikiwiki
+[[ikiwiki/markdown]] files.
diff --git a/doc/tips/embedding_content.mdwn b/doc/tips/embedding_content.mdwn
new file mode 100644
index 000000000..142acd16e
--- /dev/null
+++ b/doc/tips/embedding_content.mdwn
@@ -0,0 +1,35 @@
+Content from sites such as YouTube can be embedded into a web page. Maybe
+you want to do this. But you'll find that the [[plugins/htmlscrubber]]
+doesn't let you. It blocks the tags used to embed such content, because
+they can be abused in many evil ways.
+
+Some plugins have been written to try to work around this problem, by
+whitelisting the html needed to embed things from a few sites like Google
+maps, calendar, videos, and YouTube. The problem with these plugins is that
+they have to be kept up to date to add new sites, and follow changes to the
+html such sites use for embedding.
+
+(Digression: The real problem with the plugins is that they hide the
+underlying trust relationship. If you decide to embed html from a site,
+you'd better trust that site. And if ikiwiki lets you enter such html, it
+needs to trust you.)
+
+The [[plugins/htmlscrubber]] offers a different way around this problem.
+You can configure it to skip scrubbing certian pages, so that content from
+elsewhere can be embedded on those pages. Then use [[plugins/lockedit]]
+to limit who can edit those unscrubbed pages.
+
+For example, suppose your blog is all under `blog/*`, and you want
+only yourself to be able to post there, and you'd like to be able to embed
+youtube videos etc in your blog. Other users can edit some pages in the
+wiki (Discussion pages, say), but not your blog posts. Then you could configure
+ikiwiki as follows:
+
+ htmlscrubber_skip => 'blog/* and !*/Discussion',
+ locked_pages => '!*/Discussion',
+
+More simply, you might want to allow yourself to embed content anywhere
+on the wiki, but scrub content written on Discussion pages:
+
+ htmlscrubber_skip => '!*/Discussion',
+ locked_pages => '!*/Discussion',
diff --git a/doc/tips/github.mdwn b/doc/tips/github.mdwn
new file mode 100644
index 000000000..c3fdab734
--- /dev/null
+++ b/doc/tips/github.mdwn
@@ -0,0 +1,64 @@
+Here's how to set up a static wiki or blog using ikiwiki with no hosting
+fees. Everything is hosted on github, both the git repository and the web
+site. Your laptop is used to generate and publish changes to it.
+
+This is possible because github now supports
+[github pages](http://github.com/blog/272-github-pages).
+
+Note that github limits free accounts to 100 mb of git storage. It's
+unlikely that a small wiki or blog will outgrow this, but we are keeping
+two copies of the website in git (source and the compiled site), and all
+historical versions too. So it could happen. If it does, you can pay github
+for more space, or you can migrate your site elsewhere.
+
+## Github Setup
+
+* Go to [github](http://github.com/) and sign up for an account, if you haven't already.
+* Be sure to add your laptop's ssh key to it so you can push to github.
+* Create a repository on github named `$YOU.github.com`, substituting your
+ *username*. This repository will be used to publish your compiled website.
+* Create a repository on github named `$YOU` (or anything else you like).
+ This repository will be used to publish the source of your website.
+ This is actually optional.
+
+## Local Setup
+
+* On your laptop, create two empty git repositories to correspond to the github repositories: <br />
+ `YOU = your github username here` <br />
+ `mkdir ~/$YOU.github.com` <br />
+ `cd ~/$YOU.github.com` <br />
+ `git init` <br />
+ `git remote add origin git@github.com:$YOU/$YOU.github.com.git` <br />
+ `mkdir ~/$YOU` <br />
+ `cd ~/$YOU` <br />
+ `git init` <br />
+ `git remote add origin git@github.com:$YOU/$YOU.git` <br />
+* Add some wiki pages, such as an `index.mdwn`, to `~/$YOU`, and check them
+ in and commit them to git. You need something to push to github. Run
+ `git push origin master` to push the source pages to github.
+
+## Publishing to Github
+
+* Now build your wiki with a command such as: <br />
+ `ikiwiki ~/$YOU ~/$YOU.github.com --refresh`
+* Each time you build the wiki you will need to commit the changes
+ to git, and push the compiled pages to github: <br />
+ `cd ~/YOU.github.com` <br />
+ `git add .` <br />
+ `git commit -a -m update` <br />
+ `git push origin master` <br />
+
+Your wiki will show up at `http://$YOU.github.com/` within ten
+minutes after the first push, and changes you push to it from then on
+should show up immediately.
+
+## Enhancements
+
+You can follow the instructions in [[laptop_wiki_with_git]] to set up an
+editable version of your wiki on your laptop. Then you can use the web
+interface for editing. You'll still need to follow the instructions above
+to publish your changes to github.
+
+It would also be possible to teach ikiwiki to push compiled pages to github
+itself via a plugin, as was done with the [[plugins/amazon_s3]] plugin. Not
+done yet!
diff --git a/doc/tips/howto_avoid_flooding_aggregators.mdwn b/doc/tips/howto_avoid_flooding_aggregators.mdwn
index 98cef9249..e45b96689 100644
--- a/doc/tips/howto_avoid_flooding_aggregators.mdwn
+++ b/doc/tips/howto_avoid_flooding_aggregators.mdwn
@@ -1,27 +1,27 @@
If you have a [[blog]] that is aggregated, either on a site like Planet
Debian, or just through user subscriptions, one common problem is that
-changes to the guids of items in the blog can "flood" the aggregator,
+changes to the guids of items in the blog can “flood” the aggregator,
causing all recent blog entries to be posted to the top of it.
This can happen in a lot of situations:
-* Perhaps you've just switched to ikiwiki from some other blog engine and
+* Perhaps you’ve just switched to ikiwiki from some other blog engine and
imported your data.
-* Perhaps you've turned on the `usedirs` setting, which changes all the
+* Perhaps you’ve turned on the `usedirs` setting, which changes all the
urls in your wiki. Even if you set up
[[redirections|redirections_for_usedirs]] for the old urls, you still face
the issue of flooding aggregators.
-* Perhaps you've just moved stuff around in your wiki.
+* Perhaps you’ve just moved stuff around in your wiki.
-To avoid annoying readers in these situations, it's a good idea to remove
-any existing items from your blog's news feed. That way only new items will
+To avoid annoying readers in these situations, it’s a good idea to remove
+any existing items from your blog’s news feed. That way only new items will
show up in the aggregator. The best way to do this is to add a `feedpages`
parameter to the `inline` directive for your blog, with a condition such as:
feedpages=created_after(blog/posts/old_post)
-Where "old_post" is the name of the last post you made to the blog before
-making the change. This will limit the feed to only newer posts, while stil
+Where “old_post” is the name of the last post you made to the blog before
+making the change. This will limit the feed to only newer posts, while still
displaying the old posts in the blog page.
Alternatively, you can add the [[plugins/meta]] guid directives to pages,
diff --git a/doc/tips/inside_dot_ikiwiki.mdwn b/doc/tips/inside_dot_ikiwiki.mdwn
index b649636dc..b81ffae8d 100644
--- a/doc/tips/inside_dot_ikiwiki.mdwn
+++ b/doc/tips/inside_dot_ikiwiki.mdwn
@@ -63,3 +63,28 @@ To remove that user:
I've not written actual utilities to do this yet because I've only needed
to do it rarely, and the data I've wanted has been different each time.
--[[Joey]]
+
+## the session database
+
+`.ikiwiki/sessions.db` is the session database. See the [[!cpan CGI::Session]]
+documentation for more details.
+
+## lockfiles
+
+In case you're curious, here's what the various lock files do.
+
+* `.ikiwiki/lockfile` is the master ikiwiki lock file. Ikiwiki takes this
+ lock before reading/writing state.
+* `.ikiwiki/commitlock` is locked as a semophore, to disable the commit hook
+ from doing anything.
+* `.ikiwiki/cgilock` is locked by the cgi wrapper, to ensure that only
+ one ikiwiki process is run at a time to handle cgi requests.
+
+## plugin state files
+
+Some plugins create other files to store their state.
+
+* `.ikiwiki/aggregate` is a plain text database used by the aggregate plugin
+ to record feeds and known posts.
+* `.ikiwiki/xapian/` is created by the search plugin, and contains xapian-omega
+ configuration and the xapian database.
diff --git a/doc/tips/inside_dot_ikiwiki/discussion.mdwn b/doc/tips/inside_dot_ikiwiki/discussion.mdwn
index c05e7a3e0..34d5b9252 100644
--- a/doc/tips/inside_dot_ikiwiki/discussion.mdwn
+++ b/doc/tips/inside_dot_ikiwiki/discussion.mdwn
@@ -16,3 +16,50 @@ No idea how this happened. I've blown it away and recreated it but, for future
>>> --getctime does. --[[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]]
+
+<!-- Add by Blanko -->
+
+## Lost password for an user
+
+This morning, a person has lost its password. I was able to do something to make another password. This is the way I take :
+
+> You can certianly do that, but do note that ikiwiki will offer to mail a
+> user a password reset link if they lost their password. --[[Joey]]
+
+### Locate the user database
+
+As tips show us, the user database is in the source file, for an example :
+
+ src/.ikiwiki/userdb
+
+### See which user to modify
+
+Because I don't know the real login of the user, I have to read all the database :
+
+ perl -le 'use Storable; my $index=Storable::retrieve("userdb"); use Data::Dumper; print Dumper $index'
+
+Then I was able to find this :
+
+ 'Utilisateur' => {
+ 'email' => 'user@pl.fr',
+ 'cryptresettoken' => '$2a$10$cfVeOoVbFw9VzMlgEbPMsu34pwHIFP84mWlkrs2RCKknZYPZkPffm',
+ 'password' => '',
+ 'resettoken' => '',
+ 'cryptpassword' => '$2a$10$H8bYq.dlb68wpnfJgVZQhOdsF9JQ06cteRfhPQPB5eHKnD5Y3u7au',
+ 'regdate' => '1226574052'
+ },
+
+Let's have a look to modify lines.
+
+### Modify the line
+
+When you have found the line to modify, take the user name, and change its password to **sc** (for an example) :
+
+ perl -le 'use Storable; my $userinfo=Storable::retrieve("userdb"); $userinfo->{"Utilisateur"}->{cryptpassword}=q{$2a$10$7viOHCrUkdAVL135Kr6one1mpZQ/FWYC773G1yZ0EtQciI11sSDRS}; Storable::lock_nstore($userinfo, "userdb")'
+ perl -le 'use Storable; my $userinfo=Storable::retrieve("userdb"); $userinfo->{"Utilisateur"}->{cryptresettoken}=q{}; Storable::lock_nstore($userinfo, "userdb")'
+
+Because I don't know how suppress cryptresettoken and resettoken fields, I change their content with *null*.
+
+After all these modifications, the user *Utilisateur* could connect to its account with the password **sc**, and go to Preferences, then change its password.
+
+<!-- End of Blanko's modifications -->
diff --git a/doc/tips/laptop_wiki_with_git.mdwn b/doc/tips/laptop_wiki_with_git.mdwn
index 998ac7443..9758beb80 100644
--- a/doc/tips/laptop_wiki_with_git.mdwn
+++ b/doc/tips/laptop_wiki_with_git.mdwn
@@ -15,7 +15,7 @@ for setting up ikiwiki with git.
Next, `git clone` the source (`$REPOSITORY`, not `$SRCDIR`)
from the server to the laptop.
-Now, set up a [[web_server|apache_cgi]] on your laptop, if it doesn't
+Now, set up a [[web_server|dot_cgi]] on your laptop, if it doesn't
already have one.
Now you need to write a setup file for ikiwiki on the laptop. Mostly this
diff --git a/doc/tips/laptop_wiki_with_git/discussion.mdwn b/doc/tips/laptop_wiki_with_git/discussion.mdwn
index 234833ca7..6ce72ae7b 100644
--- a/doc/tips/laptop_wiki_with_git/discussion.mdwn
+++ b/doc/tips/laptop_wiki_with_git/discussion.mdwn
@@ -5,3 +5,8 @@ Or, was this last remark about rebuilding after pulling meant to apply to rebuil
[[DavidBremner]]
* *Updated* Now that I play with this a bit, this seems not so important. Having a seperate sync operation that I run from the laptop is no big deal, and lets me update the parts of my site not yet managed by ikiwiki at the same time.
+
+* Ok, I have finally finished to set this up. I have a question for you :) Is it mandatory to have a locally running webserver on the laptop ? I mean, do I need to setup the CGI wrapper on the laptop ? Is it possible to just add/edit/delete/whatever, git commit all the stuff and git push back to the server ? Thank you. --[[xma]]
+
+> Of course you don't need a web server on the laptop. It is useful for
+> previewing pages before publishing them though. --[[Joey]]
diff --git a/doc/tips/lighttpd_cgi.mdwn b/doc/tips/lighttpd_cgi.mdwn
deleted file mode 100644
index 5504b0658..000000000
--- a/doc/tips/lighttpd_cgi.mdwn
+++ /dev/null
@@ -1,15 +0,0 @@
-Here is how to enable cgi on [lighttpd](http://www.lighttpd.net/) and configure it in order to execute ikiwiki.cgi wherever it is located.
-
-* Activate cgi by linking `/etc/lighttpd/conf-available/10-cgi.conf` into `/etc/lighttpd/conf-enabled` ([doc](http://trac.lighttpd.net/trac/wiki/Docs%3AModCGI)).
-
-* Create `/etc/lighttpd/conf-available/90-ikiwiki-cgi.conf` and add a line like this:
-
- cgi.assign = ( "ikiwiki.cgi" => "", )
-
-* Activate ikiwiki-cgi by linking `/etc/lighttpd/conf-available/90-ikiwiki-cgi.conf` into `/etc/lighttpd/conf-enabled`.
-
-* Restart lighttpd server with something like `/etc/init.d/lighttpd restart`.
-
-Note that the first part enables cgi server wide but depending on default configuration, it may be not enough. The second part creates a specific rule that allow `ikiwiki.cgi` to be executed.
-
-**Warning:** I only use this on my development 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.
diff --git a/doc/tips/markdown_and_eclipse.mdwn b/doc/tips/markdown_and_eclipse.mdwn
new file mode 100644
index 000000000..9e8e9bfa9
--- /dev/null
+++ b/doc/tips/markdown_and_eclipse.mdwn
@@ -0,0 +1,4 @@
+For people that were not born with GNU emacs fingers,
+there is a markdown editor (with preview and outline)
+for [eclipse](http://www.eclipse.org) available
+[here](http://www.winterwell.com/software/markdown-editor.php).
diff --git a/doc/tips/nearlyfreespeech.mdwn b/doc/tips/nearlyfreespeech.mdwn
index 6715f0c29..4b3b02eac 100644
--- a/doc/tips/nearlyfreespeech.mdwn
+++ b/doc/tips/nearlyfreespeech.mdwn
@@ -81,7 +81,8 @@ Here is an example of how I set up a wiki:
nano ikiwiki.setup
# Set destdir to /home/htdocs
# Set srcdir to /home/private/wiki
- # Set url to http://yoursite.nfshost.com/ , set cgiurl likewise
+ # Set url to http://yoursite.nfshost.com/
+ # Set cgiurl to http://yoursite.nfshost.com/ikiwiki.cgi
# Uncomment the `rcs => "git"` line.
# Set the cgi_wrapper path to /home/htdocs/ikiwiki.cgi
# Set the git_wrapper path to /home/private/wiki.git/hooks/post-update
diff --git a/doc/tips/untrusted_git_push.mdwn b/doc/tips/untrusted_git_push.mdwn
new file mode 100644
index 000000000..aef67a3db
--- /dev/null
+++ b/doc/tips/untrusted_git_push.mdwn
@@ -0,0 +1,122 @@
+This tip will describe how to allow anyone on the planet to `git push`
+changes into your wiki, without needing a special account. All a user needs
+to know is:
+
+ git clone git://your.wiki/path
+ # now modify any of the files the wiki would let you modify on the web
+ git push
+
+This is a wonderful thing to set up for users, because then they can work
+on the wiki while offline, and they don't need to mess around with web
+browsers.
+
+## security
+
+But, you might be wondering, how can this possibly be secure. Won't users
+upload all sorts of garbage, change pages you don't want them to edit, and so
+on.
+
+The key to making it secure is configuring ikiwiki to run as your git
+repository's `pre-receive` hook. There it will examine every change that
+untrusted users push into the wiki, and reject pushes that contain changes
+that cannot be made using the web interface.
+
+So, unless you have the [[plugins/attachment]] plugin turned on,
+non-page files cannot be added. And if it's turned on, whatever
+`allowed_attachments` checks you have configured will also check files
+pushed into git.
+
+And, unless you have the [[plugins/remove]] plugin turned on, no
+files can be deleted.
+
+And if you have `locked_pages` configured, then it will also affect what's
+pushed into git.
+
+Untrusted committers will also not be able to upload files with strange
+modes, or push to any branch except for the configured `gitorigin_branch`,
+or manipulate tags.
+
+One thing to keep an eye on is uploading large files. It may be easier to
+do this via git push than using the web, and that could be abused.
+
+Also, no checking is done that the authors of commits are right, so people
+can make a commit that pretends to be done by someone else.
+
+## user setup
+
+Add a dedicated user who will push in untrusted commits. This user should have
+a locked password, and `git-shell` as its shell.
+
+ root@bluebird:/home/joey>adduser --shell=/usr/bin/git-shell --disabled-password anon
+ Adding user `anon' ...
+
+## ikiwiki setup
+
+You should set up ikiwiki before turning on anonymous push in git.
+
+Edit your wiki's setup file, and uncomment the lines for
+`git_test_receive_wrapper` and `untrusted_committers`.
+
+ # git pre-receive hook to generate
+ git_test_receive_wrapper => '/srv/git/ikiwiki.info/.git/hooks/pre-receive',
+ # unix users whose commits should be checked by the pre-receive hook
+ untrusted_committers => ['anon'],
+
+The `git_test_receive_wrapper` will become the git `pre-receive` hook. The
+`untrusted_committers` list is the list of unix users who will be pushing in
+untrusted changes. It should *not* include the user that ikiwiki normally runs
+as.
+
+Once you're done modifying the setup file, don't forget to run
+`ikiwiki -setup --refresh --wrappers` on it.
+
+## git setup
+
+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
+repository owned and writable by the group. See [[rcs/git]] for some more
+tips on setting up a git repository with multiple committers.
+
+Note that anon should *not* be able to write to the `srcdir`, *only* to the bare git
+repository for your wiki.
+
+If you want to allow git over `ssh`, generate a ssh key for anon, and
+publish the *private* key for other people to use. This is optional; you
+can use `git-daemon` instead and not worry about keys.
+
+Now set up `git-daemon`. It will need to run as user `anon`, and be
+configured to export your wiki's bare git repository. I set it up as
+follows in `/etc/inetd.conf`, and ran `/etc/init.d/openbsd-inetd restart`.
+
+ git stream tcp nowait anon /usr/bin/git-daemon git-daemon --inetd --export-all --interpolated-path=/srv/git/%H%D /srv/git
+
+At this point you should be able to `git clone git://your.wiki/path` from
+anywhere, and check out the source to your wiki. But you won't be able to
+push to it yet, one more change is needed to turn that on. Edit the
+`config` file of your bare git repository, and allow `git-daemon` to
+receive pushes:
+
+ [daemon]
+ receivepack = true
+
+Now pushes should be accepted, and your wiki immediatly be updated. If it
+doesn't, check your git repo's permissions, and make sure that the
+`post-update` and `pre-receive` hooks are suid so they run as the user who
+owns the `srcdir`.
+
+## infelicities
+
+If a user tries to push a changeset that ikiwiki doesn't like, it will
+abort the push before refs are updated. However, the changeset will still
+be present in your repository, wasting space. Since nothing refers to it,
+it will be expired eventually. You can speed up the expiry by running `git
+prune`.
+
+When aborting a push, ikiwiki displays an error message about why it didn't
+accept it. If using git over ssh, the user will see this error message,
+which is probably useful to them. But `git-daemon` is buggy, and hides this
+message from the user. This can make it hard for users to figure out why
+their push was rejected. (If this happens to you, look at "'git log --stat
+origin/master..`" and think about whether your changes would be accepted
+over the web interface.)
diff --git a/doc/tips/untrusted_git_push/discussion.mdwn b/doc/tips/untrusted_git_push/discussion.mdwn
new file mode 100644
index 000000000..d95c01ecf
--- /dev/null
+++ b/doc/tips/untrusted_git_push/discussion.mdwn
@@ -0,0 +1,33 @@
+I've just tried this (commit c1fa07a). Recent changes shows:
+
+<div id="change-c1fa07ad4f165b42c962ba2a310681107f38c4f7" class="metadata">
+<span class="desc"><br />Changed pages:</span>
+<span class="pagelinks">
+
+<a href="http://git.ikiwiki.info/?p=ikiwiki;a=blobdiff;h=8bfa3dd7601a09b11ecbd20026849a777dc4b1b9;hp=c6302616f52ec058de5a8f5956fc512149a2f1a3;hb=1ea66c3d3f0a33bc3f04d073457b525a70380c37;f=doc/users/jondowland.mdwn"><img src="/wikiicons/diff.png" alt="diff" /></a><a href="http://ikiwiki.info/ikiwiki.cgi?page=users%2Fjondowland&amp;do=recentchanges_link">users/jondowland</a>
+
+
+</span>
+<span class="desc"><br />Changed by:</span>
+<span class="committer">
+
+<a href="http://ikiwiki.info/ikiwiki.cgi?page=users%2Fjon&amp;do=recentchanges_link">jon</a>
+
+</span>
+<span class="desc"><br />Commit type:</span>
+<span class="committype">git</span>
+<span class="desc"><br />Date:</span>
+<span class="changedate"><span class="relativedate" title="Mon, 10 Nov 2008 18:24:22 -0500">18:24:22 11/10/08</span>
+</div>
+
+Note that the user for the commit is 'jon', and the link points at cgi to
+create users/jon. I was wondering if that is configurable for users pushing
+via git. It would be nice perhaps to specify it in some way, perhaps via a
+git-config setting (user.name?). I'm not too familiar with exactly what the
+changeset contains. -- [[users/Jon]]
+
+> All ikiwiki can do it look at who git has recorded as the author of
+> the change (and it looks at the username part of the email address).
+> You can set `user.email` in `.git/config`. --[[Joey]]
+
+> > Ah, excellent. In which case this *should* DTRT... -- [[users/Jon]]
diff --git a/doc/tips/upgrade_to_3.0.mdwn b/doc/tips/upgrade_to_3.0.mdwn
new file mode 100644
index 000000000..d22813bf2
--- /dev/null
+++ b/doc/tips/upgrade_to_3.0.mdwn
@@ -0,0 +1,95 @@
+Version 3.0 of ikiwiki makes some significant changes, which
+you will need to deal with when upgrading from ikiwiki 2.x.
+
+[[!toc ]]
+
+## setup file format change
+
+The layout of the setup file changed in a significant way in version 2.60
+of ikiwiki. If you have not changed yours to the new format, now would be a
+good time to do so. Some new features, like the [[plugins/websetup]]
+interface, need the new format setup file.
+
+You can convert old setup files into the new format by running
+`ikiwiki-transition setupformat your.setup`
+
+## moving settings from Preferences page
+
+The admin preferences page used to have settings for allowed attachments,
+locked pages, and banned users. These three settings have moved to the
+setup file, and will no longer appear on the admin preferences page once
+your wiki is upgraded to 3.0.
+
+You can move these preferences into the setup file by running
+`ikiwiki-transition moveprefs your.setup; ikiwiki -setup your.setup -refresh -wrappers`
+
+(Make sure you have converted the setup file to the new format first.)
+
+## prefix directives
+
+In 3.0, the syntax ikiwiki uses for [[directives|ikiwiki/directive]] has
+changed, requiring that the directive start with a bang:
+
+ \[[!directive ...]]
+
+If you would like to keep the old syntax, it is still supported, add the
+following to your setup file:
+
+ prefix_directives => 0,
+
+To convert to the new syntax, make sure that your setup file does *not*
+contain the above, then run `ikiwiki-transition prefix_directives your.setup`
+
+(And then commit the changes it makes to pages in your srcdir.)
+
+## 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
+them with "and" or "or":
+
+ sandbox !*/Discussion
+
+To convert this to a modern PageSpec, simply add "and" or "or" as
+appropriate between terms:
+
+ sandbox and !*/Discussion
+
+GlobLists have been deprecated for more than two years. If your wiki dates
+to the ikiwiki 1.0 era, you should check it for any that might have lurked
+unnoticed in it since back then. Ikiwiki version 2.72 will print warnings
+about any GlobLists it sees.
+
+## aggregateinternal
+
+If your wiki uses the [[aggregate|plugins/aggregate]] plugin, it will start
+to aggregate feeds to special "internal" pages.
+
+If you don't want this change, you can add the following to your setup
+file:
+
+ aggregateinternal => 0,
+
+Otherwise, follow this procedure to upgrade a wiki using the aggregate plugin:
+
+1. Update all [[PageSpecs|ikiwiki/PageSpec]] that refer to the aggregated
+ pages -- such as those in inlines. Put "internal()" around globs
+ in those PageSpecs. For example, if the PageSpec was `foo/*`, it should
+ be changed to `internal(foo/*)`. This has to be done because internal
+ pages are not matched by regular globs.
+2. Use [[ikiwiki-transition]] to rename all existing aggregated `.html`
+ files in the srcdir. The command to run is
+ `ikiwiki-transition aggregateinternal your.setup`,
+3. Refresh the wiki. (`ikiwiki -setup your.setup -refresh`)
+
+## embed / googlecalendar
+
+The googlecalendar plugin has been deprecated for a long time, and is
+removed in 3.0.
+
+The embed plugin is also now deprecated, though not yet removed.
+
+If you use either plugin to embed content from google, youtube, etc,
+into your wiki, you should instead configure the [[plugins/htmlscrubber]]
+to skip sanitising some pages, via the `htmlscrubber_skip` setting.
+See [[embedding_content]] for examples.
diff --git a/doc/tips/using_the_web_interface_with_a_real_text_editor.mdwn b/doc/tips/using_the_web_interface_with_a_real_text_editor.mdwn
index d696bacdb..cf9327395 100644
--- a/doc/tips/using_the_web_interface_with_a_real_text_editor.mdwn
+++ b/doc/tips/using_the_web_interface_with_a_real_text_editor.mdwn
@@ -4,3 +4,10 @@ you to use a real text editor like Emacs or Vim to edit the contents of text
areas. This allows you to edit ikiwiki pages with a real text editor through
the ikiwiki web interface, rather than only with direct commit
access. --[[JoshTriplett]]
+
+For Firefox or Iceweasel users, the vimperator extension is also a good
+idea. You can press Ctrl-I in the insert mode of vimperator and switch to
+an external editor, e.g. Vim. --[[WeakishJiang]]
+
+Finally, with wikis configured to allow, [[untrusted_git_push]], you can
+ditch the browser altogether. --[[Joey]]
diff --git a/doc/tips/vim_syntax_highlighting.mdwn b/doc/tips/vim_syntax_highlighting.mdwn
index 453efa8d1..172b763c3 100644
--- a/doc/tips/vim_syntax_highlighting.mdwn
+++ b/doc/tips/vim_syntax_highlighting.mdwn
@@ -1,2 +1,4 @@
-[[ikiwiki.vim]] is a vim syntax highlighting file for ikiwiki. Installation
-instructions are at the top of the file.
+[[ikiwiki.vim]] is a vim syntax highlighting file for ikiwiki
+[[ikiwiki/markdown]] files.
+
+Installation instructions are at the top of the file.
diff --git a/doc/tips/vim_syntax_highlighting/discussion.mdwn b/doc/tips/vim_syntax_highlighting/discussion.mdwn
index b1637e758..72cb52aab 100644
--- a/doc/tips/vim_syntax_highlighting/discussion.mdwn
+++ b/doc/tips/vim_syntax_highlighting/discussion.mdwn
@@ -1 +1,8 @@
-I'm going to look at merging this with potwiki.vim (a vim-based personal wiki) so that you can follow wiki-links and auto-create pages etc., direct from vim. (I'm writing this incase I don't get around to it) -- [[JonDowland]]
+I'm going to look at merging this with potwiki.vim (a vim-based personal wiki) so that you can follow wiki-links and auto-create pages etc., direct from vim. (I'm writing this incase I don't get around to it) -- [[users/Jon]]
+
+----
+
+Another attempt at the same thing is here:
+<http://plasticboy.com/markdown-vim-mode/>
+
+In my tests, [[ikiwiki.vim]] works better than that one, YMMV. --[[Joey]]
diff --git a/doc/tips/vim_syntax_highlighting/ikiwiki.vim b/doc/tips/vim_syntax_highlighting/ikiwiki.vim
index fd87f49a2..bbcad4239 100644
--- a/doc/tips/vim_syntax_highlighting/ikiwiki.vim
+++ b/doc/tips/vim_syntax_highlighting/ikiwiki.vim
@@ -1,6 +1,6 @@
" Vim syntax file
" Language: Ikiwiki (links)
-" Maintainer: Recai Okta (roktasATdebian.org)
+" Maintainer: Recai Oktaş (roktasATdebian.org)
" Last Change: 2007 May 29
" Instructions:
diff --git a/doc/todo/Add_DATE_parameter_for_use_in_templates.mdwn b/doc/todo/Add_DATE_parameter_for_use_in_templates.mdwn
index c908f57c8..8ecdf36d0 100644
--- a/doc/todo/Add_DATE_parameter_for_use_in_templates.mdwn
+++ b/doc/todo/Add_DATE_parameter_for_use_in_templates.mdwn
@@ -44,7 +44,7 @@ regenerate this one against that).
%config %links %renderedfiles %pagesources %destsources);
our $VERSION = 2.00; # plugin interface version, next is ikiwiki version
our $version="2.1";my $installdir="/usr";
- @@ -70,6 +70,7 @@ sub defaultconfig () { #{{{
+ @@ -70,6 +70,7 @@ sub defaultconfig () {
plugin => [qw{mdwn inline htmlscrubber passwordauth openid signinedit
lockedit conditional}],
timeformat => '%c',
@@ -52,27 +52,27 @@ regenerate this one against that).
locale => undef,
sslcookie => 0,
httpauth => 0,
- @@ -447,6 +448,15 @@ sub displaytime ($) { #{{{
+ @@ -447,6 +448,15 @@ sub displaytime ($) {
$config{timeformat}, localtime($time)));
- } #}}}
+ }
- +sub displaydate ($) { #{{{
+ +sub displaydate ($) {
+ my $time=shift;
+
+ # strftime doesn't know about encodings, so make sure
+ # its output is properly treated as utf8
+ return decode_utf8(POSIX::strftime(
+ $config{dateformat}, localtime($time)));
- +} #}}}
+ +}
+
- sub beautify_url ($) { #{{{
+ sub beautify_url ($) {
my $url=shift;
diff --git a/Plugin/inline.pm b/Plugin/inline.pm
index 8f6ab51..7bd6147 100644
--- a/Plugin/inline.pm
+++ b/Plugin/inline.pm
- @@ -148,6 +148,7 @@ sub preprocess_inline (@) { #{{{
+ @@ -148,6 +148,7 @@ sub preprocess_inline (@) {
$template->param(pageurl => urlto(bestlink($params{page}, $page), $params{destpage}));
$template->param(title => pagetitle(basename($page)));
$template->param(ctime => displaytime($pagectime{$page}));
diff --git a/doc/todo/Add_camelcase_exclusions.mdwn b/doc/todo/Add_camelcase_exclusions.mdwn
new file mode 100644
index 000000000..6b86132a0
--- /dev/null
+++ b/doc/todo/Add_camelcase_exclusions.mdwn
@@ -0,0 +1,23 @@
+Camelcase currently looks for any and call camelcase words and turns them into wiki links. This patch adds a config item called <code>camelcase_ignore</code> which is an array of camelcase words to ignore.
+
+<pre>
+--- /usr/share/perl5/IkiWiki/Plugin/camelcase.pm.orig 2008-12-24 11:49:14.000000000 +1300
++++ /usr/share/perl5/IkiWiki/Plugin/camelcase.pm 2008-12-24 12:02:21.000000000 +1300
+@@ -33,7 +33,11 @@
+ my $destpage=$params{destpage};
+
+ $params{content}=~s{$link_regexp}{
+- htmllink($page, $destpage, IkiWiki::linkpage($1))
++ if (grep {/$1/} @{ $config{'camelcase_ignore'} }) {
++ $1
++ } else {
++ htmllink($page, $destpage, IkiWiki::linkpage($1))
++ }
+ }eg;
+
+ return $params{content};
+</pre>
+
+--[[puck]]
+
+[[done]]
diff --git a/doc/todo/Add_showdown_GUI_input__47__edit.mdwn b/doc/todo/Add_showdown_GUI_input__47__edit.mdwn
index e864f5351..7e7947fbc 100644
--- a/doc/todo/Add_showdown_GUI_input__47__edit.mdwn
+++ b/doc/todo/Add_showdown_GUI_input__47__edit.mdwn
@@ -27,3 +27,5 @@ A demo is at <http://www.attacklab.net/showdown-gui.html>
>>> be necessary to insert some sort of placeholder, perhaps by outputting
>>> the text in monospace form w/ a lighter font to denote that it won't
>>> directly be shown in the page... -- [[harningt]]
+
+>>>>> We have a wmd plugin now. --[[Joey]]
diff --git a/doc/todo/Add_support_for_latest_Text::Markdown_as_found_on_CPAN.mdwn b/doc/todo/Add_support_for_latest_Text::Markdown_as_found_on_CPAN.mdwn
index 222cd8c46..6b9fa0535 100644
--- a/doc/todo/Add_support_for_latest_Text::Markdown_as_found_on_CPAN.mdwn
+++ b/doc/todo/Add_support_for_latest_Text::Markdown_as_found_on_CPAN.mdwn
@@ -12,7 +12,7 @@ This patch allows IkiWiki to work with either of the two:
--- IkiWiki/Plugin/mdwn.pm.orig 2008-03-08 11:33:50.000000000 +0100
+++ IkiWiki/Plugin/mdwn.pm 2008-03-08 13:37:21.000000000 +0100
- @@ -28,14 +28,20 @@ sub htmlize (@) { #{{{
+ @@ -28,14 +28,20 @@ sub htmlize (@) {
$markdown_sub=\&Markdown::Markdown;
}
else {
diff --git a/doc/todo/Allow_change_of_wiki_file_types.mdwn b/doc/todo/Allow_change_of_wiki_file_types.mdwn
index 8a398f2e0..19574b175 100644
--- a/doc/todo/Allow_change_of_wiki_file_types.mdwn
+++ b/doc/todo/Allow_change_of_wiki_file_types.mdwn
@@ -12,7 +12,7 @@ I was hoping that the [[plugins/rename]] plugin would allow web uses to change t
index 527ee88..123b772 100644
--- a/IkiWiki/Plugin/rename.pm
+++ b/IkiWiki/Plugin/rename.pm
- @@ -43,7 +43,7 @@ sub check_canrename ($$$$$$$) { #{{{
+ @@ -43,7 +43,7 @@ sub check_canrename ($$$$$$$) {
# Dest checks can be omitted by passing undef.
if (defined $dest) {
@@ -21,7 +21,7 @@ I was hoping that the [[plugins/rename]] plugin would allow web uses to change t
error(gettext("no change to the file name was specified"));
}
- @@ -54,7 +54,7 @@ sub check_canrename ($$$$$$$) { #{{{
+ @@ -54,7 +54,7 @@ sub check_canrename ($$$$$$$) {
}
# Must not be a known source file.
@@ -30,7 +30,7 @@ I was hoping that the [[plugins/rename]] plugin would allow web uses to change t
error(sprintf(gettext("%s already exists"),
htmllink("", "", $dest, noimageinline => 1)));
}
- @@ -97,6 +97,24 @@ sub rename_form ($$$) { #{{{
+ @@ -97,6 +97,24 @@ sub rename_form ($$$) {
$f->field(name => "do", type => "hidden", value => "rename", force => 1);
$f->field(name => "page", type => "hidden", value => $page, force => 1);
$f->field(name => "new_name", value => IkiWiki::pagetitle($page), size => 60);
@@ -55,7 +55,7 @@ I was hoping that the [[plugins/rename]] plugin would allow web uses to change t
$f->field(name => "attachment", type => "hidden");
return $f, ["Rename", "Cancel"];
- @@ -223,12 +241,19 @@ sub sessioncgi ($$) { #{{{
+ @@ -223,12 +241,19 @@ sub sessioncgi ($$) {
my $dest=IkiWiki::possibly_foolish_untaint(IkiWiki::titlepage($q->param("new_name")));
# The extension of dest is the same as src if it's
diff --git a/doc/todo/Allow_disabling_edit_and_preferences_links.mdwn b/doc/todo/Allow_disabling_edit_and_preferences_links.mdwn
new file mode 100644
index 000000000..a356c69df
--- /dev/null
+++ b/doc/todo/Allow_disabling_edit_and_preferences_links.mdwn
@@ -0,0 +1,54 @@
+This patch allows disabling the edit and preferences link in the config file. It is backwards compatible (so peoples edit and preferences links won't suddenly vanish).
+
+To disable edit or prefs respectively, add the following to the config file:
+
+<pre>
+ 'edit' => 0,
+ 'prefs' => 0,
+</pre>
+
+Patch:
+<pre>
+--- /usr/share/perl5/IkiWiki/Render.pm.orig 2008-12-23 16:49:00.000000000 +1300
++++ /usr/share/perl5/IkiWiki/Render.pm 2008-12-23 16:55:40.000000000 +1300
+@@ -80,8 +80,10 @@
+ my $actions=0;
+
+ if (length $config{cgiurl}) {
+- $template->param(editurl => cgiurl(do => "edit", page => $page));
+- $template->param(prefsurl => cgiurl(do => "prefs"));
++ $template->param(editurl => cgiurl(do => "edit", page => $page))
++ if ! defined $config{edit} || (defined $config{edit} && $config{edit} == 1);
++ $template->param(prefsurl => cgiurl(do => "prefs"))
++ if ! defined $config{prefs} || (defined $config{prefs} && $config{prefs} == 1);
+ $actions++;
+ }
+
+</pre>
+
+> On irc, you said, "That was to allow the hack to of using wikistatedir to
+> allow me to generate two websites, one with inline editting, the other a
+> static page for public consumption."
+>
+> The edit and preferences links can already be disabled by editing
+> `page.tmpl`. (Look for PREFSURL and EDITURL).
+>
+> More to the point though, disabling those links does not disable anyone
+> consticting the urls by hand and logging in and editing a page. So you'd
+> really want to disable the editpage plugin in the setup file for the
+> public, static wiki. Sounds like you might also want to turn off cgi
+> entirely for that build. --[[Joey]]
+
+>> I want to retain the same page.tmpl for both sites (different templates
+>> will just increase the maintenance hell), so disabling the links in the
+>> config for one public site works better in my case.
+>>
+>> I do have the editpage plugin disabled for the public static wiki, but
+>> the link still appears on the site. I want to keep the cgi on, so that
+>> the site is still searchable. --[[puck]]
+
+>>> For me, disabling the editpage plugin does make the "Edit" link
+>>> disappear (this is with 3.03) but as far as I can tell, "Preferences"
+>>> is not controlled by any plugin. It would be nice if it were; I am
+>>> trying to achieve a configuration where the only action supported
+>>> via CGI is blog-style comments. --[Zack](http://zwol.livejournal.com/)
diff --git a/doc/todo/Allow_edittemplate_to_set_file_type.mdwn b/doc/todo/Allow_edittemplate_to_set_file_type.mdwn
index b49968c18..1b99a4e05 100644
--- a/doc/todo/Allow_edittemplate_to_set_file_type.mdwn
+++ b/doc/todo/Allow_edittemplate_to_set_file_type.mdwn
@@ -14,7 +14,7 @@ edittemplate there. --[[Joey]]
index 98308de..c381940 100644
--- a/IkiWiki/Plugin/edittemplate.pm
+++ b/IkiWiki/Plugin/edittemplate.pm
- @@ -56,8 +56,14 @@ sub preprocess (@) { #{{{
+ @@ -56,8 +56,14 @@ sub preprocess (@) {
$pagestate{$params{page}}{edittemplate}{$params{match}}=$params{template};
@@ -28,10 +28,10 @@ edittemplate there. --[[Joey]]
+
+ return sprintf(gettext("edittemplate: %s registered for %s"),
+ $linkHTML, $params{match});
- } # }}}
+ }
- sub formbuilder (@) { #{{{
- @@ -89,6 +95,9 @@ sub formbuilder (@) { #{{{
+ sub formbuilder (@) {
+ @@ -89,6 +95,9 @@ sub formbuilder (@) {
if (pagespec_match($p, $pagespec, location => $registering_page)) {
$form->field(name => "editcontent",
value => filltemplate($pagestate{$registering_page}{edittemplate}{$pagespec}, $page));
diff --git a/doc/todo/Allow_filenames_that_are_all_type.mdwn b/doc/todo/Allow_filenames_that_are_all_type.mdwn
new file mode 100644
index 000000000..bebbcafa8
--- /dev/null
+++ b/doc/todo/Allow_filenames_that_are_all_type.mdwn
@@ -0,0 +1,41 @@
+This is a [[patch]] to allow filenames that are just the type. The best example of this is wanting to
+pass a `Makefile` through one of the [[todo/syntax_highlighting/]] plugins. With this patch,
+if the plugin can process files of type `.Makefile` then it will also process `Makefile`.
+
+I put this patch on the [[todo/syntax_highlighting/]] page a while ago, but it seemed to get
+lost because it didn't have its own bug to track it. Now it does :). -- [[Will]]
+
+> This changes `pagename()`, but what about `pagetype()`?
+> Many things in ikiwiki check if `pagetype($file)` returns
+> true to see if it's a page, etc. --[[Joey]]
+
+>> I think this patch is complete. It does not change `pagename()`, it
+>> changes `pagetype()` (the diff is fairly old - line numbers may have
+>> changed).
+>>
+>> Before this patch, `pagetype()` required a `.` in the page name. With
+>> this patch it doesn't, as long as the extension is being kept. This allows
+>> the filename to be all extension. `pagename()` relies on `pagetype()`
+>> to detect the type. `pagename()` also removes the extension on some
+>> pages, but this patch only affects pages where the extension isn't
+>> removed.
+>>
+>> So, yeah, I think this patch is complete. :) -- [[Will]]
+
+>>> Thanks, [[applied|done]], but I added a noextension parameter,
+>>> since having keepextension allow files with no extension didn't make
+>>> sense. Also, made it work for pages in subdirs.. --[[Joey]]
+
+ diff --git a/IkiWiki.pm b/IkiWiki.pm
+ index 8d728c9..1bd46a9 100644
+ --- a/IkiWiki.pm
+ +++ b/IkiWiki.pm
+ @@ -618,6 +618,8 @@ sub pagetype ($) {
+
+ if ($page =~ /\.([^.]+)$/) {
+ return $1 if exists $hooks{htmlize}{$1};
+ + } elsif ($hooks{htmlize}{$page}{keepextension}) {
+ + return $page;
+ }
+ return;
+ }
diff --git a/doc/todo/Bestdir_along_with_bestlink_in_IkiWiki.pm.mdwn b/doc/todo/Bestdir_along_with_bestlink_in_IkiWiki.pm.mdwn
index 73157a326..95c38f794 100644
--- a/doc/todo/Bestdir_along_with_bestlink_in_IkiWiki.pm.mdwn
+++ b/doc/todo/Bestdir_along_with_bestlink_in_IkiWiki.pm.mdwn
@@ -8,9 +8,9 @@ This patch adds function bestdir() which returns best directory from the directo
+++ IkiWiki.pm (working copy)
@@ -391,6 +391,35 @@
return "";
- } #}}}
+ }
- +sub bestdir ($$) { #{{{
+ +sub bestdir ($$) {
+ my $page=shift;
+ my $link=shift;
+ my $cwd=$page;
@@ -37,9 +37,9 @@ This patch adds function bestdir() which returns best directory from the directo
+ }
+
+ return "";
- +} #}}}
+ +}
+
- sub isinlinableimage ($) { #{{{
+ sub isinlinableimage ($) {
my $file=shift;
----
diff --git a/doc/todo/Default_text_for_new_pages.mdwn b/doc/todo/Default_text_for_new_pages.mdwn
index 4a17bbf8b..a904f8287 100644
--- a/doc/todo/Default_text_for_new_pages.mdwn
+++ b/doc/todo/Default_text_for_new_pages.mdwn
@@ -15,7 +15,7 @@ Inline below is a [[patch]] that implements this:
index bb21ed2..10c985c 100644
--- a/IkiWiki/Plugin/editpage.pm
+++ b/IkiWiki/Plugin/editpage.pm
- @@ -60,7 +60,7 @@ sub cgi_editpage ($$) { #{{{
+ @@ -60,7 +60,7 @@ sub cgi_editpage ($$) {
decode_cgi_utf8($q);
@@ -24,7 +24,7 @@ Inline below is a [[patch]] that implements this:
my @buttons=("Save Page", "Preview", "Cancel");
eval q{use CGI::FormBuilder};
error($@) if $@;
- @@ -117,9 +117,20 @@ sub cgi_editpage ($$) { #{{{
+ @@ -117,9 +117,20 @@ sub cgi_editpage ($$) {
}
else {
$type=$form->param('type');
@@ -45,7 +45,7 @@ Inline below is a [[patch]] that implements this:
elsif (defined $from && exists $pagesources{$from}) {
# favor the type of linking page
$type=pagetype($pagesources{$from});
- @@ -129,7 +140,7 @@ sub cgi_editpage ($$) { #{{{
+ @@ -129,7 +140,7 @@ sub cgi_editpage ($$) {
if (! $form->submitted) {
$form->field(name => "rcsinfo", value => "", force => 1);
}
@@ -58,7 +58,7 @@ Inline below is a [[patch]] that implements this:
index 8efef3f..075d7d8 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
- @@ -271,6 +271,7 @@ sub preprocess_inline (@) { #{{{
+ @@ -271,6 +271,7 @@ sub preprocess_inline (@) {
$rootpage=$params{page};
}
$formtemplate->param(rootpage => $rootpage);
diff --git a/doc/todo/Feature_parity_with_Trac.mdwn b/doc/todo/Feature_parity_with_Trac.mdwn
index 8693da5e3..b2d9d43ed 100644
--- a/doc/todo/Feature_parity_with_Trac.mdwn
+++ b/doc/todo/Feature_parity_with_Trac.mdwn
@@ -5,11 +5,12 @@ Features needed:
* Wiki, duh.
* Source code viewing: This can be handled quite well with a [[shortcut|shortcuts]] to an external source viewer, or by putting
- the source in the wiki itself (see the [[todo/automatic_use_of_syntax_plugin_on_source_code_files]] wishlist item) and using the
- [[plugins/contrib/highlightcode]] or [[plugins/contrib/sourcehighlight]] plugins.
+ the source in the wiki itself (see the [[todo/automatic_use_of_syntax_plugin_on_source_code_files]] wishlist item and [[todo/syntax_highlighting]] todo item).
* This could be improved with [[todo/source_link]].
* Currently the source highlighting is a little problematic, as there can be two source files with the same wikiname.
e.g. a `hello-world.c` and `hello-world.h`. See [[bugs/multiple_pages_with_same_name]]
+ > That bug was fixed before you linked to the page. :-)
+ >> I was the one that fixed it... :) -- [[Will]]
* Trac 'Timeline' feature: view history of the RCS - the `recentchanges` button.
* Trac 'Roadmap' feature: Which TODOs/bugs are needed for which milestones. Use the [[plugins/progress]] directive to show percentage complete for each milestone.
* Bug tracking: see [[tips/integrated_issue_tracking_with_ikiwiki]] and [[todo/Updated_bug_tracking_example]].
diff --git a/doc/todo/Gallery.mdwn b/doc/todo/Gallery.mdwn
index fbf1802fd..bc1d5bea4 100644
--- a/doc/todo/Gallery.mdwn
+++ b/doc/todo/Gallery.mdwn
@@ -1,6 +1,6 @@
New Version of gallery is available now. Few more features have been added like support for multiple pages, sorting and resizing of images etc.
-SVN repository of plugin is located at http://ned.snow-crash.org:8080/svn/ikiwiki-gallery
+Gallery repo is now available at <http://github.com/joeyh/ikiwiki/tree/gallery>
--[[arpitjain]]
@@ -73,3 +73,9 @@ Additional details are available [here](http://myweb.unomaha.edu/~ajain/ikiwikig
> the gallery and put it in a "gallery" branch of my git repository.
>
> --[[Joey]]
+
+----
+
+See also [[/users/smcv/gallery]] for another implementation of the same sort of
+thing. Unfortunately, none of the implementation ideas
+I have there seem quite right either... --[[smcv]]
diff --git a/doc/todo/Give_access_to_more_TMPL__95__VAR_variables_in_templates_inserted_by_the_template_plugin.mdwn b/doc/todo/Give_access_to_more_TMPL__95__VAR_variables_in_templates_inserted_by_the_template_plugin.mdwn
index a644e236b..c71250b3a 100644
--- a/doc/todo/Give_access_to_more_TMPL__95__VAR_variables_in_templates_inserted_by_the_template_plugin.mdwn
+++ b/doc/todo/Give_access_to_more_TMPL__95__VAR_variables_in_templates_inserted_by_the_template_plugin.mdwn
@@ -94,7 +94,7 @@ most possible of these pages.
> index a6e34fc..bb9dd8d 100644
> --- a/IkiWiki/Plugin/template.pm
> +++ b/IkiWiki/Plugin/template.pm
-> @@ -57,6 +57,8 @@ sub preprocess (@) { #{{{
+> @@ -57,6 +57,8 @@ sub preprocess (@) {
> }
> }
>
diff --git a/doc/todo/Improve_display_of_OpenIDs.mdwn b/doc/todo/Improve_display_of_OpenIDs.mdwn
new file mode 100644
index 000000000..e2ba1d90d
--- /dev/null
+++ b/doc/todo/Improve_display_of_OpenIDs.mdwn
@@ -0,0 +1,5 @@
+Some OpenIDs seen in the IkiWiki git history are displayed poorly in [[RecentChanges]], including mine :-) (`http://smcv.pseudorandom.co.uk/`, shown as `smcv.pseudorandom [co.uk]`)
+
+My `openid` branch on <http://git.pseudorandom.co.uk/> improves on a couple of cases and adds a regression test. --[[smcv]]
+
+[[!tag patch done]]
diff --git a/doc/todo/Inline_plugin_option_to_show_full_page_path.mdwn b/doc/todo/Inline_plugin_option_to_show_full_page_path.mdwn
index 9f52a724a..691694009 100644
--- a/doc/todo/Inline_plugin_option_to_show_full_page_path.mdwn
+++ b/doc/todo/Inline_plugin_option_to_show_full_page_path.mdwn
@@ -19,7 +19,7 @@ Cheers,
index 59eabb6..82913ba 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
- @@ -229,6 +229,7 @@ sub preprocess_inline (@) { #{{{
+ @@ -229,6 +229,7 @@ sub preprocess_inline (@) {
$template->param(content => $content);
}
$template->param(pageurl => urlto(bestlink($params{page}, $page), $params{destpage}));
diff --git a/doc/todo/Move_teximg_latex_preamble_to_config_file.mdwn b/doc/todo/Move_teximg_latex_preamble_to_config_file.mdwn
index d94d24ee4..3cedd5ae3 100644
--- a/doc/todo/Move_teximg_latex_preamble_to_config_file.mdwn
+++ b/doc/todo/Move_teximg_latex_preamble_to_config_file.mdwn
@@ -71,10 +71,10 @@ Happy TeXing.
+
+my $default_postfix = '\\end{document}';
+
- sub import { #{{{
+ sub import {
hook(type => "getsetup", id => "teximg", call => \&getsetup);
hook(type => "preprocess", id => "teximg", call => \&preprocess);
- @@ -21,6 +33,26 @@ sub getsetup () { #{{{
+ @@ -21,6 +33,26 @@ sub getsetup () {
safe => 1,
rebuild => undef,
},
@@ -98,10 +98,10 @@ Happy TeXing.
+ safe => 0, # Not sure how secure LaTeX is...
+ rebuild => 1,
+ },
- } #}}}
+ }
- sub preprocess (@) { #{{{
- @@ -105,25 +137,35 @@ sub gen_image ($$$$) { #{{{
+ sub preprocess (@) {
+ @@ -105,25 +137,35 @@ sub gen_image ($$$$) {
my $digest = shift;
my $imagedir = shift;
diff --git a/doc/todo/New_preprocessor_directive_syntax/discussion.mdwn b/doc/todo/New_preprocessor_directive_syntax/discussion.mdwn
index dda1ff5e9..f6c0fc0ec 100644
--- a/doc/todo/New_preprocessor_directive_syntax/discussion.mdwn
+++ b/doc/todo/New_preprocessor_directive_syntax/discussion.mdwn
@@ -1,2 +1,19 @@
Err, is this really fixed in 2.21? I can't find it anywhere in 2.32.3
(debian unstable)
+
+-----
+
+I just did a `--dumpsetup` with the current version from the Git repository
+and the default option is
+
+ # use '!'-prefixed preprocessor directives?
+ prefix_directives => 0,
+
+My impression was that this should be enabled by default now. --[[JasonBlevins]]
+
+> As stated in `debian/NEWS`:
+>> For backward compatibility with existing wikis,
+>> refix_directives currently defaults to false. In ikiwiki 3.0,
+>> prefix_directives will default to true [...]
+> --[[intrigeri]]
+
diff --git a/doc/todo/Option_to_make_title_an_h1__63__.mdwn b/doc/todo/Option_to_make_title_an_h1__63__.mdwn
index efa07ad79..f4023d6dd 100644
--- a/doc/todo/Option_to_make_title_an_h1__63__.mdwn
+++ b/doc/todo/Option_to_make_title_an_h1__63__.mdwn
@@ -6,3 +6,9 @@ Currently, the page title (either the name of the page or the title specified wi
> way, # is reserved for h1 if you choose to use headers in your page. --[[Joey]]
[[done]]
+
+> For anyone interested, I've written a small plugin called [h1title][] that does the
+> latter, making `#` (only when on the first line) set the page title, removing it from
+> the page body. --[[JasonBlevins]], October 22, 2008
+
+ [h1title]: http://code.jblevins.org/ikiwiki/plugins.git/plain/h1title.pm
diff --git a/doc/todo/RecentChanges_page_links_without_cgi_wrapper.mdwn b/doc/todo/RecentChanges_page_links_without_cgi_wrapper.mdwn
new file mode 100644
index 000000000..b37109032
--- /dev/null
+++ b/doc/todo/RecentChanges_page_links_without_cgi_wrapper.mdwn
@@ -0,0 +1,26 @@
+Links to the changed page on RecentChanges only show up if the cgi wrapper is
+enabled. It would be nice if links were also generated on wikis that do not use
+the cgi. [[svend]]
+
+> It would be, but doing so would make updating the recentchanges page for
+> each commit a lot slower, or would result in there often being broken
+> links there.
+>
+> The broken links would happen if a page is removed.
+>
+> The speed issue is that currently each individual change in the
+> recentchanges page is built just once, when the change is made, and the
+> html for it is reused thereafter. To avoid broken links, it would need to
+> regenerate each change's html on each commit. That's 100x the overhead.
+> (Perhaps it's possible to be smarter about which need generation tho.)
+>
+> The best way to approach this that I can see ATM is to use the
+> [[plugins/404]] plugin to handle the broken links and then recentchanges
+> could avoid explicitly using the CGI. But this doesn't meet your use case
+> of having no CGI.
+>
+> If you're willing to live with broken links to removed pages, I suppose
+> that could be made an option..
+> --[[Joey]]
+
+[[!tag wishlist]]
diff --git a/doc/todo/Set_arbitrary_date_to_be_used_by_calendar_plugin.mdwn b/doc/todo/Set_arbitrary_date_to_be_used_by_calendar_plugin.mdwn
index a26433919..89167c084 100644
--- a/doc/todo/Set_arbitrary_date_to_be_used_by_calendar_plugin.mdwn
+++ b/doc/todo/Set_arbitrary_date_to_be_used_by_calendar_plugin.mdwn
@@ -42,13 +42,13 @@ Longer term plans:
my %cache;
my %linkcache;
@@ -32,6 +34,7 @@
- sub import { #{{{
+ sub import {
hook(type => "needsbuild", id => "version", call => \&needsbuild);
hook(type => "preprocess", id => "calendar", call => \&preprocess);
+ hook(type => "preprocess", id => "event", call => \&preprocess_event);
- } #}}}
+ }
- sub is_leap_year (@) { #{{{
+ sub is_leap_year (@) {
@@ -58,6 +61,7 @@
my $nmonth = $params{nmonth};
my $pyear = $params{pyear};
@@ -137,9 +137,9 @@ Longer term plans:
# finish off the week
@@ -304,6 +333,18 @@
return $calendar;
- } #}}}
+ }
- +sub preprocess_event (@) { #{{{
+ +sub preprocess_event (@) {
+ my %params=@_;
+ # if now time is given, use now
+ $params{begin} = localtime($time) unless defined $params{begin};
@@ -151,7 +151,7 @@ Longer term plans:
+ return "<!-- $params{begin} -->";
+} #}}
+
- sub preprocess (@) { #{{{
+ sub preprocess (@) {
my %params=@_;
$params{pages} = "*" unless defined $params{pages};
@@ -311,6 +352,8 @@
diff --git a/doc/todo/Silence_monotone_warning.mdwn b/doc/todo/Silence_monotone_warning.mdwn
index e3f0224c2..d875900c5 100644
--- a/doc/todo/Silence_monotone_warning.mdwn
+++ b/doc/todo/Silence_monotone_warning.mdwn
@@ -4,7 +4,7 @@ A quick [[patch]] to silence a [[rcs/monotone]] warning I started seeing:
index 4b9be31..9d4e280 100644
--- a/IkiWiki/Plugin/monotone.pm
+++ b/IkiWiki/Plugin/monotone.pm
- @@ -55,7 +55,7 @@ sub checkconfig () { #{{{
+ @@ -55,7 +55,7 @@ sub checkconfig () {
error("Monotone version too old, is $version but required 0.38");
}
diff --git a/doc/todo/Support_wildcard_inside_of_link__40____41___within_a_pagespec.mdwn b/doc/todo/Support_wildcard_inside_of_link__40____41___within_a_pagespec.mdwn
index 2837634d9..8320f72a6 100644
--- a/doc/todo/Support_wildcard_inside_of_link__40____41___within_a_pagespec.mdwn
+++ b/doc/todo/Support_wildcard_inside_of_link__40____41___within_a_pagespec.mdwn
@@ -20,7 +20,7 @@ That doesn't work in ikiwiki 2.1, but I have it
index 38aa46a..cd42e8d 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
- @@ -1082,10 +1082,15 @@ sub match_link ($$;@) { #{{{
+ @@ -1082,10 +1082,15 @@ sub match_link ($$;@) {
my $links = $IkiWiki::links{$page} or return undef;
return IkiWiki::FailReason->new("$page has no links") unless @$links;
my $bestlink = IkiWiki::bestlink($from, $link);
@@ -38,7 +38,7 @@ That doesn't work in ikiwiki 2.1, but I have it
+ }
}
return IkiWiki::FailReason->new("$page does not link to $link");
- } #}}}
+ }
--
1.5.1.1.g6aead
diff --git a/doc/todo/Untrusted_push_in_Monotone.mdwn b/doc/todo/Untrusted_push_in_Monotone.mdwn
new file mode 100644
index 000000000..a8b1cd7c4
--- /dev/null
+++ b/doc/todo/Untrusted_push_in_Monotone.mdwn
@@ -0,0 +1,28 @@
+As noted in [[tips/untrusted_git_push]] an untrusted push capability was added recently, but only implemented in git.
+(See also [[todo/rcs_updates_needed]])
+
+This note describes (but does not implement) an approach for this with the [[rcs/monotone]] rcs backend.
+
+----
+
+Monotone behaves a little differently to git in its networking. Git allows anyone to try to push, and then
+check whether it is ok before finally accepting it. Monotone has no way to accept or reject revisions
+in this way. However, monotone does have the ability to mark revisions, and to ignore unmarked revisions.
+
+This marking capability can be used to achieve a somewhat similar effect to what happens with git. The
+problem with this is that anyone could put anything into the monotone database, and while this wouldn't
+affect ikiwiki, it seems bad to leave open, untrusted storage on the web.
+
+The Plan
+=====
+
+In the `note_netsync_revision_received` hook in the monotone server, have the server check to make sure
+that either a) the revision is signed by someone trusted or, b) the revision is checked using the same
+hook that git uses in `pre-receive`. If the revision passes the ikiwiki `pre-receive` check then the
+monotone hook signs the revision. This gives that revision the 'ikiwiki seal of approval'.
+
+You'll also want to update the monotone trust hooks to only trust revisions signed by trusted people, or
+ikiwiki.
+
+Now anyone can upload a revision, but only those signed by a trusted person, or which pass the ikiwiki
+check and so get signed by the ikiwiki key, will be seen by ikiwiki.
diff --git a/doc/todo/Wrapper_config_with_multiline_regexp.mdwn b/doc/todo/Wrapper_config_with_multiline_regexp.mdwn
index c0311bc92..7b4323de1 100644
--- a/doc/todo/Wrapper_config_with_multiline_regexp.mdwn
+++ b/doc/todo/Wrapper_config_with_multiline_regexp.mdwn
@@ -13,12 +13,12 @@ Second, the untainting of $configstring should allow newlines.
+++ wiki-meta/perl/IkiWiki.pm Mon Jun 11 10:52:07 2007
@@ -205,7 +205,7 @@
- sub possibly_foolish_untaint ($) { #{{{
+ sub possibly_foolish_untaint ($) {
my $tainted=shift;
- my ($untainted)=$tainted=~/(.*)/;
+ my ($untainted)=$tainted=~/(.*)/s;
return $untainted;
- } #}}}
+ }
Modified: wiki-meta/perl/IkiWiki/Wrapper.pm
diff --git a/doc/todo/add_forward_age_sorting_option_to_inline.mdwn b/doc/todo/add_forward_age_sorting_option_to_inline.mdwn
index 684419f90..e91c5a42f 100644
--- a/doc/todo/add_forward_age_sorting_option_to_inline.mdwn
+++ b/doc/todo/add_forward_age_sorting_option_to_inline.mdwn
@@ -19,7 +19,7 @@ diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index d2e5832..9e52712 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
-@@ -194,6 +194,9 @@ sub preprocess_inline (@) { #{{{
+@@ -194,6 +194,9 @@ sub preprocess_inline (@) {
elsif (! exists $params{sort} || $params{sort} eq 'age') {
@list=sort { $pagectime{$b} <=> $pagectime{$a} } @list;
}
diff --git a/doc/todo/allow_disabling_backlinks.mdwn b/doc/todo/allow_disabling_backlinks.mdwn
new file mode 100644
index 000000000..5dd4876e8
--- /dev/null
+++ b/doc/todo/allow_disabling_backlinks.mdwn
@@ -0,0 +1,18 @@
+This patch allows disabling the backlinks in the config file by setting nobacklinks to 0.
+
+It is backwards compatible, and by default enables backlinks in the generated pages.
+
+<pre>
+--- IkiWiki/Render.pm.orig2 2009-01-06 14:54:01.000000000 +1300
++++ IkiWiki/Render.pm 2009-01-06 14:55:08.000000000 +1300
+@@ -107,7 +107,8 @@
+ $template->param(have_actions => 1);
+ }
+
+- my @backlinks=sort { $a->{page} cmp $b->{page} } backlinks($page);
++ my @backlinks=sort { $a->{page} cmp $b->{page} } backlinks($page)
++ unless defined $config{nobacklinks} && $config{nobacklinks} == 0;
+ my ($backlinks, $more_backlinks);
+ if (@backlinks <= $config{numbacklinks} || ! $config{numbacklinks}) {
+ $backlinks=\@backlinks;
+</pre>
diff --git a/doc/todo/anti-spam_protection.mdwn b/doc/todo/anti-spam_protection.mdwn
index cb45faee5..b0524be5f 100644
--- a/doc/todo/anti-spam_protection.mdwn
+++ b/doc/todo/anti-spam_protection.mdwn
@@ -17,3 +17,14 @@ Cheers,
You might look at the Wikipedia page on "Spam\_in\_blogs" for more ideas. In particular, would it be possible to force a subset of the pages (by regex, but you'd choose the regex to match those pages which are publicly writable) to use rel="nofollow" in all links.
> I just wanted to leave a link here to the [[todo/require_CAPTCHA_to_edit]] plugin patch. Unfortunately that plugin currently interacts badly with the openid plugin. -- [[Will]]
+
+
+---
+
+Ikiwiki now has a checkcontent hook that plugins can use to see content
+that is being entered and check it for spam/whatever.
+
+There is a blogspam plugin that uses the blogspam.org service
+to check for common spam signatures. --[[Joey]]
+
+[[done]]
diff --git a/doc/todo/apache_404_ErrorDocument_handler.mdwn b/doc/todo/apache_404_ErrorDocument_handler.mdwn
new file mode 100644
index 000000000..4ae1d1a79
--- /dev/null
+++ b/doc/todo/apache_404_ErrorDocument_handler.mdwn
@@ -0,0 +1,25 @@
+Apache's ErrorDocument directive lets you write a CGI script that will be invoked for all 404s.
+IkiWiki could offer one as an optional wrapper; it would do much the same thing that the
+existing recentchanges_link (or [[generic___39__do__61__goto__39___for_CGI]]) does when
+encountering a nonexistent page.
+
+I think it'd probably have to be a separate CGI script because the environment with which
+404 handlers are invoked is somewhat odd, and because it needs to return a 404 status
+(having said that, it might make sense for `recentchanges_link` to return 404 rather than
+200 anyway if the page doesn't exist).
+
+> This turns out to be untrue, as long as the wrapper lets a couple of extra
+> environment variables through. --[[smcv]]
+
+This would give IkiWiki the behaviour of many other wikis, where visiting a page that
+does not yet exist prompts you to create it, without having to invoke the CGI for
+successful requests.
+
+Due to [a well-known MSIE misfeature](http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807),
+error output needs to be at least 512 bytes long, so some padding might also be required.
+
+Implemented in the 'goto' branch in my git repository. You can see this
+feature in action [on my blog](http://smcv.pseudorandom.co.uk/no/such/page/).
+--[[smcv]]
+
+[[done]]
diff --git a/doc/todo/applydiff_plugin.mdwn b/doc/todo/applydiff_plugin.mdwn
index d3eb9793b..d26b0dfe9 100644
--- a/doc/todo/applydiff_plugin.mdwn
+++ b/doc/todo/applydiff_plugin.mdwn
@@ -1,4 +1,4 @@
-[[!tag wishlist]]
+[[!tag wishlist done]]
[[!toc ]]
@@ -54,3 +54,57 @@ modify only *one* page may be easier.
Implementation
==============
+
+Also see [[joey]]'s idea on [[users/xma/discussion]], to allow (filtered) anonymous push to this wiki's repository.
+
+> Ideally the filtering should apply the same constraints on what's pushed
+> as are applied to web edits. So locked pages can't be changed, etc.
+>
+> That could be accomplished by making the git pre-receive hook be a
+> ikiwiki wrapper. A new `git_receive_wrapper` config setting could cause
+> the wrapper to be generated, with `$config{receive}` set to true.
+>
+> When run that way, ikiwiki would call `rcs_receive`. In the case of git,
+> that would look at the received changes as fed into the hook on stdin,
+> and use `parse_diff_tree` to get a list of the files changed. Then it
+> could determine if the changes were allowed.
+>
+> To do that, it should first look at what unix user received the
+> commit. That could be mapped directly to an ikiwiki user. This would
+> typically be an unprivelidged user (that was set up just to allow
+> anonymous pushes), but you might also want to set up
+> separate users who have fewer limits on what they can push. And, of
+> course, pushes from the main user, who owns the wiki, would not be
+> checked at all. So, let's say `$config{usermap}` is a hash, something
+> like `{usera => "wikiusera", userb => "wikiuserb"}`, and pushes from
+> users not in the hash are not checked.
+>
+> Then it seems like it would want to call `check_canedit` to test if an
+> edit to each changed page is allowed. Might also want to call
+> `check_canattach` and `check_canremove` if the attach and remove plugins
+> are enabled. All three expect to be passed a CGI and a CGI::Session
+> object, which is a bit problimatic here. So dummy the objects up? (To call
+> `check_canattach` the changed attachment would need to be extracted to a
+> temp file for it to check..)
+>
+> If a change is disallowed, it would print out what was disallowed, and
+> exit nonzero. I think that git then discards the pushed objects (or maybe
+> they remain in the database until `git-gc` .. if so, that could be used
+> to DOS by uploading junk, so need to check this point).
+>
+> Also, I've not verified that the objects have been recieved already when
+> whe pre-receive hook is called. Although the docs seem to say that is the
+> case. --[[Joey]]
+
+>> Update: The git pre-receive hook stuff is written, and seems to work.
+>> I think it makes more sense than using diffs, and so think this todo
+>> could probably be closed.
+>> --[[Joey]]
+
+>>> I agree, closing this. I really prefer this solution to the one I was
+>>> initially proposing.
+>>> Is this pre-receive hook already enabled on ikiwiki.info?
+>>> If not, do you plan to enable it at some point?
+>>> --[[intrigeri]]
+
+>>>> [[news/git_push_to_this_wiki]] gave me the answer. Well done! --[[intrigeri]]
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 bfb4a863b..ab9263556 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
@@ -7,3 +7,102 @@ Also see: <http://madduck.net/blog/2008.01.06:new-blog/> and <http://users.itk.p
[[!tag wishlist]]
I would love to see this as well. -- dato
+
+---
+
+I have create a patch to tag.pm for add the option for auto create tag pages.
+A new setting is used to enable or disable auto-create tag pages, `tag_autocreate`.
+The new tag file is created during the preprocess phase.
+The new tag file is then complied during the change phase.
+
+_tag.pm from version 3.01_
+
+
+ --- tag.pm 2009-02-06 10:26:03.000000000 -0700
+ +++ tag_new.pm 2009-02-06 12:17:19.000000000 -0700
+ @@ -14,6 +14,7 @@
+ hook(type => "preprocess", id => "tag", call => \&preprocess_tag, scan => 1);
+ hook(type => "preprocess", id => "taglink", call => \&preprocess_taglink, scan => 1);
+ hook(type => "pagetemplate", id => "tag", call => \&pagetemplate);
+ + hook(type => "change", id => "tag", call => \&change);
+ }
+
+ sub getopt () {
+ @@ -36,6 +37,36 @@
+ safe => 1,
+ rebuild => 1,
+ },
+ + tag_autocreate => {
+ + type => "boolean",
+ + example => 0,
+ + description => "Auto-create the new tag pages, uses autotagpage.tmpl ",
+ + safe => 1,
+ + rebulid => 1,
+ + },
+ +}
+ +
+ +my $autocreated_page = 0;
+ +
+ +sub gen_tag_page($) {
+ + my $tag=shift;
+ +
+ + my $tag_file=$tag.'.'.$config{default_pageext};
+ + return if (-f $config{srcdir}.$tag_file);
+ +
+ + my $template=template("autotagpage.tmpl");
+ + $template->param(tag => $tag);
+ + writefile($tag_file, $config{srcdir}, $template->output);
+ + $autocreated_page = 1;
+ +
+ + if ($config{rcs}) {
+ + IkiWiki::disable_commit_hook();
+ + IkiWiki::rcs_add($tag_file);
+ + IkiWiki::rcs_commit_staged(
+ + gettext("Automatic tag page generation"),
+ + undef, undef);
+ + IkiWiki::enable_commit_hook();
+ + }
+ }
+
+ sub tagpage ($) {
+ @@ -47,6 +78,10 @@
+ $tag=~y#/#/#s; # squash dups
+ }
+
+ + if (defined $config{tag_autocreate} && $config{tag_autocreate} ) {
+ + gen_tag_page($tag);
+ + }
+ +
+ return $tag;
+ }
+
+ @@ -125,4 +160,18 @@
+ }
+ }
+
+ +sub change(@) {
+ + return unless($autocreated_page);
+ + $autocreated_page = 0;
+ +
+ + # This refresh/saveindex is to complie the autocreated tag pages
+ + IkiWiki::refresh();
+ + IkiWiki::saveindex();
+ +
+ + # This refresh/saveindex is to fix the Tags link
+ + # With out this additional refresh/saveindex the tag link displays ?tag
+ + IkiWiki::refresh();
+ + IkiWiki::saveindex();
+ +}
+ +
+
+
+This uses a template called `autotagpage.tmpl`, here is my template file:
+
+ \[[!inline pages="link(<TMPL_VAR TAG>)" archive="yes"]]
+
+
+A quirk I have not figured out is during the `sub change`, see my comments in the code.
+I am not sure if that is the best way to handle it.
+
+[[!tag patch]]
+-- Jeremy Schultz <jeremy.schultz@uleth.ca>
diff --git a/doc/todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion.mdwn b/doc/todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion.mdwn
index 2fad9f19a..8bc75420d 100644
--- a/doc/todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion.mdwn
+++ b/doc/todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion.mdwn
@@ -1,13 +1,66 @@
Here is another [[patch]] for this. It is more up to date than either of the patches linked on the previous page. It is most similar to [[plugins/contrib/sourcehighlight]].
-Note that if this is being used with `c` or `c++` then you'll probably want to wait until [[bugs/multiple_pages_with_same_name]] is fixed.
+Updated to use fix noted in [[bugs/multiple_pages_with_same_name]].
-- [[Will]]
----
+I was trying to replace sourcehighlight with sourcecode. I had to modify the
+htmlize call slightly so that it would work in a format directive.
+([modified version](http://pivot.cs.unb.ca/git/?p=ikiplugins.git;a=blob_plain;f=IkiWiki/Plugin/sourcecode.pm;hb=21fc57091edb9))
+
+> I haven't tested them, but those changes look sensible to me. -- [[Will]]
+
+I hit a wall the following example (the last commit in the above repo).
+
+ \[[!meta title="Solutions to assignment 1"]]
+
+ - [[!format cc """
+ test
+ """]]
+
+
+> I haven't actually tested this to see what the problem is. How does this fail?
+> Does source-highlight barf on the non-c++ content? Is there a wiki URL that shows the failure? -- [[Will]]
+>> Here is the content div from the output page
+>> [[DavidBremner]]
+
+ <div id="content">
+ <p><ul>
+ <li><div id="sourcecode"></li>
+ </ul>
+ 2beb4fd7289998159f61976143f66bb6</p>
+
+ <p></div></p>
+
+ </div>
+
+>>> That is quite strange. I tested your version of the plugin. I had to revert one your changes to get it to
+>>> work: the linenumber argument should not have a space at the end of it. Once I made that change,
+>>> everything worked as expected. The output I get for your example is below:
+
+ <div id="content">
+ <ul>
+ <li><div id="sourcecode"></li>
+ </ul>
+
+ <pre><tt><span class="linenum">00001:</span> <span class="normal">test</span></tt></pre>
+
+ <p></div></p>
+
+ </div>
+
+>>> I don't know what is going wrong for you... source-highlight, Markdown or something else.
+>>> I do find it interesting the way the sourcecode `div` and the list get interleaved. That
+>>> just looks like a Markdown thing though.
+>>> In any case, I've updated the patch below to include most of your changes. -- [[Will]]
+
+----
#!/usr/bin/perl
# markup source files
+ # Originally by Will Uther
+ # With modifications by David Bremner
package IkiWiki::Plugin::sourcecode;
use warnings;
@@ -17,143 +70,145 @@ Note that if this is being used with `c` or `c++` then you'll probably want to w
my %metaheaders;
- sub import { #{{{
- hook(type => "getsetup", id => "sourcecode", call => \&getsetup);
- hook(type => "checkconfig", id => "sourcecode", call => \&checkconfig);
- hook(type => "pagetemplate", id => "sourcecode", call => \&pagetemplate);
- } # }}}
-
- sub getsetup () { #{{{
- return
- plugin => {
- safe => 1,
- rebuild => 1, # format plugin
- },
- sourcecode_command => {
- type => "string",
- example => "/usr/bin/source-highlight",
- description => "The command to execute to run source-highlight",
- safe => 0,
- rebuild => 1,
- },
- sourcecode_lang => {
- type => "string",
- example => "c,cpp,h,java",
- description => "Comma separated list of suffixes to recognise as source code",
- safe => 1,
- rebuild => 1,
- },
- sourcecode_linenumbers => {
- type => "boolean",
- example => 1,
- description => "Should we add line numbers to the source code",
- safe => 1,
- rebuild => 1,
- },
- sourcecode_css => {
- type => "string",
- example => "sourcecode_style",
- description => "page to use as css file for source",
- safe => 1,
- rebuild => 1,
- },
- } #}}}
-
- sub checkconfig () { #{{{
- if (! $config{sourcecode_lang}) {
- error("The sourcecode plugin requires a list of suffixes in the 'sourcecode_lang' config option");
- }
-
- if (! $config{sourcecode_command}) {
- $config{sourcecode_command} = "source-highlight";
- }
-
- if (! length `which $config{sourcecode_command} 2>/dev/null`) {
- error("The sourcecode plugin is unable to find the $config{sourcecode_command} command");
- }
-
- if (! $config{sourcecode_css}) {
- $config{sourcecode_css} = "sourcecode_style";
- }
-
- if (! defined $config{sourcecode_linenumbers}) {
- $config{sourcecode_linenumbers} = 1;
- }
-
- my %langs = ();
-
- open(LANGS, "$config{sourcecode_command} --lang-list|");
- while (<LANGS>) {
- if ($_ =~ /(\w+) = .+\.lang/) {
- $langs{$1} = 1;
- }
- }
- close(LANGS);
-
- foreach my $lang (split(/[, ]+/, $config{sourcecode_lang})) {
- if ($langs{$lang}) {
- hook(type => "htmlize", id => $lang, call => \&htmlize);
- } else {
- error("Your installation of source-highlight cannot handle sourcecode language $lang!");
- }
- }
- } #}}}
-
- sub htmlize (@) { #{{{
- my %params=@_;
-
- my $page = $params{page};
-
- eval q{use FileHandle};
- error($@) if $@;
- eval q{use IPC::Open2};
- error($@) if $@;
-
- local(*SPS_IN, *SPS_OUT); # Create local handles
-
- my @args;
-
- if ($config{sourcecode_linenumbers}) {
- push @args, '--line-number= ';
- }
-
- my $pid = open2(*SPS_IN, *SPS_OUT, $config{sourcecode_command},
- '-s', IkiWiki::pagetype($pagesources{$page}),
- '-c', $config{sourcecode_css}, '--no-doc',
- '-f', 'xhtml',
- @args);
-
- error("Unable to open $config{sourcecode_command}") unless $pid;
-
- print SPS_OUT $params{content};
- close SPS_OUT;
-
- my @html = <SPS_IN>;
- close SPS_IN;
-
- waitpid $pid, 0;
-
- my $stylesheet=bestlink($page, $config{sourcecode_css}.".css");
- if (length $stylesheet) {
- push @{$metaheaders{$page}}, '<link href="'.urlto($stylesheet, $page).'"'.
- ' rel="stylesheet"'.
- ' type="text/css" />';
- }
-
- return '<div id="sourcecode">'."\r\n".join("\r\n",@html)."\r\n</div>\n";
- } # }}}
-
- sub pagetemplate (@) { #{{{
- my %params=@_;
-
- my $page=$params{page};
- my $template=$params{template};
-
- if (exists $metaheaders{$page} && $template->query(name => "meta")) {
- # avoid duplicate meta lines
- my %seen;
- $template->param(meta => join("\n", grep { (! $seen{$_}) && ($seen{$_}=1) } @{$metaheaders{$page}}));
- }
- } # }}}
+ sub import {
+ hook(type => "getsetup", id => "sourcecode", call => \&getsetup);
+ hook(type => "checkconfig", id => "sourcecode", call => \&checkconfig);
+ hook(type => "pagetemplate", id => "sourcecode", call => \&pagetemplate);
+ }
+
+ sub getsetup () {
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 1, # format plugin
+ },
+ sourcecode_command => {
+ type => "string",
+ example => "/usr/bin/source-highlight",
+ description => "The command to execute to run source-highlight",
+ safe => 0,
+ rebuild => 1,
+ },
+ sourcecode_lang => {
+ type => "string",
+ example => "c,cpp,h,java",
+ description => "Comma separated list of suffixes to recognise as source code",
+ safe => 1,
+ rebuild => 1,
+ },
+ sourcecode_linenumbers => {
+ type => "boolean",
+ example => 1,
+ description => "Should we add line numbers to the source code",
+ safe => 1,
+ rebuild => 1,
+ },
+ sourcecode_css => {
+ type => "string",
+ example => "sourcecode_style",
+ description => "page to use as css file for source",
+ safe => 1,
+ rebuild => 1,
+ },
+ }
+
+ sub checkconfig () {
+ if (! $config{sourcecode_lang}) {
+ error("The sourcecode plugin requires a list of suffixes in the 'sourcecode_lang' config option");
+ }
+
+ if (! $config{sourcecode_command}) {
+ $config{sourcecode_command} = "source-highlight";
+ }
+
+ if (! length `which $config{sourcecode_command} 2>/dev/null`) {
+ error("The sourcecode plugin is unable to find the $config{sourcecode_command} command");
+ }
+
+ if (! $config{sourcecode_css}) {
+ $config{sourcecode_css} = "sourcecode_style";
+ }
+
+ if (! defined $config{sourcecode_linenumbers}) {
+ $config{sourcecode_linenumbers} = 1;
+ }
+
+ my %langs = ();
+
+ open(LANGS, "$config{sourcecode_command} --lang-list|");
+ while (<LANGS>) {
+ if ($_ =~ /(\w+) = .+\.lang/) {
+ $langs{$1} = 1;
+ }
+ }
+ close(LANGS);
+
+ foreach my $lang (split(/[, ]+/, $config{sourcecode_lang})) {
+ if ($langs{$lang}) {
+ hook(type => "htmlize", id => $lang, no_override=>1,
+ call => sub { htmlize(lang=>$lang, @_) },
+ keepextension => 1);
+ } else {
+ error("Your installation of source-highlight cannot handle sourcecode language $lang!");
+ }
+ }
+ }
+
+ sub htmlize (@) {
+ my %params=@_;
+
+ my $page = $params{page};
+
+ eval q{use FileHandle};
+ error($@) if $@;
+ eval q{use IPC::Open2};
+ error($@) if $@;
+
+ local(*SPS_IN, *SPS_OUT); # Create local handles
+
+ my @args;
+
+ if ($config{sourcecode_linenumbers}) {
+ push @args, '--line-number';
+ }
+
+ my $pid = open2(*SPS_IN, *SPS_OUT, $config{sourcecode_command},
+ '-s', $params{lang},
+ '-c', $config{sourcecode_css}, '--no-doc',
+ '-f', 'xhtml',
+ @args);
+
+ error("Unable to open $config{sourcecode_command}") unless $pid;
+
+ print SPS_OUT $params{content};
+ close SPS_OUT;
+
+ my @html = <SPS_IN>;
+ close SPS_IN;
+
+ waitpid $pid, 0;
+
+ my $stylesheet=bestlink($page, $config{sourcecode_css}.".css");
+ if (length $stylesheet) {
+ push @{$metaheaders{$page}}, '<link href="'.urlto($stylesheet, $page).'"'.
+ ' rel="stylesheet"'.
+ ' type="text/css" />';
+ }
+
+ return '<div id="sourcecode">'."\r\n".join("",@html)."\r\n</div>\r\n";
+ }
+
+ sub pagetemplate (@) {
+ my %params=@_;
+
+ my $page=$params{page};
+ my $template=$params{template};
+
+ if (exists $metaheaders{$page} && $template->query(name => "meta")) {
+ # avoid duplicate meta lines
+ my %seen;
+ $template->param(meta => join("\n", grep { (! $seen{$_}) && ($seen{$_}=1) } @{$metaheaders{$page}}));
+ }
+ }
1
diff --git a/doc/todo/avatar.mdwn b/doc/todo/avatar.mdwn
new file mode 100644
index 000000000..b8aa2327f
--- /dev/null
+++ b/doc/todo/avatar.mdwn
@@ -0,0 +1,47 @@
+[[!tag wishlist]]
+
+It would be nice if ikiwiki, particularly [[plugins/comments]]
+supported user avatar icons. I was considering adding a directive for this,
+as designed below.
+
+However, there is no *good* service for mapping openids to avatars --
+openavatar has many issues, including not supporting delegated openids, and
+after trying it, I don't trust it to push users toward.
+Perhaps instead ikiwiki could get the email address from the openid
+provider, though I think the perl openid modules don't support the openid
+2.x feature that allows that.
+
+At the moment, working on this doesn't feel like a good use of my time.
+--[[Joey]]
+
+Hmm.. unless is just always used a single provider (gravatar) and hashed
+the openid. Then wavatars could be used to get a unique avatar per openid
+at least. --[[Joey]]
+
+----
+
+The directive displays a small avatar image for a user. Pass it the
+email address, openid, or wiki username of the user.
+
+ \[[!avatar user@example.com]]
+ \[[!avatar http://joey.kitenet.net/]]
+ \[[!avatar user]]
+
+The avatars are provided by various sites. For email addresses, it uses a
+[gravatar](http://gravatar.com/). For openid,
+[openavatar](http://www.openvatar.com/) is used. For a wiki username, the
+user's email address is looked up and the gravatar for that user is
+displayed. (Of course, the user has to have filled in their email address
+on their Preferences page for that to work.)
+
+An optional second parameter can be included, containing additional
+options to pass in the
+[gravatar url](http://en.gravatar.com/site/implement/url).
+For example, this asks for a smaller gravatar, and if a user does
+not have a gravatar, uses a cute auto-generated "wavatar" avatar.
+
+ \[[!gravatar user@example.com "size=40&default=wavatar"]]
+
+The `gravitar_options` setting in the setup file can be used to
+specify additional options to pass. So for example if you want
+to use wavatars everywhere, set it to "default=wavatar".
diff --git a/doc/todo/avoid_thrashing.mdwn b/doc/todo/avoid_thrashing.mdwn
new file mode 100644
index 000000000..45b11d872
--- /dev/null
+++ b/doc/todo/avoid_thrashing.mdwn
@@ -0,0 +1,22 @@
+Problem: Suppose a server has 256 mb ram. Each ikiwiki process needs about
+15 mb, before it's loaded the index. (And maybe 25 after, but only one such
+process runs at any time). That allows for about 16 ikiwiki processes to
+run concurrently on a server, before it starts to swap. Of course, anything
+else that runs on the server and eats memory will affect this.
+
+One could just set `MaxClients 16` in the apache config, but then it's also
+limited to 16 clients serving static pages, which is silly. Also, 16 is
+optimistic -- 8 might be a saner choice. And then, what if something on the
+server decides to eat a lot of memory? Ikiwiki can again overflow memory
+and thrash.
+
+It occurred to me that the ikiwiki cgi wrapper could instead do locking of
+its own (say of `.ikiwiki/cgilock`). The wrapper only needs a few kb to
+run, and it starts *fast*. So hundreds could be running waiting for a lock
+with no ill effects. Crank `MaxClients` up to 256? No problem..
+
+And there's no real reason to allow more than one ikiwiki cgi to run at a
+time. Since almost all uses of the CGI lock the index, only one can really
+be doing anything at a time. --[[Joey]]
+
+[[done]]
diff --git a/doc/todo/blogpost_plugin.mdwn b/doc/todo/blogpost_plugin.mdwn
index 60b1e2515..bb91ffd02 100644
--- a/doc/todo/blogpost_plugin.mdwn
+++ b/doc/todo/blogpost_plugin.mdwn
@@ -51,13 +51,13 @@ Index: IkiWiki/Plugin/blogpost.pm
+use POSIX;
+use IkiWiki 2.00;
+
-+sub import { #{{{
++sub import {
+ hook(type => "checkconfig", id => "blogpost", call => \&checkconfig);
+ hook(type => "authcgi", id => "blogpost", call => \&authcgi);
+ hook(type => "canedit", id => "blogpost", call => \&canedit);
-+} # }}}
++}
+
-+sub checkconfig () { #{{{
++sub checkconfig () {
+ if (! defined $config{blogformat}){
+ $config{blogformat} = 'posts/%Y/%m/%d/$title';
+ }
@@ -72,9 +72,9 @@ Index: IkiWiki/Plugin/blogpost.pm
+ if (! defined $config{blogusers}) {
+ $config{blogusers} = (); # disallow all posting by default
+ }
-+} #}}}
++}
+
-+sub authcgi ($$) { #{{{
++sub authcgi ($$) {
+ my $cgi=shift;
+ my $session=shift;
+
@@ -115,16 +115,16 @@ Index: IkiWiki/Plugin/blogpost.pm
+ $cgi->param("page", $page);
+ }
+
-+} #}}}
++}
+
-+sub blogpage ($) { #{{{
++sub blogpage ($) {
+ my $title=shift;
+ my $page=POSIX::strftime $config{blogformat}, localtime;
+ $page =~ s/\$title/$title/;
+ return $page;
-+} #}}}
++}
+
-+sub canedit ($$$) { #{{{
++sub canedit ($$$) {
+ my $page=shift;
+ my $cgi=shift;
+ my $session=shift;
@@ -136,7 +136,7 @@ Index: IkiWiki/Plugin/blogpost.pm
+ return "" if ($config{blogusers} eq "*" ||
+ grep {$_ eq $user} $config{blogusers});
+ return ("not allowed to blog, $user");
-+} #}}}
++}
+
+1
Index: IkiWiki.pm
diff --git a/doc/todo/bzr.mdwn b/doc/todo/bzr.mdwn
index 179ea2f24..a50c58d26 100644
--- a/doc/todo/bzr.mdwn
+++ b/doc/todo/bzr.mdwn
@@ -56,15 +56,15 @@ and rcs_getctime and rcs_notify aren't written at all. --[[bma]]
return @ret;
}
- sub rcs_update () { #{{{
+ sub rcs_update () {
# Not needed.
- } #}}}
+ }
- sub rcs_prepedit ($) { #{{{
+ sub rcs_prepedit ($) {
return "";
- } #}}}
+ }
- sub rcs_commit ($$$;$$) { #{{{
+ sub rcs_commit ($$$;$$) {
my ($file, $message, $rcstoken, $user, $ipaddr) = @_;
if (defined $user) {
@@ -95,18 +95,18 @@ and rcs_getctime and rcs_notify aren't written at all. --[[bma]]
system("bzr","whoami",$olduser);
return undef; # success
- } #}}}
+ }
- sub rcs_add ($) { # {{{
+ sub rcs_add ($) {
my ($file) = @_;
my @cmdline = ("bzr", "add", "--quiet", "$config{srcdir}/$file");
if (system(@cmdline) != 0) {
warn "'@cmdline' failed: $!";
}
- } #}}}
+ }
- sub rcs_recentchanges ($) { #{{{
+ sub rcs_recentchanges ($) {
my ($num) = @_;
eval q{use CGI 'escapeHTML'};
@@ -153,15 +153,15 @@ and rcs_getctime and rcs_notify aren't written at all. --[[bma]]
}
return @ret;
- } #}}}
+ }
- sub rcs_notify () { #{{{
+ sub rcs_notify () {
# TODO
- } #}}}
+ }
- sub rcs_getctime ($) { #{{{
+ sub rcs_getctime ($) {
# TODO
- } #}}}
+ }
1
diff --git a/doc/todo/cas_authentication.mdwn b/doc/todo/cas_authentication.mdwn
index c8ffe7005..8bf7042df 100644
--- a/doc/todo/cas_authentication.mdwn
+++ b/doc/todo/cas_authentication.mdwn
@@ -43,11 +43,11 @@ follows) ?
> the use of it: `eval q{use AuthCAS}; error $@ if $@`
+
- +sub import { #{{{
+ +sub import {
+ hook(type => "getopt", id => "cas", call => \&getopt);
+ hook(type => "auth", id => "cas", call => \&auth);
+ hook(type => "formbuilder_setup", id => "cas", call => \&formbuilder_setup);
- +} # }}}
+ +}
> Could you please use tabs for indentation of program flow?
@@ -61,15 +61,15 @@ follows) ?
> Why would you want to make other auth plugins not work? Could a site not
> legitimatly chose to use this and another auth method?
- +sub getopt () { #{{{
+ +sub getopt () {
+ eval q{use Getopt::Long};
+ error($@) if $@;
+ Getopt::Long::Configure('pass_through');
+ GetOptions("cas_url=s" => \$config{cas_url});
+ GetOptions("ca_file=s" => \$config{ca_file});
- +} #}}}
+ +}
+
- +sub auth ($$) { #{{{
+ +sub auth ($$) {
+ my $q=shift;
+ my $session=shift;
+
@@ -98,11 +98,11 @@ follows) ?
+ error("CAS failure: ".&AuthCAS::get_errors());
+ }
+ }
- +} #}}}
+ +}
+
+# I use formbuilder_setup and not formbuilder type in order to bypass the
+# Logout processing done in IkiWiki::CGI::cgi_prefs()
- +sub formbuilder_setup (@) { #{{{
+ +sub formbuilder_setup (@) {
+ my %params=@_;
+
+ my $form=$params{form};
diff --git a/doc/todo/clear_page_to_delete.mdwn b/doc/todo/clear_page_to_delete.mdwn
new file mode 100644
index 000000000..6bab6ef27
--- /dev/null
+++ b/doc/todo/clear_page_to_delete.mdwn
@@ -0,0 +1,33 @@
+Would it make sense to automatically delete a page if it's edited and
+cleared to be entirely empty (or only have whitespace)? Discuss. --[[Joey]]
+
+ I'd say so; yes. A method of deleting pages via the web would be great; I
+can't think of a use of keeping blank pages around. What about vandalism --
+if someone blanks a page and deletes it and someone else wishes to restore
+it; or is undoing edits via the web a bigger issue? -- [[users/Jon]]
+
+Of course there's already a way to delete pages (remove plugin). So the
+question is really:
+
+* Does it make sense to have a second way to do it, by clearing the page?
+* Should it be enabled even if the full remove plugin isn't?
+
+Re vandalism in general, I am generally happy using git-revert to kill the
+offending change. --[[Joey]]
+
+I don't think we need a second way to delete pages, which would probably be
+used by the only few people who will learn it's possible by random
+documentation reading, find it useful, *and* remember it. -- [[intrigeri]]
+
+On the other hand, clearing the page's whole content essentially means deleting
+the page. That's what the user intended to do in this case. The information
+content of an empty vs. a deleted page is essentially the same, I'd say. But
+having ikiwiki remove those stale pages would save some (minimal, admittedly)
+time needed for manual clean-up. --[[tschwinge]]
+
+On EmacsWiki, a page is marked for deletion when it contains just the DeletedPage
+keyword and if there were no page editions since XX days. Here, I use pages that
+can be empty everyday and filled all day long. It does not make sense to me to
+delete these pages :). --[[xma]]
+
+I was not aware of [[plugins/remove]]. I don't think another method is necessary -- [[users/Jon]]
diff --git a/doc/todo/color_plugin.mdwn b/doc/todo/color_plugin.mdwn
index 69afe837d..19fba3b35 100644
--- a/doc/todo/color_plugin.mdwn
+++ b/doc/todo/color_plugin.mdwn
@@ -132,12 +132,12 @@ Of course, I'm open for discussion or exchange of ideas :) --[[Paweł|ptecza]]
+use strict;
+use IkiWiki 2.00;
+
- +sub import { #{{{
+ +sub import {
+ hook(type => "preprocess", id => "color", call => \&preprocess);
+ hook(type => "format", id => "color", call => \&format);
- +} #}}}
+ +}
+
- +sub preserve_style ($$$) { #{{{
+ +sub preserve_style ($$$) {
+ my $foreground = shift;
+ my $background = shift;
+ my $text = shift;
@@ -162,18 +162,18 @@ Of course, I'm open for discussion or exchange of ideas :) --[[Paweł|ptecza]]
+
+ return $preserved;
+
- +} #}}}
+ +}
+
- +sub replace_preserved_style ($) { #{{{
+ +sub replace_preserved_style ($) {
+ my $content = shift;
+
+ $content =~ s!<span class="color">((color: ([a-z]+|\#[0-9a-f]{3,6})?)?((; )?(background-color: ([a-z]+|\#[0-9a-f]{3,6})?)?)?)</span>!<span class="color" style="$1">!g;
+ $content =~ s!<span class="colorend">!!g;
+
+ return $content;
- +} #}}}
+ +}
+
- +sub preprocess (@) { #{{{
+ +sub preprocess (@) {
+ my %params = @_;
+
+ # Preprocess the text to expand any preprocessor directives
@@ -182,14 +182,14 @@ Of course, I'm open for discussion or exchange of ideas :) --[[Paweł|ptecza]]
+ IkiWiki::filter($params{page}, $params{destpage}, $params{text}));
+
+ return preserve_style($params{foreground}, $params{background}, $params{text});
- +} #}}}
+ +}
+
- +sub format (@) { #{{{
+ +sub format (@) {
+ my %params = @_;
+
+ $params{content} = replace_preserved_style($params{content});
+ return $params{content};
- +} #}}}
+ +}
+
+1
--- /dev/null 2008-06-21 02:02:15.000000000 +0200
diff --git a/doc/todo/comments.mdwn b/doc/todo/comments.mdwn
new file mode 100644
index 000000000..7a113bee3
--- /dev/null
+++ b/doc/todo/comments.mdwn
@@ -0,0 +1,170 @@
+# Known issues with the [[plugins/comments]] plugin
+
+## Unimplemented
+
+* Instead of just a link to add a comment, it could have a form to enter
+ the title, similar to the form for adding a new blog post.
+
+ > I'm not sure this is so useful? On Livejournal titles are allowed on
+ > comments, but very rarely used (and indeed usually not very useful);
+ > it's hard enough to get some people to title their blog posts :-)
+ > --[[smcv]]
+
+## Won't fix
+
+* Because IkiWiki generates static HTML, we can't have a form inlined in
+ page.tmpl where the user fills in an entire comment and can submit it in
+ a single button-press, without being vulnerable to cross-site request forgery.
+ So I'll put this in as wontfix. --[[smcv]]
+
+ > Surely there's a way around that?
+ > A web 2.0 way comes to mind: The user clicks on a link
+ > to open the comment post form. While the nasty web 2.0 javascript :)
+ > is manipulating the page to add the form to it, it looks at the cookie
+ > and uses that to insert a sid field.
+ >
+ > Or, it could have a mandatory preview page and do the CSRF check then.
+ > --[[Joey]]
+
+* It would be useful to have a pagespec that always matches all comments on
+ pages matching a glob. Something like `comment(blog/*)`.
+ Perhaps postcomment could also be folded into this? Then the pagespec
+ would match both existing comments, as well as new comments that are
+ being posted.
+
+ > Please see [[plugins/comments/discussion]]. If I've convinced you that
+ > internal pages are the way forward, then sure, we can do that, because
+ > people who can comment still won't be able to edit others' comments
+ > (one of my goals is that commenters can't put words into each other's
+ > mouths :-) )
+ >
+ > On the other hand, if you still want me to switch this plugin to "real"
+ > pages, or if internal pages might become editable in future, then
+ > configuring lockedit/anonok so a user X can add comments to blog pages
+ > would also let X edit/delete comments on blog pages (including those
+ > written by others) in arbitrary ways, which doesn't seem good. --[[smcv]]
+
+ > I had a look at implementing comment() and fell afoul of
+ > some optimisations that assume only internal() will be used to match
+ > internal pages. So probably this isn't worth doing. --[[Joey]]
+
+## Done
+
+* There is some common code cargo-culted from other plugins (notably inline and editpage) which
+ should probably be shared
+
+ > Actually, there's less of this now than there used to be - a lot of simple
+ > things that were shared have become unshareable as they became more
+ > complex. --[[smcv]]
+
+ > There's still goto. You have a branch for that. --[[Joey]]
+
+ >> Now merged --[[smcv]]
+
+* The default template should have a (?) icon next to unauthenticated users (with the IP address
+ as title) and an OpenID icon next to OpenIDs
+
+ > Done in my comments git branch, at least as a mockup (using the (?),
+ > {x} and {*} smileys for anonymous, OpenID and login respectively).
+ > --[[smcv]]
+
+ >> I've improved this to use independent icons from the wikiicons
+ >> directory (untested!) --[[smcv]]
+
+ >>> The new code produces links like /wikiisons/openid.png, which
+ >>> fail if ikiwiki is not at the root of the web server. --[[Joey]]
+
+ >>>> Sorry, I should have spotted that (the assumption failed on my demo
+ >>>> site, but the push to that site was when I was on the way out, so I
+ >>>> didn't have time to investigate). As a note for other ikiwiki hackers,
+ >>>> I should have used
+ >>>> `<img src="<TMPL_VAR NAME=BASEURL>wikiicons/openid.png" />`. --[[smcv]]
+
+ >>> I got to wondering if the icons are needed. On my comments branch
+ >>> (not master), I've dropped the icons and info can be seen by hovering
+ >>> over the author's name. Idea being that you probably don't care how
+ >>> they authenticated unless something is weird, and in that case you
+ >>> can hover to check. Does that make sense, should I merge it?
+ >>> --[[Joey]]
+
+ >>>> Yeah, go ahead. I preferred my layout with the author before the
+ >>>> comment - perhaps that's Livejournal's influence :-) - but I can always
+ >>>> edit the templates for my own site. As long as the default is something
+ >>>> reasonable and both layouts are possible, I don't really mind.
+ >>>> Minimizing the number of "resource" files in the basewiki also seems
+ >>>> a good goal. --[[smcv]]
+
+* Previews always say "unknown IP address"
+
+ > Fixed in my comments branch by commits bc66a00b and 95b3bbbf --[[smcv]]
+
+* The Comments link in the "toolbar" is to `index.html#comments`, not the
+ desired `./#comments`
+
+ > Fixed in my comments branch by commit 0844bd0b; commits 5b1cf21a
+ > and c42f174e fix another `beautify_urlpath` bug and add a regression test
+ > --[[smcv]]
+
+
+* Now that inline has some comments-specific functionality anyway, it would
+ be good to output `<link rel="comments">` in Atom and the equivalent in RSS.
+
+ > Fixed in my comments branch by d0d598e4, 3feebe31, 9e5f504e --[[smcv]]
+
+
+* Add `COMMENTOPENID`: the authenticated/verified user name, if and only if it was an OpenID
+
+ > Done in my comments git branch --[[smcv]]
+
+ > Not seeing it there, which branch? --[[Joey]]
+
+ >> Bah, git push --all is not the default... 'comments' branch now (I've also rebased it).
+ >> Sorry, I'm on mobile Internet at the moment... --[[smcv]]
+
+ >>> merged by [[Joey]] in commit 0f03af38 --[[smcv]]
+
+* Should the comments be visually set off more from the page above?
+ Rather than just a horizontal rule, I'm thinking put the comments
+ in a box like is used for inlined pages.
+
+ > I did put them in a box in the CSS... I agree the default template
+ > could do with visual improvement though. --[[smcv]]
+
+ >> I'll consider this solved by [[Joey]]'s changes. --[[smcv]]
+
+* One can use inline to set up a feed of all comments posted to any page.
+ Using template=comment they are displayed right. Only problem
+ is there is no indication in that template of what page each comment in the
+ feed is a comment on. So, if a comment is inlined into a different page,
+ I think it should show a link back to the page commented on.
+ (BTW, the rss feed in this situation seems ok; there the link element
+ points back to the parent page.
+
+ > done --[[Joey]]
+
+* One of Joey's commit messages says "Not ideal, it would be nicer to jump to
+ the actual comment posted, but no anchor is available". In fact there is
+ an anchor - the `\[[_comment]]` preprocessing wraps the comment in a `<div>`
+ with id="comment_123" or something. I'll fix this, unless Joey gets there
+ first. --[[smcv]]
+
+ > done --[[Joey]]
+
+* If a spammer posts a comment, it is either impossible or hard to clean
+ up via the web. Would be nice to have some kind of link on the comment
+ that allows trusted users to remove it (using the remove plugin of
+ course).
+
+ > Won't the remove plugin refuse to remove internal pages? This would be
+ > a good feature to have, though. --[[smcv]]
+
+ > Here, FWIW, is the first ikiwiki comment spam I've seen:
+ > <http://waldeneffect.org/blog/Snake_bite_information/#blog/Snake_bite_information/comment_1>
+ > So that took about 10 days...
+ > --[[Joey]]
+
+ >> Implemented in my 'comments' branch, please review. It turns out
+ >> [[plugins/remove]] is happy to remove internal pages, so it was quite
+ >> easy to do. --[[smcv]]
+
+ >>> done --[[Joey]]
diff --git a/doc/todo/configurable_timezones.mdwn b/doc/todo/configurable_timezones.mdwn
index 3ed50503a..f8b1dbbab 100644
--- a/doc/todo/configurable_timezones.mdwn
+++ b/doc/todo/configurable_timezones.mdwn
@@ -3,3 +3,8 @@ It would be nice if the sure could set the timezone of the wiki, and have ikiwik
This is nice for shared hosting, and other situation where the user doesn't have control over the server timezone.
> [[done]] via the ENV setting in the setup file. --[[Joey]]
+
+
+Example (ikiwiki.setup):
+
+ ENV => { TZ => "Europe/Sofia" }
diff --git a/doc/todo/darcs.mdwn b/doc/todo/darcs.mdwn
index b8ddfd485..882a41379 100644
--- a/doc/todo/darcs.mdwn
+++ b/doc/todo/darcs.mdwn
@@ -219,14 +219,14 @@ This is my ([bma](bma@bmalee.eu)) darcs.pm - it's messy (my Perl isn't up to muc
package IkiWiki;
- sub rcs_update () { #{{{
+ sub rcs_update () {
# Do nothing - there's nowhere to update *from*.
- } #}}}
+ }
- sub rcs_prepedit ($) { #{{{
- } #}}}
+ sub rcs_prepedit ($) {
+ }
- sub rcs_commit ($$$;$$) { #{{{
+ sub rcs_commit ($$$;$$) {
my ($file, $message, $rcstoken, $user, $ipaddr) = @_;
# $user should probably be a name and an email address, by darcs
@@ -257,16 +257,16 @@ This is my ([bma](bma@bmalee.eu)) darcs.pm - it's messy (my Perl isn't up to muc
return undef; # success
- sub rcs_add ($) { # {{{
+ sub rcs_add ($) {
my ($file) = @_;
my @cmdline = ("darcs", "add", "--repodir", "$config{srcdir}", "-a", "-q", "$file");
if (system(@cmdline) != 0) {
warn "'@cmdline' failed: $!";
}
- } #}}}
+ }
- sub rcs_recentchanges ($) { #{{{
+ sub rcs_recentchanges ($) {
# TODO: This is horrible code. It doesn't work perfectly, and uses regexes
# rather than parsing Darcs' XML output.
my $num=shift;
@@ -314,15 +314,15 @@ This is my ([bma](bma@bmalee.eu)) darcs.pm - it's messy (my Perl isn't up to muc
}
}
return @ret;
- } #}}}
+ }
- sub rcs_notify () { #{{{
+ sub rcs_notify () {
# TODO
- } #}}}
+ }
- sub rcs_getctime ($) { #{{{
+ sub rcs_getctime ($) {
error gettext("getctime not implemented");
- } #}}}
+ }
1
@@ -546,4 +546,6 @@ Regarding the repository layout: There are two darcs repositories. One is the `s
>> `rcs_commit_staged`. For some revision control systems, which
>> automatically commit modifications, it would be a no-op. --[[Joey]]
+>>> Done. --pesco
+
[[!tag patch]]
diff --git a/doc/todo/datearchives-plugin.mdwn b/doc/todo/datearchives-plugin.mdwn
index 5a5560d6c..5f33cde4c 100644
--- a/doc/todo/datearchives-plugin.mdwn
+++ b/doc/todo/datearchives-plugin.mdwn
@@ -17,11 +17,11 @@ Index: IkiWiki/Plugin/datearchives.pm
+use strict;
+use IkiWiki;
+
-+sub import { #{{{
++sub import {
+ hook(type => "pagetemplate", id => "datearchives", call => \&pagetemplate, scan => 1);
-+} # }}}
++}
+
-+sub pagetemplate (@) { #{{{
++sub pagetemplate (@) {
+ my %args = @_;
+ my $dt;
+ eval {
@@ -37,7 +37,7 @@ Index: IkiWiki/Plugin/datearchives.pm
+ $template->param(ctime => htmllink( $args{page}, $args{destpage}, $link, 0, 0,
+ $template->param('ctime')));
+ }
-+} # }}}
++}
+
+1
</pre>
diff --git a/doc/todo/different_search_engine.mdwn b/doc/todo/different_search_engine.mdwn
index 2f309dea5..9d0fc92c9 100644
--- a/doc/todo/different_search_engine.mdwn
+++ b/doc/todo/different_search_engine.mdwn
@@ -126,7 +126,7 @@ Index: IkiWiki/Plugin/search.pm
+ $PLUCENE_DIR = $config{wikistatedir}.'/plucene';
+}
+
- sub import { #{{{
+ sub import {
- hook(type => "getopt", id => "hyperestraier",
- call => \&amp;getopt);
- hook(type => "checkconfig", id => "hyperestraier",
@@ -142,14 +142,14 @@ Index: IkiWiki/Plugin/search.pm
call => \&amp;change);
- hook(type => "cgi", id => "hyperestraier",
- call => \&amp;cgi);
- } # }}}
+ }
--sub getopt () { #{{{
+-sub getopt () {
- eval q{use Getopt::Long};
- error($@) if $@;
- Getopt::Long::Configure('pass_through');
- GetOptions("estseek=s" => \$config{estseek});
--} #}}}
+-}
+sub writer {
+ init();
@@ -165,20 +165,20 @@ Index: IkiWiki/Plugin/search.pm
+ grep { defined pagetype($_) } @_;
+}
+
- sub checkconfig () { #{{{
+ sub checkconfig () {
foreach my $required (qw(url cgiurl)) {
if (! length $config{$required}) {
@@ -36,112 +58,55 @@
}
- } #}}}
+ }
-my $form;
--sub pagetemplate (@) { #{{{
+-sub pagetemplate (@) {
- my %params=@_;
- my $page=$params{page};
- my $template=$params{template};
+#my $form;
-+#sub pagetemplate (@) { #{{{
++#sub pagetemplate (@) {
+# my %params=@_;
+# my $page=$params{page};
+# my $template=$params{template};
@@ -193,7 +193,7 @@ Index: IkiWiki/Plugin/search.pm
+#
+# $template->param(searchform => $form);
+# }
-+#} #}}}
++#}
- # Add search box to page header.
- if ($template->query(name => "searchform")) {
@@ -205,9 +205,9 @@ Index: IkiWiki/Plugin/search.pm
-
- $template->param(searchform => $form);
- }
--} #}}}
+-}
-
- sub delete (@) { #{{{
+ sub delete (@) {
- debug(gettext("cleaning hyperestraier search index"));
- estcmd("purge -cl");
- estcfg();
@@ -219,9 +219,9 @@ Index: IkiWiki/Plugin/search.pm
+ $reader->delete_term( Plucene::Index::Term->new({ field => "id", text => $_ }));
+ }
+ $reader->close;
- } #}}}
+ }
- sub change (@) { #{{{
+ sub change (@) {
- debug(gettext("updating hyperestraier search index"));
- estcmd("gather -cm -bc -cl -sd",
- map {
@@ -250,9 +250,9 @@ Index: IkiWiki/Plugin/search.pm
+ $doc->add(Plucene::Document::Field->UnStored('text' => $data));
+ $writer->add_document($doc);
+ }
- } #}}}
+ }
-
--sub cgi ($) { #{{{
+-sub cgi ($) {
- my $cgi=shift;
-
- if (defined $cgi->param('phrase') || defined $cgi->param("navi")) {
@@ -260,10 +260,10 @@ Index: IkiWiki/Plugin/search.pm
- chdir("$config{wikistatedir}/hyperestraier") || error("chdir: $!");
- exec("./".IkiWiki::basename($config{cgiurl})) || error("estseek.cgi failed");
- }
--} #}}}
+-}
-
-my $configured=0;
--sub estcfg () { #{{{
+-sub estcfg () {
- return if $configured;
- $configured=1;
-
@@ -301,9 +301,9 @@ Index: IkiWiki/Plugin/search.pm
- unlink($cgi);
- my $estseek = defined $config{estseek} ? $config{estseek} : '/usr/lib/estraier/estseek.cgi';
- symlink($estseek, $cgi) || error("symlink $estseek $cgi: $!");
--} # }}}
+-}
-
--sub estcmd ($;@) { #{{{
+-sub estcmd ($;@) {
- my @params=split(' ', shift);
- push @params, "-cl", "$config{wikistatedir}/hyperestraier";
- if (@_) {
@@ -323,7 +323,7 @@ Index: IkiWiki/Plugin/search.pm
- open(STDOUT, "/dev/null"); # shut it up (closing won't work)
- exec("estcmd", @params) || error("can't run estcmd");
- }
--} #}}}
+-}
-
-1
+1;
diff --git a/doc/todo/directive_docs.mdwn b/doc/todo/directive_docs.mdwn
index 1f6307381..2baa61b40 100644
--- a/doc/todo/directive_docs.mdwn
+++ b/doc/todo/directive_docs.mdwn
@@ -40,15 +40,15 @@ defined them: --[[Joey]]
index e476521..afe982a 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
- @@ -493,6 +493,7 @@ sub loadplugins () { #{{{
+ @@ -493,6 +493,7 @@ sub loadplugins () {
return 1;
- } #}}}
+ }
+my $loading_plugin;
- sub loadplugin ($) { #{{{
+ sub loadplugin ($) {
my $plugin=shift;
- @@ -502,14 +503,18 @@ sub loadplugin ($) { #{{{
+ @@ -502,14 +503,18 @@ sub loadplugin ($) {
"$installdir/lib/ikiwiki") {
if (defined $dir && -x "$dir/plugins/$plugin") {
require IkiWiki::Plugin::external;
@@ -67,7 +67,7 @@ defined them: --[[Joey]]
if ($@) {
error("Failed to load plugin $mod: $@");
}
- @@ -1429,6 +1434,9 @@ sub hook (@) { # {{{
+ @@ -1429,6 +1434,9 @@ sub hook (@) {
return if $param{no_override} && exists $hooks{$param{type}}{$param{id}};
@@ -76,4 +76,4 @@ defined them: --[[Joey]]
+
$hooks{$param{type}}{$param{id}}=\%param;
return 1;
- } # }}}
+ }
diff --git a/doc/todo/discussion_page_as_blog.mdwn b/doc/todo/discussion_page_as_blog.mdwn
index c7a3d6ac9..990b7ddb3 100644
--- a/doc/todo/discussion_page_as_blog.mdwn
+++ b/doc/todo/discussion_page_as_blog.mdwn
@@ -30,4 +30,4 @@ I don't think that the nesting is very clear, I found it confusing..
Would each page be its own individual blog? Or its own blog post? To me it seems like an entire wiki can be viewed as a blog, with threaded or unthreaded comments underneath.
-[[!tag soc]]
+[[!tag soc done]]
diff --git a/doc/todo/dynamic_rootpage.mdwn b/doc/todo/dynamic_rootpage.mdwn
index fa0e23254..5cf80b0a8 100644
--- a/doc/todo/dynamic_rootpage.mdwn
+++ b/doc/todo/dynamic_rootpage.mdwn
@@ -23,3 +23,10 @@ What's your opinion, Joey? I hope it's also useful for another ikiwiki lovers :)
>>> Seems like a job for good ol' string interpolation. rootpage="post/$current_year/$current_month/$current_day"
>>> Ikiwiki could provide some vars, and it would be nice to write plugins to also provide vars. Sort of like templates.
>>> Does that feel OK? --[[sabr]]
+
+> I want the exact same thing. My compromise was to create a `datedblog` module which overrides `inline`'s `sessioncgi` hook
+> with something that sets the new page name to `%Y-%m-%d.$page` and sets up a meta directive at the beginning of
+> the content, with the title you wanted. Now if you use the `datedblog` module, you get dated blog entries. But I'd
+> like to have traditional `inline` functionality too. This would work great if there were a way to change the `do`
+> parameter in the `blogpost` template's form; if I could change it to `datedblog` instead of `blog` then I could hook
+> my datedblog module in nicely, without having to override anything. What would be the right way to do that? --[[neale]]
diff --git a/doc/todo/enable-htaccess-files.mdwn b/doc/todo/enable-htaccess-files.mdwn
index b3c174fba..e3b295123 100644
--- a/doc/todo/enable-htaccess-files.mdwn
+++ b/doc/todo/enable-htaccess-files.mdwn
@@ -5,7 +5,7 @@
@@ -26,7 +26,7 @@
memoize("file_pruned");
- sub defaultconfig () { #{{{
+ sub defaultconfig () {
- wiki_file_prune_regexps => [qr/\.\./, qr/^\./, qr/\/\./,
+ wiki_file_prune_regexps => [qr/\.\./, qr/^\.(?!htaccess)/, qr/\/\.(?!htaccess)/,
qr/\.x?html?$/, qr/\.ikiwiki-new$/,
diff --git a/doc/todo/firm_up_plugin_interface.mdwn b/doc/todo/firm_up_plugin_interface.mdwn
index b0e92e65c..c7553f7dd 100644
--- a/doc/todo/firm_up_plugin_interface.mdwn
+++ b/doc/todo/firm_up_plugin_interface.mdwn
@@ -41,7 +41,7 @@ Another problimatic thing is plugins often define functions named 'preprocess',
6 IkiWiki::titlepage
These go together; linkpage is needed by all link plugins, and the others are used widely.
-All should be exported.
+All should be exported. (Done)
7 IkiWiki::saveindex
5 IkiWiki::loadindex
@@ -92,3 +92,5 @@ Probably needs to evolve more and be more widely used before being exported.
* %IkiWiki::pagecase (aggregate)
* %IkiWiki::backlinks (pagestats)
+
+[[done]] (until 4.0)..
diff --git a/doc/todo/format_escape.mdwn b/doc/todo/format_escape.mdwn
index 8dfe05581..574883d1b 100644
--- a/doc/todo/format_escape.mdwn
+++ b/doc/todo/format_escape.mdwn
@@ -141,13 +141,13 @@ Index: IkiWiki/Plugin/rst.pm
print html[html.find('<body>')+6:html.find('</body>')].strip();
";
- sub import { #{{{
+ sub import {
hook(type => "htmlize", id => "rst", call => \&htmlize);
+ hook(type => "htmlescape", id => "rst", call => \&htmlescape);
+ hook(type => "htmlescapelink", id => "rst", call => \&htmlescapelink);
- } # }}}
+ }
-+sub htmlescapelink ($$;@) { #{{{
++sub htmlescapelink ($$;@) {
+ my $url = shift;
+ my $text = shift;
+ my %params = @_;
@@ -158,15 +158,15 @@ Index: IkiWiki/Plugin/rst.pm
+ else {
+ return "`$text <$url>`_";
+ }
-+} # }}}
++}
+
-+sub htmlescape ($) { #{{{
++sub htmlescape ($) {
+ my $html=shift;
+ $html=~s/^/ /mg;
+ return ".. raw:: html\n\n".$html;
-+} # }}}
++}
+
- sub htmlize (@) { #{{{
+ sub htmlize (@) {
my %params=@_;
my $content=$params{content};
Index: doc/plugins/write.mdwn
@@ -272,7 +272,7 @@ Index: IkiWiki.pm
+ return $hooks{htmlescapelink}{$type}{call}->($bestlink, $linktext);
+ }
return "<a href=\"$bestlink\">$linktext</a>";
- } #}}}
+ }
@@ -628,6 +640,14 @@
preview => $preprocess_preview,
diff --git a/doc/todo/fortune:_select_options_via_environment.mdwn b/doc/todo/fortune:_select_options_via_environment.mdwn
index f906312fe..ddacd91b5 100644
--- a/doc/todo/fortune:_select_options_via_environment.mdwn
+++ b/doc/todo/fortune:_select_options_via_environment.mdwn
@@ -14,9 +14,9 @@
package IkiWiki::Plugin::fortune;
use warnings;
- @@ -12,7 +18,13 @@ sub import { #{{{
+ @@ -12,7 +18,13 @@ sub import {
- sub preprocess (@) { #{{{
+ sub preprocess (@) {
$ENV{PATH}="$ENV{PATH}:/usr/games:/usr/local/games";
- my $f = `fortune 2>/dev/null`;
+ my $f;
diff --git a/doc/todo/generic___39__do__61__goto__39___for_CGI.mdwn b/doc/todo/generic___39__do__61__goto__39___for_CGI.mdwn
new file mode 100644
index 000000000..26c5202d0
--- /dev/null
+++ b/doc/todo/generic___39__do__61__goto__39___for_CGI.mdwn
@@ -0,0 +1,35 @@
+The [[plugins/recentchanges]] plugin has a `do=recentchanges_link` feature that will
+redirect to a given wiki page, or an error page with a creation link.
+
+In the [[plugins/contrib/comments]] plugin I've found that it would be useful to do
+the same for users. For now I've just cloned the functionality into the comments
+plugin, but perhaps this functionality could be renamed to `do=goto` or
+something, and moved to `IkiWiki/CGI.pm`?
+
+> Now implemented as the 'goto' branch in my git repository, along with
+> [[apache_404_ErrorDocument_handler]]. --[[smcv]]
+
+>> Looks good, the only things I wonder are:
+>> * Should it be a separate plugin? In particular `cgi_page_from_404()` is
+>> pretty big, and only works if apache is configured so seems somewhat
+>> pluginaable.
+
+>>> I've split out `goto` and `apache404` plugins in the branch. I think
+>>> you're right that apache404 should be a plugin. If you think goto is small
+>>> and general enough to not be a plugin, just don't merge my most recent
+>>> patch! --[[smcv]]
+
+>> * I wish there were some way to generalize the workaround for the stupid
+>> MSIE behavior. Actually, I wish we could ignore the MSIE stupidity,
+>> as I tend to do, but perhaps it's too stupid in this case for that to
+>> fly..
+>> * Is there any reason to require do=goto before checking for
+>> `REDIRECT_STATUS`? Seems that if that code were moved
+>> out of the enclosing if block, the apache 404 handler could
+>> be set direct to the cgi, which seems simpler to remember.
+>> --[[Joey]]
+
+>>> No, good point - the `REDIRECT_STATUS` check is sufficiently unambiguous
+>>> already. Fixed. --[[smcv]]
+
+[[done]]
diff --git a/doc/todo/httpauth_feature_parity_with_passwordauth.mdwn b/doc/todo/httpauth_feature_parity_with_passwordauth.mdwn
new file mode 100644
index 000000000..eb71cf840
--- /dev/null
+++ b/doc/todo/httpauth_feature_parity_with_passwordauth.mdwn
@@ -0,0 +1,28 @@
+The only way to have a private ikiwiki, with a shared user database
+for static pages and CGI authentication, is to use
+[[plugins/httpauth]]. It would be good for httpauth to be on par with
+[[plugins/passwordauth]], i.e. to allow registering users, resetting
+passwords, and changing passwords; supporting some kind of
+`account_creation_password` configuration option would be nice, too.
+
+I'll probably propose patches implementing this at some point.
+I've not had a single look at the code yet, but it may be nice to factorize
+the relevant passwordauth code, instead of rewriting it completely in httpauth.
+
+-- [[intrigeri]]
+
+Well, on such a private wiki, one can neither register herself nor
+reset his password: the registration page, as any other page, would be
+forbidden to non-authenticated users. Admin users should then be
+enabled to:
+
+- register a new user
+- reset someone else's password
+
+In both cases, a brand new random password is sent by e-mail to the
+new user.
+
+An authenticated user should nevertheless be able to change his
+own password. -- [[intrigeri]]
+
+[[wishlist]]
diff --git a/doc/todo/index.html_allowed.mdwn b/doc/todo/index.html_allowed.mdwn
index f030f9eea..f5e6f8cd7 100644
--- a/doc/todo/index.html_allowed.mdwn
+++ b/doc/todo/index.html_allowed.mdwn
@@ -91,15 +91,15 @@ page "A/B/index.html" is treated as "A/B".
+++ ikidev/IkiWiki.pm 2007-02-25 15:05:22.328852000 -0800
@@ -192,6 +192,12 @@
return $untainted;
- } #}}}
+ }
- +sub titlename($;@) { #{{{
+ +sub titlename($;@) {
+ my $page = shift;
+ $page =~ s!/index$!!;
+ return pagetitle(basename($page), @_);
- +} #}}}
+ +}
+
- sub basename ($) { #{{{
+ sub basename ($) {
my $file=shift;
@@ -117,7 +117,7 @@ diff -ru ikiwiki-2.4/IkiWiki.pm ikiwiki/IkiWiki.pm
$page=~s/\Q.$type\E*$// if defined $type;
+ $page=~s/\/index$// if $page =~ /\/index$/;
return $page;
- } #}}}
+ }
</pre>
diff --git a/doc/todo/inline:_numerical_ordering_by_title.mdwn b/doc/todo/inline:_numerical_ordering_by_title.mdwn
index 95511d998..3d7424b3f 100644
--- a/doc/todo/inline:_numerical_ordering_by_title.mdwn
+++ b/doc/todo/inline:_numerical_ordering_by_title.mdwn
@@ -1,6 +1,8 @@
Could you please add numerical ordering by title to [[inline|plugins/inline]]
plugin? Now I can do only alphabetical order by title, but sometime it's not enough.
+> Implemented, see [[natural_sorting]] [[!tag done]] --[[Joey]]
+
BTW, it seems that ordering by title is rather ordering by filename of page.
For me "title" means title of page I can set using `title` parameter
of [[meta|plugins/meta]] plugin :)
@@ -155,11 +157,11 @@ Joey, have you forgotten about that request? ;) --[[Paweł|ptecza]]
%config %links %pagestate %renderedfiles
%pagesources %destsources);
our $VERSION = 2.00; # plugin interface version, next is ikiwiki version
- @@ -835,6 +835,42 @@ sub titlepage ($) { #{{{
+ @@ -835,6 +835,42 @@ sub titlepage ($) {
return $title;
- } #}}}
+ }
- +sub titlecmp ($$) { #{{{
+ +sub titlecmp ($$) {
+ my $titleA=shift;
+ my $titleB=shift;
+
@@ -193,29 +195,29 @@ Joey, have you forgotten about that request? ;) --[[Paweł|ptecza]]
+ return -1 if (@listB);
+
+ return 0;
- +} #}}}
+ +}
+
- sub linkpage ($) { #{{{
+ sub linkpage ($) {
my $link=shift;
my $chars = defined $config{wiki_file_chars} ? $config{wiki_file_chars} : "-[:alnum:]+/.:_";
diff --git a/IkiWiki/Plugin/brokenlinks.pm b/IkiWiki/Plugin/brokenlinks.pm
index 37752dd..ccaa399 100644
--- a/IkiWiki/Plugin/brokenlinks.pm
+++ b/IkiWiki/Plugin/brokenlinks.pm
- @@ -59,7 +59,7 @@ sub preprocess (@) { #{{{
+ @@ -59,7 +59,7 @@ sub preprocess (@) {
map {
"<li>$_</li>"
}
- sort @broken)
+ sort titlecmp @broken)
."</ul>\n";
- } # }}}
+ }
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index 8efef3f..263e7a6 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
- @@ -192,7 +192,7 @@ sub preprocess_inline (@) { #{{{
+ @@ -192,7 +192,7 @@ sub preprocess_inline (@) {
}
if (exists $params{sort} && $params{sort} eq 'title') {
@@ -228,20 +230,20 @@ Joey, have you forgotten about that request? ;) --[[Paweł|ptecza]]
index b910758..10a1d87 100644
--- a/IkiWiki/Plugin/orphans.pm
+++ b/IkiWiki/Plugin/orphans.pm
- @@ -56,7 +56,7 @@ sub preprocess (@) { #{{{
+ @@ -56,7 +56,7 @@ sub preprocess (@) {
htmllink($params{page}, $params{destpage}, $_,
noimageinline => 1).
"</li>"
- } sort @orphans).
+ } sort titlecmp @orphans).
"</ul>\n";
- } # }}}
+ }
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index ceb7c84..00798e1 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
- @@ -89,7 +89,7 @@ sub genpage ($$) { #{{{
+ @@ -89,7 +89,7 @@ sub genpage ($$) {
$template->param(have_actions => 1);
}
diff --git a/doc/todo/inline_plugin:_ability_to_override_feed_name.mdwn b/doc/todo/inline_plugin:_ability_to_override_feed_name.mdwn
new file mode 100644
index 000000000..df5bf9194
--- /dev/null
+++ b/doc/todo/inline_plugin:_ability_to_override_feed_name.mdwn
@@ -0,0 +1,29 @@
+If RSS and Atom are enabled by default, the [[plugins/contrib/comments]]
+plugin generates a feed, perhaps `/sandbox/index.atom` for comments on the
+sandbox. If a blog is added to the page, the blog will steal the name
+`/sandbox/index.atom` and the comments plugin's feed will change to
+`/sandbox/index.atom2`.
+
+If `\[[!inline]]` gained a parameter `feedname` or something, the comments
+plugin could use `feedname=comments` to produce `/sandbox/comments.atom`
+instead (this would just require minor enhancements to rsspage(),
+atompage() and targetpage()).
+
+As a side benefit, [my blog](http://smcv.pseudorandom.co.uk/) could go back
+to its historical Atom feed URL of `.../feed.atom` (which is currently a
+symlink to `index.atom` :-) )
+
+On sites not using `usedirs` the current feed is `/sandbox.atom`, and we
+could perhaps change it to `/sandbox-comments.atom` or
+`/sandbox/comments.atom` if `feedname=comments` is given.
+
+--[[smcv]]
+
+> This is slightly hard to do, because you have to worry about
+> conflicting pages setting feedname, which could cause ikiwiki to blow up.
+>
+> Particularly for the non-usedirs case, where a page `sandbox/comments`
+> would produce the same feed as sandbox with `feedname=comments`.
+> --[[Joey]]
+
+> [[done]] as feedfile option --[[Joey]]
diff --git a/doc/todo/inline_plugin:_hide_feed_buttons_if_empty.mdwn b/doc/todo/inline_plugin:_hide_feed_buttons_if_empty.mdwn
new file mode 100644
index 000000000..d046c0cd0
--- /dev/null
+++ b/doc/todo/inline_plugin:_hide_feed_buttons_if_empty.mdwn
@@ -0,0 +1,7 @@
+ < joeyh> 03:49:19> also, I think it may be less visually confusing to
+ drop the rss/atom buttons for comments when there are none yet
+
+This seems to me like something that applies to the [[plugins/inline]] plugin in general, rather than the [[plugins/contrib/comments]] plugin specifically. --[[smcv]]
+
+>> [[done]] as emptyfeeds option, not on by default for inline, but I think
+>> it should be for comments --[[Joey]]
diff --git a/doc/todo/inline_postform_autotitles.mdwn b/doc/todo/inline_postform_autotitles.mdwn
new file mode 100644
index 000000000..5005208be
--- /dev/null
+++ b/doc/todo/inline_postform_autotitles.mdwn
@@ -0,0 +1,52 @@
+[[!tag wishlist]]
+[[!tag patch]]
+
+for postforms in inlines of pages which follow a certain scheme, it might not
+be required to set the title for each individual post, but to automatically set
+the title and show no input box prompting for it.
+this can either be based on timestamp formatting, or use the already existing
+munging mechanism, which appends numbers to page titles in case that page
+already exists.
+
+two patches ([1], [2]) set inline up for that, adding an additional `autotitle`
+parameter. if that is given, the regular input of the inline postform will be
+replaced with a hidden input of that text. in addition, the empty title is
+permitted (both for autotitle and regular titles, as they go in the same GET
+parameter, `title`). as the empty page title is illegal, munging is used,
+resulting in ascending numeric page titles to be created.
+
+the second patch is actually a one-liner, filtering the title through strftime.
+
+### potential user interaction issues
+
+this has two side effects which have to be considered: first, the empty page
+title is accepted also in normal postforms (previously, this resulted in a "bad
+page name" error); second, entering a percent sign in that field might result
+in unexpexted strftime substitution (strftime might not even substitute for
+common uses of percent as in "reach 10% market share", but might in others as
+in "the 10%-rule").
+
+both can be circumvented by using another GET parameter for autotexts, as
+implemented in [3].
+> this patch still does not work perfectly; especially, it should make a
+> distinction between "autotitle is set but equal ''" (in which case it
+> should create a page named `1.mdwn`, and "autotitle is not set, and title is
+> equal ''" (in which case it should display the old error message) --[[chrysn]]
+
+### potential security issues
+
+* the autotitle's value is directly output through the template (but that's
+ done in other places as well, so i assume it's safe)
+* i don't know if anything bad can happen if unfiltered content is passed to
+ POSIX::strftime.
+
+### further extension
+
+having a pre-filled input field instead of an unchangable hidden input might be
+cool (eg for creating an entry with yesterday's date), but would be a bit of a
+problem with static pages. javascript could help with the date part, but name
+munging would be yet another thing.
+
+[1]: http://github.com/github076986099/ikiwiki/commit/b568eb257a3ef5ff49a84ac00a3a7465b643c1e1
+[2]: http://github.com/github076986099/ikiwiki/commit/34bc82f232be141edf036d35e8ef5aa289415072
+[3]: http://github.com/github076986099/ikiwiki/commit/40dc10a4ec7809e401b4497c2abccfba30f7a2af
diff --git a/doc/todo/language_definition_for_the_meta_plugin.mdwn b/doc/todo/language_definition_for_the_meta_plugin.mdwn
index 33098c601..4ac4e2e25 100644
--- a/doc/todo/language_definition_for_the_meta_plugin.mdwn
+++ b/doc/todo/language_definition_for_the_meta_plugin.mdwn
@@ -54,7 +54,7 @@ This may be useful for sites with a few pages in different languages, but no ful
my %authorurl;
+my %lang;
- sub import { #{{{
+ sub import {
hook(type => "preprocess", id => "meta", call => \&preprocess, scan => 1);
@@ -100,6 +101,11 @@
$meta{$page}.='<link href="'.encode_entities($value).
@@ -75,7 +75,7 @@ This may be useful for sites with a few pages in different languages, but no ful
+ $template->param(lang => $lang{$page})
+ if exists $lang{$page} && $template->query(name => "lang");
- } # }}}
+ }
</pre>
> Please resolve lang somewhere reusable rather than within meta plugin: It is certainly usable outside
diff --git a/doc/todo/latex.mdwn b/doc/todo/latex.mdwn
index eb53538b4..604c5e87f 100644
--- a/doc/todo/latex.mdwn
+++ b/doc/todo/latex.mdwn
@@ -31,6 +31,9 @@ Conversely, how about adding a plugin to support exporting to LaTeX?
a latex plugin. Examples [here](http://ng.l4x.org/latex/). Currently without image support for hevea. And the latex2html
output has the wrong charset and no command line switch to change that. Dreamland.
+As this link is not working, I setted a mirror here: <a href="http://satangoss.sarava.org/ikiwiki/latex.pm">http://satangoss.sarava.org/ikiwiki/latex.pm</a>.
+
+
----
Okay, now is the time for a mid term report i think.
diff --git a/doc/todo/location_of_external_plugins.mdwn b/doc/todo/location_of_external_plugins.mdwn
new file mode 100644
index 000000000..c28003e74
--- /dev/null
+++ b/doc/todo/location_of_external_plugins.mdwn
@@ -0,0 +1,24 @@
+Would it be possible to make the installation location for the external
+plugins (those talked to via xmlrpc) configurable? Currently, they are
+installed into (and later expected to be in) /usr/lib/ikiwiki/plugins. For
+the Fedora package (which I maintain), I move them to
+/usr/libexec/ikiwiki/plugins. While not covered by the FHS, this seems to
+be a more appropriate place, see:
+https://fedoraproject.org/wiki/Packaging/Guidelines#Libexecdir.
+
+> This would need to be a build time configuration setting so the directory
+> is built into ikiwiki for use at runtime. --[[Joey]]
+
+As a side note, the accompanying proxy.py might better be placed into some directory on the python path.
+
+> If someone can show how to do so without needing a Setup.py and all the
+> pain that using one entails.. --[[Joey]]
+
+>> At the very least I don't think proxy.py should be on the `sys.path`
+>> under its current name. If it was renamed to ikiwiki_proxy or some such,
+>> possibly; but I think it's more appropriate to have it in an
+>> ikiwiki-specific directory (a "private module") since it's not useful for
+>> anything outside ikiwiki, and putting it in the same directory as the
+>> external plugins means it's automatically in their `sys.path` without
+>> needing special configuration. --[[smcv]]
+>> (a mostly-inactive member of Debian's Python modules packaging team)
diff --git a/doc/todo/location_of_ikiwiki-w3m.cgi.mdwn b/doc/todo/location_of_ikiwiki-w3m.cgi.mdwn
new file mode 100644
index 000000000..8ca925bee
--- /dev/null
+++ b/doc/todo/location_of_ikiwiki-w3m.cgi.mdwn
@@ -0,0 +1,3 @@
+The `ikiwiki-w3m.cgi` script is installed (hard-coded) into `/usr/lib/w3m/cgi-bin`. On Fedora however, the w3m package expects it in `/usr/libexec/w3m/cgi-bin`. So, it would be nice if the destination for this script could be configured.
+
+> You can use `W3M_CGI_BIN now`. [[done]] --[[Joey]]
diff --git a/doc/todo/mbox.mdwn b/doc/todo/mbox.mdwn
index 081d51200..f7744563c 100644
--- a/doc/todo/mbox.mdwn
+++ b/doc/todo/mbox.mdwn
@@ -14,3 +14,6 @@ I'd like to be able to drop an unmodified RFC2822 email message into ikiwiki, an
>>> to page foo). I'm not sure if this is possible and worthwhile to fix.
>> It is certainly workable
>>> to use a \[[!mailbox ]] directive. -- [[DavidBremner]]
+
+> Your gitweb doesn't tell me where I can git pull this from, which I'd
+> like to do ... --[[Joey]]
diff --git a/doc/todo/mdwn_preview.mdwn b/doc/todo/mdwn_preview.mdwn
new file mode 100644
index 000000000..c20314c28
--- /dev/null
+++ b/doc/todo/mdwn_preview.mdwn
@@ -0,0 +1,305 @@
+The [StackOverflow](http://stackoverflow.com/) site uses markdown for markup.
+It has a fancy javascript thing for showing a real-time preview of what the user
+is editing. It would be nice if ikiwiki could support this, too. The thing they
+use on StackOverflow is supposed to be free software, so it should be easy to
+add to ikiwiki.
+
+> See [[wikiwyg]]. Note that I do not have a copy of the code for that, or
+> it'd be in ikiwiki already. --[[Joey]]
+
+>> I just had a brief look at the [[wikiwyg]] page and the link to the plugin was
+>> broken. The StackOverflow site uses the [WMD](http://wmd-editor.com/) editor,
+>> which seems to be related to the [ShowDown](http://attacklab.net/showdown/)
+>> javascript port of Markdown. Interestingly, [WMD source](http://wmd.googlecode.com/)
+>> is now available under an MIT license, though it is supposedly undergoing heavy
+>> refactoring. It looks like there was previous discussion ( [[todo/Add_showdown_GUI_input__47__edit]] )
+>> about a showdown plugin. Maybe a WMD plugin would be worthwhile. I might
+>> look into it if I have time on the weekend. -- [[Will]]
+
+[[!tag wishlist]]
+
+>>> Below is a simple plugin/[[patch]] to make use of the WMD editor.
+
+>>>> Now added to ikiwiki, thanks! --[[Joey]]
+
+>>> Turns out it isn't hard at all to
+>>> get a basic version going (which doesn't handle directives at all, nor does it swtich itself off when you're
+>>> editing something other than Markdown source). I've
+>>> removed the done tag so this is visible as a patch. -- [[Will]]
+
+>>>> Hmm, it would be good if it turned off for !mdwn. Although this could
+>>>> be difficult for a new page, since there is a dropdown selector to
+>>>> choose the markup language then. But it should be doable for editing an
+>>>> existing page.
+
+>>>>> I agree. I'm working on this for for both new pages and existing pages.
+>>>>> It shouldn't be hard once I get WMD going through the javascript API.
+>>>>> At the moment that is inexplicably failing, and I haven't had time to have a good look at why.
+>>>>> I may not get a chance to look at this again for a few weeks.
+
+>>>> Can I get a license statement (ie, GPL-2+) ffrom you for the plugin?
+>>>> --[[Joey]]
+
+>>>>> Certainly. You're free to use the code I posted below under the GPL-2+ license. You'll note
+>>>>> however that I haven't said anything about the WMD code itself. The WMD web page says:
+
+>>>>>> "I'm refactoring the code, and will be releasing WMD under the MIT license soon. For now you can download the most recent release (wmd-1.0.1.zip) and use it freely."
+
+>>>>> It might be best to contact <support@attacklab.net> to for an explicit license on that if you want to include it.
+>>>>> -- [[Will]]
+
+> So, I wonder if I should add a copy of the WMD source to ikiwiki, or rely
+> on the user or distribution providing it. It does not seem to be packaged
+> for Debian yet. Hmm, I also can't find any copyright or license info in
+> the zip file. --[[Joey]]
+
+>> This is a good question. My thought is that it will probably not be packaged any time soon,
+>> so you're better off adding it to IkiWiki. I'd contact the author of WMD and ask them. They
+>> may have more insight. -- [[Will]]
+
+Note that the WMD plugin does **not** handle directives. For this reason the normal `preview` button
+remains. Some CSS to clean up the display of the live WMD preview would be good.
+
+> Can you elucidate the CSS comment -- or will it be obvious what you mean
+> when I try it? Is it what's needed for the live preview? --[[Joey]]
+
+>> In the version of the plugin below, a new `div` is added just below the form. WMD
+>> populates this div with the HTML it generates from the Markdown source. This is not very
+>> pretty at the moment - it appears in the same place as the preview used to, but with no
+>> header or anything. Any standard IkiWiki preview will appear below the WMD live preview.
+>> I recommend having a look at <http://wmd-editor.com/examples/splitscreen>
+>> for what a little CSS could achieve. -- [[Will]]
+
+> Hmm, now that I've tried it, I notice that it does live preview by
+> default, below the edit window. Which is nice, but then if I hit the
+> preview button, I get two previews.. which is confusing. (Also, minor,
+> but: the live preview is missing the "Page Preview:" header.) --[[Joey]]
+
+> I wonder how annoying it would be to add some kind of simplistic wikilink
+> support to wmd's preview? And/or a wikilink button? While not supporting
+> directies is fine, not supporting wikilinks in a wiki seems a bit
+> lacking. It may also entice novide users to not use wikilinks and instead
+> use the hyperlinks that wmd does support. --[[Joey]]
+
+> Bug: When I preview, all the text in the edit field seems to be
+> converted from mdwn to html. I think that wmd is converting the mdwn
+> into html when the form is posted, so it would also save like that.
+> I assume that is designed for websites that do not use markdown
+> internally. Doesn't it have a setting to leave it as markdown?
+>> Found setting, fixed. --[[Joey]]
+
+>>> As I noted above, I've been working on the non-markdown page issue.
+>>> Below is my a new javascript file that I'm using, and below that a patch
+>>> to enable it. This patch makes the normal usage prettier - you get
+>>> a side panel with the live preview in it. It also adds a new config
+>>> option, `wmd_use101api`, which turns on code that tries to use the
+>>> wmd api. At the moment this code doesn't seem to work - moreover the
+>>> code that uses the new API dies early, so any code after that point is
+>>> completely untested. I will not
+>>> get a chance to look at this again soon though, so I thought I'd post
+>>> my progress so far. -- [[Will]]
+
+
+Place the following file in `underlays/wmd/wmd-ikiwiki.js`.
+
+----
+
+ // This is some code to interface the WMD interface 1.0.1 with IkiWiki
+ // The WMD interface is planned to change, so this file will likely need
+ // updating in future.
+
+ if (useWMDinterface) {
+ wmd_options = { autostart: false, output: "Markdown" };
+ var instance = null;
+
+ hook("onload", initwmd);
+ } else {
+ var typeSelector = document.getElementById("type");
+
+ var currentType = getType(typeSelector);
+
+ if (currentType == "mdwn") {
+ wmd_options = { output: "Markdown" };
+ document.getElementById("wmd-preview-container").style.display = 'none';
+ } else {
+ wmd_options = { autostart: false };
+ document.getElementById("wmd-preview-container").style.display = 'block';
+ }
+ }
+
+ function initwmd() {
+ if (!Attacklab || !Attacklab.wmd) {
+ alert("WMD hasn't finished loading!");
+ return;
+ }
+
+ var typeSelector = document.getElementById("type");
+
+ var currentType = getType(typeSelector);
+
+ if (currentType == "mdwn") {
+ window.setTimeout(enableWMD,10);
+ }
+
+ typeSelector.onchange=function() {
+ var docType=getType(this);
+
+ if (docType=="mdwn") {
+ enableWMD();
+ } else {
+ disableWMD();
+ }
+ }
+ }
+
+ function getType(typeSelector)
+ {
+ if (typeSelector.nodeName.toLowerCase() == 'input') {
+ return typeSelector.getAttribute('value');
+ } else if (typeSelector.nodeName.toLowerCase() == 'select') {
+ return typeSelector.value;
+ // return typeSelector.options[typeSelector.selectedIndex].innerText;
+ }
+ return "";
+ }
+
+ function enableWMD()
+ {
+ var editContent = document.getElementById("editcontent");
+ var previewDiv = document.getElementById("wmd-preview");
+ var previewDivContainer = document.getElementById("wmd-preview-container");
+
+ previewDivContainer.style.display = 'block';
+ // editContent.style.width = previewDivContainer.style.width;
+
+ /***** build the preview manager *****/
+ var panes = {input:editContent, preview:previewDiv, output:null};
+ var previewManager = new Attacklab.wmd.previewManager(panes);
+
+ /***** build the editor and tell it to refresh the preview after commands *****/
+ var editor = new Attacklab.wmd.editor(editContent,previewManager.refresh);
+
+ // save everything so we can destroy it all later
+ instance = {ta:editContent, div:previewDiv, ed:editor, pm:previewManager};
+ }
+
+ function disableWMD()
+ {
+ document.getElementById("wmd-preview-container").style.display = 'none';
+
+ if (instance != null) {
+ instance.pm.destroy();
+ instance.ed.destroy();
+ // inst.ta.style.width='100%'
+ }
+ instance = null;
+ }
+
+
+----
+
+ diff --git a/IkiWiki/Plugin/wmd.pm b/IkiWiki/Plugin/wmd.pm
+ index 9ddd237..743a0b8 100644
+ --- a/IkiWiki/Plugin/wmd.pm
+ +++ b/IkiWiki/Plugin/wmd.pm
+ @@ -17,6 +17,13 @@ sub getsetup () {
+ return
+ plugin => {
+ safe => 1,
+ + rebuild => 1,
+ + },
+ + wmd_use101api => {
+ + type => "boolean",
+ + description => "Use the advanced, but unstable, WMD api for markdown preview.",
+ + safe => 0,
+ + rebuild => 0,
+ },
+ }
+
+ @@ -24,29 +31,25 @@ sub formbuilder_setup (@) {
+ my %params=@_;
+ my $form=$params{form};
+
+ - return if ! defined $form->field("do");
+ + return unless defined $form->field("do");
+
+ return unless $form->field("do") eq "edit" ||
+ - $form->field("do") eq "create" ||
+ - $form->field("do") eq "comment";
+ -
+ - $form->tmpl_param("wmd_preview", "<div class=\"wmd-preview\"></div>\n".
+ - include_javascript(undef, 1));
+ -}
+ -
+ -sub include_javascript ($;$) {
+ - my $page=shift;
+ - my $absolute=shift;
+ -
+ - my $wmdjs=urlto("wmd/wmd.js", $page, $absolute);
+ - return <<"EOF"
+ -<script type="text/javascript">
+ -wmd_options = {
+ - output: "Markdown"
+ -};
+ -</script>
+ -<script src="$wmdjs" type="text/javascript"></script>
+ -EOF
+ + $form->field("do") eq "create" ||
+ + $form->field("do") eq "comment";
+ +
+ + my $useAPI = $config{wmd_use101api}?'true':'false';
+ + my $ikiwikijs = urlto("ikiwiki.js", undef, 1);
+ + my $wmdIkiwikijs = urlto("wmd-ikiwiki.js", undef, 1);
+ + my $wmdjs = urlto("wmd.js", undef, 1);
+ +
+ + my $previewScripts = <<"EOS";
+ + <script type="text/javascript">useWMDinterface=$useAPI;</script>
+ + <script src="$ikiwikijs" type="text/javascript"></script>
+ + <script src="$wmdIkiwikijs" type="text/javascript"></script>
+ + <script src="$wmdjs" type="text/javascript"></script>
+ +EOS
+ +
+ + $form->tmpl_param("wmd_preview", $previewScripts);
+ }
+
+ 1
+ diff --git a/doc/style.css b/doc/style.css
+ index a6e6734..36c2b13
+ --- a/doc/style.css
+ +++ b/doc/style.css
+ @@ -76,9 +76,16 @@ div.tags {
+ float: right;
+ }
+
+ +/*
+ #editcontent {
+ width: 100%;
+ }
+ +*/
+ +
+ +#wmd-preview-container {
+ + width: 49%;
+ + float: right;
+ +}
+
+ img {
+ border-style: none;
+ diff --git a/templates/editpage.tmpl b/templates/editpage.tmpl
+ index b1cf015..1d2f080 100644
+ --- a/templates/editpage.tmpl
+ +++ b/templates/editpage.tmpl
+ @@ -15,6 +15,14 @@ Page type: <TMPL_VAR FIELD-TYPE>
+ <TMPL_VAR FIELD-PAGE>
+ <TMPL_VAR FIELD-TYPE>
+ </TMPL_IF>
+ +<TMPL_IF NAME="WMD_PREVIEW">
+ +<div id="wmd-preview-container">
+ +<div class="header">
+ +<span>Live preview:</span>
+ +</div>
+ +<div class="wmd-preview" id="wmd-preview"></div>
+ +</div>
+ +</TMPL_IF>
+ <TMPL_VAR FIELD-EDITCONTENT><br />
+ <TMPL_IF NAME="CAN_COMMIT">
+ Optional comment about this change:<br />
diff --git a/doc/todo/mercurial.mdwn b/doc/todo/mercurial.mdwn
index f0dbf9806..e71c8106a 100644
--- a/doc/todo/mercurial.mdwn
+++ b/doc/todo/mercurial.mdwn
@@ -14,6 +14,10 @@
It seems that with the current mercurial commit code, it will always
blindly overwrite the current file with the web edited version, losing
any other changes.
+* `rcs_commit_staged`, `rcs_rename`, `rcs_remove`, and `rcs_diff` are not
+ implemented for mercurial, and so attachments, remove and rename plugins
+ and recentchangesdiff cannot be used with it. (These should be fairly
+ easy to add..)
Posthook: in `$srcdir/.hg/hgrc`, I have the following
@@ -29,6 +33,62 @@ This should update the working directory and run ikiwiki every time a change is
> It can deadlock if the post-commit hook runs with --refresh in the
> former case. --[[Joey]]
+The problem with --post-commit is that if you delete some pages in $SRC, ikiwiki --setup setupfile --post-commit will not delete them in $DEST. --[[users/weakish]]
+
+> You should really be using a setup file that has `mercurial_wrapper`
+> set, and running the wrapper generated by that from your hook.
+> That will work. I think that the `--setup --post-commit` on the command
+> line is currently broken and does the same expensive rebuild process as --setup
+> alone (which doesn't delete files from $DEST either). Will fix that.
+> (fixed)
+> --[[Joey]]
+
+>> Mercurial doesn't support put hooks in .hg/hooks/* (like git). In Mercurial, the only way to run
+>> your own hooks is specifying them in the hgrc file. (Or write a new extension.)
+>> I guess use a very long command will work.
+>> (e.g. ikiwiki --post-commit --a-lot-of-switches --set var=value $SRC $DEST)
+>> (Fortunately ikiwiki supports --set var=value so without --setup works.)
+>>
+>> Alternative is always editing via cgi or pushing. Never work on the $SRC/repo directly.
+>> --[[users/weakish]]
+
+>>> I don't see anything preventing you from using a setup file with
+>>> `mercurial_wrapper => ".hg/ikiwiki-hook",` and then modifying the hgrc
+>>> to run that wrapper. --[[Joey]]
+
+>> Thanks for pointing out this. I have some stupid misunderstanding on the
+>> usage of mercurial_wrapper before. The wrapper works nicely! --[[weakish]]
+
+I add the following to .hg/hgrc:(I use changegroup since I don't think we need refresh per changeset, please point out if I am wrong.)
+
+ [hooks]
+ changegroup = hg update >&2 && ikiwiki --setup path.to.setup.file --refresh
+ post-commit = path.to.the.mercurial.wrapper
+
+-----
+
+I have no idea when the deadlock will happen. --[[users/weakish]]
+
+> For the deadlock to occur, a edit has to be made via the web.
+>
+> Ikiwiki,
+> running as a CGI, takes a lock on the wiki, and commits the edit,
+> continuing to run in the background, with the lock still held.
+> When the edit is committed, the hg hook runs, running `ikwiki --refresh`.
+> Nearly the first thing that process does it try to lock the wiki..
+> which is already locked. This lock is taken in a blocking manner,
+> thus the deadlock -- the cgi is waiting for the commit to finish before
+> dropping the lock, and the commit is blocked waiting for the lock to be
+> released.
+>
+> --post-commit avoids this problem by checking if the cgi is running
+> and avoiding doing anything in that case. (While still handing the
+> refresh if the commit was not made by the CGI.)
+> So in that case, the commit finishes w/o ikiwiki doing anything,
+> and the ikiwiki CGI handles the wiki refresh.
+> --[[Joey]]
+
+
***
I have a few notes on mercurial usage after trying it out for a while:
diff --git a/doc/todo/meta_rcsid.mdwn b/doc/todo/meta_rcsid.mdwn
index 81a2c1328..158edea6e 100644
--- a/doc/todo/meta_rcsid.mdwn
+++ b/doc/todo/meta_rcsid.mdwn
@@ -26,7 +26,7 @@ of CVS/SVN-style keywords (like '$Id$', etc.) from the source file in the page t
my %copyright;
+my %rcsid;
- sub import { #{{{
+ sub import {
hook(type => "preprocess", id => "meta", call => \&preprocess, scan => 1);
@@ -110,6 +111,9 @@
$meta{$page}.="<link rel=\"copyright\" href=\"#page_copyright\" />\n";
diff --git a/doc/todo/missingparents.pm.mdwn b/doc/todo/missingparents.pm.mdwn
index 0cc7137ba..c5f2ab535 100644
--- a/doc/todo/missingparents.pm.mdwn
+++ b/doc/todo/missingparents.pm.mdwn
@@ -82,15 +82,15 @@ Index: IkiWiki/Plugin/missingparents.pm
+my %ownfiles;
+my @pagespecs;
+
-+sub import { #{{{
++sub import {
+ hook(type => "checkconfig", id => "missingparents", call => \&checkconfig);
+ hook(type => "needsdelete", id => "missingparents", call => \&needsdelete);
+ hook(type => "needsbuild", id => "missingparents", call => \&needsbuild);
+ hook(type => "savestate", id => "missingparents", call => \&savestate);
+ hook(type => "preprocess", id => "missingparents", call => \&preprocess_missingparents);
-+} # }}}
++}
+
-+sub checkconfig () { #{{{
++sub checkconfig () {
+ IkiWiki::preprocess("missingparents", "missingparents",
+ readfile(srcfile("missingparents.mdwn")));
+ loadstate();
@@ -99,9 +99,9 @@ Index: IkiWiki/Plugin/missingparents.pm
+ unlink $config{srcdir}.'/'.$file;
+ }
+ }
-+} #}}}
++}
+
-+sub preprocess_missingparents (@) { #{{{
++sub preprocess_missingparents (@) {
+ my %params=@_;
+
+ if (! defined $params{pages} || ! defined $params{generate}) {
@@ -115,10 +115,10 @@ Index: IkiWiki/Plugin/missingparents.pm
+ #translators: is text for pages that match that pagespec.
+ return sprintf(gettext("missingparents in %s will be %s"),
+ '`'.$params{pages}.'`', '`\\'.$params{generate}.'`');
-+} # }}}
++}
+
+my $state_loaded=0;
-+sub loadstate() { #{{{
++sub loadstate() {
+ my $filename = "$config{wikistatedir}/missingparents";
+ if (-e $filename) {
+ open (IN, $filename) ||
@@ -132,9 +132,9 @@ Index: IkiWiki/Plugin/missingparents.pm
+
+ $state_loaded=1;
+ }
-+} #}}}
++}
+
-+sub savestate() { #{{{
++sub savestate() {
+ my $filename = "$config{wikistatedir}/missingparents.new";
+ my $cleanup = sub { unlink ($filename) };
+ open (OUT, ">$filename") || error("open $filename: $!", $cleanup);
@@ -143,9 +143,9 @@ Index: IkiWiki/Plugin/missingparents.pm
+ }
+ rename($filename, "$config{wikistatedir}/missingparents") ||
+ error("rename $filename: $!", $cleanup);
-+} #}}}
++}
+
-+sub needsdelete (@) { #{{{
++sub needsdelete (@) {
+ my $files=shift;
+
+ my @mydel;
@@ -167,9 +167,9 @@ Index: IkiWiki/Plugin/missingparents.pm
+ foreach my $page (@mydel){
+ push @{$files}, $page;
+ }
-+} #}}}
++}
+
-+sub check_matches($) { #{{{
++sub check_matches($) {
+ my $page = shift;
+ return if $IkiWiki::pagesources{$page};
+
@@ -183,9 +183,9 @@ Index: IkiWiki/Plugin/missingparents.pm
+ return $output;
+ }
+ return "";
-+} #}}}
++}
+
-+sub needsbuild ($) { #{{{
++sub needsbuild ($) {
+ my $files=shift;
+ my @new;
+
@@ -209,7 +209,7 @@ Index: IkiWiki/Plugin/missingparents.pm
+ $ownfiles{$file} = 1;
+ push @{$files}, $file;
+ }
-+} #}}}
++}
+
+1
Index: IkiWiki.pm
@@ -227,18 +227,18 @@ Index: IkiWiki.pm
our $version='unknown'; # VERSION_AUTOREPLACE done by Makefile, DNE
@@ -330,6 +336,30 @@
error("failed renaming $newfile to $destdir/$file: $!", $cleanup);
- } #}}}
+ }
-+sub newpage($$) { #{{{
++sub newpage($$) {
+ my $file=shift;
+ my $page=shift;
+
+ $pagemtime{$page} = $pagectime{$page} = time;
+ $pagesources{$page} = $file;
+ $pagecase{lc $page} = $page;
-+} #}}}
++}
+
-+sub delpage($) { #{{{
++sub delpage($) {
+ my $page=shift;
+ $links{$page}=[];
+ $renderedfiles{$page}=[];
@@ -251,10 +251,10 @@ Index: IkiWiki.pm
+ delete $destsources{$_};
+ }
+ }
-+} #}}}
++}
+
my %cleared;
- sub will_render ($$;$) { #{{{
+ sub will_render ($$;$) {
my $page=shift;
</pre>
diff --git a/doc/todo/modify_page_filename_in_plugin.mdwn b/doc/todo/modify_page_filename_in_plugin.mdwn
index 7c0a909eb..a13c8b62f 100644
--- a/doc/todo/modify_page_filename_in_plugin.mdwn
+++ b/doc/todo/modify_page_filename_in_plugin.mdwn
@@ -6,11 +6,13 @@ The problem is that I occasionally have xxx.c and xxx.h in the same directory an
My solution is to allow plugins to provide a hook that sets the pagename. --[[/users/bstpierre]]
+> You might also find the solution to [[bugs/multiple_pages_with_same_name]] helps you. That patch is already applied. -- [[Will]]
+
--- /usr/share/perl5/IkiWiki.pm.ORIG 2008-10-03 14:12:50.000000000 -0400
+++ /usr/share/perl5/IkiWiki.pm 2008-10-07 11:57:26.000000000 -0400
@@ -196,11 +196,32 @@
- sub pagename ($) { #{{{
+ sub pagename ($) {
my $file=shift;
my $type=pagetype($file);
@@ -27,7 +29,7 @@ My solution is to allow plugins to provide a hook that sets the pagename. --[[/u
$page=~s/\Q.$type\E*$// if defined $type;
return $page;
+ }
- } #}}}
+ }
- sub htmlpage ($) { #{{{
+ sub htmlpage ($) {
diff --git a/doc/todo/natural_sorting.mdwn b/doc/todo/natural_sorting.mdwn
new file mode 100644
index 000000000..5df17e95b
--- /dev/null
+++ b/doc/todo/natural_sorting.mdwn
@@ -0,0 +1,21 @@
+[[!tag wishlist]]
+[[!tag patch]]
+
+the inline plugin's sorting is plain lexical, thich may not be appropriate for
+page titles if they have numeric components. the
+[Sort::Naturally](http://search.cpan.org/dist/Sort-Naturally/) perl module
+provides an algorithm for that.
+
+there is a
+[patch](http://git.ikiwiki.info/?p=ikiwiki;a=commit;h=55b83cb7bd1cd7c60bb45dc22c3745dd80a63fed)
+attached that makes the [[plugins/inline]] plugin use Sort::Naturally if sort
+is set to "title_natural".
+
+the current patch uses `require Sort::Naturally`, so
+[libsort-naturally-perl](http://packages.debian.org/libsort-naturally-perl)
+does not become a dependency; it might be worth suggesting, though.
+
+> See also: [[inline:_numerical_ordering_by_title]] (I probably prefer your
+> approach..) --[[Joey]]
+
+> [[applied|done]]
diff --git a/doc/todo/need_global_renamepage_hook.mdwn b/doc/todo/need_global_renamepage_hook.mdwn
new file mode 100644
index 000000000..b123340af
--- /dev/null
+++ b/doc/todo/need_global_renamepage_hook.mdwn
@@ -0,0 +1,115 @@
+As documented in [[plugins/write]], the current `renamepage` hook is
+heavily oriented towards updating links in pages' content: it is run
+once per page linking to the renamed page.
+
+That's fine, but it can't be used to trigger more general actions on
+page rename. E.g. it won't be run at all if the page being renamed is
+an orphan one.
+
+This is a real issue for the [[plugins/contrib/po]] development: what
+I'm about to achieve is:
+
+- when a master page is renamed, the plugin takes notice of it (using
+ the `rename` hook), and later renames the translation pages
+ accordingly (in the `change` hook)
+- when a master page is deleted, the plugin deletes its translations
+ (using the `delete` hook)
+
+With the current `renamepage` hook behavior, combining these two goals
+has an annoying drawback: a plugin can't notice an orphan master page
+has been renamed, so instead of renaming (and preserving) its
+translations, it considers the oldpage as deleted, and deletes its
+translations. Game over.
+
+It may seem like a corner case, but I want to be very careful when
+deleting files automatically in `srcdir`, which is not always under
+version control.
+
+As a sad workaround, I can still disable any deletion in `srcdir`
+when it is not under version control. But I think ikiwiki deserves
+a global `renamepage` hook that would be run once per rename
+operation.
+
+My proposal is thus:
+
+- keep the documented `renamepage` hook as it is
+- use something inspired by the trick `preprocess` uses: when `hook`
+ is passed an optional "global" parameter, set to a true value, the
+ declared `renamepage` hook is run once per rename operation, and is
+ passed named parameters: `src`, `srcfile`, `dest` and `destfile`.
+
+I'm of course volunteering to implement this, or anything related that
+would solve my problem. Hmmm? --[[intrigeri]]
+
+> I think it would be better to have a different hook that is called for
+> renames, since the two hook actions are very different (unlike the
+> preprocess hook, which does a very similar thing in scan mode).
+>
+> Just calling it `rename` seems like a reasonable name, by analogy with
+> the `delete` and `change` hooks.
+>
+> It might make sense to rename `renamepage` to `renamelink` to make it
+> clearer what it does. (I'm not very worried about this breaking things, at
+> this point.) --[[Joey]]
+
+>> In my `po` branch, I renamed `renamepage` to `renamelink`, and
+>> created a `rename` hook that is passed a reference to `@torename`.
+>> --[[intrigeri]]
+
+>>> As Joey highlights it on [[plugins/contrib/po]], it's too late to
+>>> merge such a change, as the 3.x plugin API is released and should
+>>> not be broken. I will thus keep the existing `renamepage` as it
+>>> is, and call `rename` the global hook I need. --[[intrigeri]]
+
+>>>> Done in my `po` branch. --[[intrigeri]]
+
+I think I see a problem in the rename hook. The hook is called
+before the plugin adds any subpages to the set of pages to rename.
+So, if the user choses to rename subpages, po will not notice
+they are moving, and will not move their po files.
+
+Perhaps the hooks should be moved to come after subpages are added.
+This would, though, mean that if the hook somehow decides to add
+entirely other pages to the list, their subpages would not be
+automatically added.
+
+I also have some qualms about the design of the hook. In particular,
+passing the mutable array reference probably makes it impossible
+to use from external plugins. Instead it could return any additional
+rename hashes it wants to add. Or, if the ability to modify existing
+hashes is desired, it could return the full set of hashes.
+
+--[[Joey]]
+
+> I fixed the last part, i.e. a rename hook function now returns the
+> full set of hashes. As I also converted it to take named parameters,
+> such a function still is passed a reference to the original array,
+> though, because one can't build a hash containing an array of hashes
+> as a value, without passing this array as a reference.
+>
+>> Sure.
+>
+> I'm not entirely sure about your first concern. Calling the hook
+> before or after the subpages addition both have their own problems.
+>
+> What about running the hook before *and* after the subpages
+> addition, with an additional `when` named parameter, so that
+> a given hook function can choose to act only before or after, or both?
+>
+> --[[intrigeri]]
+>>
+>> Have you thought about making the hook be run once *per* file that is
+>> selected to be renamed? This would even handle the case where two
+>> plugins use the hook; plugin A would see when plugin B adds a new file
+>> to be renamed. And the subpage renaming stuff could probably be moved
+>> into the rename hook too. --[[Joey]]
+>>>
+>>> I've implemented this nice solution in my po branch, please review.
+>>> I'm slowly coming back to do the last bits needed to get my po and
+>>> meta branch merged. --[[intrigeri]]
+
+>>>> It looks good. I made some small changes to it in my own po branch.
+>>>> Nothing significant really. If this were not tied up in the po branch,
+>>>> I've have merged it to master already. --[[Joey]]
+
+>>>> Thanks, this is great :) --[[intrigeri]]
diff --git a/doc/todo/overriding_displayed_modification_time.mdwn b/doc/todo/overriding_displayed_modification_time.mdwn
new file mode 100644
index 000000000..160d31519
--- /dev/null
+++ b/doc/todo/overriding_displayed_modification_time.mdwn
@@ -0,0 +1,27 @@
+Some aggregators, like Planet, sort by mtime rather than ctime. This
+means that posts with modified content come to the top (which seems odd
+to me, but is presumably what the aggregator's author or operator
+wants),
+
+> Hah! That's so charitable I hope you can deduct it from your taxes. ;-)
+> --[[Joey]]
+
+but it also means that posts with insignificant edits (like
+adding tags) come to the top too. Atom defines `<updated>` to be the date
+of the last *significant* change, so it's fine that ikiwiki defaults to
+using the mtime, but it would be good to have a way for the author to
+say "that edit was insignificant, don't use that mtime".
+
+> Yes, this is a real limitiation of ikiwiki's atom support. --[[Joey]]
+
+See smcv's 'updated' branch for a basic implementation, which only affects
+the Atom `<updated>` field or the RSS equivalent.
+
+Other places the updated metadata item could be used (opinions on whether
+each should use it or not, please):
+
+* sorting by mtime in the inline directive
+* displaying "last edited" on ordinary pages
+
+> Tending toward no for both, but willing to be convinced otherwise..
+> [[merged|done]] --[[Joey]]
diff --git a/doc/todo/pagespec_relative_to_a_target.mdwn b/doc/todo/pagespec_relative_to_a_target.mdwn
index f7b248670..4757988e0 100644
--- a/doc/todo/pagespec_relative_to_a_target.mdwn
+++ b/doc/todo/pagespec_relative_to_a_target.mdwn
@@ -57,7 +57,7 @@ diff -urNX ignorepats ikiwiki/IkiWiki/Plugin/relative.pm ikidev/IkiWiki/Plugin/r
+
+package IkiWiki::PageSpec;
+
-+sub match_relative($$;@) { #{{{
++sub match_relative($$;@) {
+ my $parent = shift;
+ my $spec = shift;
+ my %params = @_;
@@ -69,21 +69,21 @@ diff -urNX ignorepats ikiwiki/IkiWiki/Plugin/relative.pm ikidev/IkiWiki/Plugin/r
+ }
+ }
+ return IkiWiki::FailReason->new("$parent can't match $spec against anything");
-+} #}}}
++}
+
-+sub match_has_child($$;@) { #{{{
++sub match_has_child($$;@) {
+ my $page = shift;
+ my $childname = shift;
+ my $spec;
-+ if ($childname) { #{{{
++ if ($childname) {
+ $spec = "$page/$childname or $page/*/$childname";
-+ } #}}}
-+ else { #{{{
++ }
++ else {
+ $spec = "$page/*";
-+ } #}}}
++ }
+
+ return match_relative($page, $spec, @_);
-+} #}}}
++}
+
+1
</pre>
diff --git a/doc/todo/pingback_support.mdwn b/doc/todo/pingback_support.mdwn
new file mode 100644
index 000000000..b10366bda
--- /dev/null
+++ b/doc/todo/pingback_support.mdwn
@@ -0,0 +1,39 @@
+A "pingback" is a system whereby URLs you might reference in a blog post are
+contacted by the blog publishing software at publishing time (i.e., once) so
+that they might update a list of "pingbacks" to the URL. The originating
+URL's blog software might then display a list of pingbacks, or an excerpt of
+the text from your blog, perhaps interleaved with comments, etc.
+
+At a technical level, external URLs are extracted from your blog post by the
+blogging software, fetched, inspected for information to determine whether the
+remote server is configured to support pingbacks (look for link tags, or HTTP
+headers) and the relevant pingback URL sent an XML-RPC packet.
+
+There are other technologies to achieve the same thing: trackbacks predate
+pingbacks but are more vulnerable to spam due to design problems.
+
+The spec for pingbacks is at <http://www.hixie.ch/specs/pingback/pingback>.
+
+I would like to somehow use pingbacks in conjunction with ikiwiki. I suppose
+this could be achieved using a commit hook and some external software in which
+case I will consider this done with an entry in [[tips]]; otherwise a
+[[plugins|plugin]] to implement pingbacks would be great.
+
+-- [[Jon]] (Wed Jan 14 13:48:47 GMT 2009)
+
+> I think it's now possible to implement trackback and pingback receiving
+> support in ikiwiki. One easy way to do it would be to hook it into the
+> existing [[plugins/comments]] plugin -- each pingback/trackback that
+> ikiwiki recieves would result in the creation if a new comment, which
+> would be subject to the usual comment filtering (ie, blogspam) and
+> moderation and would then show up amoung the other, regular comments on
+> the page.
+>
+> (One wrinkle: would need to guard against duplicate pings. Maybe by
+> checking existing comments for any that have the same url?)
+>
+> As for sending trackbacks and pingbacks, this could fairly easily be
+> implemented using a `editcontent` hook. Since this hook is called
+> whenever a page is posted or edited, and gets the changed content, it can
+> simply scan it for urls (may have to htmlize first?), and send pings to
+> all urls found. --[[Joey]]
diff --git a/doc/todo/plugin.mdwn b/doc/todo/plugin.mdwn
index 132de4480..b3e3a7889 100644
--- a/doc/todo/plugin.mdwn
+++ b/doc/todo/plugin.mdwn
@@ -70,10 +70,6 @@ Suggestions of ideas for plugins:
> web-server-specific code to list all users, and openid can't feasibly do so
> at all. --[[JoshTriplett]]
-* It would be nice to be able to have a button to show "Differences" (or
- "Show Diff") when editing a page. Is that an option that can be enabled?
- Using a plugin?
-
* For PlaceWiki I want to be able to do some custom plugins, including one
that links together subpages about the same place created by different
users. This seems to call for a plugin that applies to every page w/o any
diff --git a/doc/todo/provide_inline_diffs_in_recentchanges.mdwn b/doc/todo/provide_inline_diffs_in_recentchanges.mdwn
index 7724576f5..39a35d0c6 100644
--- a/doc/todo/provide_inline_diffs_in_recentchanges.mdwn
+++ b/doc/todo/provide_inline_diffs_in_recentchanges.mdwn
@@ -1,3 +1,8 @@
It would rock if I could view diffs from the web without going via feeds. I envision toggle-style buttons on the recentchanges page, or just links to the CGI, which then displays the diff... --[[madduck]]
+> The diffs are actually there, enabled by the `recentchangesdiff`
+> plugin, but they are hidden in the XHTML version by the stylesheet.
+> You might try a user stylesheet with `div.diff { display: block }`.
+> --[[JasonBlevins]]
+
[[!tag wishlist]]
diff --git a/doc/todo/provide_sha1_for_git_diffurl.mdwn b/doc/todo/provide_sha1_for_git_diffurl.mdwn
new file mode 100644
index 000000000..01aa512f8
--- /dev/null
+++ b/doc/todo/provide_sha1_for_git_diffurl.mdwn
@@ -0,0 +1,26 @@
+This [[patch]] allows for `\[[sha1]]` substitution in the `diffurl`
+for git repositories. This is useful for use with [cgit][] which has
+diffurls of the following form:
+
+ /project.git/diff/\[[file]]?id=\[[sha1_commit]]
+
+ [cgit]: http://hjemli.net/git/cgit/
+
+ diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm
+ index 5bef928..164210d 100644
+ --- a/IkiWiki/Plugin/git.pm
+ +++ b/IkiWiki/Plugin/git.pm
+ @@ -518,6 +518,7 @@ sub rcs_recentchanges ($) {
+
+ my $diffurl = defined $config{'diffurl'} ? $config{'diffurl'} : "";
+ $diffurl =~ s/\[\[file\]\]/$file/go;
+ + $diffurl =~ s/\[\[sha1\]\]/$sha1/go;
+ $diffurl =~ s/\[\[sha1_parent\]\]/$ci->{'parent'}/go;
+ $diffurl =~ s/\[\[sha1_from\]\]/$detail->{'sha1_from'}/go;
+ $diffurl =~ s/\[\[sha1_to\]\]/$detail->{'sha1_to'}/go;
+
+> [[done]], but I called it `sha1_commit` since I think that's what it's
+> actually a sha1 of. --[[Joey]]
+
+>> I was at a loss for something more descriptive...I like that much
+>> better :) Thanks! --[[JasonBlevins]]
diff --git a/doc/todo/rcs_updates_needed_for_rename_and_remove.mdwn b/doc/todo/rcs_updates_needed.mdwn
index 2af659c3b..472a5800f 100644
--- a/doc/todo/rcs_updates_needed_for_rename_and_remove.mdwn
+++ b/doc/todo/rcs_updates_needed.mdwn
@@ -3,3 +3,8 @@ renaming and removing files using the web interface. The mercurial and
tla [[rcs]] backends need implementions of these functions.
(The maintainers of these backends have been mailed. --[[Joey]])
+
+Also, currently git is the only VCS to have support for
+[[untrusted_push|tips/untrusted_git_push]]. It _may_ be possible to
+implement it for other DVCS, if they offer a hook that can be used to check
+incoming pushes early.
diff --git a/doc/todo/redirect_automatically_after_rename.mdwn b/doc/todo/redirect_automatically_after_rename.mdwn
new file mode 100644
index 000000000..1cbb824d2
--- /dev/null
+++ b/doc/todo/redirect_automatically_after_rename.mdwn
@@ -0,0 +1,10 @@
+In some wikis, (e.g. Mediawiki) after [[renaming|plugins/rename]]
+a page, the old page still exist but only redirect to the
+new page. This is convenient since external sites may
+have links pointing to the old url.
+
+If [[plugins/meta]] plugin is enabled, users can manually edit the
+page, and put in '\[[!meta redir=newpage]]', but this is
+not very convenient.
+
+
diff --git a/doc/todo/relative_pagespec_deficiency.mdwn b/doc/todo/relative_pagespec_deficiency.mdwn
new file mode 100644
index 000000000..4500581c7
--- /dev/null
+++ b/doc/todo/relative_pagespec_deficiency.mdwn
@@ -0,0 +1,8 @@
+While a relative pagespec like `./posts/*` will work, when used in a page
+such as `bdale/blog`, you cannot do
+`created_after(./posts/foo)` -- only `glob()` supports relative page
+references.
+
+The other pagespec functions should too, where appropriate.
+
+[[done]]
diff --git a/doc/todo/replace_HTML::Template_with_Template_Toolkit.mdwn b/doc/todo/replace_HTML::Template_with_Template_Toolkit.mdwn
index dfeacbabd..c4e78ca0b 100644
--- a/doc/todo/replace_HTML::Template_with_Template_Toolkit.mdwn
+++ b/doc/todo/replace_HTML::Template_with_Template_Toolkit.mdwn
@@ -54,3 +54,7 @@ the templates. I'd prefer not having to touch Perl though...
-----
Yes, Template::Toolkit is very powerful. But I think it's somehow overkill for a wiki. HTML::Template can keep things simple, though. --[weakish](http://weakish.int.eu.org/blog/)
+
+I'd have to agree that Template::Toolkit is overkill and personally I'm not a fan, but it is very popular (there is even a book) and the new version (3) is alleged to be much more nimble than current version. --[[ajt]]
+
+HTML::Template's HTML-like markup prevents me from editing templates in KompoZer or other WYSIWYG HTML editors. The editor tries to render the template markup rather than display it verbatim, and large parts of the template become invisible. A markup syntax that doesn't confuse editors (such as Template::Toolkit's "[% FOO %]") may promote template customization. The ability to replace the template engine would be within the spirit of ikiwiki's extensibility. --Rocco
diff --git a/doc/todo/require_CAPTCHA_to_edit.mdwn b/doc/todo/require_CAPTCHA_to_edit.mdwn
index 110b4167f..83ba07eb0 100644
--- a/doc/todo/require_CAPTCHA_to_edit.mdwn
+++ b/doc/todo/require_CAPTCHA_to_edit.mdwn
@@ -91,15 +91,15 @@ ignored.
--- a/IkiWiki/Plugin/openid.pm
+++ b/IkiWiki/Plugin/openid.pm
-@@ -18,6 +18,7 @@ sub getopt () { #{{{
+@@ -18,6 +18,7 @@ sub getopt () {
error($@) if $@;
Getopt::Long::Configure('pass_through');
GetOptions("openidsignup=s" => \$config{openidsignup});
+ GetOptions("openidneedscaptcha=s" => \$config{openidneedscaptcha});
- } #}}}
+ }
- sub formbuilder_setup (@) { #{{{
-@@ -61,6 +62,7 @@ sub formbuilder_setup (@) { #{{{
+ sub formbuilder_setup (@) {
+@@ -61,6 +62,7 @@ sub formbuilder_setup (@) {
# Skip all other required fields in this case.
foreach my $field ($form->field) {
next if $field eq "openid_url";
@@ -107,7 +107,7 @@ ignored.
$form->field(name => $field, required => 0,
validate => '/.*/');
}
-@@ -96,6 +98,18 @@ sub validate ($$$;$) { #{{{
+@@ -96,6 +98,18 @@ sub validate ($$$;$) {
}
}
@@ -152,19 +152,19 @@ use warnings;
use strict;
use IkiWiki 2.00;
-sub import { #{{{
+sub import {
hook(type => "formbuilder_setup", id => "recaptcha", call => \&formbuilder_setup);
-} # }}}
+}
-sub getopt () { #{{{
+sub getopt () {
eval q{use Getopt::Long};
error($@) if $@;
Getopt::Long::Configure('pass_through');
GetOptions("reCaptchaPubKey=s" => \$config{reCaptchaPubKey});
GetOptions("reCaptchaPrivKey=s" => \$config{reCaptchaPrivKey});
-} #}}}
+}
-sub formbuilder_setup (@) { #{{{
+sub formbuilder_setup (@) {
my %params=@_;
my $form=$params{form};
@@ -274,7 +274,7 @@ EOTAGS
});
}
}
-} # }}}
+}
# The following function is borrowed from
# Captcha::reCAPTCHA by Andy Armstrong and are under the PERL Artistic License
diff --git a/doc/todo/rewrite_ikiwiki_in_haskell.mdwn b/doc/todo/rewrite_ikiwiki_in_haskell.mdwn
new file mode 100644
index 000000000..204c48cd7
--- /dev/null
+++ b/doc/todo/rewrite_ikiwiki_in_haskell.mdwn
@@ -0,0 +1,68 @@
+[[!tag wishlist blue-sky]]
+
+In the long term, I have been considering rewriting ikiwiki in haskell.
+It's appealing for a lot of reasons, including:
+
+* No need to depend on a C compiler and have wrappers. Instead, ikiwiki
+ binaries could be built on demand to do the things wrappers are used for
+ now (cgi, post-commit, etc).
+* Potentially much faster. One problem with the now very modular ikiwiki is
+ that it has to load up dozens of perl modules each time it runs, which
+ means both opening lots of files and evaluating them. A haskell version
+ could run from one pre-compiled file. Other speed efficienies are also
+ likely with haskell. For example, pandoc is apparently an order of
+ magnitude faster than perl markdown implementations.
+* Many plugins could be written in pure functional code, with no side
+ effects. Not all of them, of course.
+* It should be much easier to get ikiwiki to support parallel compilation
+ on multi-core systems using haskell.
+* A rewrite would be an opportunity to utterly break compatability and
+ redo things based on experience. Since the haskell libraries used for
+ markdown, templates, etc, are unlikely to be very compatable with the perl
+ versions, and since perl plugins obviously wouldn't work, and perl setup
+ files wouldn't be practical to keep, a lot of things would unavoidably
+ change, and at that point changinge everything else I can think of
+ probably wouldn't hurt (much).
+
+ - Re templates, it would be nice to have a template library that
+ doesn't use html-ish templating tags, since those are hard for users to
+ edit in html editors currently.
+ - This would be a chance to make WikiLinks with link texts read
+ "the right way round" (ie, vaguely wiki creole compatably).
+ - The data structures would probably be quite different.
+ - I might want to drop a lot of the command-line flags, either
+ requiring a setup file be used for those things, or leaving the
+ general-purpose `--set var=value` flag.
+ - Sometimes the current behavior of `--setup` seems confusing; it might
+ only cause a setup file to be read, and not force rebuild mode.
+ - Hard to say how the very high level plugin interface design would change,
+ but at the least some of the names of hooks could stand a rename, and
+ their parameter passing cleaned up.
+
+We know that a big, break-the-world rewrite like this can be a very
+bad thing for a project to attempt. It would be possible to support
+external plugins written in haskell today, without any rewrite; and a few
+of the benefits could be obtained by, eg, making the mdwn plugin be a
+haskell program that uses pandoc. I doubt that wouod be a good first step
+to converting ikiwiki to haskell, because such a program would have very
+different data structures and intercommuniucation than a pure haskell
+version.
+
+Some other things to be scared about:
+
+* By picking perl, I made a lot of people annoyed (and probably turned
+ several people away from using ikiwiki). But over time there turned out
+ to be a lot of folks who knew perl already (even if rustily), and made
+ some *very* useful contributions. I doubt there's as large a pool of haskell
+ programmers, and it's probably harder for a python user to learn haskell
+ than perl if they want to contribute to ikiwiki.
+* It might be harder for users of hosting services to install a haskell based
+ ikiwiki than the perl version. Such systems probably don't have ghc and
+ a bunch of haskell libraries. OTOH, it might be possible to build a
+ static binary at home and upload it, thus avoiding a messy installation
+ procedure entirely.
+* I can barely code in haskell yet. I'm probably about 100x faster at
+ programming in perl. I need to get some more practical experience before
+ I´m fast and seasoned enough in haskell to attempt such a project.
+ (And so far, progress at learning has been slow and I have not managed
+ to write anything serious in haskell.) --[[Joey]]
diff --git a/doc/todo/rewrite_ikiwiki_in_haskell/discussion.mdwn b/doc/todo/rewrite_ikiwiki_in_haskell/discussion.mdwn
new file mode 100644
index 000000000..1edebe4e8
--- /dev/null
+++ b/doc/todo/rewrite_ikiwiki_in_haskell/discussion.mdwn
@@ -0,0 +1,14 @@
+Ok, I have to admit, I have no idea if this is an April fool's joke or not.
+Congratulations for demonstrating that April fools jokes can still be subtle
+(whether intentionally or not!) -- [[Jon]]
+
+> Having said all that, have you looked at erlang? Have you heard of couchdb?
+> I'd strongly recommend looking at that. -- [[Jon]]
+
+>> I've glanced at couchdb, but don't see how it would tie in with ikiwiki.
+>> --[[Joey]]
+
+
+>>> It doesn't really. I recently (re-)read about couchdb and thought that
+>>> what it was trying to do had some comparisons with the thinking going on
+>>> in [[todo/structured_page_data]]. -- [[Jon]]
diff --git a/doc/todo/source_link.mdwn b/doc/todo/source_link.mdwn
index 93791c81a..b051361a8 100644
--- a/doc/todo/source_link.mdwn
+++ b/doc/todo/source_link.mdwn
@@ -1,6 +1,6 @@
How about a direct link from the page header to the source of the latest version, to avoid the need to either use edit or navigate to the current version via the history link?
- I'd like this too (and might try to implement it). -- [[jondowland]]
+ I'd like this too (and might try to implement it). -- [[users/jon]]
I just implemented this. There is one [[patch]] to the default page template, and a new plugin. -- [[Will]]
@@ -31,13 +31,13 @@ I just implemented this. There is one [[patch]] to the default page template, a
use IkiWiki;
use open qw{:utf8 :std};
- sub import { #{{{
+ sub import {
hook(type => "getsetup", id => "getsource", call => \&getsetup);
hook(type => "pagetemplate", id => "getsource", call => \&pagetemplate);
hook(type => "sessioncgi", id => "getsource", call => \&cgi_getsource);
- } # }}}
+ }
- sub getsetup () { #{{{
+ sub getsetup () {
return
plugin => {
safe => 1,
@@ -50,9 +50,9 @@ I just implemented this. There is one [[patch]] to the default page template, a
safe => 1,
rebuild => 0,
},
- } #}}}
+ }
- sub pagetemplate (@) { #{{{
+ sub pagetemplate (@) {
my %params=@_;
my $page=$params{page};
@@ -62,9 +62,9 @@ I just implemented this. There is one [[patch]] to the default page template, a
$template->param(getsourceurl => IkiWiki::cgiurl(do => "getsource", page => $page));
$template->param(have_actions => 1);
}
- } # }}}
+ }
- sub cgi_getsource ($$) { #{{{
+ sub cgi_getsource ($$) {
my $cgi=shift;
my $session=shift;
diff --git a/doc/todo/structured_page_data.mdwn b/doc/todo/structured_page_data.mdwn
index 2a196ed23..22f67cc0a 100644
--- a/doc/todo/structured_page_data.mdwn
+++ b/doc/todo/structured_page_data.mdwn
@@ -257,21 +257,21 @@ in a large number of other cases.
use CGI::FormBuilder;
use IkiWiki 2.00;
- sub import { #{{{
+ sub import {
hook(type => "getsetup", id => "form", call => \&getsetup);
hook(type => "htmlize", id => "form", call => \&htmlize);
hook(type => "sessioncgi", id => "form", call => \&cgi_submit);
- } # }}}
+ }
- sub getsetup () { #{{{
+ sub getsetup () {
return
plugin => {
safe => 1,
rebuild => 1, # format plugin
},
- } #}}}
+ }
- sub makeFormFromYAML ($$$) { #{{{
+ sub makeFormFromYAML ($$$) {
my $page = shift;
my $YAMLString = shift;
my $q = shift;
@@ -350,9 +350,9 @@ in a large number of other cases.
# IkiWiki::decode_form_utf8($form);
return $form;
- } #}}}
+ }
- sub htmlize (@) { #{{{
+ sub htmlize (@) {
my %params=@_;
my $content = $params{content};
my $page = $params{page};
@@ -360,9 +360,9 @@ in a large number of other cases.
my $form = makeFormFromYAML($page, $content, undef);
return $form->render(submit => 'Update Form');
- } # }}}
+ }
- sub cgi_submit ($$) { #{{{
+ sub cgi_submit ($$) {
my $q=shift;
my $session=shift;
@@ -425,11 +425,11 @@ in a large number of other cases.
}
exit;
- } #}}}
+ }
package IkiWiki::PageSpec;
- sub match_form_eq ($$;@) { #{{{
+ sub match_form_eq ($$;@) {
my $page=shift;
my $argSet=shift;
my @args=split(/,/, $argSet);
@@ -460,7 +460,7 @@ in a large number of other cases.
} else {
return IkiWiki::FailReason->new("field value does not match");
}
- } #}}}
+ }
1
@@ -476,22 +476,22 @@ in a large number of other cases.
my $inTable = 0;
- sub import { #{{{
+ sub import {
hook(type => "getsetup", id => "data", call => \&getsetup);
hook(type => "needsbuild", id => "data", call => \&needsbuild);
hook(type => "preprocess", id => "data", call => \&preprocess, scan => 1);
hook(type => "preprocess", id => "datatable", call => \&preprocess_table, scan => 1); # does this need scan?
- } # }}}
+ }
- sub getsetup () { #{{{
+ sub getsetup () {
return
plugin => {
safe => 1,
rebuild => 1, # format plugin
},
- } #}}}
+ }
- sub needsbuild (@) { #{{{
+ sub needsbuild (@) {
my $needsbuild=shift;
foreach my $page (keys %pagestate) {
if (exists $pagestate{$page}{data}) {
@@ -506,7 +506,7 @@ in a large number of other cases.
}
}
- sub preprocess (@) { #{{{
+ sub preprocess (@) {
my @argslist = @_;
my %params=@argslist;
@@ -546,9 +546,9 @@ in a large number of other cases.
}
return $html;
- } # }}}
+ }
- sub preprocess_table (@) { #{{{
+ sub preprocess_table (@) {
my %params=@_;
my @lines;
@@ -568,11 +568,11 @@ in a large number of other cases.
push @lines, '</table>';
return join("\n", @lines);
- } #}}}
+ }
package IkiWiki::PageSpec;
- sub match_data_eq ($$;@) { #{{{
+ sub match_data_eq ($$;@) {
my $page=shift;
my $argSet=shift;
my @args=split(/,/, $argSet);
@@ -592,9 +592,9 @@ in a large number of other cases.
} else {
return IkiWiki::FailReason->new("value does not match");
}
- } #}}}
+ }
- sub match_data_link ($$;@) { #{{{
+ sub match_data_link ($$;@) {
my $page=shift;
my $argSet=shift;
my @params=@_;
@@ -618,6 +618,6 @@ in a large number of other cases.
}
return IkiWiki::FailReason->new("No data link on page $page with key $key matches glob $value");
- } #}}}
+ }
1
diff --git a/doc/todo/support_creole_markup.mdwn b/doc/todo/support_creole_markup.mdwn
index b0ebf5b9e..5a1e1286d 100644
--- a/doc/todo/support_creole_markup.mdwn
+++ b/doc/todo/support_creole_markup.mdwn
@@ -12,7 +12,7 @@ And there is a perl module: Text::WikiCreole
Syntax file for vim: http://www.peter-hoffmann.com/code/vim/ (Since a typical ikiwiki user usually use external editors. :))
-> Should be pretty easy to add a plugin to do it using [[cpan
+> Should be pretty easy to add a plugin to do it using [[!cpan
> Text::WikiCreole]]. --[[Joey]]
[[done]]
diff --git a/doc/todo/supporting_comments_via_disussion_pages.mdwn b/doc/todo/supporting_comments_via_disussion_pages.mdwn
index e0495c8c2..aae0b3008 100644
--- a/doc/todo/supporting_comments_via_disussion_pages.mdwn
+++ b/doc/todo/supporting_comments_via_disussion_pages.mdwn
@@ -91,14 +91,14 @@ Each comment is processed to something like this:
use strict;
use IkiWiki '1.02';
- sub import { #{{{
+ sub import {
hook(type => "formbuilder_setup", id => "comments",
call => \&formbuilder_setup);
hook(type => "preprocess", id => "blogcomment",
call => \&preprocess);
- } # }}}
+ }
- sub formbuilder_setup (@) { #{{{
+ sub formbuilder_setup (@) {
my %params=@_;
my $cgi = $params{cgi};
my $form = $params{form};
@@ -138,9 +138,9 @@ Each comment is processed to something like this:
$content.=qq{[[!blogcomment from="""$name""" timestamp="""$timestamp""" subject="""$subject""" text="""$comment"""]]\n\n};
$content=~s/\n/\r\n/g;
$form->field(name => "editcontent", value => $content, force => 1);
- } # }}}
+ }
- sub preprocess (@) { #{{{
+ sub preprocess (@) {
my %params=@_;
my ($text, $date, $from, $subject, $r);
@@ -159,7 +159,7 @@ Each comment is processed to something like this:
$r .= "</dl>\n" . $text . "</div>\n";
return $r;
- } # }}}
+ }
1;
@@ -213,3 +213,8 @@ do you think so far? Known issues include:
un-wikiish).
--[[smcv]]
+
+I've updated smcvpostcomment and publicised it as [[plugins/contrib/comments]]. --[[smcv]]
+
+> While there is still room for improvement and entirely other approaches,
+> I am calling this done since smcv's comments plugin is ready. --[[Joey]]
diff --git a/doc/todo/syntax_highlighting.mdwn b/doc/todo/syntax_highlighting.mdwn
new file mode 100644
index 000000000..b5d083ba5
--- /dev/null
+++ b/doc/todo/syntax_highlighting.mdwn
@@ -0,0 +1,133 @@
+There's been a lot of work on contrib syntax highlighting plugins. One should be
+picked and added to ikiwiki core.
+
+Ideally, it should support both converting whole source files into wiki
+pages, as well as doing syntax highlighting as a preprocessor directive
+(which is either passed the text, or reads it from a file).
+
+## The big list of possibilities
+
+* [[plugins/contrib/highlightcode]] uses [[!cpan Syntax::Highlight::Engine::Kate]],
+ operates on whole source files only, has a few bugs (see
+ [here](http://u32.net/Highlight_Code_Plugin/), and needs to be updated to
+ support [[bugs/multiple_pages_with_same_name]].
+* [[!cpan IkiWiki-Plugin-syntax]] only operates as a directive.
+ Interestingly, it supports multiple highlighting backends, including Kate
+ and Vim.
+* [[plugins/contrib/syntax]] only operates as a directive
+ ([[not_on_source_code_files|automatic_use_of_syntax_plugin_on_source_code_files]]),
+ and uses [[!cpan Text::VimColor]].
+* [[plugins/contrib/sourcehighlight]] uses src-highlight, and operates on
+ whole source files only. Needs to be updated to
+ support [[bugs/multiple_pages_with_same_name]].
+* [[sourcecode|todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion]]
+ also uses src-highlight, and operates on whole source files.
+ Updated to work with the fix for [[bugs/multiple_pages_with_same_name]]. Untested with files with no extension, e.g. `Makefile`.
+* [[users/jasonblevins]]'s code plugin uses src-highlight, and supports both
+ while file and directive use.
+
+* [hlsimple](http://pivot.cs.unb.ca/git/?p=ikiplugins.git;a=blob_plain;f=IkiWiki/Plugin/hlsimple.pm;hb=HEAD) is a wrapper for the the perl module Syntax::Highlight::Engine::Simple. This is pure perl, pretty simple, uses css. It ought to be pretty fast (according to the author, and just because it is not external).
+On the other hand, there are not many predefined languages yet. Defining language syntaxes is about as much
+work as source-highlight, but in perl. I plan to package the base module for debian. Perhaps after the author
+releases the 5 or 6 language definitions he has running on his web site, it might be suitable for inclusion in ikiwiki. [[DavidBremner]]
+
+## General problems
+
+* Using non-perl syntax highlighting backends is slow. I'd prefer either
+ using a perl module, or a multiple-backend solution that can use a perl
+ module as one option. (Or, if there's a great highlighter python module,
+ we could use an external plugin..)
+* Currently no single plugin supports both modes of operation (directive
+ and whole source file to page).
+
+ > This is now fixed by the [[ikiwiki/directive/format]] directive for all
+ > whole-source-file plugins, right?
+
+* Nothing seems to support
+ [[wiki-formatted_comments|wiki-formatted_comments_with_syntax_plugin]]
+ inside source files. Doing this probably means post-processing the
+ results of the highlighting engine, to find places where it's highlighted
+ comments, and then running them through the ikiwiki rendering pipeline.
+ This seems fairly doable with [[!cpan Syntax::Highlight::Engine::Kate]],
+ at least.
+* The whole-file plugins tend to have a problem that things that look like
+ wikilinks in the source code get munged into links by ikiwiki, which can
+ have confusing results. Similar problem with preprocessor directives.
+ One approach that's also been requested for eg,
+ [[plugins/contrib/mediawiki]] is to allow controlling which linkification
+ types a page type can have on it.
+
+ > The previous two points seem to be related. One thought: instead of
+ > getting the source from the `content` parameter, the plugin could
+ > re-load the page source. That would stop directives/links from
+ > being processed in the source. As noted above, comments
+ > could then be parsed for directives/links later.
+ >
+ > Would it be worth adding a `nodirectives` option when registering
+ > an htmlize hook that switches off directive and link processing before
+ > generating the html for a page?
+
+* The whole-file plugins all get confused if there is a `foo.c` and a `foo.h`.
+ This is trivially fixable now by passing the keepextension option when
+ registering the htmlize hooks, though.
+* Whole-file plugins register a bunch of htmlize hooks. The wacky thing
+ about it is that, when creating a new page, you can then pick "c" or
+ "h" or "pl" etc from the dropdown that normally has "mdwn" etc in it.
+ Is this a bug, or a feature? (Even if a feature, plugins with many
+ extensions make the dropdown unusable.. One way to deal with that is have
+ a config setting that lists what extensions to offer highlighting for.
+ Most people won't need/want the dozens some engines support.)
+* The per page highlighters can't handle creating wiki pages from
+ "Makefile", or other files without a significant extension.
+ Not clear how to fix this, as ikiwiki is very oriented toward file
+ extensions. The workaround is to use a directive on a wiki page, pulling
+ in the Makefile.
+
+ > I wonder how hard it would be to make a patch whereby a file with
+ > no `.` in the name, and a name that matches a filetype, and where
+ > that filetype was registered `keepextension`, then the file is just
+ > chosen as the appropriate type. This would allow `Makefile` to
+ > work.
+
+like this:
+
+ diff --git a/IkiWiki.pm b/IkiWiki.pm
+ index 8d728c9..1bd46a9 100644
+ --- a/IkiWiki.pm
+ +++ b/IkiWiki.pm
+ @@ -618,6 +618,8 @@ sub pagetype ($) {
+
+ if ($page =~ /\.([^.]+)$/) {
+ return $1 if exists $hooks{htmlize}{$1};
+ + } elsif ($hooks{htmlize}{$page}{keepextension}) {
+ + return $page;
+ }
+ return;
+ }
+
+## format directive
+
+Rather than making syntax highlight plugins have to provide a preprocessor
+directive as well as handling whole source files, perhaps a generic format
+directive could be used:
+
+ \[[!format pl """..."""]]
+
+That would run the text through the pl htmlizer, from the syntax hightligh
+plugin. OTOH, if "rst" were given, it would run the text through the rst
+htmlizer. So, more generic, allows mixing different types of markup on one
+page, as well as syntax highlighting. Does require specifying the type of
+format, instead of allowing it to be guessed (which some syntax highlighters
+can do). (This directive is now implemented..)
+
+Hmm, this would also allow comments inside source files to have mdwn
+embedded in them, without making the use of mdwn a special case, or needing
+to postprocess the syntax highlighter output to find comments.
+
+ /* \[[!format mdwn """
+
+ This is a comment in my C file. You can use mdwn in here.
+
+ """]] */
+
+Note that this assumes that directives are expanded in source files.
diff --git a/doc/todo/syntax_highlighting/discussion.mdwn b/doc/todo/syntax_highlighting/discussion.mdwn
new file mode 100644
index 000000000..7a4095c65
--- /dev/null
+++ b/doc/todo/syntax_highlighting/discussion.mdwn
@@ -0,0 +1,26 @@
+sourcehighlight is annoyingly slow, but it does support wiki directives
+in comments. See [here](http://www.cs.unb.ca/~bremner/teaching/java_examples/snippet/ListMerge/)
+for an example (tags).
+
+> I think that is just a result of it expanding directives, and wikilinks,
+> everywhere in the file, which is generally a possible problem..
+> --[[Joey]]
+
+* * * * *
+
+I think having the option to choose source code page types from the
+dropdown list is definitely a feature. This gives users an easy way
+to contribute programs (say `.pl` files) or code snippets (like, for
+example, the Elisp area of the EmacsWiki). Actually, would there any
+other way to create a `.pl` file without write access to the
+repository? --[[JasonBlevins]]
+
+> Well, you can upload them as an attachment if the wiki is configured to
+> allow it. Having them in the drop down becomes a problem when there are
+> so many wacky extensions in there that you can't find anything.
+> --[[Joey]]
+
+>> I should just note that the
+>> [[sourcecode|todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion]]
+>> plugin only adds the file extensions listed in the config. This shouldn't cause
+>> massive drop-down menu pollution. -- [[Will]]
diff --git a/doc/todo/tag_pagespec_function.mdwn b/doc/todo/tag_pagespec_function.mdwn
new file mode 100644
index 000000000..681a1f661
--- /dev/null
+++ b/doc/todo/tag_pagespec_function.mdwn
@@ -0,0 +1,34 @@
+Implementing tags in terms of links is clever, but it would be nice if it was
+opaque in both directions: tagging and matching tags. Writing pagespecs to
+find out which pages are tagged with a given name means that the pagespec is
+tied to whatever the tagbase is.
+
+This patch adds a pagespec function 'tag' which lets you write pagespecs to
+match tagged pages independent of whatever the tagbase is set to.
+
+ -- [[users/Jon]] 2009/02/17
+
+> So, this looks good, appreciate the patch.
+>
+> The only problem I see is it could be confusing if `tag(foo)` matched
+> a page that just linked to the tag via a wikilink, w/o actually tagging it.
+>
+> One other thing, perhaps it should be called `tagged()`? --[[Joey]]
+
+[[!tag patch done]]
+
+ --- a/plugins/IkiWiki/Plugin/tag.pm 2009-02-16 11:30:11.000000000 +0000
+ +++ b/plugins/IkiWiki/Plugin/tag.pm 2009-02-17 15:40:03.000000000 +0000
+ @@ -125,4 +125,12 @@
+ }
+ }
+
+ +package IkiWiki::PageSpec;
+ +
+ +sub match_tag ($$;@) {
+ + my $page = shift;
+ + my $glob = shift;
+ + return match_link($page, IkiWiki::Plugin::tag::tagpage($glob));
+ +}
+ +
+ 1
diff --git a/doc/todo/tidy_git__39__s_ctime_debug_output.mdwn b/doc/todo/tidy_git__39__s_ctime_debug_output.mdwn
index aaa040ec7..bfc130d69 100644
--- a/doc/todo/tidy_git__39__s_ctime_debug_output.mdwn
+++ b/doc/todo/tidy_git__39__s_ctime_debug_output.mdwn
@@ -10,6 +10,6 @@
+ debug("ctime for '$file': ". localtime($ctime));
return $ctime;
- } #}}}
+ }
[[!tag patch done]]
diff --git a/doc/todo/tla.mdwn b/doc/todo/tla.mdwn
index 6ef8453f1..b6b082cfe 100644
--- a/doc/todo/tla.mdwn
+++ b/doc/todo/tla.mdwn
@@ -1,4 +1,7 @@
* Need to get post commit hook code working.
* Need some example urls for web based diffs.
+* `rcs_commit_staged`, `rcs_rename`, `rcs_remove`, are not
+ implemented for tla, and so attachments, remove and rename plugins
+ cannot be used with it. (These should be fairly easy to add..)
[[!tag rcs/tla]]
diff --git a/doc/todo/tmplvars_plugin.mdwn b/doc/todo/tmplvars_plugin.mdwn
index f7d06a579..644cf23aa 100644
--- a/doc/todo/tmplvars_plugin.mdwn
+++ b/doc/todo/tmplvars_plugin.mdwn
@@ -11,12 +11,12 @@ A simple plugin to allow per-page customization of a template by passing paramat
my %tmplvars;
- sub import { #{{{
+ sub import {
hook(type => "preprocess", id => "tmplvars", call => \&preprocess);
hook(type => "pagetemplate", id => "tmplvars", call => \&pagetemplate);
- } # }}}
+ }
- sub preprocess (@) { #{{{
+ sub preprocess (@) {
my %params=@_;
if ($params{page} eq $params{destpage}) {
@@ -34,9 +34,9 @@ A simple plugin to allow per-page customization of a template by passing paramat
}
}
- } # }}}
+ }
- sub pagetemplate (@) { #{{{
+ sub pagetemplate (@) {
my %params=@_;
my $template = $params{template};
@@ -47,6 +47,6 @@ A simple plugin to allow per-page customization of a template by passing paramat
}
return undef;
- } # }}}
+ }
1
diff --git a/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn b/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn
new file mode 100644
index 000000000..547c7a80a
--- /dev/null
+++ b/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn
@@ -0,0 +1,3 @@
+It would be nice if the [[plugins/toc]] plugin let you specify a header level "ceiling" above which (or above and including which) the headers would not be incorporated into the toc.
+
+Currently, the levels=X parameter lets you tweak how deep it will go for small headers, but I'd like to chop off the h1's (as I use them for my page title) -- [[Jon]]
diff --git a/doc/todo/tracking_bugs_with_dependencies.mdwn b/doc/todo/tracking_bugs_with_dependencies.mdwn
index 3af0458bd..2832e37aa 100644
--- a/doc/todo/tracking_bugs_with_dependencies.mdwn
+++ b/doc/todo/tracking_bugs_with_dependencies.mdwn
@@ -194,9 +194,9 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
index 4e4da11..8b3cdfe 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
- @@ -1550,7 +1550,16 @@ sub globlist_to_pagespec ($) { #{{{
+ @@ -1550,7 +1550,16 @@ sub globlist_to_pagespec ($) {
- sub is_globlist ($) { #{{{
+ sub is_globlist ($) {
my $s=shift;
- return ( $s =~ /[^\s]+\s+([^\s]+)/ && $1 ne "and" && $1 ne "or" );
+ return ! ($s =~ /
@@ -209,19 +209,19 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
+ ) |
+ (\s and \s) | (\s or \s) # or we find 'and' or 'or' somewhere
+ /xs);
- } #}}}
+ }
- sub safequote ($) { #{{{
- @@ -1631,7 +1640,7 @@ sub pagespec_merge ($$) { #{{{
+ sub safequote ($) {
+ @@ -1631,7 +1640,7 @@ sub pagespec_merge ($$) {
return "($a) or ($b)";
- } #}}}
+ }
- -sub pagespec_translate ($) { #{{{
- +sub pagespec_makeperl ($) { #{{{
+ -sub pagespec_translate ($) {
+ +sub pagespec_makeperl ($) {
my $spec=shift;
# Support for old-style GlobLists.
- @@ -1650,12 +1659,14 @@ sub pagespec_translate ($) { #{{{
+ @@ -1650,12 +1659,14 @@ sub pagespec_translate ($) {
|
\) # )
|
@@ -238,7 +238,7 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
my $word=$1;
if (lc $word eq 'and') {
$code.=' &&';
- @@ -1666,16 +1677,23 @@ sub pagespec_translate ($) { #{{{
+ @@ -1666,16 +1677,23 @@ sub pagespec_translate ($) {
elsif ($word eq "(" || $word eq ")" || $word eq "!") {
$code.=' '.$word;
}
@@ -265,14 +265,14 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
}
}
- @@ -1683,8 +1701,18 @@ sub pagespec_translate ($) { #{{{
+ @@ -1683,8 +1701,18 @@ sub pagespec_translate ($) {
$code=0;
}
+ return 'sub { my $page=shift; my %params = @_; '.$code.' }';
- +} #}}}
+ +}
+
- +sub pagespec_translate ($) { #{{{
+ +sub pagespec_translate ($) {
+ my $spec=shift;
+
+ my $code = pagespec_makeperl($spec);
@@ -282,19 +282,19 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
no warnings;
- return eval 'sub { my $page=shift; '.$code.' }';
+ return eval $code;
- } #}}}
+ }
- sub pagespec_match ($$;@) { #{{{
- @@ -1699,7 +1727,7 @@ sub pagespec_match ($$;@) { #{{{
+ sub pagespec_match ($$;@) {
+ @@ -1699,7 +1727,7 @@ sub pagespec_match ($$;@) {
my $sub=pagespec_translate($spec);
return IkiWiki::FailReason->new("syntax error in pagespec \"$spec\"") if $@;
- return $sub->($page, @params);
+ return $sub->($page, @params, specFuncs => {});
- } #}}}
+ }
- sub pagespec_valid ($) { #{{{
- @@ -1748,11 +1776,78 @@ sub new { #{{{
+ sub pagespec_valid ($) {
+ @@ -1748,11 +1776,78 @@ sub new {
package IkiWiki::PageSpec;
@@ -361,7 +361,7 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
+ }
+}
+
- sub match_glob ($$;@) { #{{{
+ sub match_glob ($$;@) {
my $page=shift;
my $glob=shift;
my %params=@_;
@@ -373,9 +373,9 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
my $from=exists $params{location} ? $params{location} : '';
# relative matching
- @@ -1782,11 +1877,12 @@ sub match_internal ($$;@) { #{{{
+ @@ -1782,11 +1877,12 @@ sub match_internal ($$;@) {
- sub match_link ($$;@) { #{{{
+ sub match_link ($$;@) {
my $page=shift;
- my $link=lc(shift);
+ my $fulllink=shift;
@@ -388,7 +388,7 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
# relative matching
if ($link =~ m!^\.! && defined $from) {
$from=~s#/?[^/]+$##;
- @@ -1804,19 +1900,32 @@ sub match_link ($$;@) { #{{{
+ @@ -1804,19 +1900,32 @@ sub match_link ($$;@) {
}
else {
return IkiWiki::SuccessReason->new("$page links to page $p matching $link")
@@ -397,9 +397,9 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
}
}
return IkiWiki::FailReason->new("$page does not link to $link");
- } #}}}
+ }
- sub match_backlink ($$;@) { #{{{
+ sub match_backlink ($$;@) {
- return match_link($_[1], $_[0], @_);
+ my $page=shift;
+ my $backlink=shift;
@@ -410,9 +410,9 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
+ }
+
+ return match_link($backlink, $page, @params);
- } #}}}
+ }
- sub match_created_before ($$;@) { #{{{
+ sub match_created_before ($$;@) {
my $page=shift;
my $testpage=shift;
+ my @params=@_;
@@ -423,8 +423,8 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W
if (exists $IkiWiki::pagectime{$testpage}) {
if ($IkiWiki::pagectime{$page} < $IkiWiki::pagectime{$testpage}) {
- @@ -1834,6 +1943,11 @@ sub match_created_before ($$;@) { #{{{
- sub match_created_after ($$;@) { #{{{
+ @@ -1834,6 +1943,11 @@ sub match_created_before ($$;@) {
+ sub match_created_after ($$;@) {
my $page=shift;
my $testpage=shift;
+ my @params=@_;
diff --git a/doc/todo/turn_edittemplate_verbosity_off_by_default.mdwn b/doc/todo/turn_edittemplate_verbosity_off_by_default.mdwn
index 87e55685c..14bb43782 100644
--- a/doc/todo/turn_edittemplate_verbosity_off_by_default.mdwn
+++ b/doc/todo/turn_edittemplate_verbosity_off_by_default.mdwn
@@ -8,7 +8,7 @@ I think this (untested) patch might just do the trick:
--- a/IkiWiki/Plugin/edittemplate.pm
+++ b/IkiWiki/Plugin/edittemplate.pm
- @@ -46,8 +46,13 @@ sub preprocess (@) { #{{{
+ @@ -46,8 +46,13 @@ sub preprocess (@) {
$pagestate{$params{page}}{edittemplate}{$params{match}}=$params{template};
@@ -21,9 +21,9 @@ I think this (untested) patch might just do the trick:
+ else {
+ return '';
+ }
- } # }}}
+ }
- sub formbuilder (@) { #{{{
+ sub formbuilder (@) {
--[[madduck]]
diff --git a/doc/todo/using_meta_titles_for_parentlinks.html b/doc/todo/using_meta_titles_for_parentlinks.html
deleted file mode 100644
index 651b7fa0f..000000000
--- a/doc/todo/using_meta_titles_for_parentlinks.html
+++ /dev/null
@@ -1,116 +0,0 @@
-It is possible to set a Page-Title in the meta-plugin, but that one isn't
-reused in parentlinks. This [[patch]] may fix it.
-
-<ul>
-<li> I give pagetitle the full path to a page.
-<li> I redefine the 'pagetitle'-sub to deal with it.
-<li> to maintain compatibility for IkiWikis without the meta-plugin, i added a 'basename' to the Original-pagetitle.
-</ul>
-
-<pre>
-diff -c /usr/share/perl5/IkiWiki/Render.pm.distrib /usr/share/perl5/IkiWiki/Render.pm
-*** /usr/share/perl5/IkiWiki/Render.pm.distrib Wed Aug 6 07:34:55 2008
---- /usr/share/perl5/IkiWiki/Render.pm Tue Aug 26 23:29:32 2008
-***************
-*** 102,108 ****
- $template->param(
- title => $page eq 'index'
- ? $config{wikiname}
-! : pagetitle(basename($page)),
- wikiname => $config{wikiname},
- content => $content,
- backlinks => $backlinks,
---- 102,108 ----
- $template->param(
- title => $page eq 'index'
- ? $config{wikiname}
-! : pagetitle($page),
- wikiname => $config{wikiname},
- content => $content,
- backlinks => $backlinks,
-
-diff -c /usr/share/perl5/IkiWiki/Plugin/parentlinks.pm.distrib /usr/share/perl5/IkiWiki/Plugin/parentlinks.pm
-*** /usr/share/perl5/IkiWiki/Plugin/parentlinks.pm.distrib Wed Aug 6 07:34:55 2008
---- /usr/share/perl5/IkiWiki/Plugin/parentlinks.pm Tue Aug 26 23:19:43 2008
-***************
-*** 44,50 ****
- "height_$height" => 1,
- };
- $path.="/".$dir;
-! $title=IkiWiki::pagetitle($dir);
- $i++;
- }
- return @ret;
---- 44,50 ----
- "height_$height" => 1,
- };
- $path.="/".$dir;
-! $title=IkiWiki::pagetitle($path);
- $i++;
- }
- return @ret;
-
-diff -c /usr/share/perl5/IkiWiki.pm.distrib /usr/share/perl5/IkiWiki.pm
-*** /usr/share/perl5/IkiWiki.pm.distrib Wed Aug 6 07:48:34 2008
---- /usr/share/perl5/IkiWiki.pm Tue Aug 26 23:47:30 2008
-***************
-*** 792,797 ****
---- 792,799 ----
- my $page=shift;
- my $unescaped=shift;
-
-+ $page=basename($page);
-+
- if ($unescaped) {
- $page=~s/(__(\d+)__|_)/$1 eq '_' ? ' ' : chr($2)/eg;
- }
-
-diff -c /usr/share/perl5/IkiWiki/Plugin/meta.pm.distrib /usr/share/perl5/IkiWiki/Plugin/meta.pm
-*** /usr/share/perl5/IkiWiki/Plugin/meta.pm.distrib Wed Aug 6 07:34:55 2008
---- /usr/share/perl5/IkiWiki/Plugin/meta.pm Tue Aug 26 23:30:58 2008
-***************
-*** 3,8 ****
---- 3,9 ----
- package IkiWiki::Plugin::meta;
-
- use warnings;
-+ no warnings 'redefine';
- use strict;
- use IkiWiki 2.00;
-
-***************
-*** 289,294 ****
---- 290,319 ----
- }
- } #}}}
-
-+ sub IkiWiki::pagetitle ($;$) { #{{{
-+ my $page=shift;
-+ my $unescaped=shift;
-+
-+ if ($page =~ m#/#) {
-+ $page =~ s#^/##;
-+ $page =~ s#/index$##;
-+ if ($pagestate{"$page/index"}{meta}{title}) {
-+ $page = $pagestate{"$page/index"}{meta}{title};
-+ } else {
-+ $page = IkiWiki::basename($page);
-+ }
-+ }
-+
-+ if ($unescaped) {
-+ $page=~s/(__(\d+)__|_)/$1 eq '_' ? ' ' : chr($2)/eg;
-+ }
-+ else {
-+ $page=~s/(__(\d+)__|_)/$1 eq '_' ? ' ' : "&#$2;"/eg;
-+ }
-+
-+ return $page;
-+ } #}}}
-+
- package IkiWiki::PageSpec;
-
- sub match_title ($$;@) { #{{{
-
-
-</pre>
diff --git a/doc/todo/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup.mdwn b/doc/todo/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup.mdwn
index 492a32b36..b28469993 100644
--- a/doc/todo/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup.mdwn
+++ b/doc/todo/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup.mdwn
@@ -157,9 +157,9 @@ ManojSrivastava
+=cut
+
+
-+sub import { #{{{
++sub import {
+ hook(type => "pagetemplate", id => "varioki", call => \&pagetemplate);
-+} # }}}
++}
+
+
+=pod
@@ -175,7 +175,7 @@ ManojSrivastava
+
+=cut
+
-+sub pagetemplate (@) { #{{{
++sub pagetemplate (@) {
+ my %params=@_;
+ my $page=$params{page};
+ my $template=$params{template};
@@ -207,7 +207,7 @@ ManojSrivastava
+ $template->param("$var" =>"$value");
+ }
+ }
-+} # }}}
++}
+
+1;
+
diff --git a/doc/todo/wiki-formatted_comments_with_syntax_plugin.mdwn b/doc/todo/wiki-formatted_comments_with_syntax_plugin.mdwn
index 08ca61b0c..a5244c9ef 100644
--- a/doc/todo/wiki-formatted_comments_with_syntax_plugin.mdwn
+++ b/doc/todo/wiki-formatted_comments_with_syntax_plugin.mdwn
@@ -1 +1,4 @@
-[[Wishlist]] item: I'd love to see the ability to optionally switch back to wiki syntax within the comments of code pretty-printed with the [[plugins/contrib/syntax]] plugin. This would allow the use of links and formatting in comments.
+[[Wishlist]] item: I'd love to see the ability to optionally switch back to
+wiki syntax within the comments of code pretty-printed with the
+[[plugins/contrib/syntax]] plugin. This would allow the use of links and
+formatting in comments.
diff --git a/doc/todo/wikiwyg.mdwn b/doc/todo/wikiwyg.mdwn
index e3d1b3927..839986c7b 100644
--- a/doc/todo/wikiwyg.mdwn
+++ b/doc/todo/wikiwyg.mdwn
@@ -57,3 +57,8 @@ The plugin can be downloaded from <http://ikiwiki.xbaud.com/wikiwyg-1.6.tar.gz>
* Personalized settings
[Wikiwyg]: http://www.wikiwyg.net/
+
+> As noted in [[discussion]], the url above doesn't work, and I stupidly
+> lost my copy of this before merging it. I hope that this plugin will turn
+> back up. In the meantime, there is a wmd plugin that accomplishes the
+> same basic task of WSYWIG markdown editing. --[[Joey]]
diff --git a/doc/usage.mdwn b/doc/usage.mdwn
index b6af75ac8..0c618de5c 100644
--- a/doc/usage.mdwn
+++ b/doc/usage.mdwn
@@ -6,7 +6,7 @@ ikiwiki - a wiki compiler
ikiwiki [options] source destination
-ikiwiki --setup configfile
+ikiwiki --setup setupfile
# DESCRIPTION
@@ -30,19 +30,19 @@ These options control the mode that ikiwiki operates in.
Force a rebuild of all pages.
-* --setup configfile
+* --setup setupfile
In setup mode, ikiwiki reads the config file, which is really a perl
program that can call ikiwiki internal functions.
The default action when --setup is specified is to automatically generate
- wrappers for a wiki based on data in a config file, and rebuild the wiki.
+ wrappers for a wiki based on data in a setup file, and rebuild the wiki.
If you only want to build any changed pages, you can use --refresh with
--setup.
-* --dumpsetup configfile
+* --dumpsetup setupfile
- Causes ikiwiki to write to the specified config file, dumping out
+ Causes ikiwiki to write to the specified setup file, dumping out
its current configuration.
* --wrappers
@@ -103,13 +103,14 @@ These options control the mode that ikiwiki operates in.
# CONFIG OPTIONS
These options configure the wiki. Note that [[plugins]] can add additional
-configuration options of their own.
+configuration options of their own. All of these options and more besides can
+also be configured using a setup file.
-* --wikiname
+* --wikiname name
The name of the wiki, default is "wiki".
-* --templatedir
+* --templatedir dir
Specify the directory that the page [[templates|wikitemplates]] are stored in.
Default is `/usr/share/ikiwiki/templates`, or another location as configured at
@@ -121,7 +122,7 @@ configuration options of their own.
ikiwiki. Old versions of templates do not always work with new ikiwiki
versions.
-* --underlaydir
+* --underlaydir dir
Specify the directory that is used to underlay the source directory.
Source files will be taken from here unless overridden by a file in the
@@ -292,7 +293,7 @@ configuration options of their own.
* --prefix-directives, --no-prefix-directives
Toggle new '!'-prefixed syntax for preprocessor directives. ikiwiki currently
- defaults to --no-prefix-directives.
+ defaults to --prefix-directives.
* --w3mmode, --no-w3mmode
@@ -307,19 +308,37 @@ configuration options of their own.
* --getctime
- Pull last changed time for each new page out of the revision control
+ 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
- Subversion checkout. It is unoptimised and quite slow. It is best used
+ VCS checkout. It is unoptimised and quite slow. It is best used
with --rebuild, to force ikiwiki to get the ctime for all pages.
* --set var=value
This allows setting an arbitrary configuration variable, the same as if it
- were set via a configuration file. Since most options can be configured
+ were set via a setup file. Since most options can be configured
using command-line switches, you will rarely need to use this, but it can be
useful for the odd option that lacks a command-line switch.
+# EXAMPLES
+
+* ikiwiki --setup my.setup
+
+ Completly (re)build the wiki using the specified setup file.
+
+* ikiwiki --setup my.setup --refresh
+
+ Refresh the wiki, using settings from my.setup, and avoid
+ rebuilding any pages that have not changed. This is faster.
+
+* ikiwiki --setup my.setup --refresh --wrappers
+
+ Refresh the wiki, including regnerating all wrapper programs,
+ but do not rebuild all pages. Useful if you have changed something
+ in the setup file that does not need a full wiki rebuild to update
+ all pages, but that you want to immediatly take effect.
+
# ENVIRONMENT
* CC
diff --git a/doc/users/Edward_Betts.mdwn b/doc/users/Edward_Betts.mdwn
index 0d4483fa8..b32927a1c 100644
--- a/doc/users/Edward_Betts.mdwn
+++ b/doc/users/Edward_Betts.mdwn
@@ -3,5 +3,7 @@ My watchlist:
[[!inline archive="yes" sort="mtime" atom="yes" pages="
todo/allow_wiki_syntax_in_commit_messages*
todo/shortcut_with_different_link_text*
-todo/structured_page_data* "]]
+todo/structured_page_data*
+tips/convert_mediawiki_to_ikiwiki*
+"]]
diff --git a/doc/users/StevenBlack.mdwn b/doc/users/StevenBlack.mdwn
new file mode 100644
index 000000000..ea7a6a97a
--- /dev/null
+++ b/doc/users/StevenBlack.mdwn
@@ -0,0 +1,5 @@
+It feels like there are a lot of people named Steven Black. While I'm just one of many with my name, sometimes it is actually just me and I've forgotten that I had an account somewhere.
+
+I'm not a doctor, though I would certainly trust any doctor, dentist, or philosopher named Steven Black. (There are several.)
+
+I *am* a huge Ikiwiki fan. I've had my eye on it for many years for personal projects (though I never quite got around to installing it). Recently, however, I managed to convince my coworkers that it would be a good idea for an internal wiki. Boy was I right. The thing is practically designed to be the perfect developer-centered wiki.
diff --git a/doc/users/ajt.mdwn b/doc/users/ajt.mdwn
new file mode 100644
index 000000000..bc47040b6
--- /dev/null
+++ b/doc/users/ajt.mdwn
@@ -0,0 +1,20 @@
+[[!meta title="Adam Trickett"]]
+
+# Adam Trickett
+
+## "ajt"
+
+I'm a long time hacker of sorts, I like to program in Perl on Debian systems but work pays me to program in ABAP (COBOL) on SAP.
+
+I like wikis and I'm currently in love with ikiwiki, having moved my home intranet from a home made template solution to ikiwiki over a weekend. I'm using ikiwiki more like a web content management system (e.g. RedDot) rather than a traditional wiki.
+
+### My Links
+
+* [iredale dot net](http://www.iredale.net/) my web server and main blog
+* [ajt](http://www.perlmonks.org/index.pl?node_id=113686) my Perkmonks home node
+* [ajt](http://use.perl.org/~ajt) my use Perl home
+* [ATRICKETT](http://search.cpan.org/~atrickett/) my CPAN folder
+* [ajt](http://www.debian-administration.org/users/ajt) my Debian-Administration home (good site btw)
+* [drajt](http://www.linkedin.com/in/drajt) my LinkedIn profile
+* [drajt](http://www.slideshare.net/drajt) my "Slidespace" on SlideShare
+* [AdamTrickett](http://www.hants.lug.org.uk/cgi-bin/wiki.pl?AdamTrickett) my wiki page on my LUG's site
diff --git a/doc/users/alexander.mdwn b/doc/users/alexander.mdwn
new file mode 100644
index 000000000..b2894a90c
--- /dev/null
+++ b/doc/users/alexander.mdwn
@@ -0,0 +1 @@
+I use ikiwiki to organize information - projects, reading notes, outlines, todo lists, etc.
diff --git a/doc/users/cfm.mdwn b/doc/users/cfm.mdwn
new file mode 100644
index 000000000..4feab9601
--- /dev/null
+++ b/doc/users/cfm.mdwn
@@ -0,0 +1 @@
+I maintain a [home page](http://www.panix.com/~cfm/ "Cory Myers").
diff --git a/doc/users/hb/discussion.mdwn b/doc/users/hb/discussion.mdwn
index 6dfa6a23b..15c065e45 100644
--- a/doc/users/hb/discussion.mdwn
+++ b/doc/users/hb/discussion.mdwn
@@ -1,4 +1,5 @@
I'd love to see any notes you have on using ikiwiki for GTD. Would you
consider documenting them? Perhaps we could turn the result into a
[[tip|tips]]. -[[JoshTriplett]]
-> Well, certainly. Basically it's just inline + tag feature. I'm going to have more time in May for ikiwiki, I hope. \ No newline at end of file
+> Well, certainly. Basically it's just inline + tag feature. I'm going to have more time in May for ikiwiki, I hope.
+> > Any news about that ?
diff --git a/doc/users/intrigeri.mdwn b/doc/users/intrigeri.mdwn
index f9a216e18..8fa9965a5 100644
--- a/doc/users/intrigeri.mdwn
+++ b/doc/users/intrigeri.mdwn
@@ -1,4 +1,4 @@
intrigeri AT boum.org, already loving ikiwiki.
* [gnupg key](http://gaffer.ptitcanardnoir.org/intrigeri/intrigeri.asc)
-* Git repository ([gitweb](http://repo.or.cz/w/ikiwiki/intrigeri.git)) with various ikiwiki {feature, bugfix}-branches : `git://repo.or.cz/ikiwiki/intrigeri.git`
+* Git repository with various ikiwiki {feature, bugfix}-branches : `git://gaffer.ptitcanardnoir.org/ikiwiki.git`
diff --git a/doc/users/jasonblevins.mdwn b/doc/users/jasonblevins.mdwn
index 52420f7c9..61c381d96 100644
--- a/doc/users/jasonblevins.mdwn
+++ b/doc/users/jasonblevins.mdwn
@@ -1,11 +1,109 @@
+[[!meta title="Jason Blevins"]]
+
I'm currently hosting a private ikiwiki for keeping research notes
-which, with some patches and a (currently unreleased) plugin, will
+which, with some patches and a plugin (below), will
convert inline LaTeX expressions to MathML. I'm working towards a
patchset and instructions for others to do the same.
-There is one thing that needs to be decided first: whether or not to
-include [[sanitization|todo/svg]] of MathML in htmlscrubber (and while
-we're at it, why not SVG).
+I've setup a test ikiwiki [here](http://xbeta.org/colab/) where I've
+started keeping a few notes on my progress. There is an example of
+inline SVG on the homepage (note that the logo scales along with the
+font size). There are a few example mathematical expressions in the
+[sandbox](http://xbeta.org/colab/sandbox/). The MathML is generated
+automatically from inline LaTeX expressions using an experimental
+plugin I'm working on.
My (also MathML-enabled) homepage: <http://jblevins.org/> (still using
Blosxom...maybe one day I'll convert it to ikiwiki...)
+
+Current ikiwki issues of interest:
+
+ * [[bugs/recentchanges_feed_links]]
+ * [[bugs/HTML_inlined_into_Atom_not_necessarily_well-formed]]
+ * [[plugins/toc/discussion]]
+ * [[todo/BibTeX]]
+ * [[todo/svg]]
+ * [[todo/Option_to_make_title_an_h1?]]
+ * [[bugs/SVG_files_not_recognized_as_images]]
+
+## Plugins
+
+These plugins are experimental. Use them at your own risk. Read the
+perldoc documentation for more details. Patches and suggestions are
+welcome.
+
+ * [mdwn_itex][] - Works with the `mdwn` plugin to convert inline LaTeX
+ expressions to MathML using `itex2MML`.
+
+ * [h1title][] - If present, use the leading level 1 Markdown header to
+ set the page title and remove it from the page body.
+
+ * [code][] - Whole file and inline code snippet syntax highlighting
+ via GNU Source-highlight. The list of supported file extensions is
+ configurable. There is also some preliminary [documentation][code-doc].
+ See the [FortranWiki](http://fortranwiki.org) for examples.
+
+ * [metamail][] - a plugin for loading metadata from email-style
+ headers at top of a file (e.g., `title: Page Title` or
+ `date: November 2, 2008 11:14 EST`).
+
+ * [pandoc][] - Markdown page processing via Pandoc. LaTeX and
+ reStructuredText are optional.
+
+ * [path][] - Provides path-specific template conditionals such as
+ `IS_HOMEPAGE` and `IN_DIR_SUBDIR`.
+
+ [mdwn_itex]: http://code.jblevins.org/ikiwiki/plugins.git/plain/mdwn_itex.pm
+ [h1title]: http://code.jblevins.org/ikiwiki/plugins.git/plain/h1title.pm
+ [code]: http://code.jblevins.org/ikiwiki/plugins.git/plain/code.pm
+ [code-doc]: http://code.jblevins.org/ikiwiki/plugins.git/plain/code.text
+ [metamail]: http://code.jblevins.org/ikiwiki/plugins.git/plain/metamail.pm
+ [pandoc]: http://code.jblevins.org/ikiwiki/plugins.git/plain/pandoc.pm
+ [path]: http://code.jblevins.org/ikiwiki/plugins.git/plain/path.pm
+
+
+## MathML and SVG support
+
+So far, I've made some notes on sanitizing MathML and SVG via
+htmlscrubber on the [[todo/svg]] todo item.
+
+I've also worked out some content-negotiation issues. First of all,
+one needs to modify the default templates to use the
+XHTML+MathML+SVG doctype (see e.g., this [patch][template-patch]).
+For most browsers, the content type of the pages should be
+`application/xhtml+xml`. The solution is easy if you want to
+just send `application/xhtml+xml` to everybody:
+just change the content type of `.html` files across the board.
+
+However, if you want to support browsers that don't accept
+`application/xhtml+xml` (and those that will but say they
+don't, such as IE with the MathPlayer plugin), then one
+needs a `mod_rewrite` rule like the following:
+
+ RewriteCond %{HTTP_ACCEPT} application\/xhtml\+xml [OR]
+ RewriteCond %{HTTP_USER_AGENT} (W3C.*Validator|MathPlayer)
+ RewriteRule \.html$ - [T=application/xhtml+xml]
+
+This solves the problem of MathML and inline SVG in static pages
+but some additional work is required for dynamically generated
+pages, like page previews, that are generated by `ikiwiki.cgi`.
+We need to allow `ikiwiki.cgi` to set the content type dynamically
+based on the `HTTP_CONTENT_TYPE` environment variable
+(e.g., with the following [patch][cgi-patch]). Then, the following
+rewrite rules can pass the correct content type to ikiwiki:
+
+ RewriteCond %{HTTP_ACCEPT} application\/xhtml\+xml [OR]
+ RewriteCond %{HTTP_USER_AGENT} (W3C.*Validator|MathPlayer)
+ RewriteRule ikiwiki.cgi$ - [T=application/xhtml+xml]
+
+One final critical issue is that a production-ready setup needs to
+implement some sort of on-the-fly error handling. If a user submits
+an invalid LaTeX expression or SVG code (not malicious, just invalid)
+and saves the page, then browsers like Firefox will halt processing of
+the page, preventing any further viewing or editing. A less than
+optimal solution is to force users to preview the page before saving.
+That way if someone introduces invalid XHTML then they can't save the
+page in the first place (unless they post directly to the right URL).
+
+ [template-patch]: http://xbeta.org/gitweb/?p=xbeta/ikiwiki.git;a=blobdiff;f=templates/page.tmpl;h=380ef699fa72223744eb5c1ee655fb79aa6bce5b;hp=9084ba7e11e92a10528b2ab12c9b73cf7b0f40a7;hb=416d5d1b15b94e604442e4e209a30dee4b77b684;hpb=ececf4fb8766a4ff7eff943b3ef600be81a0df49
+ [cgi-patch]: http://xbeta.org/gitweb/?p=xbeta/ikiwiki.git;a=commitdiff;h=fa538c375250ab08f396634135f7d79fce2a9d36
diff --git a/doc/users/jelmer.mdwn b/doc/users/jelmer.mdwn
new file mode 100644
index 000000000..1f2f71aad
--- /dev/null
+++ b/doc/users/jelmer.mdwn
@@ -0,0 +1 @@
+[Jelmer Vernooij](http://samba.org/~jelmer/)
diff --git a/doc/users/jon.mdwn b/doc/users/jon.mdwn
new file mode 100644
index 000000000..1cda23999
--- /dev/null
+++ b/doc/users/jon.mdwn
@@ -0,0 +1,20 @@
+[[!meta title="Jon Dowland"]]
+I'm looking at ikiwiki both for my personal site but also as a
+team-documentation management system for a small-sized group of UNIX
+sysadmins.
+
+* my edits should appear either as 'Jon' (if I've used
+ [[tips/untrusted_git_push]]) or 'jmtd.net' (or once upon a time
+ 'alcopop.org/me/openid/' or 'jondowland').
+* My [homepage](http://jmtd.net/) is powered by ikiwiki
+
+I gave a talk at the [UK UNIX User's Group](http://www.ukuug.org/) annual
+[Linux conference](http://www.ukuug.org/events/linux2008/) about organising
+system administrator documentation. Roughly a third of this talk was
+discussing IkiWiki in some technical detail and suggesting it as a good piece
+of software for this task.
+
+ * slides at <http://www.staff.ncl.ac.uk/jon.dowland/unix/docs/>.
+
+I am also working on some ikiwiki hacks: an alternative approach to
+[[plugins/comments]]; a system for [[forum/managing_todo_lists]].
diff --git a/doc/users/jondowland.mdwn b/doc/users/jondowland.mdwn
deleted file mode 100644
index c6302616f..000000000
--- a/doc/users/jondowland.mdwn
+++ /dev/null
@@ -1,5 +0,0 @@
-A new ikiwiki user, looking at ikiwiki both for his personal site but also as a team-documentation management system for a small-sized group of UNIX sysadmins.
-
-* My [homepage](http://jmtd.net/) is powered by ikiwiki (replacing my [older homepage](http://alcopop.org/), which was a mess of scripts)
-
-I am giving a talk at the [UK UNIX User's Group](http://www.ukuug.org/) annual [Linux conference](http://www.ukuug.org/events/linux2008/) about organising system administrator documentation which will feature IkiWiki.
diff --git a/doc/users/joshtriplett.mdwn b/doc/users/joshtriplett.mdwn
index f32d23bb7..f85c068c3 100644
--- a/doc/users/joshtriplett.mdwn
+++ b/doc/users/joshtriplett.mdwn
@@ -1,10 +1,15 @@
[[!meta title="Josh Triplett"]]
-Josh Triplett; `josh@{freedesktop.org,kernel.org,psas.pdx.edu}`.
+Email: `josh@{joshtriplett.org,freedesktop.org,kernel.org,psas.pdx.edu}`.
+
+[Josh Triplett's homepage](http://joshtriplett.org)
Proud user of ikiwiki.
-Currently working on scripts to convert MoinMoin and TWiki wikis to ikiwikis
-backed by a git repository, including full history.
+Currently working on scripts to convert MoinMoin and TWiki wikis to
+ikiwikis backed by a git repository, including full history.
+Available from the following repositories, though not well-documented:
-> I've written about how I converted from Mediawiki here: <http://iki.u32.net/Mediawiki_Conversion/> Are you ever going to release your scripts? --[[sabr]]
+ git clone git://svcs.cs.pdx.edu/git/wiki2iki/moin2iki
+ git clone git://svcs.cs.pdx.edu/git/wiki2iki/html-wikiconverter
+ git clone git://svcs.cs.pdx.edu/git/wiki2iki/twiki
diff --git a/doc/users/jrblevin.mdwn b/doc/users/jrblevin.mdwn
new file mode 100644
index 000000000..4eb250bfa
--- /dev/null
+++ b/doc/users/jrblevin.mdwn
@@ -0,0 +1 @@
+[[!meta redir=users/jasonblevins]]
diff --git a/doc/users/jwalzer.mdwn b/doc/users/jwalzer.mdwn
new file mode 100644
index 000000000..e66ad1a52
--- /dev/null
+++ b/doc/users/jwalzer.mdwn
@@ -0,0 +1,3 @@
+Jan Walzer started to look on ikiwiki just recently.
+
+Read [here](http://wa.lzer.net/wiki/ikiwiki/whyikiwiki/) why he uses ikiwiki.
diff --git a/doc/users/neale.mdwn b/doc/users/neale.mdwn
new file mode 100644
index 000000000..5245c2c99
--- /dev/null
+++ b/doc/users/neale.mdwn
@@ -0,0 +1,10 @@
+I used IkiWiki to supplant some custom journal software. I like that it uses
+the filesystem, my intent is to make journal entries as future-proof as
+possible. I'll probably start using it for generation of entire sites, soon.
+
+Things generated by IkiWiki with some fancypants stylesheets:
+
+* [woozle.org](http://woozle.org/)
+* [My page](http://woozle.org/~neale/)
+* [Amy's blog](http://woozle.org/~aim/blog/)
+* [Heidi's blog](http://woozle.org/~heidi/blog/)
diff --git a/doc/users/nolan.mdwn b/doc/users/nolan.mdwn
new file mode 100644
index 000000000..64b405e60
--- /dev/null
+++ b/doc/users/nolan.mdwn
@@ -0,0 +1 @@
+Hi, I'm Nolan. I'll add more later.
diff --git a/doc/users/seanh.mdwn b/doc/users/seanh.mdwn
new file mode 100644
index 000000000..d093c2f32
--- /dev/null
+++ b/doc/users/seanh.mdwn
@@ -0,0 +1 @@
+seanh is an ikiwiki user.
diff --git a/doc/users/simonraven.mdwn b/doc/users/simonraven.mdwn
new file mode 100644
index 000000000..0706859aa
--- /dev/null
+++ b/doc/users/simonraven.mdwn
@@ -0,0 +1,3 @@
+New ikiwiki site at my personal site under /ikiwiki/ . This might move to /wiki/ or be on wiki.k.o depending on if I can import my MediaWiki stuff to it.
+
+Thought I'd try it out again and it grew on me.
diff --git a/doc/users/smcv.mdwn b/doc/users/smcv.mdwn
index 33ae450b2..59d1affba 100644
--- a/doc/users/smcv.mdwn
+++ b/doc/users/smcv.mdwn
@@ -1 +1,10 @@
-I'm trying to add enough features/fix enough bugs to convert [smcv.pseudorandom.co.uk](http://smcv.pseudorandom.co.uk/) from Django + Python + misc hacks to ikiwiki.
+Website: [pseudorandom.co.uk](http://www.pseudorandom.co.uk/)
+
+Blog: [smcv.pseudorandom.co.uk](http://smcv.pseudorandom.co.uk/)
+
+My repository containing ikiwiki branches:
+
+* gitweb: http://git.pseudorandom.co.uk/smcv/ikiwiki.git
+* anongit: git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git
+
+Currently thinking about a [[users/smcv/gallery]] plugin.
diff --git a/doc/users/smcv/gallery.mdwn b/doc/users/smcv/gallery.mdwn
new file mode 100644
index 000000000..b6b8de79f
--- /dev/null
+++ b/doc/users/smcv/gallery.mdwn
@@ -0,0 +1,342 @@
+[[!template id=plugin name=smcvgallery author="[[Simon_McVittie|smcv]]"]]
+[[!tag type/chrome]]
+
+This plugin has not yet been written; this page is an experiment in
+design-by-documentation :-)
+
+## Requirements
+
+This plugin formats a collection of images into a photo gallery,
+in the same way as many websites: good examples include the
+PHP application [Gallery](http://gallery.menalto.com/), Flickr,
+and Facebook's Photos "application".
+
+The web UI I'm trying to achieve consists of one
+[HTML page of thumbnails](http://www.pseudorandom.co.uk/2008/2008-03-08-panic-cell-gig/)
+as an entry point to the gallery, where each thumbnail links to
+[a "viewer" HTML page](http://www.pseudorandom.co.uk/2008/2008-03-08-panic-cell-gig/img_0068/)
+with a full size image, next/previous thumbnail links, and
+[[plugins/comments]].
+
+(The Summer of Code [[plugins/contrib/gallery]] plugin does the
+next/previous UI in Javascript using Lightbox, which means that
+individual photos can't be bookmarked in a meaningful way, and
+the best it can do as a fallback for non-Javascript browsers
+is to provide a direct link to the image.)
+
+Other features that would be good to have:
+
+* minimizing the number of separate operations needed to make a gallery -
+ editing one source file per gallery is acceptable, editing one
+ source file per photo is not
+
+* keeping photos outside source code control, for instance in an
+ underlay
+
+* assigning [[tags|ikiwiki/directive/tag]] to photos, providing a
+ superset of Facebook's "show tagged photos of this person" functionality
+
+* constructing galleries entirely via the web by uploading attachments
+
+* inserting grouping (section headings) within a gallery; as in the example
+ linked above, I'd like this to split up the thumbnails but not the
+ next/previous trail
+
+* rendering an `<object>/<embed>` arrangement to display videos, and possibly
+ thumbnailing them in the same way as totem-video-thumbnailer
+ (my camera can record short videos, so some of my web photo galleries
+ contain them)
+
+My plan is to have these directives:
+
+* \[[!gallery]] registers the page it's on as a gallery, and displays all
+ photos that are part of this gallery but not part of a \[[!gallerysection]]
+ (below).
+
+ All images (i.e. `*.png *.jpg *.gif`) that are attachments to the gallery page
+ or its subpages are considered to be part of the gallery.
+
+ Optional arguments:
+
+ * filter="[[ikiwiki/PageSpec]]": only consider images to be part of the
+ gallery if they also match this filter
+
+ * sort="date|filename": order in which to sort the images
+
+* \[[!gallerysection filter="[[ikiwiki/PageSpec]]"]] displays all photos in the
+ gallery that match the filter
+
+So,
+[the gallery I'm using as an example](http://www.pseudorandom.co.uk/2008/2008-03-08-panic-cell-gig/)
+could look something like this:
+
+ \[[!gallery]]
+ <!-- replaced with one uncategorized photo -->
+
+ # Gamarra
+
+ \[[!gallerysection filter="link(sometag)"]]
+ <!-- all the Gamarra photos -->
+
+ # Smokescreen
+
+ \[[!gallerysection filter="link(someothertag)"]]
+ <!-- all the Smokescreen photos -->
+
+ <!-- ... -->
+
+## Implementation ideas
+
+The next/previous part this plugin overlaps with [[todo/wikitrails]].
+
+A \[[!galleryimg]] directive to assign metadata to images might be necessary, so
+the gallery page can contain something like:
+
+ \[[!galleryimg p1010001.jpg title="..." caption="..." tags="foo"]]
+ \[[!galleryimg p1010002.jpg title="..." caption="..." tags="foo bar"]]
+
+However, allowing other pages to push in metadata like that will make
+dependency tracking difficult.
+
+Making the viewer pages could be rather tricky. Here are some options:
+"synthesize source pages for viewers" is the one I'm leaning towards at the
+moment.
+
+### Viewers' source page is the gallery
+
+One possibility is to write out the viewer pages as a side-effect of
+preprocessing the \[[!gallery]] directive. The proof-of-concept implementation
+below does this. However, this does mean the viewer pages can't have tags or
+metadata of their own and can't be matched by [[pagespecs|ikiwiki/pagespec]] or
+[[wikilinks|ikiwiki/wikilink]].
+
+It might be possible to implement tagging by using \[[!galleryimg]] to assign
+the metadata to the *images* instead of their viewers; however, that would
+require hacking up both `IkiWiki::htmllink` and `IkiWiki::urlto` to redirect
+links to the image (e.g. from the \[[!map]] on a tag page) to become links to
+the viewer page.
+
+Modifications to the comments plugin would also be required, to make it allow
+comments written to `foo/bar/comment_1._comment` even though the page foo/bar
+does not really exist, and display comments on the viewer pages even though
+they're not real pages. (Writing comments to `foo/bar.jpg/*._comment` is not
+an option!)
+
+### Synthesize source pages for viewers
+
+Another is to synthesize source pages for the viewers. This means they can have
+tags and metadata, but trying to arrange for them to be scanned etc. correctly
+without needing another refresh run is somewhat terrifying.
+[[plugins/autoindex]] can safely create source pages because it runs in
+the refresh hook, but I don't really like the idea of a refresh hook that scans
+all source pages to see if they contain \[[!gallery]]...
+
+The photo galleries I have at the moment, like the Panic Cell example above,
+are made by using an external script to parse XML gallery descriptions (lists
+of image filenames, with metadata such as titles), and using this to write
+IkiWiki markup into a directory which is then used as an underlay. This is a
+hack, but it works. The use of XML is left over from a previous attempt at
+solving the same problem using Django.
+
+Perhaps a better approach would be to have a setupfile option that names a
+particular underlay directory (meeting the objective of not having large
+photos under source code control) and generates a source page for each file
+in that directory during the refresh hook. The source pages could be in the
+underlay until they are edited (e.g. tagged), at which point they would be
+copied into the source-code-controlled version in the usual way.
+
+The synthetic source pages can be very simple, using the same trick as my
+[[plugins/comments]] plugin (a dedicated [[directive|ikiwiki/directives]]
+encapsulating everything the plugin needs). If the plugin automatically
+gathers information like file size, pixel size, date etc. from the images, then
+only the human-edited information and a filename reference need to be present
+in the source page; with some clever lookup rules based on the filename of
+the source page, not even the photo's filename is necessarily needed.
+
+ \[[!meta title="..."]]
+ \[[!meta date="..."]]
+ \[[!meta copyright="..."]]
+ \[[!tag ...]]
+
+ \[[!galleryimageviewer p1010001.jpg]]
+
+However, this would mean that editing tags and other metadata would require
+editing pages individually. Rather than trying to "fix" that, perhaps it would
+be better to have a special CGI interface for bulk tagging/metadata editing.
+This could even be combined with a bulk upload form (a reasonable number of
+file upload controls - maybe 20 - with metadata alongside each).
+
+Uploading multiple images is necessarily awkward due to restrictions placed on
+file upload controls by browsers for security reasons - sites like Facebook
+allow whole directories to be uploaded at the same time, but they achieve this
+by using a signed Java applet with privileged access to the user's filesystem.
+
+I've found that it's often useful to be able to force the creation time of
+photos (my camera's battery isn't very reliable, and it frequently decides that
+the date is 0000-00-00 00:00:00), so treating the \[[!meta date]] of the source
+page and the creation date of the photo as synonymous would be useful.
+
+### Images are the viewer's source - special filename extension
+
+Making the image be the source page (and generate HTML itself) would be
+possible, but I wouldn't want to generate a HTML viewer for every `.jpg` on a
+site, so either the images would have to have a special extension (awkward for
+uploads from Windows users) or the plugin would have to be able to change
+whether HTML was generated in some way (not currently possible).
+
+### Images are the viewer's source - alter `ispage()`
+
+It might be possible to hack up `ispage()` so some, but not all, images are
+considered to "be a page":
+
+* srcdir/not-a-photo.jpg → destdir/not-a-photo.jpg
+* srcdir/gallery/photo.jpg → destdir/gallery/photo/index.html
+
+Perhaps one way to do this would be for the photos to appear in a particular
+underlay directory, which would also fulfil the objective of having photos not
+be version-controlled:
+
+* srcdir/not-a-photo.jpg → destdir/not-a-photo.jpg
+* underlay/gallery/photo.jpg → destdir/gallery/photo/index.html
+
+## Proof-of-concept implementation of "viewers' source page is the gallery"
+
+ #!/usr/bin/perl
+ package IkiWiki::Plugin::gallery;
+
+ use warnings;
+ use strict;
+ use IkiWiki 2.00;
+
+ sub import {
+ hook(type => "getsetup", id => "gallery", call => \&getsetup);
+ hook(type => "checkconfig", id => "gallery", call => \&checkconfig);
+ hook(type => "preprocess", id => "gallery",
+ call => \&preprocess_gallery, scan => 1);
+ hook(type => "preprocess", id => "gallerysection",
+ call => \&preprocess_gallerysection, scan => 1);
+ hook(type => "preprocess", id => "galleryimg",
+ call => \&preprocess_galleryimg, scan => 1);
+ }
+
+ sub getsetup () {
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+ }
+
+ sub checkconfig () {
+ }
+
+ # page that is a gallery => array of images
+ my %galleries;
+ # page that is a gallery => array of filters
+ my %sections;
+ # page that is an image => page name of generated "viewer"
+ my %viewers;
+
+ sub preprocess_gallery {
+ # \[[!gallery filter="!*/cover.jpg"]]
+ my %params=@_;
+
+ my $subpage = qr/^\Q$params{page}\E\//;
+
+ my @images;
+
+ foreach my $page (keys %pagesources) {
+ # Reject anything not a subpage or attachment of this page
+ next unless $page =~ $subpage;
+
+ # Reject non-images
+ # FIXME: hard-coded list of extensions
+ next unless $page =~ /\.(jpg|gif|png|mov)$/;
+
+ # Reject according to the filter, if any
+ next if (exists $params{filter} &&
+ !pagespec_match($page, $params{filter},
+ location => $params{page}));
+
+ # OK, we'll have that one
+ push @images, $page;
+
+ my $viewername = $page;
+ $viewername =~ s/\.[^.]+$//;
+ $viewers{$page} = $viewername;
+
+ my $filename = htmlpage($viewername);
+ will_render($params{page}, $filename);
+ }
+
+ $galleries{$params{page}} = \@images;
+
+ # If we're just scanning, don't bother producing output
+ return unless defined wantarray;
+
+ # actually render the viewers
+ foreach my $img (@images) {
+ my $filename = htmlpage($viewers{$img});
+ debug("rendering image viewer $filename for $img");
+ writefile($filename, $config{destdir}, "# placeholder");
+ }
+
+ # display a list of "loose" images (those that are in no section);
+ # this works because we collected the sections' filters during the
+ # scan stage
+
+ my @loose = @images;
+
+ foreach my $filter (@{$sections{$params{page}}}) {
+ my $_;
+ @loose = grep { !pagespec_match($_, $filter,
+ location => $params{page}) } @loose;
+ }
+
+ my $_;
+ my $ret = "<ul>\n";
+ foreach my $img (@loose) {
+ $ret .= "<li>";
+ $ret .= "<a href=\"" . urlto($viewers{$img}, $params{page});
+ $ret .= "\">$img</a></li>\n"
+ }
+ return "$ret</ul>\n";
+ }
+
+ sub preprocess_gallerysection {
+ # \[[!gallerysection filter="friday/*"]]
+ my %params=@_;
+
+ # remember the filter for this section so the "loose images" section
+ # won't include these images
+ push @{$sections{$params{page}}}, $params{filter};
+
+ # If we're just scanning, don't bother producing output
+ return unless defined wantarray;
+
+ # this relies on the fact that we ran preprocess_gallery once
+ # already, during the scan stage
+ my @images = @{$galleries{$params{page}}};
+ @images = grep { pagespec_match($_, $params{filter},
+ location => $params{page}) } @images;
+
+ my $_;
+ my $ret = "<ul>\n";
+ foreach my $img (@images) {
+ $ret .= "<li>";
+ $ret .= htmllink($params{page}, $params{destpage},
+ $viewers{$img});
+ $ret .= "</li>";
+ }
+ return "$ret</ul>\n";
+ }
+
+ sub preprocess_galleryimg {
+ # \[[!galleryimg p1010001.jpg title="" caption="" tags=""]]
+ my $file = $_[0];
+ my %params=@_;
+
+ return "";
+ }
+
+ 1
diff --git a/doc/users/svend.mdwn b/doc/users/svend.mdwn
new file mode 100644
index 000000000..69d83584f
--- /dev/null
+++ b/doc/users/svend.mdwn
@@ -0,0 +1,4 @@
+[[!meta title="Svend Sorensen"]]
+
+* [website](http://www.ciffer.net/~svend/)
+* [blog](http://www.ciffer.net/~svend/blog/)
diff --git a/doc/users/weakish.mdwn b/doc/users/weakish.mdwn
new file mode 100644
index 000000000..ccd5665ad
--- /dev/null
+++ b/doc/users/weakish.mdwn
@@ -0,0 +1 @@
+email: weakish@gmail.com
diff --git a/doc/users/weakishjiang.mdwn b/doc/users/weakishjiang.mdwn
new file mode 100644
index 000000000..0cafb4653
--- /dev/null
+++ b/doc/users/weakishjiang.mdwn
@@ -0,0 +1,4 @@
+[My blog](http://millenniumdark.blog.ubuntu.org.cn)
+
+> So, you're learning haskell. You know, I want to add support for haskell
+> external plugins to ikiwiki.. :-) --[[Joey]]
diff --git a/doc/users/xma.mdwn b/doc/users/xma.mdwn
new file mode 100644
index 000000000..89f2ff74c
--- /dev/null
+++ b/doc/users/xma.mdwn
@@ -0,0 +1,28 @@
+[[!meta title="Xavier Maillard"]]
+# Xavier Maillard
+
+I just started using [[ikiwiki]] for my own webspace at http://maillard.mobi/~xma/wiki
+
+I am learning how to effectively use it.
+
+Anyway, [[ikiwiki]] is really *awesome* !
+
+## More about me
+
+I am CLI user living in the linux console. More precisely, I live in an [[GNU_Emacs]] frame all day long. My main computer is an EeePC 901 running Slackware GNU/Linux 12.1. I do not have X installed (too lazy) but when in X, I am running an instance of [[CLFSWM]].
+
+## Contacting me
+
+Various channels to contact me:
+
+- mail: xma@gnu.org
+- jabber: xma01@jabber.fr
+- mobile: +33 621-964-362 (I only anwser to people I know though)
+
+Voila.
+
+## Plans
+
+I am planning to make a presentation of [[ikiwiki]]to my [local LUG](http://lolica.org) for our next montly meeting. Any help would be greatly appreciated.
+
+We are discussing to replace our old unmaintained (and unmaintainable) [SPIP](http://spip.net) website with a wiki. This is why I would like using ikiwiki ;)
diff --git a/doc/users/xma/discussion.mdwn b/doc/users/xma/discussion.mdwn
new file mode 100644
index 000000000..34adbf821
--- /dev/null
+++ b/doc/users/xma/discussion.mdwn
@@ -0,0 +1,18 @@
+How do you edit this wiki (I mean [ikiwiki]) without the web browser ? Is there a way to git clone/pull/push and thus to use our favorite [text editor](http://www.gnu.org/software/emacs) ? --[[xma]]
+
+> You can clone ikiwiki's [[git]] repo. I have not implemented a way to
+> allow users to push doc wiki only changesets anonymously, but you can
+> mails changesets to me. --[[Joey]]
+> > How can I send you the changesets ? (git command) --[[xma]]
+> > > `git-format-patch` --[[Joey]]
+
+> > > > Glad to hear I can mail changesets to you, since I wrote the [[todo/applydiff_plugin]] wishlist entry. --[[intrigeri]]
+
+> It would be nice to have a git recieve hook that
+> checked that a commit contained only changes to .mdwn or other allowed
+> extensions.. if someone writes up a good one, I'd be willing to deploy it
+> for ikiwiki. --[[Joey]]
+
+> > I'll think about it. It may solve some of my offline-being issues. --[[intrigeri]]
+
+>>>> Now developed! --[[Joey]]
diff --git a/doc/wikiicons/openidlogin-bg.gif b/doc/wikiicons/openidlogin-bg.gif
index c8f43d08e..a3bfe1098 100644
--- a/doc/wikiicons/openidlogin-bg.gif
+++ b/doc/wikiicons/openidlogin-bg.gif
Binary files differ
diff --git a/doc/wikitemplates.mdwn b/doc/wikitemplates.mdwn
index babd70211..fc5893677 100644
--- a/doc/wikitemplates.mdwn
+++ b/doc/wikitemplates.mdwn
@@ -29,6 +29,12 @@ located in /usr/share/ikiwiki/templates by default.
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.
The [[plugins/pagetemplate]] plugin can allow individual pages to use a
different template than `page.tmpl`.