]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/tips/embedding_content.mdwn
meta: Specifically document [[!meta foo:bar="baz"]] as not working
[git.ikiwiki.info.git] / doc / tips / embedding_content.mdwn
1 [[!meta date="2008-12-26 15:27:49 -0500"]]
3 Content from sites such as YouTube can be embedded into a web page. Maybe
4 you want to do this. But you'll find that the [[plugins/htmlscrubber]]
5 doesn't let you. It blocks the tags used to embed such content, because
6 they can be abused in many evil ways.
8 Some plugins have been written to try to work around this problem, by
9 whitelisting the html needed to embed things from a few sites like Google
10 maps, calendar, videos, and YouTube. The problem with these plugins is that
11 they have to be kept up to date to add new sites, and follow changes to the
12 html such sites use for embedding.
14 (Digression: The real problem with the plugins is that they hide the
15 underlying trust relationship. If you decide to embed html from a site,
16 you'd better trust that site. And if ikiwiki lets you enter such html, it
17 needs to trust you.)
19 The [[plugins/htmlscrubber]] offers a different way around this problem.
20 You can configure it to skip scrubbing certain pages, so that content from
21 elsewhere can be embedded on those pages. Then use [[plugins/lockedit]]
22 to limit who can edit those unscrubbed pages.
24 For example, suppose your blog is all under `blog/*`, and you want
25 only yourself to be able to post there, and you'd like to be able to embed
26 youtube videos etc in your blog. Other users can edit some pages in the
27 wiki (Discussion pages, say), but not your blog posts. Then you could configure
28 ikiwiki as follows:
30         htmlscrubber_skip => 'blog/* and !*/Discussion',
31         locked_pages => '!*/Discussion',
33 More simply, you might want to allow yourself to embed content anywhere
34 on the wiki, but scrub content written on Discussion pages:
35         
36         htmlscrubber_skip => '!*/Discussion',
37         locked_pages => '!*/Discussion',