]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/plugins/contrib/opengraph.mdwn
de4b6920cbb06a2527ee560f05bce65f3ecd35b8
[git.ikiwiki.info.git] / doc / plugins / contrib / opengraph.mdwn
1 # TL;DR
3 **Plugin**: [opengraph.pm](https://notabug.org/hiatobr/ikiwiki-plugin-opengraph/raw/master/opengraph.pm)
5 **Source**: [git](https://notabug.org/hiatobr/ikiwiki-plugin-opengraph)
7 ---
9 [[!toc]]
11 ---
13 # NAME
15 IkiWiki::Plugin::opengraph - Adds Open Graph tags on the html head
17 ---
19 # DESCRIPTION
21 This plugin implements the Open Graph tags in the head of the hmtl for all pages, provided you configure it properly and add it to the current template.
22 For more information on what is Open Graph, visit [[!wikipedia Open_Graph]].
23 To test your site against the Open Graph rules, use the tool available on <https://developers.facebook.com/tools/debug/og/object/>.
25 # DISCLAIMER
27 > **WARNING: Open Graph is modern spyware. You should use this if and only if you don't mind making the readers of your wiki/blog being tracked by evil corporations without their consent. By using this plugin you are being mean to the people who are reading your content. You have been warned.**
29 ---
31 # INSTALLATION
33 Put [opengraph.pm](https://notabug.org/hiatobr/ikiwiki-plugin-opengraph/raw/master/opengraph.pm) in *${HOME}/.ikiwiki/IkiWiki/Plugin/* or elsewhere in
34 your *@INC* path. Or read [[/plugins/install]].
36 ---
38 # CONFIGURATION
40 Add to the configuration in your [[blog.setup|/setup#index5h2]] file.
42     ## Open Graph plugin
43     # For more information, see
44     # <https://en.wikipedia.org/wiki/Open_Graph#Open_Graph_protocol>.
45     # Default values for <http://ikiwiki.info>
46     # obtained from <https://developers.facebook.com/tools/debug/og/object/>
47     # meta property="og:title"
48     opengraph_title: "ikiwiki"
49     # meta property="og:type"
50     opengraph_type: "website"
51     # meta property="og:url"
52     opengraph_url: "http://ikiwiki.info/"
53     # meta property="og:image"
54     opengraph_image: "http://ikiwiki.info/logo/ikiwiki.png"
55     # meta property="og:description"
56     opengraph_description: "Ikiwiki is a wiki compiler."
58 Add *opengraph* to the list of plugins:
60     add_plugins: [qw{goodstuff opengraph}]
62 ---
64 # TEMPLATES
66 You will need to add the following code to [[page.tmpl|/templates]] on the current
67 [[template|/templates]]. It **must** be in the <head> section of the <html>. I recommend
68 puting it after the <title> tag.
70     <TMPL_IF OPENGRAPH>
71     <TMPL_VAR OPENGRAPH_TAGS>
72     </TMPL_IF>
74 ---
76 # BUGS AND LIMITATIONS
78 ...that's not a bug. It's an issue. Issues shall be reported [here](https://notabug.org/hiatobr/ikiwiki-plugin-opengraph/issues)
80 Seriously, I don't know how to fetch the current page's description. Help on that is appreciated.
82 ---
84 # LICENSE AND COPYRIGHT
86 Copyleft (.) 2015 Hacklab IndependĂȘncia
88 This program is free software: you can redistribute it and/or modify
89 it under the terms of the GNU General Public License as published by
90 the Free Software Foundation, either version 3 of the License, or
91 (at your option) any later version.
93 This program is distributed in the hope that it will be useful,
94 but WITHOUT ANY WARRANTY; without even the implied warranty of
95 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
96 GNU General Public License for more details.
98 You should have received a copy of the GNU General Public License
99 along with this program. If not, see <http://www.gnu.org/licenses/>.
101 ---
103 # SEE ALSO
105 [[index]]
107 [[!wikipedia Open_Graph]]
109 [[plugins/contrib/opengraph]]