]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/forum/understanding_filter_hooks.mdwn
ikiwiki (3.20130711) unstable; urgency=low
[git.ikiwiki.info.git] / doc / forum / understanding_filter_hooks.mdwn
1 Hi All;
3 I'm trying to use a filter hook as part of making [[wikilinks|ikiwiki/wikilink]] work in [[plugins/contrib/tex4ht]].
4 It seems that filter is called for every page. For my application I just want it to be called for ".tex" files, 
5 but right now I have to have a look at the content, which I don't like so much.
7 Is there a better hook to use for this? I need to transform the input before preprocessing.
9 [[DavidBremner]] 
11 >You can check the type of the page without having to look at the content of the page:
13     my $page_file=$pagesources{$page};
14     my $page_type=pagetype($page_file);
16 >Then you can check whether `$page_type` is "tex".
17 >--[[KathrynAndersen]]