From 3ebd4e0b45a8a6bd4c12604a3bb683dcb3a60eb8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 10 Sep 2009 14:04:46 -0400 Subject: Add genwrapper hook, that can be used to add code into the C wrapper. --- doc/plugins/write.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 3976f9adf..668f8d8b6 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -496,6 +496,13 @@ describes the plugin as a whole. For example: and undef if a rebuild could be needed in some circumstances, but is not strictly required. +### genwrapper + + hook(type => "genwrapper", id => "foo", call => \&genwrapper); + +This hook is used to inject C code (which it returns) into the `main` +function of the ikiwiki wrapper when it is being generated. + ## Plugin interface To import the ikiwiki plugin interface: -- cgit v1.2.3 From 525d4cd037b1da19f4d54cf113212cbe452be417 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 10 Sep 2009 14:06:30 -0400 Subject: new hook --- doc/plugins/contrib/cvs/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn index 155a2289d..ace455d06 100644 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -141,3 +141,7 @@ general-purpose way to do so. If and when some other problem thinks it wants to be solved by a new wrapper hook, it's easy enough to add one. Until then, I'd say it's more important to keep the wrapper as short and clear as possible. --[[schmonz]] + +> I've committed a slightly different hook, which should be general enough +> that `IkiWiki::Receive` can also use it, so please adapt your code to +> that. --[[Joey]] -- cgit v1.2.3 From 5ee980d77a614865747101615a6a795bec6f272f Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Thu, 10 Sep 2009 15:17:28 -0400 Subject: catch up to genwrapper --- doc/plugins/contrib/cvs.mdwn | 3 --- doc/plugins/contrib/cvs/discussion.mdwn | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/cvs.mdwn b/doc/plugins/contrib/cvs.mdwn index d45992300..b75929139 100644 --- a/doc/plugins/contrib/cvs.mdwn +++ b/doc/plugins/contrib/cvs.mdwn @@ -22,9 +22,6 @@ Consider creating `$HOME/.cvsrc` if you don't have one already; the plugin doesn * `cvs.pm` started life as a copy of [[3.14159|news/version_3.14159]]'s `svn.pm`. * `IkiWiki.pm:wiki_file_prune_regexps` avoids copying CVS metadata into `$DESTDIR`. -* `IkiWiki/Wrapper.pm` provides a new "wrapperargcheck" hook, which -the plugin implements to avoid calling ikiwiki from post-commit -(and locking against itself) if it's a directory being `cvs add`ed. * [[ikiwiki-makerepo]]: * creates a repository, * imports `$SRCDIR` into top-level module `ikiwiki` (vendor tag IKIWIKI, release tag PRE_CVS), diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn index ace455d06..645b2388b 100644 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -145,3 +145,5 @@ short and clear as possible. --[[schmonz]] > I've committed a slightly different hook, which should be general enough > that `IkiWiki::Receive` can also use it, so please adapt your code to > that. --[[Joey]] + +>> Done. --[[schmonz]]. -- cgit v1.2.3