aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2018-07-28 11:07:55 +0200
committerArthurHoaro <arthur@hoa.ro>2018-07-28 11:07:55 +0200
commit83faedadff76c5bdca036f39f13943f63b27e164 (patch)
tree6f44cede16ec6a60f10b9699e211e0818f06d2c8 /doc
parent1d9eb22a3df85b67fe6652c0876cd7382c2fb525 (diff)
parent658988f3aeba7a5a938783249ccf2765251e5597 (diff)
downloadShaarli-83faedadff76c5bdca036f39f13943f63b27e164.tar.gz
Shaarli-83faedadff76c5bdca036f39f13943f63b27e164.tar.zst
Shaarli-83faedadff76c5bdca036f39f13943f63b27e164.zip
Merge tag 'v0.9.7' into stable
Release v0.9.7
Diffstat (limited to 'doc')
-rw-r--r--doc/3rd-party-libraries.html86
-rw-r--r--doc/Backup,-restore,-import-and-export.html150
-rw-r--r--doc/Browsing-and-searching.html81
-rw-r--r--doc/Browsing-and-searching.md28
-rw-r--r--doc/Coding-guidelines.html73
-rw-r--r--doc/Coding-guidelines.md5
-rw-r--r--doc/Community-&-Related-software.html121
-rw-r--r--doc/Community-&-Related-software.md55
-rw-r--r--doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.html163
-rw-r--r--doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.md67
-rw-r--r--doc/Create-and-serve-multiple-Shaarlis-(farm).html157
-rw-r--r--doc/Create-and-serve-multiple-Shaarlis-(farm).md58
-rw-r--r--doc/Datastore-hacks.html122
-rw-r--r--doc/Datastore-hacks.md24
-rw-r--r--doc/Development.html110
-rw-r--r--doc/Development.md35
-rw-r--r--doc/Directory-structure.html133
-rw-r--r--doc/Docker.html242
-rw-r--r--doc/Docker.md157
-rw-r--r--doc/Download-CSS-styles-from-an-OPML-list.html255
-rw-r--r--doc/Download-CSS-styles-from-an-OPML-list.md155
-rw-r--r--doc/Download-and-Installation.html170
-rw-r--r--doc/Download-and-Installation.md102
-rw-r--r--doc/Example-patch---add-new-via-field-for-links.html252
-rw-r--r--doc/Example-patch---add-new-via-field-for-links.md190
-rw-r--r--doc/FAQ.html105
-rw-r--r--doc/Firefox-share.html93
-rw-r--r--doc/Firefox-share.md16
-rw-r--r--doc/GnuPG-signature.html173
-rw-r--r--doc/Home.html74
-rw-r--r--doc/Home.md14
-rw-r--r--doc/Plugin-System.html541
-rw-r--r--doc/Plugins.html154
-rw-r--r--doc/RSS-feeds.html97
-rw-r--r--doc/Release-Shaarli.html220
-rw-r--r--doc/Security.html133
-rw-r--r--doc/Security.md28
-rw-r--r--doc/Server-configuration.html443
-rw-r--r--doc/Server-requirements.html178
-rw-r--r--doc/Server-security.html173
-rw-r--r--doc/Shaarli-configuration.html295
-rw-r--r--doc/Shaarli-configuration.md211
-rw-r--r--doc/Sharing-button.html92
-rw-r--r--doc/Sharing-button.md31
-rw-r--r--doc/Static-analysis.html80
-rw-r--r--doc/Theming.html166
-rw-r--r--doc/Theming.md65
-rw-r--r--doc/Troubleshooting.html200
-rw-r--r--doc/Unit-tests.html212
-rw-r--r--doc/Upgrade-and-migration.html242
-rw-r--r--doc/Usage.html93
-rw-r--r--doc/Usage.md25
-rw-r--r--doc/_Footer.html68
-rw-r--r--doc/_Footer.md2
-rw-r--r--doc/_Sidebar.html115
-rw-r--r--doc/_Sidebar.md37
-rw-r--r--doc/config.json6
-rw-r--r--doc/github-markdown.css287
-rw-r--r--doc/md/3rd-party-libraries.md (renamed from doc/3rd-party-libraries.md)13
-rw-r--r--doc/md/Backup,-restore,-import-and-export.md (renamed from doc/Backup,-restore,-import-and-export.md)40
-rw-r--r--doc/md/Bookmarklet.md29
-rw-r--r--doc/md/Browsing-and-searching.md37
-rw-r--r--doc/md/Community-&-Related-software.md72
-rw-r--r--doc/md/Continuous-integration-tools.md28
-rw-r--r--doc/md/Development-guidelines.md10
-rw-r--r--doc/md/Directory-structure.md (renamed from doc/Directory-structure.md)3
-rw-r--r--doc/md/Download-and-Installation.md120
-rw-r--r--doc/md/FAQ.md (renamed from doc/FAQ.md)34
-rw-r--r--doc/md/Firefox-share.md20
-rw-r--r--doc/md/GnuPG-signature.md (renamed from doc/GnuPG-signature.md)31
-rw-r--r--doc/md/Plugin-System.md (renamed from doc/Plugin-System.md)299
-rw-r--r--doc/md/Plugins.md (renamed from doc/Plugins.md)22
-rw-r--r--doc/md/REST-API.md153
-rw-r--r--doc/md/RSS-feeds.md (renamed from doc/RSS-feeds.md)5
-rw-r--r--doc/md/Release-Shaarli.md (renamed from doc/Release-Shaarli.md)93
-rw-r--r--doc/md/Security.md25
-rw-r--r--doc/md/Server-configuration.md (renamed from doc/Server-configuration.md)104
-rw-r--r--doc/md/Server-requirements.md (renamed from doc/Server-requirements.md)43
-rw-r--r--doc/md/Server-security.md (renamed from doc/Server-security.md)16
-rw-r--r--doc/md/Shaarli-configuration.md244
-rw-r--r--doc/md/Static-analysis.md (renamed from doc/Static-analysis.md)13
-rw-r--r--doc/md/Theming.md85
-rw-r--r--doc/md/Translations.md152
-rw-r--r--doc/md/Troubleshooting.md (renamed from doc/Troubleshooting.md)95
-rw-r--r--doc/md/Unit-tests-Docker.md56
-rw-r--r--doc/md/Unit-tests.md (renamed from doc/Unit-tests.md)63
-rw-r--r--doc/md/Upgrade-and-migration.md (renamed from doc/Upgrade-and-migration.md)109
-rw-r--r--doc/md/Various-hacks.md33
-rw-r--r--doc/md/Versioning-and-Branches.md75
-rw-r--r--doc/md/docker/docker-101.md140
-rw-r--r--doc/md/docker/resources.md19
-rw-r--r--doc/md/docker/reverse-proxy-configuration.md120
-rw-r--r--doc/md/docker/shaarli-images.md95
-rw-r--r--doc/md/images/bookmarklet.png (renamed from doc/images/bookmarklet.png)bin53346 -> 53346 bytes
-rw-r--r--doc/md/images/doc-logo.png (renamed from doc/images/doc-logo.png)bin19543 -> 19543 bytes
-rw-r--r--doc/md/images/doc-logo.svg (renamed from doc/images/doc-logo.svg)0
-rw-r--r--doc/md/images/firefoxshare.png (renamed from doc/images/firefoxshare.png)bin757 -> 757 bytes
-rw-r--r--doc/md/images/install-shaarli.pngbin0 -> 44376 bytes
-rw-r--r--doc/md/images/poedit-1.jpgbin0 -> 72956 bytes
-rw-r--r--doc/md/images/rss-filter-1.png (renamed from doc/images/rss-filter-1.png)bin18682 -> 18682 bytes
-rw-r--r--doc/md/images/rss-filter-2.png (renamed from doc/images/rss-filter-2.png)bin15604 -> 15604 bytes
-rw-r--r--doc/md/index.md129
-rw-r--r--doc/sidebar.html50
103 files changed, 2276 insertions, 8059 deletions
diff --git a/doc/3rd-party-libraries.html b/doc/3rd-party-libraries.html
deleted file mode 100644
index 946ca037..00000000
--- a/doc/3rd-party-libraries.html
+++ /dev/null
@@ -1,86 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – 3rd party libraries</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="rd-party-libraries">3rd party libraries</h1>
66<h2 id="css">CSS</h2>
67<ul>
68<li>Yahoo UI <a href="http://yuilibrary.com/yui/docs/cssreset/">CSS Reset</a><a href=".html"></a>
69<ul>
70<li>resets default CSS properties for all HTML elements (overriding browsers' default values)</li>
71<li>ensures custom CSS stylessheets will provide the same results on all browsers</li>
72</ul></li>
73</ul>
74<h2 id="javascript">Javascript</h2>
75<ul>
76<li><a href="https://leaverou.github.io/awesomplete/">Awesomeplete</a> (<a href="https://github.com/LeaVerou/awesomplete">GitHub</a>) - autocompletion in input forms<a href=".html"></a></li>
77<li><a href="http://dinbror.dk/blazy/">bLazy</a> (<a href="https://github.com/dinbror/blazy">GitHub</a>) - lazy loading for thumbnails<a href=".html"></a></li>
78<li><a href="http://neocotic.com/qr.js/">qr.js</a> (<a href="https://github.com/neocotic/qr.js">GitHub</a>) - QR code generation<a href=".html"></a></li>
79</ul>
80<h2 id="php">PHP</h2>
81<ul>
82<li><a href="https://github.com/shaarli/netscape-bookmark-parser">shaarli/netscape-bookmark-parser</a> - Netscape bookmark parser<a href=".html"></a></li>
83<li><a href="https://github.com/rainphp/raintpl">RainTPL</a> - HTML templating for PHP<a href=".html"></a></li>
84</ul>
85</body>
86</html>
diff --git a/doc/Backup,-restore,-import-and-export.html b/doc/Backup,-restore,-import-and-export.html
deleted file mode 100644
index a4a48ad7..00000000
--- a/doc/Backup,-restore,-import-and-export.html
+++ /dev/null
@@ -1,150 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Backup, restore, import and export</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="backup-restore-import-and-export">Backup, restore, import and export</h1>
103<ul>
104<li><a href="#backup-and-restore-the-datastore-file">Backup and restore the datastore file</a><a href=".html"></a></li>
105<li><a href="#export-links-as">Export links as...</a><a href=".html"></a></li>
106<li><a href="#import-links-from">Import links from...</a><a href=".html"></a></li>
107<li><a href="#import-shaarli-links-to-firefox">Import Shaarli links to Firefox</a><a href=".html"></a></li>
108</ul>
109<hr />
110<h2 id="backup-and-restore-the-datastore-file">Backup and restore the datastore file</h2>
111<p>Backup the file <code>data/datastore.php</code> (by FTP or SSH). Restore by putting the file back in place.</p>
112<p>Example command:</p>
113<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="fu">rsync</span> -avzP my.server.com:/var/www/shaarli/data/datastore.php datastore-<span class="va">$(</span><span class="fu">date</span> +%Y-%m-%d_%H%M<span class="va">)</span>.php</code></pre></div>
114<h2 id="export-links-as...">Export links as...</h2>
115<p>To export links as an HTML file, under <em>Tools &gt; Export</em>, choose:</p>
116<ul>
117<li><em>Export all</em> to export both public and private links</li>
118<li><em>Export public</em> to export public links only</li>
119<li><em>Export private</em> to export private links only</li>
120</ul>
121<p>Restore by using the <code>Import</code> feature.</p>
122<ul>
123<li>This can be done using the <a href="https://github.com/nodiscc/shaarchiver">shaarchiver</a> tool.<a href=".html"></a></li>
124</ul>
125<p>Example command:</p>
126<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="ex">./export-bookmarks.py</span> --url=https://my.server.com/shaarli --username=myusername --password=mysupersecretpassword --download-dir=./ --type=all</code></pre></div>
127<h2 id="import-links-from...">Import links from...</h2>
128<h3 id="diigo">Diigo</h3>
129<p>If you export your bookmark from Diigo, make sure you use the Delicious export, not the Netscape export. (Their Netscape export is broken, and they don't seem to be interested in fixing it.)</p>
130<h3 id="mister-wong">Mister Wong</h3>
131<p>See <a href="https://github.com/sebsauvage/Shaarli/issues/146">this issue</a> for import tweaks.<a href=".html"></a></p>
132<h3 id="semanticscuttle">SemanticScuttle</h3>
133<p>To correctly import the tags from a <a href="http://semanticscuttle.sourceforge.net/">SemanticScuttle</a> HTML export, edit the HTML file before importing and replace all occurences of <code>tags=</code> (lowercase) to <code>TAGS=</code> (uppercase).<a href=".html"></a></p>
134<h3 id="scuttle">Scuttle</h3>
135<p>Shaarli cannot import data directly from <a href="https://github.com/scronide/scuttle">Scuttle</a>. However, you can use this third party tool: <a href="https://github.com/q2apro/scuttle-to-shaarli" class="uri">https://github.com/q2apro/scuttle-to-shaarli</a> to export the Scuttle database to the Netscape HTML format compatible with the Shaarli importer.<a href=".html"></a></p>
136<h2 id="import-shaarli-links-to-firefox">Import Shaarli links to Firefox</h2>
137<ul>
138<li>Export your Shaarli links as described above.</li>
139<li>For compatibility reasons, check <code>Prepend note permalinks with this Shaarli instance's URL (useful to import bookmarks in a web browser)</code></li>
140<li>In Firefox, open the bookmark manager (not the sidebar! <code>Bookmarks menu &gt; Show all bookmarks</code> or <code>Ctrl+Shift+B</code>)</li>
141<li>Select <code>Import and Backup &gt; Import bookmarks in HTML format</code></li>
142</ul>
143<p>Your bookmarks will be imported in Firefox, ready to use, with tags and descriptions retained. &quot;Self&quot; (notes) shaares will still point to the Shaarli instance you exported them from, but the note text can be viewed directly in the bookmark properties inside your browser. Depending on the number of bookmarks, the import can take some time.</p>
144<p>You may be interested in these Firefox addons to manage links imported from Shaarli</p>
145<ul>
146<li><a href="https://addons.mozilla.org/en-US/firefox/addon/bookmark-deduplicator/">Bookmark Deduplicator</a> - provides an easy way to deduplicate your bookmarks<a href=".html"></a></li>
147<li><a href="https://addons.mozilla.org/en-US/firefox/addon/tagsieve/">TagSieve</a> - browse your bookmarks by their tags<a href=".html"></a></li>
148</ul>
149</body>
150</html>
diff --git a/doc/Browsing-and-searching.html b/doc/Browsing-and-searching.html
deleted file mode 100644
index 23001bcb..00000000
--- a/doc/Browsing-and-searching.html
+++ /dev/null
@@ -1,81 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Browsing and searching</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="browsing-and-searching">Browsing and searching</h1>
66<h1 id="browsing-and-searching-1">Browsing and Searching</h1>
67<p>Status: DRAFT</p>
68<p><embed src="(http://pix.toile-libre.org/upload/original/1455571378.png).html" /></p>
69<h2 id="plain-text-search">Plain text search</h2>
70<p>Use the <code>Search text</code> field to search in <em>any</em> of the fields of all links (Title, URL, Description...)</p>
71<p><strong>Exclude text/tags:</strong> Use the <code>-</code> operator before a word or tag (example <code>-uninteresting</code>) to prevent entries containing (or tagged) <code>uninteresting</code> from showing up in the search results.</p>
72<p><strong>Exact text search:</strong> Use double-quotes (example <code>&quot;exact search&quot;</code>) to search for the exact expression.</p>
73<p>Both exclude patterns and exact searches can be combined with normal searches (example <code>&quot;exact search&quot; term otherterm -notthis &quot;very exact&quot; stuff -notagain</code>)</p>
74<h2 id="tags-search">Tags search</h2>
75<p>Use the <code>Filter by tags</code> field to restrict displayed links to entries tagged with one or multiple tags (use space to separate tags).</p>
76<p><strong>Hidden tags:</strong> Tags starting with a dot <code>.</code> (example <code>.secret</code>) are private. They can only be seen and searched when logged in.</p>
77<p>Alternatively you can use the <code>Tag cloud</code> to discover all tags and click on any of them to display related links.</p>
78<h2 id="filtering-rss-feedspicture-wall">Filtering RSS feeds/Picture wall</h2>
79<p>RSS feeds can also be restricted to only return items matching a text/tag search: see <a href="RSS-feeds.html">RSS feeds</a>.</p>
80</body>
81</html>
diff --git a/doc/Browsing-and-searching.md b/doc/Browsing-and-searching.md
deleted file mode 100644
index 187fe447..00000000
--- a/doc/Browsing-and-searching.md
+++ /dev/null
@@ -1,28 +0,0 @@
1#Browsing and searching
2# Browsing and Searching
3
4Status: DRAFT
5
6![(http://pix.toile-libre.org/upload/original/1455571378.png)]((http://pix.toile-libre.org/upload/original/1455571378.png).html)
7
8## Plain text search
9
10Use the `Search text` field to search in _any_ of the fields of all links (Title, URL, Description...)
11
12**Exclude text/tags:** Use the `-` operator before a word or tag (example `-uninteresting`) to prevent entries containing (or tagged) `uninteresting` from showing up in the search results.
13
14**Exact text search:** Use double-quotes (example `"exact search"`) to search for the exact expression.
15
16Both exclude patterns and exact searches can be combined with normal searches (example `"exact search" term otherterm -notthis "very exact" stuff -notagain`)
17
18## Tags search
19
20Use the `Filter by tags` field to restrict displayed links to entries tagged with one or multiple tags (use space to separate tags).
21
22**Hidden tags:** Tags starting with a dot `.` (example `.secret`) are private. They can only be seen and searched when logged in.
23
24Alternatively you can use the `Tag cloud` to discover all tags and click on any of them to display related links.
25
26## Filtering RSS feeds/Picture wall
27
28RSS feeds can also be restricted to only return items matching a text/tag search: see [RSS feeds](RSS-feeds.html).
diff --git a/doc/Coding-guidelines.html b/doc/Coding-guidelines.html
deleted file mode 100644
index 1a2a9351..00000000
--- a/doc/Coding-guidelines.html
+++ /dev/null
@@ -1,73 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Coding guidelines</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="coding-guidelines">Coding guidelines</h1>
66<h2 id="wip">WIP</h2>
67<p>This topic is currently being discussed here:</p>
68<ul>
69<li><a href="https://github.com/shaarli/Shaarli/issues/95">Fix coding style (static analysis)</a> (#95)<a href=".html"></a></li>
70<li><a href="https://github.com/shaarli/Shaarli/issues/130">Continuous Integration tools &amp; features</a> (#130)<a href=".html"></a></li>
71</ul>
72</body>
73</html>
diff --git a/doc/Coding-guidelines.md b/doc/Coding-guidelines.md
deleted file mode 100644
index 1fb28a5b..00000000
--- a/doc/Coding-guidelines.md
+++ /dev/null
@@ -1,5 +0,0 @@
1#Coding guidelines
2## WIP
3This topic is currently being discussed here:
4- [Fix coding style (static analysis)](https://github.com/shaarli/Shaarli/issues/95) (#95)[](.html)
5- [Continuous Integration tools & features](https://github.com/shaarli/Shaarli/issues/130) (#130)[](.html)
diff --git a/doc/Community-&-Related-software.html b/doc/Community-&-Related-software.html
deleted file mode 100644
index cbc73d54..00000000
--- a/doc/Community-&-Related-software.html
+++ /dev/null
@@ -1,121 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Community & Related software</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="community-related-software">Community &amp; Related software</h1>
66<p><em>Unofficial but related work on Shaarli. If you maintain one of these, please get in touch with us to help us find a way to adapt your work to our fork.</em></p>
67<p><em>TODO: contact repos owners to see if they'd like to standardize their work with the community fork.</em></p>
68<h2 id="community">Community</h2>
69<ul>
70<li><a href="http://sebsauvage.net/links/">Liens en vrac de sebsauvage</a> - the original Shaarli<a href=".html"></a></li>
71<li><a href="http://porneia.free.fr/pub/links/ou-est-shaarli.html">A large list of Shaarlis</a><a href=".html"></a></li>
72<li><a href="https://raw.githubusercontent.com/Oros42/find_shaarlis/master/annuaires.json">A list of working Shaarli aggregators</a><a href=".html"></a></li>
73<li><a href="https://github.com/Oros42/shaarlis_list">A list of some known Shaarlis</a><a href=".html"></a></li>
74<li><a href="http://sebsauvage.net/rhaa/index.php?2011/09/16/09/29/58-adieu-delicious-diigo-et-stumbleupon-salut-shaarli-">Adieu Delicious, Diigo et StumbleUpon. Salut Shaarli ! - sebsauvage.net</a> (fr) <em>16/09/2011 - the original post about Shaarli</em><a href=".html"></a></li>
75<li><a href="http://sebsauvage.net/wiki/doku.php?id=php:shaarli:ideas">Original ideas/fixme/TODO page</a><a href=".html"></a></li>
76<li><a href="http://sebsauvage.net/wiki/doku.php?id=php:shaarli:discussion">Original discussion page</a> (fr)<a href=".html"></a></li>
77<li><a href="http://sebsauvage.net/wiki/doku.php?id=php:shaarli:history">Original revisions history</a><a href=".html"></a></li>
78<li><a href="https://www.shaarli.fr/my.php">Shaarli.fr/my</a> - Unofficial, unsupported (old fork) hosted Shaarlis provider, courtesy of <a href="https://github.com/DMeloni">DMeloni</a><a href=".html"></a></li>
79</ul>
80<h3 id="third-party-plugins">Third party plugins</h3>
81<ul>
82<li><a href="https://github.com/kalvn/shaarli-plugin-autosave">autosave</a> by <a href="https://github.com/kalvn">@kalvn</a>: Automatically saves data when editing a link to avoid any loss in case of crash or unexpected shutdown.<a href=".html"></a></li>
83<li><a href="https://github.com/ArthurHoaro/code-coloration">Code Coloration</a> by <a href="https://github.com/ArthurHoaro">@ArthurHoaro</a>: client side code syntax highlighter.<a href=".html"></a></li>
84<li><a href="https://github.com/kalvn/shaarli-plugin-disqus">Disqus</a> by <a href="https://github.com/kalvn">@kalvn</a>: Adds Disqus comment system to your Shaarli.<a href=".html"></a></li>
85<li><a href="https://github.com/NerosTie/emojione">emojione</a> by <a href="https://github.com/NerosTie">@NerosTie</a>: Add colorful emojis to your Shaarli.<a href=".html"></a></li>
86<li><a href="https://github.com/ArthurHoaro/launch-plugin">launch</a> - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli.<a href=".html"></a></li>
87<li><a href="https://github.com/alexisju/social">social</a> by <a href="https://github.com/alexisju">@alexisju</a>: share links to social networks.<a href=".html"></a></li>
88<li><a href="https://github.com/ArthurHoaro/shaarli2twitter">shaarli2twitter</a> by <a href="https://github.com/ArthurHoaro">@ArthurHoaro</a> - Automatically tweet your shared links from Shaarli<a href=".html"></a></li>
89</ul>
90<h3 id="themes">Themes</h3>
91<p>See <a href="Theming.html">Theming</a> for the list of community-contributed themes, and an installation guide.</p>
92<h3 id="server-apps">Server apps</h3>
93<ul>
94<li><a href="https://github.com/nodiscc/shaarchiver">shaarchiver</a> - Archive your Shaarli bookmarks and their content<a href=".html"></a></li>
95<li><a href="https://github.com/mknexen/shaarli-river">shaarli-river</a> - An aggregator for shaarlis with many features <a href=".html"></a></li>
96<li><a href="https://github.com/DMeloni/shaarlo">Shaarlo</a> - An aggregator for shaarlis with many features (a very popular running instance among french shaarliers: <a href="http://shaarli.fr/">shaarli.fr</a>)<a href=".html"></a></li>
97<li><a href="https://github.com/BoboTiG/shaarlimages">Shaarlimages</a> - An image-oriented aggregator for Shaarlis<a href=".html"></a></li>
98<li><a href="https://github.com/mknexen/shaarli-api">mknexen/shaarli-api</a> - A REST API for Shaarli<a href=".html"></a></li>
99<li><a href="https://github.com/qwertygc/shaarli-dev-code/blob/master/self-dead-link.php">Self dead link</a> - Detect dead links on shaarli. This version use the database of shaarli. <a href="https://github.com/qwertygc/shaarli-dev-code/blob/master/dead-link.php">Another version</a>, can be used for other shaarli instances (but is more resource consuming).<a href=".html"></a></li>
100</ul>
101<h3 id="mobile-apps">Mobile Apps</h3>
102<ul>
103<li><a href="http://app.mro.name/Shaarli💫">Shaarli💫</a> iOS share extension - see <a href="https://github.com/shaarli/Shaarli/issues/308#issuecomment-184592070">#308</a> for some promo codes,<a href=".html"></a></li>
104<li><a href="http://sebsauvage.net/links/?ZAyDzg">Shaarli for Android</a> - Android application that adds Shaarli as a sharing provider<a href=".html"></a></li>
105<li><a href="https://github.com/dimtion/Shaarlier">Shaarlier for Android</a> - Android application to simply add links directly into your Shaarli<a href=".html"></a></li>
106</ul>
107<h2 id="integration-with-other-platforms">Integration with other platforms</h2>
108<ul>
109<li><a href="https://github.com/jcsaaddupuy/tt-rss-shaarli">tt-rss-shaarli</a> - <a href="http://tt-rss.org/">TinyTiny RSS</a> plugin that adds support for sharing articles with Shaarli<a href=".html"></a></li>
110<li><a href="https://github.com/ahmet2mir/octopress-shaarli">octopress-shaarli</a> - Octopress plugin to retrieve Shaarli links on the sidebar<a href=".html"></a></li>
111<li><a href="https://github.com/q2apro/scuttle-to-shaarli">Scuttle to Shaarli</a> - Import bookmarks from Scuttle<a href=".html"></a></li>
112</ul>
113<h2 id="alternatives-to-shaarli">Alternatives to Shaarli</h2>
114<ul>
115<li><a href="http://alternativeto.net/software/shaarli/">Shaarli alternatives</a> (alternativeto.net)<a href=".html"></a></li>
116<li><a href="https://github.com/bookieio/bookie">Bookie</a> - Another self-hostable, free bookmark sharing software, written in Python<a href=".html"></a></li>
117<li><a href="https://github.com/plainmade/unmark">Unmark</a> - An open source todo app for bookmarks (<a href="https://unmark.it/">Homepage</a>)<a href=".html"></a></li>
118<li><a href="https://wordpress.org/plugins/wp-bookmarks/">Wordpress bookmarks</a><a href=".html"></a></li>
119</ul>
120</body>
121</html>
diff --git a/doc/Community-&-Related-software.md b/doc/Community-&-Related-software.md
deleted file mode 100644
index 291bf643..00000000
--- a/doc/Community-&-Related-software.md
+++ /dev/null
@@ -1,55 +0,0 @@
1#Community & Related software
2_Unofficial but related work on Shaarli. If you maintain one of these, please get in touch with us to help us find a way to adapt your work to our fork._
3
4_TODO: contact repos owners to see if they'd like to standardize their work with the community fork._
5
6## Community
7- [Liens en vrac de sebsauvage](http://sebsauvage.net/links/) - the original Shaarli[](.html)
8- [A large list of Shaarlis](http://porneia.free.fr/pub/links/ou-est-shaarli.html)[](.html)
9- [A list of working Shaarli aggregators](https://raw.githubusercontent.com/Oros42/find_shaarlis/master/annuaires.json)[](.html)
10- [A list of some known Shaarlis](https://github.com/Oros42/shaarlis_list)[](.html)
11- [Adieu Delicious, Diigo et StumbleUpon. Salut Shaarli ! - sebsauvage.net](http://sebsauvage.net/rhaa/index.php?2011/09/16/09/29/58-adieu-delicious-diigo-et-stumbleupon-salut-shaarli-) (fr) _16/09/2011 - the original post about Shaarli_[](.html)
12- [Original ideas/fixme/TODO page](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:ideas)[](.html)
13- [Original discussion page](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:discussion) (fr)[](.html)
14- [Original revisions history](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:history)[](.html)
15- [Shaarli.fr/my](https://www.shaarli.fr/my.php) - Unofficial, unsupported (old fork) hosted Shaarlis provider, courtesy of [DMeloni](https://github.com/DMeloni)[](.html)
16
17
18### Third party plugins
19
20
21 * [autosave](https://github.com/kalvn/shaarli-plugin-autosave) by [@kalvn](https://github.com/kalvn): Automatically saves data when editing a link to avoid any loss in case of crash or unexpected shutdown.[](.html)
22 * [Code Coloration](https://github.com/ArthurHoaro/code-coloration) by [@ArthurHoaro](https://github.com/ArthurHoaro): client side code syntax highlighter.[](.html)
23 * [Disqus](https://github.com/kalvn/shaarli-plugin-disqus) by [@kalvn](https://github.com/kalvn): Adds Disqus comment system to your Shaarli.[](.html)
24 * [emojione](https://github.com/NerosTie/emojione) by [@NerosTie](https://github.com/NerosTie): Add colorful emojis to your Shaarli.[](.html)
25 * [launch](https://github.com/ArthurHoaro/launch-plugin) - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli.[](.html)
26 * [social](https://github.com/alexisju/social) by [@alexisju](https://github.com/alexisju): share links to social networks.[](.html)
27 * [shaarli2twitter](https://github.com/ArthurHoaro/shaarli2twitter) by [@ArthurHoaro](https://github.com/ArthurHoaro) - Automatically tweet your shared links from Shaarli[](.html)
28
29
30### Themes
31See [Theming](Theming.html) for the list of community-contributed themes, and an installation guide.
32
33### Server apps
34- [shaarchiver](https://github.com/nodiscc/shaarchiver) - Archive your Shaarli bookmarks and their content[](.html)
35- [shaarli-river](https://github.com/mknexen/shaarli-river) - An aggregator for shaarlis with many features [](.html)
36- [Shaarlo](https://github.com/DMeloni/shaarlo) - An aggregator for shaarlis with many features (a very popular running instance among french shaarliers: [shaarli.fr](http://shaarli.fr/))[](.html)
37- [Shaarlimages](https://github.com/BoboTiG/shaarlimages) - An image-oriented aggregator for Shaarlis[](.html)
38- [mknexen/shaarli-api](https://github.com/mknexen/shaarli-api) - A REST API for Shaarli[](.html)
39- [Self dead link](https://github.com/qwertygc/shaarli-dev-code/blob/master/self-dead-link.php) - Detect dead links on shaarli. This version use the database of shaarli. [Another version](https://github.com/qwertygc/shaarli-dev-code/blob/master/dead-link.php), can be used for other shaarli instances (but is more resource consuming).[](.html)
40
41### Mobile Apps
42- [Shaarli💫](http://app.mro.name/Shaarli💫) iOS share extension - see [#308](https://github.com/shaarli/Shaarli/issues/308#issuecomment-184592070) for some promo codes,[](.html)
43- [Shaarli for Android](http://sebsauvage.net/links/?ZAyDzg) - Android application that adds Shaarli as a sharing provider[](.html)
44- [Shaarlier for Android](https://github.com/dimtion/Shaarlier) - Android application to simply add links directly into your Shaarli[](.html)
45
46## Integration with other platforms
47- [tt-rss-shaarli](https://github.com/jcsaaddupuy/tt-rss-shaarli) - [TinyTiny RSS](http://tt-rss.org/) plugin that adds support for sharing articles with Shaarli[](.html)
48- [octopress-shaarli](https://github.com/ahmet2mir/octopress-shaarli) - Octopress plugin to retrieve Shaarli links on the sidebar[](.html)
49- [Scuttle to Shaarli](https://github.com/q2apro/scuttle-to-shaarli) - Import bookmarks from Scuttle[](.html)
50
51## Alternatives to Shaarli
52- [Shaarli alternatives](http://alternativeto.net/software/shaarli/) (alternativeto.net)[](.html)
53- [Bookie](https://github.com/bookieio/bookie) - Another self-hostable, free bookmark sharing software, written in Python[](.html)
54- [Unmark](https://github.com/plainmade/unmark) - An open source todo app for bookmarks ([Homepage](https://unmark.it/))[](.html)
55- [Wordpress bookmarks](https://wordpress.org/plugins/wp-bookmarks/)[](.html)
diff --git a/doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.html b/doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.html
deleted file mode 100644
index 9efb1ad6..00000000
--- a/doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.html
+++ /dev/null
@@ -1,163 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Copy an existing installation over SSH and serve it locally</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="copy-an-existing-installation-over-ssh-and-serve-it-locally">Copy an existing installation over SSH and serve it locally</h1>
103<p>Example bash script:</p>
104<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co">#!/bin/bash</span>
105<span class="co">#Description: Copy a Shaarli installation over SSH/SCP, serve it locally with php-cli</span>
106<span class="co">#Will create a local-shaarli/ directory when you run it, backup your Shaarli there, and serve it locally.</span>
107<span class="co">#Will NOT download linked pages. It&#39;s just a directly usable backup/copy/mirror of your Shaarli</span>
108<span class="co">#Requires: ssh, scp and a working SSH access to the server where your Shaarli is installed</span>
109<span class="co">#Usage: ./local-shaarli.sh</span>
110<span class="co">#Author: nodiscc (nodiscc@gmail.com)</span>
111<span class="co">#License: MIT (http://opensource.org/licenses/MIT)</span>
112<span class="kw">set</span> <span class="ex">-o</span> errexit
113<span class="kw">set</span> <span class="ex">-o</span> nounset
114
115<span class="co">##### CONFIG #################</span>
116<span class="co">#The port used by php&#39;s local server</span>
117<span class="va">php_local_port=</span>7431
118
119<span class="co">#Name of the SSH server and path where Shaarli is installed</span>
120<span class="co">#TODO: pass these as command-line arguments</span>
121<span class="va">remotehost=</span><span class="st">&quot;my.ssh.server&quot;</span>
122<span class="va">remote_shaarli_dir=</span><span class="st">&quot;/var/www/shaarli&quot;</span>
123
124
125<span class="co">###### FUNCTIONS #############</span>
126<span class="fu">_main()</span> <span class="kw">{</span>
127 <span class="ex">_CBSyncShaarli</span>
128 <span class="ex">_CBServeShaarli</span>
129<span class="kw">}</span>
130
131<span class="fu">_CBSyncShaarli()</span> <span class="kw">{</span>
132 <span class="va">remote_temp_dir=$(</span><span class="fu">ssh</span> <span class="va">$remotehost</span> mktemp -d<span class="va">)</span>
133 <span class="va">remote_ssh_user=$(</span><span class="fu">ssh</span> <span class="va">$remotehost</span> whoami<span class="va">)</span>
134 <span class="fu">ssh</span> -t <span class="st">&quot;</span><span class="va">$remotehost</span><span class="st">&quot;</span> sudo cp -r <span class="st">&quot;</span><span class="va">$remote_shaarli_dir</span><span class="st">&quot;</span> <span class="st">&quot;</span><span class="va">$remote_temp_dir</span><span class="st">&quot;</span>
135 <span class="fu">ssh</span> -t <span class="st">&quot;</span><span class="va">$remotehost</span><span class="st">&quot;</span> sudo chown -R <span class="st">&quot;</span><span class="va">$remote_ssh_user</span><span class="st">&quot;</span>:<span class="st">&quot;</span><span class="va">$remote_ssh_user</span><span class="st">&quot;</span> <span class="st">&quot;</span><span class="va">$remote_temp_dir</span><span class="st">&quot;</span>
136 <span class="fu">scp</span> -rq <span class="st">&quot;</span><span class="va">$remotehost</span><span class="st">&quot;</span>:<span class="st">&quot;</span><span class="va">$remote_temp_dir</span><span class="st">&quot;</span> local-shaarli
137 <span class="fu">ssh</span> <span class="st">&quot;</span><span class="va">$remotehost</span><span class="st">&quot;</span> rm -r <span class="st">&quot;</span><span class="va">$remote_temp_dir</span><span class="st">&quot;</span>
138<span class="kw">}</span>
139
140<span class="fu">_CBServeShaarli()</span> <span class="kw">{</span>
141 <span class="co">#TODO: allow serving a previously downloaded Shaarli</span>
142 <span class="co">#TODO: ask before overwriting local copy, if it exists</span>
143 <span class="bu">cd</span> local-shaarli/
144 <span class="ex">php</span> -S localhost:<span class="va">${php_local_port}</span>
145 <span class="bu">echo</span> <span class="st">&quot;Please go to http://localhost:</span><span class="va">${php_local_port}</span><span class="st">&quot;</span>
146<span class="kw">}</span>
147
148
149<span class="co">##### MAIN #################</span>
150
151<span class="ex">_main</span></code></pre></div>
152<p>This outputs:</p>
153<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">./local-shaarli.sh</span>
154<span class="ex">PHP</span> 5.6.0RC4 Development Server started at Mon Sep 1 21:56:19 2014
155<span class="ex">Listening</span> on http://localhost:7431
156<span class="ex">Document</span> root is /home/user/local-shaarli/shaarli
157<span class="ex">Press</span> Ctrl-C to quit.
158
159[<span class="ex">Mon</span> Sep 1 21:56:27 2014] ::1:57868 [200]: /[](.html)
160[<span class="ex">Mon</span> Sep 1 21:56:27 2014] ::1:57869 [200]: /index.html[](.html)
161[<span class="ex">Mon</span> Sep 1 21:56:37 2014] ::1:57881 [200]: /...[](.html)</code></pre></div>
162</body>
163</html>
diff --git a/doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.md b/doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.md
deleted file mode 100644
index 88d191da..00000000
--- a/doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.md
+++ /dev/null
@@ -1,67 +0,0 @@
1#Copy an existing installation over SSH and serve it locally
2Example bash script:
3
4```bash
5#!/bin/bash
6#Description: Copy a Shaarli installation over SSH/SCP, serve it locally with php-cli
7#Will create a local-shaarli/ directory when you run it, backup your Shaarli there, and serve it locally.
8#Will NOT download linked pages. It's just a directly usable backup/copy/mirror of your Shaarli
9#Requires: ssh, scp and a working SSH access to the server where your Shaarli is installed
10#Usage: ./local-shaarli.sh
11#Author: nodiscc (nodiscc@gmail.com)
12#License: MIT (http://opensource.org/licenses/MIT)
13set -o errexit
14set -o nounset
15
16##### CONFIG #################
17#The port used by php's local server
18php_local_port=7431
19
20#Name of the SSH server and path where Shaarli is installed
21#TODO: pass these as command-line arguments
22remotehost="my.ssh.server"
23remote_shaarli_dir="/var/www/shaarli"
24
25
26###### FUNCTIONS #############
27_main() {
28 _CBSyncShaarli
29 _CBServeShaarli
30}
31
32_CBSyncShaarli() {
33 remote_temp_dir=$(ssh $remotehost mktemp -d)
34 remote_ssh_user=$(ssh $remotehost whoami)
35 ssh -t "$remotehost" sudo cp -r "$remote_shaarli_dir" "$remote_temp_dir"
36 ssh -t "$remotehost" sudo chown -R "$remote_ssh_user":"$remote_ssh_user" "$remote_temp_dir"
37 scp -rq "$remotehost":"$remote_temp_dir" local-shaarli
38 ssh "$remotehost" rm -r "$remote_temp_dir"
39}
40
41_CBServeShaarli() {
42 #TODO: allow serving a previously downloaded Shaarli
43 #TODO: ask before overwriting local copy, if it exists
44 cd local-shaarli/
45 php -S localhost:${php_local_port}
46 echo "Please go to http://localhost:${php_local_port}"
47}
48
49
50##### MAIN #################
51
52_main
53```
54
55This outputs:
56
57```bash
58$ ./local-shaarli.sh
59PHP 5.6.0RC4 Development Server started at Mon Sep 1 21:56:19 2014
60Listening on http://localhost:7431
61Document root is /home/user/local-shaarli/shaarli
62Press Ctrl-C to quit.
63
64[Mon Sep 1 21:56:27 2014] ::1:57868 [200]: /[](.html)
65[Mon Sep 1 21:56:27 2014] ::1:57869 [200]: /index.html[](.html)
66[Mon Sep 1 21:56:37 2014] ::1:57881 [200]: /...[](.html)
67```
diff --git a/doc/Create-and-serve-multiple-Shaarlis-(farm).html b/doc/Create-and-serve-multiple-Shaarlis-(farm).html
deleted file mode 100644
index 672e4bf3..00000000
--- a/doc/Create-and-serve-multiple-Shaarlis-(farm).html
+++ /dev/null
@@ -1,157 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Create and serve multiple Shaarlis (farm)</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="create-and-serve-multiple-shaarlis-farm">Create and serve multiple Shaarlis (farm)</h1>
103<p>Example bash script (creates multiple shaarli instances and generates an HTML index of them)</p>
104<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co">#!/bin/bash</span>
105<span class="kw">set</span> <span class="ex">-o</span> errexit
106<span class="kw">set</span> <span class="ex">-o</span> nounset
107
108<span class="co">#config</span>
109<span class="va">shaarli_base_dir=</span><span class="st">&#39;/var/www/shaarli&#39;</span>
110<span class="va">accounts=</span><span class="st">&#39;bob john whatever username&#39;</span>
111<span class="va">shaarli_repo_url=</span><span class="st">&#39;https://github.com/shaarli/Shaarli&#39;</span>
112<span class="va">ref=</span><span class="st">&quot;master&quot;</span>
113
114<span class="co">#clone multiple shaarli instances</span>
115<span class="kw">if</span><span class="bu"> [</span> <span class="ot">!</span> <span class="ot">-d</span> <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">&quot;</span><span class="bu"> ]</span>; <span class="kw">then</span> <span class="fu">mkdir</span> <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">&quot;</span><span class="kw">;</span> <span class="kw">fi</span>[]<span class="kw">(</span><span class="ex">.html</span><span class="kw">)</span>
116
117<span class="kw">for</span> <span class="ex">account</span> in <span class="va">$accounts</span><span class="kw">;</span> <span class="kw">do</span>
118 <span class="kw">if</span><span class="bu"> [</span> <span class="ot">-d</span> <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">/</span><span class="va">$account</span><span class="st">&quot;</span><span class="bu"> ]</span>;[]<span class="kw">(</span><span class="ex">.html</span><span class="kw">)</span>
119 <span class="kw">then</span> <span class="bu">echo</span> <span class="st">&quot;[info] account </span><span class="va">$account</span><span class="st"> already exists, skipping&quot;</span><span class="kw">;</span>[]<span class="kw">(</span><span class="ex">.html</span><span class="kw">)</span>
120 <span class="kw">else</span> <span class="bu">echo</span> <span class="st">&quot;[info] creating new account </span><span class="va">$account</span><span class="st"> ...&quot;</span><span class="kw">;</span> <span class="fu">git</span> clone --quiet <span class="st">&quot;</span><span class="va">$shaarli_repo_url</span><span class="st">&quot;</span> -b <span class="st">&quot;</span><span class="va">$ref</span><span class="st">&quot;</span> <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">/</span><span class="va">$account</span><span class="st">&quot;</span><span class="kw">;</span> <span class="kw">fi</span>[]<span class="kw">(</span><span class="ex">.html</span><span class="kw">)</span>
121<span class="kw">done</span>
122
123<span class="co">#generate html index of shaarlis</span>
124<span class="va">htmlhead=</span><span class="st">&#39;&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;</span>
125<span class="st">&lt;!-- Minimal html template thanks to http://www.sitepoint.com/a-minimal-html-document/ --&gt;</span>
126<span class="st">&lt;html lang=&quot;en&quot;&gt;</span>
127<span class="st"> &lt;head&gt;</span>
128<span class="st"> &lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;</span>
129<span class="st"> &lt;title&gt;My Shaarli farm&lt;/title&gt;</span>
130<span class="st"> &lt;style&gt;body {font-family: &quot;Open Sans&quot;}&lt;/style&gt;</span>
131<span class="st"> &lt;/head&gt;</span>
132<span class="st"> &lt;body&gt;</span>
133<span class="st"> &lt;div&gt;</span>
134<span class="st"> &lt;h1&gt;My Shaarli farm&lt;/h1&gt;</span>
135<span class="st"> &lt;ul style=&quot;list-style-type: none;&quot;&gt;&#39;</span>
136
137<span class="va">accountlinks=</span><span class="st">&#39;&#39;</span>
138
139<span class="va">htmlfooter=</span><span class="st">&#39;</span>
140<span class="st"> &lt;/ul&gt;</span>
141<span class="st"> &lt;/div&gt;</span>
142<span class="st"> &lt;/body&gt;</span>
143<span class="st">&lt;/html&gt;&#39;</span>
144
145
146
147<span class="kw">for</span> <span class="ex">account</span> in <span class="va">$accounts</span><span class="kw">;</span> <span class="kw">do</span> <span class="va">accountlinks=</span><span class="st">&quot;</span><span class="va">$accountlinks</span><span class="st">\n&lt;li&gt;&lt;a href=</span><span class="dt">\&quot;</span><span class="va">$account</span><span class="dt">\&quot;</span><span class="st">&gt;</span><span class="va">$account</span><span class="st">&lt;/a&gt;&lt;/li&gt;&quot;</span>; <span class="kw">done</span>
148<span class="kw">if</span><span class="bu"> [</span> <span class="ot">-d</span> <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">/index.html&quot;</span><span class="bu"> ]</span>; <span class="kw">then</span> <span class="bu">echo</span> <span class="st">&quot;[removing old index.html]&quot;</span><span class="kw">;</span> <span class="fu">rm</span> <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">/index.html&quot;</span> ]<span class="kw">;</span> <span class="kw">fi</span>[]<span class="kw">(</span><span class="ex">.html</span><span class="kw">)</span>
149<span class="bu">echo</span> <span class="st">&quot;[info] generating new index of shaarlis&quot;</span>[](.html)
150<span class="bu">echo</span> -e <span class="st">&quot;</span><span class="va">$htmlhead</span><span class="st"> </span><span class="va">$accountlinks</span><span class="st"> </span><span class="va">$htmlfooter</span><span class="st">&quot;</span> <span class="op">&gt;</span> <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">/index.html&quot;</span>
151<span class="bu">echo</span> <span class="st">&#39;[info] done.&#39;</span>[](.html)
152<span class="bu">echo</span> <span class="st">&quot;[info] list of accounts: </span><span class="va">$accounts</span><span class="st">&quot;</span>[](.html)
153<span class="bu">echo</span> <span class="st">&quot;[info] contents of </span><span class="va">$shaarli_base_dir</span><span class="st">:&quot;</span>[](.html)
154<span class="ex">tree</span> -a -L 1 <span class="st">&quot;</span><span class="va">$shaarli_base_dir</span><span class="st">&quot;</span></code></pre></div>
155<p>This script just serves as an example. More precise or complex (applying custom configuration, etc) automation is possible using configuration management software like <a href="https://www.ansible.com/">Ansible</a><a href=".html"></a></p>
156</body>
157</html>
diff --git a/doc/Create-and-serve-multiple-Shaarlis-(farm).md b/doc/Create-and-serve-multiple-Shaarlis-(farm).md
deleted file mode 100644
index a71f6520..00000000
--- a/doc/Create-and-serve-multiple-Shaarlis-(farm).md
+++ /dev/null
@@ -1,58 +0,0 @@
1#Create and serve multiple Shaarlis (farm)
2Example bash script (creates multiple shaarli instances and generates an HTML index of them)
3
4```bash
5#!/bin/bash
6set -o errexit
7set -o nounset
8
9#config
10shaarli_base_dir='/var/www/shaarli'
11accounts='bob john whatever username'
12shaarli_repo_url='https://github.com/shaarli/Shaarli'
13ref="master"
14
15#clone multiple shaarli instances
16if [ ! -d "$shaarli_base_dir" ]; then mkdir "$shaarli_base_dir"; fi[](.html)
17
18for account in $accounts; do
19 if [ -d "$shaarli_base_dir/$account" ];[](.html)
20 then echo "[info] account $account already exists, skipping";[](.html)
21 else echo "[info] creating new account $account ..."; git clone --quiet "$shaarli_repo_url" -b "$ref" "$shaarli_base_dir/$account"; fi[](.html)
22done
23
24#generate html index of shaarlis
25htmlhead='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
26<!-- Minimal html template thanks to http://www.sitepoint.com/a-minimal-html-document/ -->
27<html lang="en">
28 <head>
29 <meta http-equiv="content-type" content="text/html; charset=utf-8">
30 <title>My Shaarli farm</title>
31 <style>body {font-family: "Open Sans"}</style>
32 </head>
33 <body>
34 <div>
35 <h1>My Shaarli farm</h1>
36 <ul style="list-style-type: none;">'
37
38accountlinks=''
39
40htmlfooter='
41 </ul>
42 </div>
43 </body>
44</html>'
45
46
47
48for account in $accounts; do accountlinks="$accountlinks\n<li><a href=\"$account\">$account</a></li>"; done
49if [ -d "$shaarli_base_dir/index.html" ]; then echo "[removing old index.html]"; rm "$shaarli_base_dir/index.html" ]; fi[](.html)
50echo "[info] generating new index of shaarlis"[](.html)
51echo -e "$htmlhead $accountlinks $htmlfooter" > "$shaarli_base_dir/index.html"
52echo '[info] done.'[](.html)
53echo "[info] list of accounts: $accounts"[](.html)
54echo "[info] contents of $shaarli_base_dir:"[](.html)
55tree -a -L 1 "$shaarli_base_dir"
56```
57
58This script just serves as an example. More precise or complex (applying custom configuration, etc) automation is possible using configuration management software like [Ansible](https://www.ansible.com/)[](.html)
diff --git a/doc/Datastore-hacks.html b/doc/Datastore-hacks.html
deleted file mode 100644
index 15da09d4..00000000
--- a/doc/Datastore-hacks.html
+++ /dev/null
@@ -1,122 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Datastore hacks</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="datastore-hacks">Datastore hacks</h1>
103<h3 id="decode-datastore-content">Decode datastore content</h3>
104<p>To display the array representing the data saved in <code>data/datastore.php</code>, use the following snippet:</p>
105<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php"><span class="kw">$data</span> = <span class="st">&quot;tZNdb9MwFIb... &lt;Commented content inside datastore.php&gt;&quot;</span><span class="ot">;</span>
106<span class="kw">$out</span> = <span class="fu">unserialize</span><span class="ot">(</span><span class="fu">gzinflate</span><span class="ot">(</span><span class="fu">base64_decode</span><span class="ot">(</span><span class="kw">$data</span><span class="ot">)));</span>
107<span class="fu">echo</span> <span class="st">&quot;&lt;pre&gt;&quot;</span><span class="ot">;</span> <span class="co">// Pretty printing is love, pretty printing is life</span>
108<span class="fu">print_r</span><span class="ot">(</span><span class="kw">$out</span><span class="ot">);</span>
109<span class="fu">echo</span> <span class="st">&quot;&lt;/pre&gt;&quot;</span><span class="ot">;</span>
110<span class="fu">exit</span><span class="ot">;</span></code></pre></div>
111<p>This will output the internal representation of the datastore, &quot;unobfuscated&quot; (if this can really be considered obfuscation).</p>
112<p>Alternatively, you can transform to JSON format (and pretty-print if you have <code>jq</code> installed):</p>
113<pre><code>php -r &#39;print(json_encode(unserialize(gzinflate(base64_decode(preg_replace(&quot;!.*/\* (.+) \*/.*!&quot;, &quot;$1&quot;, file_get_contents(&quot;data/datastore.php&quot;)))))));&#39; | jq .</code></pre>
114<h3 id="changing-the-timestamp-for-a-link">Changing the timestamp for a link</h3>
115<ul>
116<li>Look for <code>&lt;input type=&quot;hidden&quot; name=&quot;lf_linkdate&quot; value=&quot;{$link.linkdate}&quot;&gt;</code> in <code>tpl/editlink.tpl</code> (line 14)</li>
117<li>Replace <code>type=&quot;hidden&quot;</code> with <code>type=&quot;text&quot;</code> from this line</li>
118<li>A new date/time field becomes available in the edit/new link dialog.</li>
119<li>You can set the timestamp manually by entering it in the format <code>YYYMMDD_HHMMS</code>.</li>
120</ul>
121</body>
122</html>
diff --git a/doc/Datastore-hacks.md b/doc/Datastore-hacks.md
deleted file mode 100644
index ef6f6d50..00000000
--- a/doc/Datastore-hacks.md
+++ /dev/null
@@ -1,24 +0,0 @@
1#Datastore hacks
2### Decode datastore content
3To display the array representing the data saved in `data/datastore.php`, use the following snippet:
4
5```php
6$data = "tZNdb9MwFIb... <Commented content inside datastore.php>";
7$out = unserialize(gzinflate(base64_decode($data)));
8echo "<pre>"; // Pretty printing is love, pretty printing is life
9print_r($out);
10echo "</pre>";
11exit;
12```
13This will output the internal representation of the datastore, "unobfuscated" (if this can really be considered obfuscation).
14
15Alternatively, you can transform to JSON format (and pretty-print if you have `jq` installed):
16```
17php -r 'print(json_encode(unserialize(gzinflate(base64_decode(preg_replace("!.*/\* (.+) \*/.*!", "$1", file_get_contents("data/datastore.php")))))));' | jq .
18```
19
20### Changing the timestamp for a link
21* Look for `<input type="hidden" name="lf_linkdate" value="{$link.linkdate}">` in `tpl/editlink.tpl` (line 14)
22* Replace `type="hidden"` with `type="text"` from this line
23* A new date/time field becomes available in the edit/new link dialog.
24* You can set the timestamp manually by entering it in the format `YYYMMDD_HHMMS`.
diff --git a/doc/Development.html b/doc/Development.html
deleted file mode 100644
index c5776413..00000000
--- a/doc/Development.html
+++ /dev/null
@@ -1,110 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Development</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="development">Development</h1>
66<h2 id="guidelines">Guidelines</h2>
67<p>Please have a look at the following pages:</p>
68<ul>
69<li><a href="https://github.com/shaarli/Shaarli/tree/master/CONTRIBUTING.md">Contributing to Shaarli</a><a href=".html"></a></li>
70<li><a href="Static-analysis.html">Static analysis</a> - patches should try to stick to the <a href="http://www.php-fig.org/psr/">PHP Standard Recommendations</a> (PSR), especially:
71<ul>
72<li><a href="http://www.php-fig.org/psr/psr-1/">PSR-1</a> - Basic Coding Standard<a href=".html"></a></li>
73<li><a href="http://www.php-fig.org/psr/psr-2/">PSR-2</a> - Coding Style Guide<a href=".html"></a></li>
74</ul></li>
75<li><a href="Unit-tests.html">Unit tests</a></li>
76<li><a href="GnuPG-signature.html">GnuPG signature</a> for tags/releases</li>
77</ul>
78<h2 id="continuous-integration-tools">Continuous integration tools</h2>
79<h3 id="local-development">Local development</h3>
80<p>A <a href="https://github.com/shaarli/Shaarli/blob/master/Makefile"><code>Makefile</code></a> is available to perform project-related operations:<a href=".html"></a></p>
81<ul>
82<li>Documentation - generate a local HTML copy of the GitHub wiki</li>
83<li><a href="Static-analysis.html">Static analysis</a> - check that the code is compliant to PHP conventions</li>
84<li><a href="Unit-tests.html">Unit tests</a> - ensure there are no regressions introduced by new commits</li>
85</ul>
86<h3 id="automatic-builds">Automatic builds</h3>
87<p><a href="http://docs.travis-ci.com/">Travis CI</a> is a Continuous Integration build server, that runs a build:<a href=".html"></a></p>
88<ul>
89<li>each time a commit is merged to the mainline (<code>master</code> branch)</li>
90<li>each time a Pull Request is submitted or updated</li>
91</ul>
92<p>A build is composed of several jobs: one for each supported PHP version (see <a href="Server-requirements.html">Server requirements</a>).</p>
93<p>Each build job:</p>
94<ul>
95<li>updates Composer</li>
96<li>installs 3rd-party test dependencies with Composer</li>
97<li>runs <a href="Unit-tests.html">Unit tests</a></li>
98</ul>
99<p>After all jobs have finished, Travis returns the results to GitHub:</p>
100<ul>
101<li>a status icon represents the result for the <code>master</code> branch: <a href="(https://api.travis-ci.org/shaarli/Shaarli.svg)%5D(https://travis-ci.org/shaarli/Shaarli).html"><img src="https://travis-ci.org/shaarli/Shaarli" alt="(https://api.travis-ci.org/shaarli/Shaarli.svg)" /></a></li>
102<li>Pull Requests are updated with the Travis result
103<ul>
104<li>Green: all tests have passed</li>
105<li>Red: some tests failed</li>
106<li>Orange: tests are pending</li>
107</ul></li>
108</ul>
109</body>
110</html>
diff --git a/doc/Development.md b/doc/Development.md
deleted file mode 100644
index 6cfcb683..00000000
--- a/doc/Development.md
+++ /dev/null
@@ -1,35 +0,0 @@
1#Development
2## Guidelines
3Please have a look at the following pages:
4- [Contributing to Shaarli](https://github.com/shaarli/Shaarli/tree/master/CONTRIBUTING.md)[](.html)
5- [Static analysis](Static-analysis.html) - patches should try to stick to the [PHP Standard Recommendations](http://www.php-fig.org/psr/) (PSR), especially:
6 - [PSR-1](http://www.php-fig.org/psr/psr-1/) - Basic Coding Standard[](.html)
7 - [PSR-2](http://www.php-fig.org/psr/psr-2/) - Coding Style Guide[](.html)
8- [Unit tests](Unit-tests.html)
9- [GnuPG signature](GnuPG-signature.html) for tags/releases
10
11## Continuous integration tools
12### Local development
13A [`Makefile`](https://github.com/shaarli/Shaarli/blob/master/Makefile) is available to perform project-related operations:[](.html)
14- Documentation - generate a local HTML copy of the GitHub wiki
15- [Static analysis](Static-analysis.html) - check that the code is compliant to PHP conventions
16- [Unit tests](Unit-tests.html) - ensure there are no regressions introduced by new commits
17
18### Automatic builds
19[Travis CI](http://docs.travis-ci.com/) is a Continuous Integration build server, that runs a build:[](.html)
20- each time a commit is merged to the mainline (`master` branch)
21- each time a Pull Request is submitted or updated
22
23A build is composed of several jobs: one for each supported PHP version (see [Server requirements](Server-requirements.html)).
24
25Each build job:
26- updates Composer
27- installs 3rd-party test dependencies with Composer
28- runs [Unit tests](Unit-tests.html)
29
30After all jobs have finished, Travis returns the results to GitHub:
31- a status icon represents the result for the `master` branch: [![(https://api.travis-ci.org/shaarli/Shaarli.svg)](https://travis-ci.org/shaarli/Shaarli)]((https://api.travis-ci.org/shaarli/Shaarli.svg)](https://travis-ci.org/shaarli/Shaarli).html)
32- Pull Requests are updated with the Travis result
33 - Green: all tests have passed
34 - Red: some tests failed
35 - Orange: tests are pending
diff --git a/doc/Directory-structure.html b/doc/Directory-structure.html
deleted file mode 100644
index 404ff7c8..00000000
--- a/doc/Directory-structure.html
+++ /dev/null
@@ -1,133 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Directory structure</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="directory-structure">Directory structure</h1>
103<p>Here is the directory structure of Shaarli and the purpose of the different files:</p>
104<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"> <span class="ex">index.php</span> <span class="co"># Main program</span>
105 <span class="ex">application/</span> <span class="co"># Shaarli classes</span>
106 ├── <span class="ex">LinkDB.php</span>
107 └── <span class="ex">Utils.php</span>
108 <span class="ex">tests/</span> <span class="co"># Shaarli unitary &amp; functional tests</span>
109 ├── <span class="ex">LinkDBTest.php</span>
110 ├── <span class="ex">utils</span> <span class="co"># utilities to ease testing</span>
111 │ └── <span class="ex">ReferenceLinkDB.php</span>
112 └── <span class="ex">UtilsTest.php</span>
113 <span class="ex">COPYING</span> <span class="co"># Shaarli license</span>
114 <span class="ex">inc/</span> <span class="co"># static assets and 3rd party libraries</span>
115 ├── <span class="ex">awesomplete.*</span> <span class="co"># tags autocompletion library</span>
116 ├── <span class="ex">blazy.*</span> <span class="co"># picture wall lazy image loading library</span>
117 ├── <span class="ex">shaarli.css</span>, reset.css <span class="co"># Shaarli stylesheet.</span>
118 ├── <span class="ex">qr.*</span> <span class="co"># qr code generation library</span>
119 └──<span class="ex">rain.tpl.class.php</span> <span class="co"># RainTPL templating library</span>
120 <span class="ex">tpl/</span> <span class="co"># RainTPL templates for Shaarli. They are used to build the pages.</span>
121 <span class="ex">images/</span> <span class="co"># Images and icons used in Shaarli</span>
122 <span class="ex">data/</span> <span class="co"># data storage: bookmark database, configuration, logs, banlist…</span>
123 ├── <span class="ex">config.php</span> <span class="co"># Shaarli configuration (login, password, timezone, title…)</span>
124 ├── <span class="ex">datastore.php</span> <span class="co"># Your link database (compressed).</span>
125 ├── <span class="ex">ipban.php</span> <span class="co"># IP address ban system data</span>
126 ├── <span class="ex">lastupdatecheck.txt</span> <span class="co"># Update check timestamp file</span>
127 └──<span class="ex">log.txt</span> <span class="co"># login/IPban log.</span>
128 <span class="ex">cache/</span> <span class="co"># thumbnails cache</span>
129 <span class="co"># This directory is automatically created. You can erase it anytime you want.</span>
130 <span class="ex">tmp/</span> <span class="co"># Temporary directory for compiled RainTPL templates.</span>
131 <span class="co"># This directory is automatically created. You can erase it anytime you want.</span></code></pre></div>
132</body>
133</html>
diff --git a/doc/Docker.html b/doc/Docker.html
deleted file mode 100644
index e89c90fb..00000000
--- a/doc/Docker.html
+++ /dev/null
@@ -1,242 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Docker</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="docker">Docker</h1>
103<ul>
104<li><a href="#docker-usage">Docker usage</a><a href=".html"></a></li>
105<li><a href="#get-and-run-a-shaarli-image">Get and run a Shaarli image</a><a href=".html"></a></li>
106<li><a href="#resources">Resources</a><a href=".html"></a></li>
107</ul>
108<h2 id="docker-usage">Docker usage</h2>
109<h3 id="basics">Basics</h3>
110<p>Install <a href="https://www.docker.com/">Docker</a>, by following the instructions relevant<a href=".html"></a><br />
111to your OS / distribution, and start the service.</p>
112<h4 id="search-an-image-on-dockerhub">Search an image on <a href="https://hub.docker.com/">DockerHub</a><a href=".html"></a></h4>
113<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">docker</span> search debian
114
115<span class="ex">NAME</span> DESCRIPTION STARS OFFICIAL AUTOMATED
116<span class="ex">ubuntu</span> Ubuntu is a Debian-based Linux operating s... 2065 [OK][](.html)
117<span class="ex">debian</span> Debian is a Linux distribution that<span class="st">&#39;s comp... 603 [OK][](.html)</span>
118<span class="st">google/debian 47 [OK][](.html)</span></code></pre></div>
119<h4 id="show-available-tags-for-a-repository">Show available tags for a repository</h4>
120<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">curl</span> https://index.docker.io/v1/repositories/debian/tags <span class="kw">|</span> <span class="ex">python</span> -m json.tool
121
122<span class="ex">%</span> Total % Received % Xferd Average Speed Time Time Time Current
123<span class="ex">Dload</span> Upload Total Spent Left Speed
124<span class="ex">100</span> 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433</code></pre></div>
125<p>Sample output:</p>
126<div class="sourceCode"><pre class="sourceCode json"><code class="sourceCode json"><span class="ot">[[]</span><span class="er">(.html)</span>
127 <span class="fu">{</span>
128 <span class="dt">&quot;layer&quot;</span><span class="fu">:</span> <span class="st">&quot;85a02782&quot;</span><span class="fu">,</span>
129 <span class="dt">&quot;name&quot;</span><span class="fu">:</span> <span class="st">&quot;stretch&quot;</span>
130 <span class="fu">}</span><span class="ot">,</span>
131 <span class="fu">{</span>
132 <span class="dt">&quot;layer&quot;</span><span class="fu">:</span> <span class="st">&quot;59abecbc&quot;</span><span class="fu">,</span>
133 <span class="dt">&quot;name&quot;</span><span class="fu">:</span> <span class="st">&quot;testing&quot;</span>
134 <span class="fu">}</span><span class="ot">,</span>
135 <span class="fu">{</span>
136 <span class="dt">&quot;layer&quot;</span><span class="fu">:</span> <span class="st">&quot;bf0fd686&quot;</span><span class="fu">,</span>
137 <span class="dt">&quot;name&quot;</span><span class="fu">:</span> <span class="st">&quot;unstable&quot;</span>
138 <span class="fu">}</span><span class="ot">,</span>
139 <span class="fu">{</span>
140 <span class="dt">&quot;layer&quot;</span><span class="fu">:</span> <span class="st">&quot;60c52dbe&quot;</span><span class="fu">,</span>
141 <span class="dt">&quot;name&quot;</span><span class="fu">:</span> <span class="st">&quot;wheezy&quot;</span>
142 <span class="fu">}</span><span class="ot">,</span>
143 <span class="fu">{</span>
144 <span class="dt">&quot;layer&quot;</span><span class="fu">:</span> <span class="st">&quot;c5b806fe&quot;</span><span class="fu">,</span>
145 <span class="dt">&quot;name&quot;</span><span class="fu">:</span> <span class="st">&quot;wheezy-backports&quot;</span>
146 <span class="fu">}</span>
147<span class="ot">]</span></code></pre></div>
148<h4 id="pull-an-image-from-dockerhub">Pull an image from DockerHub</h4>
149<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">docker</span> pull repository[:tag][](.html)
150
151$ <span class="ex">docker</span> pull debian:wheezy
152<span class="ex">wheezy</span>: Pulling from debian
153<span class="ex">4c8cbfd2973e</span>: Pull complete
154<span class="ex">60c52dbe9d91</span>: Pull complete
155<span class="ex">Digest</span>: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe
156<span class="ex">Status</span>: Downloaded newer image for debian:wheezy</code></pre></div>
157<h2 id="get-and-run-a-shaarli-image">Get and run a Shaarli image</h2>
158<h3 id="dockerhub-repository">DockerHub repository</h3>
159<p>The images can be found in the <a href="https://hub.docker.com/r/shaarli/shaarli/"><code>shaarli/shaarli</code></a><a href=".html"></a><br />
160repository.</p>
161<h3 id="available-image-tags">Available image tags</h3>
162<ul>
163<li><code>latest</code>: master branch (tarball release)</li>
164<li><code>stable</code>: stable branch (tarball release)</li>
165<li><code>dev</code>: master branch (Git clone)</li>
166</ul>
167<p>All images rely on:</p>
168<ul>
169<li><a href="https://hub.docker.com/_/debian/">Debian 8 Jessie</a><a href=".html"></a></li>
170<li><a href="http://php-fpm.org/">PHP5-FPM</a><a href=".html"></a></li>
171<li><a href="http://nginx.org/">Nginx</a><a href=".html"></a></li>
172</ul>
173<h3 id="download-from-dockerhub">Download from DockerHub</h3>
174<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">docker</span> pull shaarli/shaarli
175<span class="ex">latest</span>: Pulling from shaarli/shaarli
176<span class="ex">32716d9fcddb</span>: Pull complete
177<span class="ex">84899d045435</span>: Pull complete
178<span class="ex">4b6ad7444763</span>: Pull complete
179<span class="ex">e0345ef7a3e0</span>: Pull complete
180<span class="ex">5c1dd344094f</span>: Pull complete
181<span class="ex">6422305a200b</span>: Pull complete
182<span class="ex">7d63f861dbef</span>: Pull complete
183<span class="ex">3eb97210645c</span>: Pull complete
184<span class="ex">869319d746ff</span>: Already exists
185<span class="ex">869319d746ff</span>: Pulling fs layer
186<span class="ex">902b87aaaec9</span>: Already exists
187<span class="ex">Digest</span>: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98
188<span class="ex">Status</span>: Downloaded newer image for shaarli/shaarli:latest</code></pre></div>
189<h3 id="create-and-start-a-new-container-from-the-image">Create and start a new container from the image</h3>
190<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co"># map the host&#39;s :8000 port to the container&#39;s :80 port</span>
191$ <span class="ex">docker</span> create -p 8000:80 shaarli/shaarli
192<span class="ex">d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101</span>
193
194<span class="co"># launch the container in the background</span>
195$ <span class="ex">docker</span> start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
196<span class="ex">d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101</span>
197
198<span class="co"># list active containers</span>
199$ <span class="ex">docker</span> ps
200<span class="ex">CONTAINER</span> ID IMAGE COMMAND CREATED STATUS PORTS NAMES
201<span class="ex">d40b7af693d6</span> shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000-<span class="op">&gt;</span>80/tcp backstabbing_galileo</code></pre></div>
202<h3 id="stop-and-destroy-a-container">Stop and destroy a container</h3>
203<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">docker</span> stop backstabbing_galileo <span class="co"># those docker guys are really rude to physicists!</span>
204<span class="ex">backstabbing_galileo</span>
205
206<span class="co"># check the container is stopped</span>
207$ <span class="ex">docker</span> ps
208<span class="ex">CONTAINER</span> ID IMAGE COMMAND CREATED STATUS PORTS NAMES
209
210<span class="co"># list ALL containers</span>
211$ <span class="ex">docker</span> ps -a
212<span class="ex">CONTAINER</span> ID IMAGE COMMAND CREATED STATUS PORTS NAMES
213<span class="ex">d40b7af693d6</span> shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) <span class="ex">48</span> seconds ago backstabbing_galileo
214
215<span class="co"># destroy the container</span>
216$ <span class="ex">docker</span> rm backstabbing_galileo <span class="co"># let&#39;s put an end to these barbarian practices</span>
217<span class="ex">backstabbing_galileo</span>
218
219$ <span class="ex">docker</span> ps -a
220<span class="ex">CONTAINER</span> ID IMAGE COMMAND CREATED STATUS PORTS NAMES</code></pre></div>
221<h2 id="resources">Resources</h2>
222<h3 id="docker-1">Docker</h3>
223<ul>
224<li><a href="http://blog.thoward37.me/articles/where-are-docker-images-stored/">Where are Docker images stored?</a><a href=".html"></a></li>
225<li><a href="https://docs.docker.com/reference/builder/">Dockerfile reference</a><a href=".html"></a></li>
226<li><a href="https://docs.docker.com/articles/dockerfile_best-practices/">Dockerfile best practices</a><a href=".html"></a></li>
227<li><a href="https://docs.docker.com/userguide/dockervolumes/">Volumes</a><a href=".html"></a></li>
228</ul>
229<h3 id="dockerhub">DockerHub</h3>
230<ul>
231<li><a href="https://docs.docker.com/userguide/dockerrepos/">Repositories</a><a href=".html"></a></li>
232<li><a href="https://docs.docker.com/docker-hub/orgs/">Teams and organizations</a><a href=".html"></a></li>
233<li><a href="https://docs.docker.com/docker-hub/github/">GitHub automated build</a><a href=".html"></a></li>
234</ul>
235<h3 id="service-management">Service management</h3>
236<ul>
237<li><a href="https://docs.docker.com/articles/using_supervisord/">Using supervisord</a><a href=".html"></a></li>
238<li><a href="http://nginx.org/en/docs/ngx_core_module.html#daemon">Nginx in the foreground</a><a href=".html"></a></li>
239<li><a href="http://supervisord.org/">supervisord</a><a href=".html"></a></li>
240</ul>
241</body>
242</html>
diff --git a/doc/Docker.md b/doc/Docker.md
deleted file mode 100644
index 1faa7904..00000000
--- a/doc/Docker.md
+++ /dev/null
@@ -1,157 +0,0 @@
1#Docker
2- [Docker usage](#docker-usage)[](.html)
3- [Get and run a Shaarli image](#get-and-run-a-shaarli-image)[](.html)
4- [Resources](#resources)[](.html)
5
6## Docker usage
7### Basics
8Install [Docker](https://www.docker.com/), by following the instructions relevant[](.html)
9to your OS / distribution, and start the service.
10
11#### Search an image on [DockerHub](https://hub.docker.com/)[](.html)
12
13```bash
14$ docker search debian
15
16NAME DESCRIPTION STARS OFFICIAL AUTOMATED
17ubuntu Ubuntu is a Debian-based Linux operating s... 2065 [OK][](.html)
18debian Debian is a Linux distribution that's comp... 603 [OK][](.html)
19google/debian 47 [OK][](.html)
20```
21
22#### Show available tags for a repository
23```bash
24$ curl https://index.docker.io/v1/repositories/debian/tags | python -m json.tool
25
26% Total % Received % Xferd Average Speed Time Time Time Current
27Dload Upload Total Spent Left Speed
28100 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433
29```
30
31Sample output:
32```json
33[[](.html)
34 {
35 "layer": "85a02782",
36 "name": "stretch"
37 },
38 {
39 "layer": "59abecbc",
40 "name": "testing"
41 },
42 {
43 "layer": "bf0fd686",
44 "name": "unstable"
45 },
46 {
47 "layer": "60c52dbe",
48 "name": "wheezy"
49 },
50 {
51 "layer": "c5b806fe",
52 "name": "wheezy-backports"
53 }
54]
55
56```
57
58#### Pull an image from DockerHub
59```bash
60$ docker pull repository[:tag][](.html)
61
62$ docker pull debian:wheezy
63wheezy: Pulling from debian
644c8cbfd2973e: Pull complete
6560c52dbe9d91: Pull complete
66Digest: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe
67Status: Downloaded newer image for debian:wheezy
68```
69
70## Get and run a Shaarli image
71### DockerHub repository
72The images can be found in the [`shaarli/shaarli`](https://hub.docker.com/r/shaarli/shaarli/)[](.html)
73repository.
74
75### Available image tags
76- `latest`: master branch (tarball release)
77- `stable`: stable branch (tarball release)
78- `dev`: master branch (Git clone)
79
80All images rely on:
81- [Debian 8 Jessie](https://hub.docker.com/_/debian/)[](.html)
82- [PHP5-FPM](http://php-fpm.org/)[](.html)
83- [Nginx](http://nginx.org/)[](.html)
84
85### Download from DockerHub
86```bash
87$ docker pull shaarli/shaarli
88latest: Pulling from shaarli/shaarli
8932716d9fcddb: Pull complete
9084899d045435: Pull complete
914b6ad7444763: Pull complete
92e0345ef7a3e0: Pull complete
935c1dd344094f: Pull complete
946422305a200b: Pull complete
957d63f861dbef: Pull complete
963eb97210645c: Pull complete
97869319d746ff: Already exists
98869319d746ff: Pulling fs layer
99902b87aaaec9: Already exists
100Digest: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98
101Status: Downloaded newer image for shaarli/shaarli:latest
102```
103
104### Create and start a new container from the image
105```bash
106# map the host's :8000 port to the container's :80 port
107$ docker create -p 8000:80 shaarli/shaarli
108d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
109
110# launch the container in the background
111$ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
112d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
113
114# list active containers
115$ docker ps
116CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
117d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo
118```
119
120### Stop and destroy a container
121```bash
122$ docker stop backstabbing_galileo # those docker guys are really rude to physicists!
123backstabbing_galileo
124
125# check the container is stopped
126$ docker ps
127CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
128
129# list ALL containers
130$ docker ps -a
131CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
132d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo
133
134# destroy the container
135$ docker rm backstabbing_galileo # let's put an end to these barbarian practices
136backstabbing_galileo
137
138$ docker ps -a
139CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
140```
141
142## Resources
143### Docker
144- [Where are Docker images stored?](http://blog.thoward37.me/articles/where-are-docker-images-stored/)[](.html)
145- [Dockerfile reference](https://docs.docker.com/reference/builder/)[](.html)
146- [Dockerfile best practices](https://docs.docker.com/articles/dockerfile_best-practices/)[](.html)
147- [Volumes](https://docs.docker.com/userguide/dockervolumes/)[](.html)
148
149### DockerHub
150- [Repositories](https://docs.docker.com/userguide/dockerrepos/)[](.html)
151- [Teams and organizations](https://docs.docker.com/docker-hub/orgs/)[](.html)
152- [GitHub automated build](https://docs.docker.com/docker-hub/github/)[](.html)
153
154### Service management
155- [Using supervisord](https://docs.docker.com/articles/using_supervisord/)[](.html)
156- [Nginx in the foreground](http://nginx.org/en/docs/ngx_core_module.html#daemon)[](.html)
157- [supervisord](http://supervisord.org/)[](.html)
diff --git a/doc/Download-CSS-styles-from-an-OPML-list.html b/doc/Download-CSS-styles-from-an-OPML-list.html
deleted file mode 100644
index a4f68ac6..00000000
--- a/doc/Download-CSS-styles-from-an-OPML-list.html
+++ /dev/null
@@ -1,255 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Download CSS styles from an OPML list</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="download-css-styles-from-an-opml-list">Download CSS styles from an OPML list</h1>
103<h3 id="download-css-styles-for-shaarlis-listed-in-an-opml-file">Download CSS styles for shaarlis listed in an opml file</h3>
104<p>Example php script:</p>
105<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php">&lt;!---- <span class="ot">?</span>php --&gt;
106&lt;!---- Copyright <span class="ot">(</span>c<span class="ot">)</span> <span class="dv">2014</span> Nicolas Delsaux <span class="ot">(</span>https<span class="ot">:</span><span class="co">//github.com/Riduidel) --&gt;</span>
107&lt;!---- License: zlib <span class="ot">(</span>http:<span class="co">//www.gzip.org/zlib/zlib_license.html) --&gt;</span>
108
109<span class="co">/**</span>
110<span class="co"> * Source: https://github.com/Riduidel</span>
111<span class="co"> * Download css styles for shaarlis listed in an opml file</span>
112<span class="co"> */</span>
113<span class="fu">define</span><span class="ot">(</span><span class="st">&quot;SHAARLI_RSS_OPML&quot;</span><span class="ot">,</span> <span class="st">&quot;https://www.ecirtam.net/shaarlirss/custom/people.opml&quot;</span><span class="ot">);</span>
114
115<span class="fu">define</span><span class="ot">(</span><span class="st">&quot;THEMES_TEMP_FOLDER&quot;</span><span class="ot">,</span> <span class="st">&quot;new_themes&quot;</span><span class="ot">);</span>
116
117<span class="kw">if</span><span class="ot">(</span>!<span class="fu">file_exists</span><span class="ot">(</span><span class="kw">THEMES_TEMP_FOLDER</span><span class="ot">))</span> {
118 <span class="fu">mkdir</span><span class="ot">(</span><span class="kw">THEMES_TEMP_FOLDER</span><span class="ot">);</span>
119}
120
121<span class="kw">function</span> siteUrl<span class="ot">(</span><span class="kw">$pathInSite</span><span class="ot">)</span> {
122 <span class="kw">$indexPos</span> = <span class="fu">strpos</span><span class="ot">(</span><span class="kw">$pathInSite</span><span class="ot">,</span> <span class="st">&quot;index.php&quot;</span><span class="ot">);</span>
123 <span class="kw">if</span><span class="ot">(</span>!<span class="kw">$indexPos</span><span class="ot">)</span> {
124 <span class="kw">return</span> <span class="kw">$pathInSite</span><span class="ot">;</span>
125 } <span class="kw">else</span> {
126 <span class="kw">return</span> <span class="fu">substr</span><span class="ot">(</span><span class="kw">$pathInSite</span><span class="ot">,</span> <span class="dv">0</span><span class="ot">,</span> <span class="kw">$indexPos</span><span class="ot">);</span>
127 }
128}
129
130<span class="kw">function</span> createShaarliHashFromOPMLL<span class="ot">(</span><span class="kw">$opmlFile</span><span class="ot">)</span> {
131 <span class="kw">$result</span> = <span class="fu">array</span><span class="ot">();</span>
132 <span class="kw">$opml</span> = <span class="fu">file_get_contents</span><span class="ot">(</span><span class="kw">$opmlFile</span><span class="ot">);</span>
133 <span class="kw">$opmlXml</span> = <span class="fu">simplexml_load_string</span><span class="ot">(</span><span class="kw">$opml</span><span class="ot">);</span>
134 <span class="kw">$outlineElements</span> = <span class="kw">$opmlXml</span>-&gt;xpath<span class="ot">(</span><span class="st">&quot;body/outline&quot;</span><span class="ot">);</span>
135 <span class="kw">foreach</span><span class="ot">(</span><span class="kw">$outlineElements</span> <span class="kw">as</span> <span class="kw">$site</span><span class="ot">)</span> {
136 <span class="kw">$siteUrl</span> = siteUrl<span class="ot">(</span><span class="dt">(string)</span> <span class="kw">$site</span><span class="ot">[</span><span class="st">&#39;htmlUrl&#39;</span><span class="ot">]);[](</span>.html<span class="ot">)</span>
137 <span class="kw">$result</span><span class="ot">[</span><span class="kw">$siteUrl</span><span class="ot">]</span>=<span class="ot">(</span><span class="dt">(string)</span> <span class="kw">$site</span><span class="ot">[</span><span class="st">&#39;text&#39;</span><span class="ot">]);[](</span>.html<span class="ot">)</span>
138 }
139 <span class="kw">return</span> <span class="kw">$result</span><span class="ot">;</span>
140}
141
142<span class="kw">function</span> getSiteFolder<span class="ot">(</span><span class="kw">$url</span><span class="ot">)</span> {
143 <span class="kw">$domain</span> = <span class="fu">parse_url</span><span class="ot">(</span><span class="kw">$url</span><span class="ot">,</span> <span class="kw">PHP_URL_HOST</span><span class="ot">);</span>
144 <span class="kw">return</span> <span class="kw">THEMES_TEMP_FOLDER</span>.<span class="st">&quot;/&quot;</span>.<span class="fu">str_replace</span><span class="ot">(</span><span class="st">&quot;.&quot;</span><span class="ot">,</span> <span class="st">&quot;_&quot;</span><span class="ot">,</span> <span class="kw">$domain</span><span class="ot">);</span>
145}
146
147<span class="kw">function</span> get_http_response_code<span class="ot">(</span><span class="kw">$theURL</span><span class="ot">)</span> {
148 <span class="kw">$headers</span> = <span class="fu">get_headers</span><span class="ot">(</span><span class="kw">$theURL</span><span class="ot">);</span>
149 <span class="kw">return</span> <span class="fu">substr</span><span class="ot">(</span><span class="kw">$headers</span><span class="ot">[</span><span class="dv">0</span><span class="ot">],</span> <span class="dv">9</span><span class="ot">,</span> <span class="dv">3</span><span class="ot">);[](</span>.html<span class="ot">)</span>
150}
151
152<span class="co">/**</span>
153<span class="co"> * This makes the code PHP-5 only (particularly the call to &quot;get_headers&quot;)</span>
154<span class="co"> */</span>
155<span class="kw">function</span> copyUserStyleFrom<span class="ot">(</span><span class="kw">$url</span><span class="ot">,</span> <span class="kw">$name</span><span class="ot">,</span> <span class="kw">$knownStyles</span><span class="ot">)</span> {
156 <span class="kw">$userStyle</span> = <span class="kw">$url</span>.<span class="st">&quot;inc/user.css&quot;</span><span class="ot">;</span>
157 <span class="kw">if</span><span class="ot">(</span><span class="fu">in_array</span><span class="ot">(</span><span class="kw">$url</span><span class="ot">,</span> <span class="kw">$knownStyles</span><span class="ot">))</span> {
158 <span class="co">// TODO add log message</span>
159 } <span class="kw">else</span> {
160 <span class="kw">$statusCode</span> = get_http_response_code<span class="ot">(</span><span class="kw">$userStyle</span><span class="ot">);</span>
161 <span class="kw">if</span><span class="ot">(</span><span class="fu">intval</span><span class="ot">(</span><span class="kw">$statusCode</span><span class="ot">)</span>&lt;<span class="dv">300</span><span class="ot">)</span> {
162 <span class="kw">$styleSheet</span> = <span class="fu">file_get_contents</span><span class="ot">(</span><span class="kw">$userStyle</span><span class="ot">);</span>
163 <span class="kw">$siteFolder</span> = getSiteFolder<span class="ot">(</span><span class="kw">$url</span><span class="ot">);</span>
164 <span class="kw">if</span><span class="ot">(</span>!<span class="fu">file_exists</span><span class="ot">(</span><span class="kw">$siteFolder</span><span class="ot">))</span> {
165 <span class="fu">mkdir</span><span class="ot">(</span><span class="kw">$siteFolder</span><span class="ot">);</span>
166 }
167 <span class="kw">if</span><span class="ot">(</span>!<span class="fu">file_exists</span><span class="ot">(</span><span class="kw">$siteFolder</span>.<span class="st">&#39;/user.css&#39;</span><span class="ot">))</span> {
168 <span class="co">// Copy stylesheet</span>
169 <span class="fu">file_put_contents</span><span class="ot">(</span><span class="kw">$siteFolder</span>.<span class="st">&#39;/user.css&#39;</span><span class="ot">,</span> <span class="kw">$styleSheet</span><span class="ot">);</span>
170 }
171 <span class="kw">if</span><span class="ot">(</span>!<span class="fu">file_exists</span><span class="ot">(</span><span class="kw">$siteFolder</span>.<span class="st">&#39;/README.md&#39;</span><span class="ot">))</span> {
172 <span class="co">// Then write a readme.md file</span>
173 <span class="fu">file_put_contents</span><span class="ot">(</span><span class="kw">$siteFolder</span>.<span class="st">&#39;/README.md&#39;</span><span class="ot">,</span>
174 <span class="st">&quot;User style from &quot;</span>.<span class="kw">$name</span>.<span class="st">&quot;</span><span class="kw">\n</span><span class="st">&quot;</span>
175 .<span class="st">&quot;=============================&quot;</span>
176 .<span class="st">&quot;</span><span class="kw">\n\n</span><span class="st">&quot;</span>
177 .<span class="st">&quot;This stylesheet was downloaded from &quot;</span>.<span class="kw">$userStyle</span>.<span class="st">&quot; on &quot;</span>.<span class="fu">date</span><span class="ot">(</span><span class="kw">DATE_RFC822</span><span class="ot">)</span>
178 <span class="ot">);</span>
179 }
180 <span class="kw">if</span><span class="ot">(</span>!<span class="fu">file_exists</span><span class="ot">(</span><span class="kw">$siteFolder</span>.<span class="st">&#39;/config.ini&#39;</span><span class="ot">))</span> {
181 <span class="co">// Write a config file containing useful informations</span>
182 <span class="fu">file_put_contents</span><span class="ot">(</span><span class="kw">$siteFolder</span>.<span class="st">&#39;/config.ini&#39;</span><span class="ot">,</span>
183 <span class="st">&quot;site_url=&quot;</span>.<span class="kw">$url</span>.<span class="st">&quot;</span><span class="kw">\n</span><span class="st">&quot;</span>
184 .<span class="st">&quot;site_name=&quot;</span>.<span class="kw">$name</span>.<span class="st">&quot;</span><span class="kw">\n</span><span class="st">&quot;</span>
185 <span class="ot">);</span>
186 }
187 <span class="kw">if</span><span class="ot">(</span>!<span class="fu">file_exists</span><span class="ot">(</span><span class="kw">$siteFolder</span>.<span class="st">&#39;/home.png&#39;</span><span class="ot">))</span> {
188 <span class="co">// And finally copy generated thumbnail</span>
189 <span class="kw">$homeThumb</span> = <span class="kw">$siteFolder</span>.<span class="st">&#39;/home.png&#39;</span><span class="ot">;</span>
190 <span class="fu">file_put_contents</span><span class="ot">(</span><span class="kw">$siteFolder</span>.<span class="st">&#39;/home.png&#39;</span><span class="ot">,</span> <span class="fu">file_get_contents</span><span class="ot">(</span>getThumbnailUrl<span class="ot">(</span><span class="kw">$url</span><span class="ot">)));</span>
191 }
192 <span class="fu">echo</span> <span class="st">&#39;Theme have been downloaded from &lt;a href=&quot;&#39;</span>.<span class="kw">$url</span>.<span class="st">&#39;&quot;&gt;&#39;</span>.<span class="kw">$url</span>.<span class="st">&#39;&lt;/a&gt; into &#39;</span>.<span class="kw">$siteFolder</span>
193 .<span class="st">&#39;. It looks like &lt;img src=&quot;&#39;</span>.<span class="kw">$homeThumb</span>.<span class="st">&#39;&quot;&gt;&lt;br/&gt;&#39;</span><span class="ot">;</span>
194 }
195 }
196}
197
198<span class="kw">function</span> getThumbnailUrl<span class="ot">(</span><span class="kw">$url</span><span class="ot">)</span> {
199 <span class="kw">return</span> <span class="st">&#39;http://api.webthumbnail.org/?url=&#39;</span>.<span class="kw">$url</span><span class="ot">;</span>
200}
201
202<span class="kw">function</span> copyUserStylesFrom<span class="ot">(</span><span class="kw">$urlToNames</span><span class="ot">,</span> <span class="kw">$knownStyles</span><span class="ot">)</span> {
203 <span class="kw">foreach</span><span class="ot">(</span><span class="kw">$urlToNames</span> <span class="kw">as</span> <span class="kw">$url</span> =&gt; <span class="kw">$name</span><span class="ot">)</span> {
204 copyUserStyleFrom<span class="ot">(</span><span class="kw">$url</span><span class="ot">,</span> <span class="kw">$name</span><span class="ot">,</span> <span class="kw">$knownStyles</span><span class="ot">);</span>
205 }
206}
207
208<span class="co">/**</span>
209<span class="co"> * Reading directory list, courtesy of http://www.laughing-buddha.net/php/dirlist/</span>
210<span class="co"> * </span><span class="an">@param</span><span class="co"> </span><span class="cv">directory</span><span class="co"> the directory we want to list files of</span>
211<span class="co"> * </span><span class="an">@return</span><span class="co"> a simple array containing the list of absolute file paths. Notice that current file (&quot;.&quot;) and parent one(&quot;..&quot;)</span>
212<span class="co"> * are not listed here</span>
213<span class="co"> */</span>
214<span class="kw">function</span> getDirectoryList <span class="ot">(</span><span class="kw">$directory</span><span class="ot">)</span> {
215 <span class="kw">$realPath</span> = <span class="fu">realpath</span><span class="ot">(</span><span class="kw">$directory</span><span class="ot">);</span>
216 <span class="co">// create an array to hold directory list</span>
217 <span class="kw">$results</span> = <span class="fu">array</span><span class="ot">();</span>
218 <span class="co">// create a handler for the directory</span>
219 <span class="kw">$handler</span> = <span class="fu">opendir</span><span class="ot">(</span><span class="kw">$directory</span><span class="ot">);</span>
220 <span class="co">// open directory and walk through the filenames</span>
221 <span class="kw">while</span> <span class="ot">(</span><span class="kw">$file</span> = <span class="fu">readdir</span><span class="ot">(</span><span class="kw">$handler</span><span class="ot">))</span> {
222 <span class="co">// if file isn&#39;t this directory or its parent, add it to the results</span>
223 <span class="kw">if</span> <span class="ot">(</span><span class="kw">$file</span> != <span class="st">&quot;.&quot;</span> &amp;&amp; <span class="kw">$file</span> != <span class="st">&quot;..&quot;</span><span class="ot">)</span> {
224 <span class="kw">$results</span><span class="ot">[</span> = <span class="fu">realpath</span><span class="ot">(</span><span class="kw">$realPath</span> . <span class="st">&quot;/&quot;</span> . <span class="kw">$file</span><span class="ot">);](</span>-=-<span class="fu">realpath</span><span class="ot">(</span><span class="kw">$realPath</span>-.-<span class="st">&quot;/&quot;</span>-.-<span class="kw">$file</span><span class="ot">);</span>.html<span class="ot">)</span>
225 }
226 }
227 <span class="co">// tidy up: close the handler</span>
228 <span class="fu">closedir</span><span class="ot">(</span><span class="kw">$handler</span><span class="ot">);</span>
229 <span class="co">// done!</span>
230 <span class="kw">return</span> <span class="kw">$results</span><span class="ot">;</span>
231}
232
233<span class="co">/**</span>
234<span class="co"> * Start in themes folder and look in all subfolders for config.ini files. </span>
235<span class="co"> * These config.ini files allow us not to download styles again and again</span>
236<span class="co"> */</span>
237<span class="kw">function</span> findKnownStyles<span class="ot">()</span> {
238 <span class="kw">$result</span> = <span class="fu">array</span><span class="ot">();</span>
239 <span class="kw">$subFolders</span> = getDirectoryList<span class="ot">(</span><span class="st">&quot;themes&quot;</span><span class="ot">);</span>
240 <span class="kw">foreach</span><span class="ot">(</span><span class="kw">$subFolders</span> <span class="kw">as</span> <span class="kw">$folder</span><span class="ot">)</span> {
241 <span class="kw">$configFile</span> = <span class="kw">$folder</span>.<span class="st">&quot;/config.ini&quot;</span><span class="ot">;</span>
242 <span class="kw">if</span><span class="ot">(</span><span class="fu">file_exists</span><span class="ot">(</span><span class="kw">$configFile</span><span class="ot">))</span> {
243 <span class="kw">$iniParameters</span> = <span class="fu">parse_ini_file</span><span class="ot">(</span><span class="kw">$configFile</span><span class="ot">);</span>
244 <span class="fu">array_push</span><span class="ot">(</span><span class="kw">$result</span><span class="ot">,</span> <span class="kw">$iniParameters</span><span class="ot">[</span><span class="st">&#39;site_url&#39;</span><span class="ot">]);[](</span>.html<span class="ot">)</span>
245 }
246 }
247 <span class="kw">return</span> <span class="kw">$result</span><span class="ot">;</span>
248}
249
250<span class="kw">$knownStyles</span> = findKnownStyles<span class="ot">();</span>
251copyUserStylesFrom<span class="ot">(</span>createShaarliHashFromOPMLL<span class="ot">(</span><span class="kw">SHAARLI_RSS_OPML</span><span class="ot">),</span> <span class="kw">$knownStyles</span><span class="ot">);</span>
252
253&lt;!--- <span class="ot">?</span> ----&gt;</code></pre></div>
254</body>
255</html>
diff --git a/doc/Download-CSS-styles-from-an-OPML-list.md b/doc/Download-CSS-styles-from-an-OPML-list.md
deleted file mode 100644
index eb66f955..00000000
--- a/doc/Download-CSS-styles-from-an-OPML-list.md
+++ /dev/null
@@ -1,155 +0,0 @@
1#Download CSS styles from an OPML list
2###Download CSS styles for shaarlis listed in an opml file
3Example php script:
4
5```php
6<!---- ?php -->
7<!---- Copyright (c) 2014 Nicolas Delsaux (https://github.com/Riduidel) -->
8<!---- License: zlib (http://www.gzip.org/zlib/zlib_license.html) -->
9
10/**
11 * Source: https://github.com/Riduidel
12 * Download css styles for shaarlis listed in an opml file
13 */
14define("SHAARLI_RSS_OPML", "https://www.ecirtam.net/shaarlirss/custom/people.opml");
15
16define("THEMES_TEMP_FOLDER", "new_themes");
17
18if(!file_exists(THEMES_TEMP_FOLDER)) {
19 mkdir(THEMES_TEMP_FOLDER);
20}
21
22function siteUrl($pathInSite) {
23 $indexPos = strpos($pathInSite, "index.php");
24 if(!$indexPos) {
25 return $pathInSite;
26 } else {
27 return substr($pathInSite, 0, $indexPos);
28 }
29}
30
31function createShaarliHashFromOPMLL($opmlFile) {
32 $result = array();
33 $opml = file_get_contents($opmlFile);
34 $opmlXml = simplexml_load_string($opml);
35 $outlineElements = $opmlXml->xpath("body/outline");
36 foreach($outlineElements as $site) {
37 $siteUrl = siteUrl((string) $site['htmlUrl']);[](.html)
38 $result[$siteUrl]=((string) $site['text']);[](.html)
39 }
40 return $result;
41}
42
43function getSiteFolder($url) {
44 $domain = parse_url($url, PHP_URL_HOST);
45 return THEMES_TEMP_FOLDER."/".str_replace(".", "_", $domain);
46}
47
48function get_http_response_code($theURL) {
49 $headers = get_headers($theURL);
50 return substr($headers[0], 9, 3);[](.html)
51}
52
53/**
54 * This makes the code PHP-5 only (particularly the call to "get_headers")
55 */
56function copyUserStyleFrom($url, $name, $knownStyles) {
57 $userStyle = $url."inc/user.css";
58 if(in_array($url, $knownStyles)) {
59 // TODO add log message
60 } else {
61 $statusCode = get_http_response_code($userStyle);
62 if(intval($statusCode)<300) {
63 $styleSheet = file_get_contents($userStyle);
64 $siteFolder = getSiteFolder($url);
65 if(!file_exists($siteFolder)) {
66 mkdir($siteFolder);
67 }
68 if(!file_exists($siteFolder.'/user.css')) {
69 // Copy stylesheet
70 file_put_contents($siteFolder.'/user.css', $styleSheet);
71 }
72 if(!file_exists($siteFolder.'/README.md')) {
73 // Then write a readme.md file
74 file_put_contents($siteFolder.'/README.md',
75 "User style from ".$name."\n"
76 ."============================="
77 ."\n\n"
78 ."This stylesheet was downloaded from ".$userStyle." on ".date(DATE_RFC822)
79 );
80 }
81 if(!file_exists($siteFolder.'/config.ini')) {
82 // Write a config file containing useful informations
83 file_put_contents($siteFolder.'/config.ini',
84 "site_url=".$url."\n"
85 ."site_name=".$name."\n"
86 );
87 }
88 if(!file_exists($siteFolder.'/home.png')) {
89 // And finally copy generated thumbnail
90 $homeThumb = $siteFolder.'/home.png';
91 file_put_contents($siteFolder.'/home.png', file_get_contents(getThumbnailUrl($url)));
92 }
93 echo 'Theme have been downloaded from <a href="'.$url.'">'.$url.'</a> into '.$siteFolder
94 .'. It looks like <img src="'.$homeThumb.'"><br/>';
95 }
96 }
97}
98
99function getThumbnailUrl($url) {
100 return 'http://api.webthumbnail.org/?url='.$url;
101}
102
103function copyUserStylesFrom($urlToNames, $knownStyles) {
104 foreach($urlToNames as $url => $name) {
105 copyUserStyleFrom($url, $name, $knownStyles);
106 }
107}
108
109/**
110 * Reading directory list, courtesy of http://www.laughing-buddha.net/php/dirlist/
111 * @param directory the directory we want to list files of
112 * @return a simple array containing the list of absolute file paths. Notice that current file (".") and parent one("..")
113 * are not listed here
114 */
115function getDirectoryList ($directory) {
116 $realPath = realpath($directory);
117 // create an array to hold directory list
118 $results = array();
119 // create a handler for the directory
120 $handler = opendir($directory);
121 // open directory and walk through the filenames
122 while ($file = readdir($handler)) {
123 // if file isn't this directory or its parent, add it to the results
124 if ($file != "." && $file != "..") {
125 $results[ = realpath($realPath . "/" . $file);](-=-realpath($realPath-.-"/"-.-$file);.html)
126 }
127 }
128 // tidy up: close the handler
129 closedir($handler);
130 // done!
131 return $results;
132}
133
134/**
135 * Start in themes folder and look in all subfolders for config.ini files.
136 * These config.ini files allow us not to download styles again and again
137 */
138function findKnownStyles() {
139 $result = array();
140 $subFolders = getDirectoryList("themes");
141 foreach($subFolders as $folder) {
142 $configFile = $folder."/config.ini";
143 if(file_exists($configFile)) {
144 $iniParameters = parse_ini_file($configFile);
145 array_push($result, $iniParameters['site_url']);[](.html)
146 }
147 }
148 return $result;
149}
150
151$knownStyles = findKnownStyles();
152copyUserStylesFrom(createShaarliHashFromOPMLL(SHAARLI_RSS_OPML), $knownStyles);
153
154<!--- ? ---->
155```
diff --git a/doc/Download-and-Installation.html b/doc/Download-and-Installation.html
deleted file mode 100644
index b9cac360..00000000
--- a/doc/Download-and-Installation.html
+++ /dev/null
@@ -1,170 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Download and Installation</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="download-and-installation">Download and Installation</h1>
103<h1 id="get-shaarli">Get Shaarli!</h1>
104<p>To install Shaarli, simply place the files in a directory under your webserver's Document Root (or directly at the document root). Make sure your <a href="Server-requirements">server</a> is properly <a href="Server-configuration">configured</a>.<a href=".html"></a></p>
105<p>Several releases are available:</p>
106<hr />
107<h2 id="latest-release-recommended">Latest release (recommended)</h2>
108<h3 id="download-as-an-archive">Download as an archive</h3>
109<p>Get the latest released version from the <a href="https://github.com/shaarli/Shaarli/releases">releases</a> page.<a href=".html"></a></p>
110<p><strong>Download our <em>shaarli-full</em> archive</strong> to include dependencies.</p>
111<p>The current latest released version is <code>v0.8.0</code></p>
112<p>Or in command lines:</p>
113<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">wget</span> https://github.com/shaarli/Shaarli/releases/download/v0.8.0/shaarli-v0.8.0-full.zip
114$ <span class="fu">unzip</span> shaarli-v0.8.0-full.zip
115$ <span class="fu">mv</span> Shaarli /path/to/shaarli/</code></pre></div>
116<table style="width:46%;">
117<colgroup>
118<col style="width: 8%" />
119<col style="width: 37%" />
120</colgroup>
121<thead>
122<tr class="header">
123<th>!</th>
124<th>In most cases, download Shaarli from the <a href="https://github.com/shaarli/Shaarli/releases">releases</a> page. Cloning using <code>git</code> or downloading Github branches as zip files requires additional steps (see below).</th>
125</tr>
126</thead>
127<tbody>
128</tbody>
129</table>
130<h3 id="using-git">Using git</h3>
131<pre><code>mkdir -p /path/to/shaarli &amp;&amp; cd /path/to/shaarli/
132git clone -b v0.8.0 https://github.com/shaarli/Shaarli.git .
133composer update --no-dev</code></pre>
134<hr />
135<h2 id="stable-version">Stable version</h2>
136<p>The stable version has been experienced by Shaarli users, and will receive security updates.</p>
137<h3 id="download-as-an-archive-1">Download as an archive</h3>
138<p>As a .zip archive:</p>
139<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">wget</span> https://github.com/shaarli/Shaarli/archive/stable.zip
140$ <span class="fu">unzip</span> stable.zip
141$ <span class="fu">mv</span> Shaarli-stable /path/to/shaarli/</code></pre></div>
142<p>As a .tar.gz archive :</p>
143<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">wget</span> https://github.com/shaarli/Shaarli/archive/stable.tar.gz
144$ <span class="fu">tar</span> xvf stable.tar.gz
145$ <span class="fu">mv</span> Shaarli-stable /path/to/shaarli/</code></pre></div>
146<h3 id="clone-with-git">Clone with Git</h3>
147<p><a href="https://getcomposer.org/">Composer</a> is required to build a functional Shaarli installation when pulling from git.<a href=".html"></a></p>
148<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">git</span> clone https://github.com/shaarli/Shaarli.git -b stable /path/to/shaarli/
149<span class="co"># install/update third-party dependencies</span>
150$ <span class="bu">cd</span> /path/to/shaarli/
151$ <span class="ex">composer</span> update --no-dev</code></pre></div>
152<hr />
153<h2 id="development-version-mainline">Development version (mainline)</h2>
154<p><em>Use at your own risk!</em></p>
155<p>To get the latest changes from the <code>master</code> branch:</p>
156<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co"># clone the repository </span>
157$ <span class="fu">git</span> clone https://github.com/shaarli/Shaarli.git master /path/to/shaarli/
158<span class="co"># install/update third-party dependencies</span>
159$ <span class="bu">cd</span> /path/to/shaarli
160$ <span class="ex">composer</span> update --no-dev</code></pre></div>
161<hr />
162<h2 id="finish-installation">Finish Installation</h2>
163<p>Once Shaarli is downloaded and files have been placed at the correct location, open it this location your favorite browser.</p>
164<p><img src="http://i.imgur.com/wuMpDSN.png" alt="install screenshot" /><a href=".html"></a></p>
165<p>Setup your Shaarli installation, and it's ready to use!</p>
166<hr />
167<h2 id="updating-shaarli">Updating Shaarli</h2>
168<p>See <a href="Upgrade-and-migration">Upgrade and Migration</a><a href=".html"></a></p>
169</body>
170</html>
diff --git a/doc/Download-and-Installation.md b/doc/Download-and-Installation.md
deleted file mode 100644
index 32df8984..00000000
--- a/doc/Download-and-Installation.md
+++ /dev/null
@@ -1,102 +0,0 @@
1#Download and Installation
2# Get Shaarli!
3
4To install Shaarli, simply place the files in a directory under your webserver's Document Root (or directly at the document root). Make sure your [server](Server-requirements) is properly [configured](Server-configuration).[](.html)
5
6Several releases are available:
7
8--------------------------------------------------------
9
10## Latest release (recommended)
11### Download as an archive
12Get the latest released version from the [releases](https://github.com/shaarli/Shaarli/releases) page.[](.html)
13
14**Download our *shaarli-full* archive** to include dependencies.
15
16The current latest released version is `v0.8.0`
17
18Or in command lines:
19
20```bash
21$ wget https://github.com/shaarli/Shaarli/releases/download/v0.8.0/shaarli-v0.8.0-full.zip
22$ unzip shaarli-v0.8.0-full.zip
23$ mv Shaarli /path/to/shaarli/
24```
25
26| ! |In most cases, download Shaarli from the [releases](https://github.com/shaarli/Shaarli/releases) page. Cloning using `git` or downloading Github branches as zip files requires additional steps (see below).|[](.html)
27|-----|--------------------------|
28
29### Using git
30
31```
32mkdir -p /path/to/shaarli && cd /path/to/shaarli/
33git clone -b v0.8.0 https://github.com/shaarli/Shaarli.git .
34composer update --no-dev
35```
36
37--------------------------------------------------------
38
39## Stable version
40
41The stable version has been experienced by Shaarli users, and will receive security updates.
42
43### Download as an archive
44
45As a .zip archive:
46
47```bash
48$ wget https://github.com/shaarli/Shaarli/archive/stable.zip
49$ unzip stable.zip
50$ mv Shaarli-stable /path/to/shaarli/
51```
52
53As a .tar.gz archive :
54
55```bash
56$ wget https://github.com/shaarli/Shaarli/archive/stable.tar.gz
57$ tar xvf stable.tar.gz
58$ mv Shaarli-stable /path/to/shaarli/
59```
60
61### Clone with Git
62
63[Composer](https://getcomposer.org/) is required to build a functional Shaarli installation when pulling from git.[](.html)
64
65```bash
66$ git clone https://github.com/shaarli/Shaarli.git -b stable /path/to/shaarli/
67# install/update third-party dependencies
68$ cd /path/to/shaarli/
69$ composer update --no-dev
70```
71
72--------------------------------------------------------
73
74## Development version (mainline)
75
76_Use at your own risk!_
77
78To get the latest changes from the `master` branch:
79
80```bash
81# clone the repository
82$ git clone https://github.com/shaarli/Shaarli.git master /path/to/shaarli/
83# install/update third-party dependencies
84$ cd /path/to/shaarli
85$ composer update --no-dev
86```
87
88--------------------------------------------------------
89
90## Finish Installation
91
92Once Shaarli is downloaded and files have been placed at the correct location, open it this location your favorite browser.
93
94![install screenshot](http://i.imgur.com/wuMpDSN.png)[](.html)
95
96Setup your Shaarli installation, and it's ready to use!
97
98--------------------------------------------------------
99
100## Updating Shaarli
101
102See [Upgrade and Migration](Upgrade-and-migration)[](.html)
diff --git a/doc/Example-patch---add-new-via-field-for-links.html b/doc/Example-patch---add-new-via-field-for-links.html
deleted file mode 100644
index 133224e2..00000000
--- a/doc/Example-patch---add-new-via-field-for-links.html
+++ /dev/null
@@ -1,252 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Example patch add new via field for links</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="example-patch-add-new-via-field-for-links">Example patch add new via field for links</h1>
66<p>Example patch to add a new field (&quot;via&quot;) for links, an input field to set the &quot;via&quot; property from the &quot;edit link&quot; dialog, and display the &quot;via&quot; field in the link list display. <strong>Untested, use at your own risk</strong></p>
67<p>Thanks to @Knah-Tsaeb in <a href="https://github.com/sebsauvage/Shaarli/pull/158" class="uri">https://github.com/sebsauvage/Shaarli/pull/158</a></p>
68<pre><code>From e0f363c18e8fe67990ed2bb1a08652e24e70bbcb Mon Sep 17 00:00:00 2001
69From: Knah Tsaeb &lt;knah-tsaeb@knah-tsaeb.org&gt;
70Date: Fri, 11 Oct 2013 15:18:37 +0200
71Subject: [PATCH] Add a &quot;via&quot;/origin property for links, add new input in &quot;edit link&quot; dialog[](.html)
72Thanks to:
73* https://github.com/Knah-Tsaeb/Shaarli/commit/040eb18ec8cdabd5ea855e108f81f97fbf0478c4
74* https://github.com/Knah-Tsaeb/Shaarli/commit/4123658eae44d7564d1128ce52ddd5689efee813
75* https://github.com/Knah-Tsaeb/Shaarli/commit/f1a8ca9cc8fe49b119d51b2d8382cc1a34542f96
76
77---
78 index.php | 43 ++++++++++++++++++++++++++++++++-----------
79 tpl/editlink.html | 1 +
80 tpl/linklist.html | 1 +
81 3 files changed, 34 insertions(+), 11 deletions(-)
82
83diff --git a/index.php b/index.php
84index 6fae2f8..53f798e 100644
85--- a/index.php
86+++ b/index.php
87@@ -436,6 +436,12 @@ if (isset($_POST[&#39;login&#39;]))[](.html)
88 // ------------------------------------------------------------------------------------------
89 // Misc utility functions:
90
91+// Try to get just domain for @via
92+function getJustDomain($url){
93+ $parts = parse_url($url);
94+ return trim($parts[&#39;host&#39;]);[](.html)
95+ }
96+
97 // Returns the server URL (including port and http/https), without path.
98 // e.g. &quot;http://myserver.com:8080&quot;
99 // You can append $_SERVER[&#39;SCRIPT_NAME&#39;] to get the current script URL.[](.html)
100@@ -799,7 +805,8 @@ class linkdb implements Iterator, Countable, ArrayAccess
101 $found= (strpos(strtolower($l[&#39;title&#39;]),$s)!==false)[](.html)
102 || (strpos(strtolower($l[&#39;description&#39;]),$s)!==false)[](.html)
103 || (strpos(strtolower($l[&#39;url&#39;]),$s)!==false)[](.html)
104- || (strpos(strtolower($l[&#39;tags&#39;]),$s)!==false);[](.html)
105+ || (strpos(strtolower($l[&#39;tags&#39;]),$s)!==false)[](.html)
106+ || (!empty($l[&#39;via&#39;]) &amp;&amp; (strpos(strtolower($l[&#39;via&#39;]),$s)!==false));[](.html)
107 if ($found) $filtered[$l[&#39;linkdate&#39;[ = $l;](-=-$l;.html)
108 }
109 krsort($filtered);
110@@ -814,7 +821,7 @@ class linkdb implements Iterator, Countable, ArrayAccess
111 $t = str_replace(&#39;,&#39;,&#39; &#39;,($casesensitive?$tags:strtolower($tags)));
112 $searchtags=explode(&#39; &#39;,$t);
113 $filtered=array();
114- foreach($this-&gt;links as $l)
115+ foreach($this-&gt; links as $l)
116 {
117 $linktags = explode(&#39; &#39;,($casesensitive?$l[&#39;tags&#39;]:strtolower($l[&#39;tags&#39;])));[](.html)
118 if (count(array_intersect($linktags,$searchtags)) == count($searchtags))
119@@ -905,7 +912,7 @@ function showRSS()
120 else $linksToDisplay = $LINKSDB;
121 $nblinksToDisplay = 50; // Number of links to display.
122 if (!empty($_GET[&#39;nb&#39;])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links.[](.html)
123- {
124+ {
125 $nblinksToDisplay = $_GET[&#39;nb&#39;]==&#39;all&#39; ? count($linksToDisplay) : max($_GET[&#39;nb&#39;]+0,1) ;[](.html)
126 }
127
128@@ -944,7 +951,12 @@ function showRSS()
129 // If user wants permalinks first, put the final link in description
130 if ($usepermalinks===true) $descriptionlink = &#39;(&lt;a href=&quot;&#39;.$absurl.&#39;&quot;&gt;Link&lt;/a&gt;)&#39;;
131 if (strlen($link[&#39;description&#39;])&gt;0) $descriptionlink = &#39;&lt;br&gt;&#39;.$descriptionlink;[](.html)
132- echo &#39;&lt;description&gt;&lt;![CDATA[&#39;.nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link[&#39;description&#39;])))).$descriptionlink.&#39;[&gt;&lt;/description&gt;&#39;.&quot;\n&lt;/item&gt;\n&quot;;](&gt;&lt;/description&gt;&#39;.&quot;\n&lt;/item&gt;\n&quot;;.html)
133+ if(!empty($link[&#39;via&#39;])){[](.html)
134+ $via = &#39;&lt;br&gt;Origine =&gt; &lt;a href=&quot;&#39;.htmlspecialchars($link[&#39;via&#39;]).&#39;&quot;&gt;&#39;.htmlspecialchars(getJustDomain($link[&#39;via&#39;])).&#39;&lt;/a&gt;&#39;;[](.html)
135+ } else {
136+ $via = &#39;&#39;;
137+ }
138+ echo &#39;&lt;description&gt;&lt;![CDATA[&#39;.nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link[&#39;description&#39;])))).$via.$descriptionlink.&#39;[&gt;&lt;/description&gt;&#39;.&quot;\n&lt;/item&gt;\n&quot;;](&gt;&lt;/description&gt;&#39;.&quot;\n&lt;/item&gt;\n&quot;;.html)
139 $i++;
140 }
141 echo &#39;&lt;/channel&gt;&lt;/rss&gt;&lt;!-- Cached version of &#39;.htmlspecialchars(pageUrl()).&#39; --&gt;&#39;;
142@@ -980,7 +992,7 @@ function showATOM()
143 else $linksToDisplay = $LINKSDB;
144 $nblinksToDisplay = 50; // Number of links to display.
145 if (!empty($_GET[&#39;nb&#39;])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links.[](.html)
146- {
147+ {
148 $nblinksToDisplay = $_GET[&#39;nb&#39;]==&#39;all&#39; ? count($linksToDisplay) : max($_GET[&#39;nb&#39;]+0,1) ;[](.html)
149 }
150
151@@ -1006,11 +1018,16 @@ function showATOM()
152
153 // Add permalink in description
154 $descriptionlink = htmlspecialchars(&#39;(&lt;a href=&quot;&#39;.$guid.&#39;&quot;&gt;Permalink&lt;/a&gt;)&#39;);
155+ if(isset($link[&#39;via&#39;]) &amp;&amp; !empty($link[&#39;via&#39;])){[](.html)
156+ $via = htmlspecialchars(&#39;&lt;/br&gt; Origine =&gt; &lt;a href=&quot;&#39;.$link[&#39;via&#39;].&#39;&quot;&gt;&#39;.getJustDomain($link[&#39;via&#39;]).&#39;&lt;/a&gt;&#39;);[](.html)
157+ } else {
158+ $via = &#39;&#39;;
159+ }
160 // If user wants permalinks first, put the final link in description
161 if ($usepermalinks===true) $descriptionlink = htmlspecialchars(&#39;(&lt;a href=&quot;&#39;.$absurl.&#39;&quot;&gt;Link&lt;/a&gt;)&#39;);
162 if (strlen($link[&#39;description&#39;])&gt;0) $descriptionlink = &#39;&amp;lt;br&amp;gt;&#39;.$descriptionlink;[](.html)
163
164- $entries.=&#39;&lt;content type=&quot;html&quot;&gt;&#39;.htmlspecialchars(nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link[&#39;description&#39;]))))).$descriptionlink.&quot;&lt;/content&gt;\n&quot;;[](.html)
165+ $entries.=&#39;&lt;content type=&quot;html&quot;&gt;&#39;.htmlspecialchars(nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link[&#39;description&#39;]))))).$descriptionlink.$via.&quot;&lt;/content&gt;\n&quot;;[](.html)
166 if ($link[&#39;tags&#39;]!=&#39;&#39;) // Adding tags to each ATOM entry (as mentioned in ATOM specification)[](.html)
167 {
168 foreach(explode(&#39; &#39;,$link[&#39;tags&#39;]) as $tag)[](.html)
169@@ -1478,7 +1495,7 @@ function renderPage()
170 if (!startsWith($url,&#39;http:&#39;) &amp;&amp; !startsWith($url,&#39;https:&#39;) &amp;&amp; !startsWith($url,&#39;ftp:&#39;) &amp;&amp; !startsWith($url,&#39;magnet:&#39;) &amp;&amp; !startsWith($url,&#39;?&#39;))
171 $url = &#39;http://&#39;.$url;
172 $link = array(&#39;title&#39;=&gt;trim($_POST[&#39;lf_title&#39;]),&#39;url&#39;=&gt;$url,&#39;description&#39;=&gt;trim($_POST[&#39;lf_description&#39;]),&#39;private&#39;=&gt;(isset($_POST[&#39;lf_private&#39;]) ? 1 : 0),[](.html)
173- &#39;linkdate&#39;=&gt;$linkdate,&#39;tags&#39;=&gt;str_replace(&#39;,&#39;,&#39; &#39;,$tags));
174+ &#39;linkdate&#39;=&gt;$linkdate,&#39;tags&#39;=&gt;str_replace(&#39;,&#39;,&#39; &#39;,$tags), &#39;via&#39;=&gt;trim($_POST[&#39;lf_via&#39;]));[](.html)
175 if ($link[&#39;title&#39;]==&#39;&#39;) $link[&#39;title&#39;]=$link[&#39;url&#39;]; // If title is empty, use the URL as title.[](.html)
176 $LINKSDB[$linkdate] = $link;[](.html)
177 $LINKSDB-&gt;savedb(); // Save to disk.
178@@ -1556,7 +1573,8 @@ function renderPage()
179 $title = (empty($_GET[&#39;title&#39;]) ? &#39;&#39; : $_GET[&#39;title&#39;] ); // Get title if it was provided in URL (by the bookmarklet).[](.html)
180 $description = (empty($_GET[&#39;description&#39;]) ? &#39;&#39; : $_GET[&#39;description&#39;]); // Get description if it was provided in URL (by the bookmarklet). [Bronco added that][](.html)
181 $tags = (empty($_GET[&#39;tags&#39;]) ? &#39;&#39; : $_GET[&#39;tags&#39;] ); // Get tags if it was provided in URL[](.html)
182- $private = (!empty($_GET[&#39;private&#39;]) &amp;&amp; $_GET[&#39;private&#39;] === &quot;1&quot; ? 1 : 0); // Get private if it was provided in URL [](.html)
183+ $via = (empty($_GET[&#39;via&#39;]) ? &#39;&#39; : $_GET[&#39;via&#39;] );[](.html)
184+ $private = (!empty($_GET[&#39;private&#39;]) &amp;&amp; $_GET[&#39;private&#39;] === &quot;1&quot; ? 1 : 0); // Get private if it was provided in URL[](.html)
185 if (($url!=&#39;&#39;) &amp;&amp; parse_url($url,PHP_URL_SCHEME)==&#39;&#39;) $url = &#39;http://&#39;.$url;
186 // If this is an HTTP link, we try go get the page to extract the title (otherwise we will to straight to the edit form.)
187 if (empty($title) &amp;&amp; parse_url($url,PHP_URL_SCHEME)==&#39;http&#39;)
188@@ -1567,7 +1585,7 @@ function renderPage()
189 {
190 // Look for charset in html header.
191 preg_match(&#39;#&lt;meta .*charset=.*&gt;#Usi&#39;, $data, $meta);
192-
193+
194 // If found, extract encoding.
195 if (!empty($meta[0]))[](.html)
196 {
197@@ -1577,7 +1595,7 @@ function renderPage()
198 $html_charset = (!empty($enc[1])) ? strtolower($enc[1]) : &#39;utf-8&#39;;[](.html)
199 }
200 else { $html_charset = &#39;utf-8&#39;; }
201-
202+
203 // Extract title
204 $title = html_extract_title($data);
205 if (!empty($title))
206@@ -1592,7 +1610,7 @@ function renderPage()
207 $url=&#39;?&#39;.smallHash($linkdate);
208 $title=&#39;Note: &#39;;
209 }
210- $link = array(&#39;linkdate&#39;=&gt;$linkdate,&#39;title&#39;=&gt;$title,&#39;url&#39;=&gt;$url,&#39;description&#39;=&gt;$description,&#39;tags&#39;=&gt;$tags,&#39;private&#39;=&gt;$private);
211+ $link = array(&#39;linkdate&#39;=&gt;$linkdate,&#39;title&#39;=&gt;$title,&#39;url&#39;=&gt;$url,&#39;description&#39;=&gt;$description,&#39;tags&#39;=&gt;$tags,&#39;via&#39; =&gt; $via,&#39;private&#39;=&gt;$private);
212 }
213
214 $PAGE = new pageBuilder;
215@@ -1842,6 +1860,9 @@ function buildLinkList($PAGE,$LINKSDB)
216 $taglist = explode(&#39; &#39;,$link[&#39;tags&#39;]);[](.html)
217 uasort($taglist, &#39;strcasecmp&#39;);
218 $link[&#39;taglist&#39;]=$taglist;[](.html)
219+ if(!empty($link[&#39;via&#39;])){[](.html)
220+ $link[&#39;via&#39;]=htmlspecialchars($link[&#39;via&#39;]);[](.html)
221+ }
222 $linkDisp[$keys[$i[ = $link;](-=-$link;.html)
223 $i++;
224 }
225diff --git a/tpl/editlink.html b/tpl/editlink.html
226index 4a2c30c..14d4f9c 100644
227--- a/tpl/editlink.html
228+++ b/tpl/editlink.html
229@@ -16,6 +16,7 @@
230 &lt;i&gt;Title&lt;/i&gt;&lt;br&gt;&lt;input type=&quot;text&quot; name=&quot;lf_title&quot; value=&quot;{$link.title|htmlspecialchars}&quot; style=&quot;width:100%&quot;&gt;&lt;br&gt;
231 &lt;i&gt;Description&lt;/i&gt;&lt;br&gt;&lt;textarea name=&quot;lf_description&quot; rows=&quot;4&quot; cols=&quot;25&quot; style=&quot;width:100%&quot;&gt;{$link.description|htmlspecialchars}&lt;/textarea&gt;&lt;br&gt;
232 &lt;i&gt;Tags&lt;/i&gt;&lt;br&gt;&lt;input type=&quot;text&quot; id=&quot;lf_tags&quot; name=&quot;lf_tags&quot; value=&quot;{$link.tags|htmlspecialchars}&quot; style=&quot;width:100%&quot;&gt;&lt;br&gt;
233+ &lt;i&gt;Origine&lt;/i&gt;&lt;br&gt;&lt;input type=&quot;text&quot; name=&quot;lf_via&quot; value=&quot;{$link.via|htmlspecialchars}&quot; style=&quot;width:100%&quot;&gt;&lt;br&gt;
234 {if condition=&quot;($link_is_new &amp;&amp; $GLOBALS[&#39;privateLinkByDefault&#39;]==true) || $link.private == true&quot;}[](.html)
235 &lt;input type=&quot;checkbox&quot; checked=&quot;checked&quot; name=&quot;lf_private&quot; id=&quot;lf_private&quot;&gt;
236 &amp;nbsp;&lt;label for=&quot;lf_private&quot;&gt;&lt;i&gt;Private&lt;/i&gt;&lt;/label&gt;&lt;br&gt;
237diff --git a/tpl/linklist.html b/tpl/linklist.html
238index ddc38cb..0a8475f 100644
239--- a/tpl/linklist.html
240+++ b/tpl/linklist.html
241@@ -43,6 +43,7 @@
242 &lt;span class=&quot;linktitle&quot;&gt;&lt;a href=&quot;{$redirector}{$value.url|htmlspecialchars}&quot;&gt;{$value.title|htmlspecialchars}&lt;/a&gt;&lt;/span&gt;
243 &lt;br&gt;
244 {if=&quot;$value.description&quot;}&lt;div class=&quot;linkdescription&quot;{if condition=&quot;$search_type==&#39;permalink&#39;&quot;} style=&quot;max-height:none !important;&quot;{/if}&gt;{$value.description}&lt;/div&gt;{/if}
245+ {if condition=&quot;isset($value.via) &amp;&amp; !empty($value.via)&quot;}&lt;div&gt;&lt;a href=&quot;{$value.via}&quot;&gt;Origine =&gt; {$value.via|getJustDomain}&lt;/a&gt;&lt;/div&gt;{/if}
246 {if=&quot;!$GLOBALS[&#39;config&#39;[&#39;HIDE_TIMESTAMPS&#39;] || isLoggedIn()&quot;}](&#39;HIDE_TIMESTAMPS&#39;]-||-isLoggedIn()&quot;}.html)
247 &lt;span class=&quot;linkdate&quot; title=&quot;Permalink&quot;&gt;&lt;a href=&quot;?{$value.linkdate|smallHash}&quot;&gt;{$value.localdate|htmlspecialchars} - permalink&lt;/a&gt; - &lt;/span&gt;
248 {else}
249--
2502.1.1</code></pre>
251</body>
252</html>
diff --git a/doc/Example-patch---add-new-via-field-for-links.md b/doc/Example-patch---add-new-via-field-for-links.md
deleted file mode 100644
index 883adf40..00000000
--- a/doc/Example-patch---add-new-via-field-for-links.md
+++ /dev/null
@@ -1,190 +0,0 @@
1#Example patch add new via field for links
2Example patch to add a new field ("via") for links, an input field to set the "via" property from the "edit link" dialog, and display the "via" field in the link list display. **Untested, use at your own risk**
3
4Thanks to @Knah-Tsaeb in https://github.com/sebsauvage/Shaarli/pull/158
5
6```
7From e0f363c18e8fe67990ed2bb1a08652e24e70bbcb Mon Sep 17 00:00:00 2001
8From: Knah Tsaeb <knah-tsaeb@knah-tsaeb.org>
9Date: Fri, 11 Oct 2013 15:18:37 +0200
10Subject: [PATCH] Add a "via"/origin property for links, add new input in "edit link" dialog[](.html)
11Thanks to:
12* https://github.com/Knah-Tsaeb/Shaarli/commit/040eb18ec8cdabd5ea855e108f81f97fbf0478c4
13* https://github.com/Knah-Tsaeb/Shaarli/commit/4123658eae44d7564d1128ce52ddd5689efee813
14* https://github.com/Knah-Tsaeb/Shaarli/commit/f1a8ca9cc8fe49b119d51b2d8382cc1a34542f96
15
16---
17 index.php | 43 ++++++++++++++++++++++++++++++++-----------
18 tpl/editlink.html | 1 +
19 tpl/linklist.html | 1 +
20 3 files changed, 34 insertions(+), 11 deletions(-)
21
22diff --git a/index.php b/index.php
23index 6fae2f8..53f798e 100644
24--- a/index.php
25+++ b/index.php
26@@ -436,6 +436,12 @@ if (isset($_POST['login']))[](.html)
27 // ------------------------------------------------------------------------------------------
28 // Misc utility functions:
29
30+// Try to get just domain for @via
31+function getJustDomain($url){
32+ $parts = parse_url($url);
33+ return trim($parts['host']);[](.html)
34+ }
35+
36 // Returns the server URL (including port and http/https), without path.
37 // e.g. "http://myserver.com:8080"
38 // You can append $_SERVER['SCRIPT_NAME'] to get the current script URL.[](.html)
39@@ -799,7 +805,8 @@ class linkdb implements Iterator, Countable, ArrayAccess
40 $found= (strpos(strtolower($l['title']),$s)!==false)[](.html)
41 || (strpos(strtolower($l['description']),$s)!==false)[](.html)
42 || (strpos(strtolower($l['url']),$s)!==false)[](.html)
43- || (strpos(strtolower($l['tags']),$s)!==false);[](.html)
44+ || (strpos(strtolower($l['tags']),$s)!==false)[](.html)
45+ || (!empty($l['via']) && (strpos(strtolower($l['via']),$s)!==false));[](.html)
46 if ($found) $filtered[$l['linkdate'[ = $l;](-=-$l;.html)
47 }
48 krsort($filtered);
49@@ -814,7 +821,7 @@ class linkdb implements Iterator, Countable, ArrayAccess
50 $t = str_replace(',',' ',($casesensitive?$tags:strtolower($tags)));
51 $searchtags=explode(' ',$t);
52 $filtered=array();
53- foreach($this->links as $l)
54+ foreach($this-> links as $l)
55 {
56 $linktags = explode(' ',($casesensitive?$l['tags']:strtolower($l['tags'])));[](.html)
57 if (count(array_intersect($linktags,$searchtags)) == count($searchtags))
58@@ -905,7 +912,7 @@ function showRSS()
59 else $linksToDisplay = $LINKSDB;
60 $nblinksToDisplay = 50; // Number of links to display.
61 if (!empty($_GET['nb'])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links.[](.html)
62- {
63+ {
64 $nblinksToDisplay = $_GET['nb']=='all' ? count($linksToDisplay) : max($_GET['nb']+0,1) ;[](.html)
65 }
66
67@@ -944,7 +951,12 @@ function showRSS()
68 // If user wants permalinks first, put the final link in description
69 if ($usepermalinks===true) $descriptionlink = '(<a href="'.$absurl.'">Link</a>)';
70 if (strlen($link['description'])>0) $descriptionlink = '<br>'.$descriptionlink;[](.html)
71- echo '<description><![CDATA['.nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description'])))).$descriptionlink.'[></description>'."\n</item>\n";](></description>'."\n</item>\n";.html)
72+ if(!empty($link['via'])){[](.html)
73+ $via = '<br>Origine => <a href="'.htmlspecialchars($link['via']).'">'.htmlspecialchars(getJustDomain($link['via'])).'</a>';[](.html)
74+ } else {
75+ $via = '';
76+ }
77+ echo '<description><![CDATA['.nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description'])))).$via.$descriptionlink.'[></description>'."\n</item>\n";](></description>'."\n</item>\n";.html)
78 $i++;
79 }
80 echo '</channel></rss><!-- Cached version of '.htmlspecialchars(pageUrl()).' -->';
81@@ -980,7 +992,7 @@ function showATOM()
82 else $linksToDisplay = $LINKSDB;
83 $nblinksToDisplay = 50; // Number of links to display.
84 if (!empty($_GET['nb'])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links.[](.html)
85- {
86+ {
87 $nblinksToDisplay = $_GET['nb']=='all' ? count($linksToDisplay) : max($_GET['nb']+0,1) ;[](.html)
88 }
89
90@@ -1006,11 +1018,16 @@ function showATOM()
91
92 // Add permalink in description
93 $descriptionlink = htmlspecialchars('(<a href="'.$guid.'">Permalink</a>)');
94+ if(isset($link['via']) && !empty($link['via'])){[](.html)
95+ $via = htmlspecialchars('</br> Origine => <a href="'.$link['via'].'">'.getJustDomain($link['via']).'</a>');[](.html)
96+ } else {
97+ $via = '';
98+ }
99 // If user wants permalinks first, put the final link in description
100 if ($usepermalinks===true) $descriptionlink = htmlspecialchars('(<a href="'.$absurl.'">Link</a>)');
101 if (strlen($link['description'])>0) $descriptionlink = '&lt;br&gt;'.$descriptionlink;[](.html)
102
103- $entries.='<content type="html">'.htmlspecialchars(nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description']))))).$descriptionlink."</content>\n";[](.html)
104+ $entries.='<content type="html">'.htmlspecialchars(nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description']))))).$descriptionlink.$via."</content>\n";[](.html)
105 if ($link['tags']!='') // Adding tags to each ATOM entry (as mentioned in ATOM specification)[](.html)
106 {
107 foreach(explode(' ',$link['tags']) as $tag)[](.html)
108@@ -1478,7 +1495,7 @@ function renderPage()
109 if (!startsWith($url,'http:') && !startsWith($url,'https:') && !startsWith($url,'ftp:') && !startsWith($url,'magnet:') && !startsWith($url,'?'))
110 $url = 'http://'.$url;
111 $link = array('title'=>trim($_POST['lf_title']),'url'=>$url,'description'=>trim($_POST['lf_description']),'private'=>(isset($_POST['lf_private']) ? 1 : 0),[](.html)
112- 'linkdate'=>$linkdate,'tags'=>str_replace(',',' ',$tags));
113+ 'linkdate'=>$linkdate,'tags'=>str_replace(',',' ',$tags), 'via'=>trim($_POST['lf_via']));[](.html)
114 if ($link['title']=='') $link['title']=$link['url']; // If title is empty, use the URL as title.[](.html)
115 $LINKSDB[$linkdate] = $link;[](.html)
116 $LINKSDB->savedb(); // Save to disk.
117@@ -1556,7 +1573,8 @@ function renderPage()
118 $title = (empty($_GET['title']) ? '' : $_GET['title'] ); // Get title if it was provided in URL (by the bookmarklet).[](.html)
119 $description = (empty($_GET['description']) ? '' : $_GET['description']); // Get description if it was provided in URL (by the bookmarklet). [Bronco added that][](.html)
120 $tags = (empty($_GET['tags']) ? '' : $_GET['tags'] ); // Get tags if it was provided in URL[](.html)
121- $private = (!empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0); // Get private if it was provided in URL [](.html)
122+ $via = (empty($_GET['via']) ? '' : $_GET['via'] );[](.html)
123+ $private = (!empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0); // Get private if it was provided in URL[](.html)
124 if (($url!='') && parse_url($url,PHP_URL_SCHEME)=='') $url = 'http://'.$url;
125 // If this is an HTTP link, we try go get the page to extract the title (otherwise we will to straight to the edit form.)
126 if (empty($title) && parse_url($url,PHP_URL_SCHEME)=='http')
127@@ -1567,7 +1585,7 @@ function renderPage()
128 {
129 // Look for charset in html header.
130 preg_match('#<meta .*charset=.*>#Usi', $data, $meta);
131-
132+
133 // If found, extract encoding.
134 if (!empty($meta[0]))[](.html)
135 {
136@@ -1577,7 +1595,7 @@ function renderPage()
137 $html_charset = (!empty($enc[1])) ? strtolower($enc[1]) : 'utf-8';[](.html)
138 }
139 else { $html_charset = 'utf-8'; }
140-
141+
142 // Extract title
143 $title = html_extract_title($data);
144 if (!empty($title))
145@@ -1592,7 +1610,7 @@ function renderPage()
146 $url='?'.smallHash($linkdate);
147 $title='Note: ';
148 }
149- $link = array('linkdate'=>$linkdate,'title'=>$title,'url'=>$url,'description'=>$description,'tags'=>$tags,'private'=>$private);
150+ $link = array('linkdate'=>$linkdate,'title'=>$title,'url'=>$url,'description'=>$description,'tags'=>$tags,'via' => $via,'private'=>$private);
151 }
152
153 $PAGE = new pageBuilder;
154@@ -1842,6 +1860,9 @@ function buildLinkList($PAGE,$LINKSDB)
155 $taglist = explode(' ',$link['tags']);[](.html)
156 uasort($taglist, 'strcasecmp');
157 $link['taglist']=$taglist;[](.html)
158+ if(!empty($link['via'])){[](.html)
159+ $link['via']=htmlspecialchars($link['via']);[](.html)
160+ }
161 $linkDisp[$keys[$i[ = $link;](-=-$link;.html)
162 $i++;
163 }
164diff --git a/tpl/editlink.html b/tpl/editlink.html
165index 4a2c30c..14d4f9c 100644
166--- a/tpl/editlink.html
167+++ b/tpl/editlink.html
168@@ -16,6 +16,7 @@
169 <i>Title</i><br><input type="text" name="lf_title" value="{$link.title|htmlspecialchars}" style="width:100%"><br>
170 <i>Description</i><br><textarea name="lf_description" rows="4" cols="25" style="width:100%">{$link.description|htmlspecialchars}</textarea><br>
171 <i>Tags</i><br><input type="text" id="lf_tags" name="lf_tags" value="{$link.tags|htmlspecialchars}" style="width:100%"><br>
172+ <i>Origine</i><br><input type="text" name="lf_via" value="{$link.via|htmlspecialchars}" style="width:100%"><br>
173 {if condition="($link_is_new && $GLOBALS['privateLinkByDefault']==true) || $link.private == true"}[](.html)
174 <input type="checkbox" checked="checked" name="lf_private" id="lf_private">
175 &nbsp;<label for="lf_private"><i>Private</i></label><br>
176diff --git a/tpl/linklist.html b/tpl/linklist.html
177index ddc38cb..0a8475f 100644
178--- a/tpl/linklist.html
179+++ b/tpl/linklist.html
180@@ -43,6 +43,7 @@
181 <span class="linktitle"><a href="{$redirector}{$value.url|htmlspecialchars}">{$value.title|htmlspecialchars}</a></span>
182 <br>
183 {if="$value.description"}<div class="linkdescription"{if condition="$search_type=='permalink'"} style="max-height:none !important;"{/if}>{$value.description}</div>{/if}
184+ {if condition="isset($value.via) && !empty($value.via)"}<div><a href="{$value.via}">Origine => {$value.via|getJustDomain}</a></div>{/if}
185 {if="!$GLOBALS['config'['HIDE_TIMESTAMPS'] || isLoggedIn()"}]('HIDE_TIMESTAMPS']-||-isLoggedIn()"}.html)
186 <span class="linkdate" title="Permalink"><a href="?{$value.linkdate|smallHash}">{$value.localdate|htmlspecialchars} - permalink</a> - </span>
187 {else}
188--
1892.1.1
190```
diff --git a/doc/FAQ.html b/doc/FAQ.html
deleted file mode 100644
index 61f3475f..00000000
--- a/doc/FAQ.html
+++ /dev/null
@@ -1,105 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – FAQ</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="faq">FAQ</h1>
66<h3 id="why-did-you-create-shaarli">Why did you create Shaarli ?</h3>
67<p>I was a StumbleUpon user. Then I got fed up with they big toolbar. I switched to delicious, which was lighter, faster and more beautiful. Until Yahoo bought it. Then the export API broke all the time, delicious became slow and was ditched by Yahoo. I switched to Diigo, which is not bad, but does too much. And Diigo is sslllooooowww and their Firefox extension a bit buggy. And… oh… <strong>their Firefox addon sends to Diigo every single URL you visit</strong> (Don't believe me ? Use <a href="https://addons.mozilla.org/en-US/firefox/addon/tamper-data/">Tamper Data</a> and open any page).<a href=".html"></a></p>
68<p>Enough is enough. Saving simple links should not be a complicated heavy thing. I ditched them all and wrote my own: Shaarli. It's simple, but it does the job and does it well. And my data is not hosted on a foreign server, but on my server.</p>
69<h3 id="why-use-shaarli-and-not-deliciousdiigo">Why use Shaarli and not Delicious/Diigo ?</h3>
70<p>With Shaarli:</p>
71<ul>
72<li>The data is yours: It's hosted on your server.</li>
73<li>Never fear of having your data locked-in.</li>
74<li>Never fear to have your data sold to third party.</li>
75<li>Your private links are not hosted on a third party server.</li>
76<li>You are not tracked by browser addons (like Diigo does)</li>
77<li>You can change the look and feel of the pages if you want.</li>
78<li>You can change the behaviour of the program.</li>
79<li>It's magnitude faster than most bookmarking services.</li>
80</ul>
81<h3 id="what-does-shaarli-mean">What does Shaarli mean?</h3>
82<p>Shaarli is for shaaring your links.</p>
83<h3 id="my-shaarli-is-broken">My Shaarli is broken!</h3>
84<p>First of all, ensure that both the <a href="Server-configuration">web server</a> and <a href="Shaarli-configuration">Shaarli</a> are correctly configured, and that your installation is <a href="Server-requirements">supported</a>.<a href=".html"></a></p>
85<p>If everything looks right but the issue(s) remain(s), please:</p>
86<ul>
87<li>take a look at the <a href="Troubleshooting">troubleshooting</a> section<a href=".html"></a></li>
88<li>come <a href="https://gitter.im/shaarli/Shaarli">chat with us</a> on Gitter, we'll be happy to help ;-)<a href=".html"></a></li>
89<li>browse active <a href="https://github.com/shaarli/Shaarli/issues">issues</a> and <a href="https://github.com/shaarli/Shaarli/pulls">Pull Requests</a><a href=".html"></a>
90<ul>
91<li>if you find one that is related to the issue, feel free to comment and provide additional details (host/Shaarli setup)</li>
92<li>else, <a href="https://github.com/shaarli/Shaarli/issues/new">open a new issue</a>, and provide information about the problem:<a href=".html"></a>
93<ul>
94<li><em>what happens?</em> - display glitches, invalid data, security flaws...</li>
95<li><em>what is your configuration?</em> - OS, server version, activated extensions, web browser...</li>
96<li><em>is it reproducible?</em></li>
97</ul></li>
98</ul></li>
99</ul>
100<h3 id="why-not-use-a-real-database-files-are-slow">Why not use a real database? Files are slow!</h3>
101<p>Does browsing <a href="http://sebsauvage.net/links/">this page</a> feel slow? Try browsing older pages, too.<a href=".html"></a></p>
102<p>It's not slow at all, is it? And don't forget the database contains more than 16000 links, and it's on a shared host, with 32000 visitors/day for my website alone. And it's still damn fast. Why?</p>
103<p>The data file is only 3.7 Mb. It's read 99% of the time, and is probably already in the operation system disk cache. So generating a page involves no I/O at all most of the time.</p>
104</body>
105</html>
diff --git a/doc/Firefox-share.html b/doc/Firefox-share.html
deleted file mode 100644
index d7dcc282..00000000
--- a/doc/Firefox-share.html
+++ /dev/null
@@ -1,93 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Firefox share</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="firefox-share">Firefox share</h1>
66<h3 id="add-shaarli-as-a-sharing-service-to-firefox">Add Shaarli as a sharing service to Firefox</h3>
67<ul>
68<li>Open your Shaarli and <code>Login</code></li>
69<li>Click the <code>Tools</code> button in the top bar</li>
70<li>Click the <code>✚Add to Firefox social</code> button and accept the activation.</li>
71</ul>
72<h3 id="sharing-links-using-firefox-share">Sharing links using Firefox share</h3>
73<ul>
74<li>Add the sharing service as described above</li>
75<li>When you are visiting a webpage you would like to share with Shaarli, click the Firefox <em>Share</em> button <a href="images/firefoxshare.png.html">images/firefoxshare.png</a></li>
76<li>You can edit your link before and after saving, just like the bookmarklet above.</li>
77</ul>
78<table style="width:100%;">
79<colgroup>
80<col style="width: 8%" />
81<col style="width: 91%" />
82</colgroup>
83<thead>
84<tr class="header">
85<th></th>
86<th>Your Shaarli instance must be hosted on an HTTPS (SSL/TLS secure connection) enabled server for Firefox Share to work. Firefox Share will not work over plain HTTP connections.</th>
87</tr>
88</thead>
89<tbody>
90</tbody>
91</table>
92</body>
93</html>
diff --git a/doc/Firefox-share.md b/doc/Firefox-share.md
deleted file mode 100644
index 58adc58f..00000000
--- a/doc/Firefox-share.md
+++ /dev/null
@@ -1,16 +0,0 @@
1#Firefox share
2### Add Shaarli as a sharing service to Firefox
3
4 * Open your Shaarli and `Login`
5 * Click the `Tools` button in the top bar
6 * Click the `✚Add to Firefox social` button and accept the activation.
7
8
9### Sharing links using Firefox share
10
11 * Add the sharing service as described above
12 * When you are visiting a webpage you would like to share with Shaarli, click the Firefox _Share_ button [images/firefoxshare.png](images/firefoxshare.png.html)
13 * You can edit your link before and after saving, just like the bookmarklet above.
14
15|  | Your Shaarli instance must be hosted on an HTTPS (SSL/TLS secure connection) enabled server for Firefox Share to work. Firefox Share will not work over plain HTTP connections. |
16|------|-------------------------------------------------------------------------------|
diff --git a/doc/GnuPG-signature.html b/doc/GnuPG-signature.html
deleted file mode 100644
index 50b904d5..00000000
--- a/doc/GnuPG-signature.html
+++ /dev/null
@@ -1,173 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – GnuPG signature</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="gnupg-signature">GnuPG signature</h1>
103<h2 id="introduction">Introduction</h2>
104<h3 id="pgp-and-gpg">PGP and GPG</h3>
105<p><a href="https://gnupg.org/">Gnu Privacy Guard</a> (GnuPG) is an Open Source implementation of the <a href="https://en.wikipedia.org/wiki/Pretty_Good_Privacy#OpenPGP">Pretty Good [](.html)<br />
106Privacy</a> (OpenPGP) specification. Its main purposes are digital authentication,<br />
107signature and encryption.</p>
108<p>It is often used by the <a href="https://en.wikipedia.org/wiki/Free_and_open-source_software">FLOSS</a> community to verify:<a href=".html"></a></p>
109<ul>
110<li>Linux package signatures: Debian <a href="https://wiki.debian.org/SecureApt">SecureApt</a>, ArchLinux <a href="https://www.archlinux.org/master-keys/">Master [](.html)<br />
111Keys</a></li>
112<li><a href="https://en.wikipedia.org/wiki/Revision_control">SCM</a> releases &amp; maintainer identity<a href=".html"></a></li>
113</ul>
114<h3 id="trust">Trust</h3>
115<p>To quote Phil Pennock (the author of the <a href="https://bitbucket.org/skskeyserver/sks-keyserver/wiki/Home">SKS</a> key server - <a href="http://sks.spodhuis.org/" class="uri">http://sks.spodhuis.org/</a>):<a href=".html"></a></p>
116<blockquote>
117<p>You MUST understand that presence of data in the keyserver (pools) in no way connotes trust. Anyone can generate a key, with any name or email address, and upload it. All security and trust comes from evaluating security at the “object level”, via PGP Web-Of-Trust signatures. This keyserver makes it possible to retrieve keys, looking them up via various indices, but the collection of keys in this public pool is KNOWN to contain malicious and fraudulent keys. It is the common expectation of server operators that users understand this and use software which, like all known common OpenPGP implementations, evaluates trust accordingly. This expectation is so common that it is not normally explicitly stated.</p>
118</blockquote>
119<p>Trust can be gained by having your key signed by other people (and signing their key back, too :) ), for instance during <a href="https://en.wikipedia.org/wiki/Key_signing_party">key signing parties</a>, see:<a href=".html"></a></p>
120<ul>
121<li><a href="http://www.cryptnet.net/fdp/crypto/keysigning_party/en/keysigning_party.html">The Keysigning party HOWTO</a><a href=".html"></a></li>
122<li><a href="https://en.wikipedia.org/wiki/Web_of_trust">Web of trust</a><a href=".html"></a></li>
123</ul>
124<h2 id="generate-a-gpg-key">Generate a GPG key</h2>
125<ul>
126<li><a href="http://stackoverflow.com/a/16725717">Generating a GPG key for Git tagging</a> (StackOverflow)<a href=".html"></a></li>
127<li><a href="https://help.github.com/articles/generating-a-gpg-key/">Generating a GPG key</a> (GitHub)<a href=".html"></a></li>
128</ul>
129<h3 id="gpg---provide-identity-information">gpg - provide identity information</h3>
130<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">gpg</span> --gen-key
131
132<span class="ex">gpg</span> (GnuPG) <span class="ex">2.1.6</span><span class="kw">;</span> <span class="ex">Copyright</span> (C) <span class="ex">2015</span> Free Software Foundation, Inc.
133<span class="ex">This</span> is free software: you are free to change and redistribute it.
134<span class="ex">There</span> is NO WARRANTY, to the extent permitted by law.
135
136<span class="ex">Note</span>: Use <span class="st">&quot;gpg2 --full-gen-key&quot;</span> for a full featured key generation dialog.
137
138<span class="ex">GnuPG</span> needs to construct a user ID to identify your key.
139
140<span class="ex">Real</span> name: Marvin the Paranoid Android
141<span class="ex">Email</span> address: marvin@h2g2.net
142<span class="ex">You</span> selected this USER-ID:
143 <span class="st">&quot;Marvin the Paranoid Android &lt;marvin@h2g2.net&gt;&quot;</span>
144
145<span class="ex">Change</span> (N)<span class="ex">ame</span>, (E)<span class="ex">mail</span>, or (O)<span class="ex">kay</span>/<span class="kw">(</span><span class="ex">Q</span><span class="kw">)</span><span class="ex">uit?</span> o
146<span class="ex">We</span> need to generate a lot of random bytes. It is a good idea to perform
147<span class="ex">some</span> other action (type on the keyboard, move the mouse, utilize the
148<span class="ex">disks</span>) <span class="ex">during</span> the prime generation<span class="kw">;</span> <span class="ex">this</span> gives the random number
149<span class="ex">generator</span> a better chance to gain enough entropy.</code></pre></div>
150<h3 id="gpg---entropy-interlude">gpg - entropy interlude</h3>
151<p>At this point, you will:</p>
152<ul>
153<li>be prompted for a secure password to protect your key (the input method will depend on your Desktop Environment and configuration)</li>
154<li>be asked to use your machine's input devices (mouse, keyboard, etc.) to generate random entropy; this step <em>may take some time</em></li>
155</ul>
156<h3 id="gpg---key-creation-confirmation">gpg - key creation confirmation</h3>
157<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="ex">gpg</span>: key A9D53A3E marked as ultimately trusted
158<span class="ex">public</span> and secret key created and signed.
159
160<span class="ex">gpg</span>: checking the trustdb
161<span class="ex">gpg</span>: 3 marginal(s) <span class="ex">needed</span>, 1 complete(s) <span class="ex">needed</span>, PGP trust model
162<span class="ex">gpg</span>: depth: 0 valid: 2 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 2u
163<span class="ex">pub</span> rsa2048/A9D53A3E 2015-07-31
164 <span class="ex">Key</span> fingerprint = AF2A 5381 E54B 2FD2 14C4 A9A3 0E35 ACA4 A9D5 3A3E
165<span class="ex">uid</span> [ultimate] Marvin the Paranoid Android <span class="op">&lt;</span>marvin@h2g2.net<span class="op">&gt;</span>[](.html)
166<span class="ex">sub</span> rsa2048/8C0EACF1 2015-07-31</code></pre></div>
167<h3 id="gpg---submit-your-public-key-to-a-pgp-server-optional">gpg - submit your public key to a PGP server (Optional)</h3>
168<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">gpg</span> --keyserver pgp.mit.edu --send-keys A9D53A3E
169<span class="ex">gpg</span>: sending key A9D53A3E to hkp server pgp.mit.edu</code></pre></div>
170<h2 id="create-and-push-a-gpg-signed-tag">Create and push a GPG-signed tag</h2>
171<p>See <a href="Release-Shaarli.html">Release Shaarli</a>.</p>
172</body>
173</html>
diff --git a/doc/Home.html b/doc/Home.html
deleted file mode 100644
index 970f547e..00000000
--- a/doc/Home.html
+++ /dev/null
@@ -1,74 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Home</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="home">Home</h1>
66<h1 id="shaarli-wiki">Shaarli wiki</h1>
67<p>Welcome to the <a href="https://github.com/shaarli/Shaarli/">Shaarli</a> wiki<embed src=".html" /></p>
68<p>Here you can find some info on how to use, configure, tweak and solve problems with your Shaarli.</p>
69<p>For general info, read the <a href="https://github.com/shaarli/Shaarli/blob/master/README.md">README</a>.<a href=".html"></a></p>
70<p>If you have any questions or ideas, please join the <a href="https://gitter.im/shaarli/Shaarli">chat</a> (also reachable via <a href="https://irc.gitter.im/">IRC</a>), post them in our <a href="https://github.com/shaarli/Shaarli/issues/308">general discussion</a> (<a href="https://github.com/shaarli/Shaarli/issues/44">archive</a>) or read the current <a href="https://github.com/shaarli/Shaarli/issues">issues</a>. If you've found a bug, please create a <a href="https://github.com/shaarli/Shaarli/issues/new">new issue</a>.<a href=".html"></a></p>
71<p>If you would like a feature added to Shaarli, check the issues labeled <a href="https://github.com/shaarli/Shaarli/labels/feature"><code>feature</code></a>, <a href="https://github.com/shaarli/Shaarli/labels/enhancement"><code>enhancement</code></a>, and <a href="https://github.com/shaarli/Shaarli/labels/plugin"><code>plugin</code></a>.<a href=".html"></a></p>
72<p><em>Note: This documentation is available online at <a href="https://github.com/shaarli/Shaarli/wiki" class="uri">https://github.com/shaarli/Shaarli/wiki</a>, and locally in the <code>doc/</code> directory of your Shaarli installation.</em></p>
73</body>
74</html>
diff --git a/doc/Home.md b/doc/Home.md
deleted file mode 100644
index 38413f24..00000000
--- a/doc/Home.md
+++ /dev/null
@@ -1,14 +0,0 @@
1#Home
2# Shaarli wiki
3
4Welcome to the [Shaarli](https://github.com/shaarli/Shaarli/) wiki![](.html)
5
6Here you can find some info on how to use, configure, tweak and solve problems with your Shaarli.
7
8For general info, read the [README](https://github.com/shaarli/Shaarli/blob/master/README.md).[](.html)
9
10If you have any questions or ideas, please join the [chat](https://gitter.im/shaarli/Shaarli) (also reachable via [IRC](https://irc.gitter.im/)), post them in our [general discussion](https://github.com/shaarli/Shaarli/issues/308) ([archive](https://github.com/shaarli/Shaarli/issues/44)) or read the current [issues](https://github.com/shaarli/Shaarli/issues). If you've found a bug, please create a [new issue](https://github.com/shaarli/Shaarli/issues/new).[](.html)
11
12If you would like a feature added to Shaarli, check the issues labeled [`feature`](https://github.com/shaarli/Shaarli/labels/feature), [`enhancement`](https://github.com/shaarli/Shaarli/labels/enhancement), and [`plugin`](https://github.com/shaarli/Shaarli/labels/plugin).[](.html)
13
14_Note: This documentation is available online at https://github.com/shaarli/Shaarli/wiki, and locally in the `doc/` directory of your Shaarli installation._
diff --git a/doc/Plugin-System.html b/doc/Plugin-System.html
deleted file mode 100644
index 655536c6..00000000
--- a/doc/Plugin-System.html
+++ /dev/null
@@ -1,541 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Plugin System</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="plugin-system">Plugin System</h1>
103<blockquote>
104<p>Note: Plugin current status - in development (not merged into master).</p>
105</blockquote>
106<p><a href="#developer-api"><strong>I am a developer.</strong> Developer API.</a><a href=".html"></a></p>
107<p><a href="#guide-for-template-designer"><strong>I am a template designer.</strong> Guide for template designer.</a><a href=".html"></a></p>
108<h2 id="developer-api">Developer API</h2>
109<h3 id="what-can-i-do-with-plugins">What can I do with plugins?</h3>
110<p>The plugin system let you:</p>
111<ul>
112<li>insert content into specific places across templates.</li>
113<li>alter data before templates rendering.</li>
114<li>alter data before saving new links.</li>
115</ul>
116<h3 id="how-can-i-create-a-plugin-for-shaarli">How can I create a plugin for Shaarli?</h3>
117<p>First, chose a plugin name, such as <code>demo_plugin</code>.</p>
118<p>Under <code>plugin</code> folder, create a folder named with your plugin name. Then create a <plugin_name>.php file in that folder.</p>
119<p>You should have the following tree view:</p>
120<pre><code>| index.php
121| plugins/
122|---| demo_plugin/
123| |---| demo_plugin.php</code></pre>
124<h3 id="understanding-hooks">Understanding hooks</h3>
125<p>A plugin is a set of functions. Each function will be triggered by the plugin system at certain point in Shaarli execution.</p>
126<p>These functions need to be named with this pattern:</p>
127<pre><code>hook_&lt;plugin_name&gt;_&lt;hook_name&gt;</code></pre>
128<p>For exemple, if my plugin want to add data to the header, this function is needed:</p>
129<pre><code>hook_demo_plugin_render_header()</code></pre>
130<p>If this function is declared, and the plugin enabled, it will be called every time Shaarli is rendering the header.</p>
131<h3 id="plugins-data">Plugin's data</h3>
132<h4 id="parameters">Parameters</h4>
133<p>Every hook function has a <code>$data</code> parameter. Its content differs for each hooks.</p>
134<p><strong>This parameter needs to be returned every time</strong>, otherwise data is lost.</p>
135<pre><code>return $data;</code></pre>
136<h4 id="filling-templates-placeholder">Filling templates placeholder</h4>
137<p>Template placeholders are displayed in template in specific places.</p>
138<p>RainTPL displays every element contained in the placeholder's array. These element can be added by plugins.</p>
139<p>For example, let's add a value in the placeholder <code>top_placeholder</code> which is displayed at the top of my page:</p>
140<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php"><span class="kw">$data</span><span class="ot">[</span><span class="st">&#39;top_placeholder&#39;</span><span class="ot">[]</span> = <span class="st">&#39;My content&#39;</span><span class="ot">;](]</span>-=-<span class="st">&#39;My-content&#39;</span><span class="ot">;</span>.html<span class="ot">)</span>
141<span class="co"># OR</span>
142<span class="fu">array_push</span><span class="ot">(</span><span class="kw">$data</span><span class="ot">[</span><span class="st">&#39;top_placeholder&#39;</span><span class="ot">],</span> <span class="st">&#39;My&#39;</span><span class="ot">,</span> <span class="st">&#39;content&#39;</span><span class="ot">);[](</span>.html<span class="ot">)</span>
143
144<span class="kw">return</span> <span class="kw">$data</span><span class="ot">;</span></code></pre></div>
145<h4 id="data-manipulation">Data manipulation</h4>
146<p>When a page is displayed, every variable send to the template engine is passed to plugins before that in <code>$data</code>.</p>
147<p>The data contained by this array can be altered before template rendering.</p>
148<p>For exemple, in linklist, it is possible to alter every title:</p>
149<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php"><span class="co">// mind the reference if you want $data to be altered</span>
150<span class="kw">foreach</span> <span class="ot">(</span><span class="kw">$data</span><span class="ot">[</span><span class="st">&#39;links&#39;</span><span class="ot">]</span> <span class="kw">as</span> &amp;<span class="kw">$value</span><span class="ot">)</span> {<span class="ot">[](</span>.html<span class="ot">)</span>
151 <span class="co">// String reverse every title.</span>
152 <span class="kw">$value</span><span class="ot">[</span><span class="st">&#39;title&#39;</span><span class="ot">]</span> = <span class="fu">strrev</span><span class="ot">(</span><span class="kw">$value</span><span class="ot">[</span><span class="st">&#39;title&#39;</span><span class="ot">]);[](</span>.html<span class="ot">)</span>
153}
154
155<span class="kw">return</span> <span class="kw">$data</span><span class="ot">;</span></code></pre></div>
156<h3 id="metadata">Metadata</h3>
157<p>Every plugin needs a <code>&lt;plugin_name&gt;.meta</code> file, which is in fact an <code>.ini</code> file (<code>KEY=&quot;VALUE&quot;</code>), to be listed in plugin administration.</p>
158<p>Each file contain two keys:</p>
159<ul>
160<li><code>description</code>: plugin description</li>
161<li><code>parameters</code>: user parameter names, separated by a <code>;</code>.</li>
162</ul>
163<blockquote>
164<p>Note: In PHP, <code>parse_ini_file()</code> seems to want strings to be between by quotes <code>&quot;</code> in the ini file.</p>
165</blockquote>
166<h3 id="its-not-working">It's not working!</h3>
167<p>Use <code>demo_plugin</code> as a functional example. It covers most of the plugin system features.</p>
168<p>If it's still not working, please <a href="https://github.com/shaarli/Shaarli/issues/new">open an issue</a>.<a href=".html"></a></p>
169<h3 id="hooks">Hooks</h3>
170<table style="width:42%;">
171<colgroup>
172<col style="width: 19%" />
173<col style="width: 22%" />
174</colgroup>
175<thead>
176<tr class="header">
177<th>Hooks</th>
178<th style="text-align: center;">Description</th>
179</tr>
180</thead>
181<tbody>
182<tr class="odd">
183<td><a href="#render_header">render_header</a></td>
184<td style="text-align: center;">Allow plugin to add content in page headers.</td>
185</tr>
186<tr class="even">
187<td><a href="#render_includes">render_includes</a></td>
188<td style="text-align: center;">Allow plugin to include their own CSS files.</td>
189</tr>
190<tr class="odd">
191<td><a href="#render_footer">render_footer</a></td>
192<td style="text-align: center;">Allow plugin to add content in page footer and include their own JS files.</td>
193</tr>
194<tr class="even">
195<td><a href="#render_linklist">render_linklist</a></td>
196<td style="text-align: center;">It allows to add content at the begining and end of the page, after every link displayed and to alter link data.</td>
197</tr>
198<tr class="odd">
199<td><a href="#render_editlink">render_editlink</a></td>
200<td style="text-align: center;">Allow to add fields in the form, or display elements.</td>
201</tr>
202<tr class="even">
203<td><a href="#render_tools">render_tools</a></td>
204<td style="text-align: center;">Allow to add content at the end of the page.</td>
205</tr>
206<tr class="odd">
207<td><a href="#render_picwall">render_picwall</a></td>
208<td style="text-align: center;">Allow to add content at the top and bottom of the page.</td>
209</tr>
210<tr class="even">
211<td><a href="#render_tagcloud">render_tagcloud</a></td>
212<td style="text-align: center;">Allow to add content at the top and bottom of the page.</td>
213</tr>
214<tr class="odd">
215<td><a href="#render_daily">render_daily</a></td>
216<td style="text-align: center;">Allow to add content at the top and bottom of the page, the bottom of each link and to alter data.</td>
217</tr>
218<tr class="even">
219<td><a href="#savelink">savelink</a></td>
220<td style="text-align: center;">Allow to alter the link being saved in the datastore.</td>
221</tr>
222</tbody>
223</table>
224<h4 id="render_header">render_header</h4>
225<p>Triggered on every page.</p>
226<p>Allow plugin to add content in page headers.</p>
227<h5 id="data">Data</h5>
228<p><code>$data</code> is an array containing:</p>
229<ul>
230<li><code>_PAGE_</code>: current target page (eg: <code>linklist</code>, <code>picwall</code>, etc.).</li>
231<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
232</ul>
233<h5 id="template-placeholders">Template placeholders</h5>
234<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
235<p>List of placeholders:</p>
236<ul>
237<li><code>buttons_toolbar</code>: after the list of buttons in the header.</li>
238</ul>
239<p><img src="http://i.imgur.com/ssJUOrt.png" alt="buttons_toolbar_example" /><a href=".html"></a></p>
240<ul>
241<li><code>fields_toolbar</code>: after search fields in the header.</li>
242</ul>
243<blockquote>
244<p>Note: This will only be called in linklist.</p>
245</blockquote>
246<p><img src="http://i.imgur.com/3GMifI2.png" alt="fields_toolbar_example" /><a href=".html"></a></p>
247<h4 id="render_includes">render_includes</h4>
248<p>Triggered on every page.</p>
249<p>Allow plugin to include their own CSS files.</p>
250<h5 id="data-1">Data</h5>
251<p><code>$data</code> is an array containing:</p>
252<ul>
253<li><code>_PAGE_</code>: current target page (eg: <code>linklist</code>, <code>picwall</code>, etc.).</li>
254<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
255</ul>
256<h5 id="template-placeholders-1">Template placeholders</h5>
257<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
258<p>List of placeholders:</p>
259<ul>
260<li><code>css_files</code>: called after loading default CSS.</li>
261</ul>
262<blockquote>
263<p>Note: only add the path of the CSS file. E.g: <code>plugins/demo_plugin/custom_demo.css</code>.</p>
264</blockquote>
265<h4 id="render_footer">render_footer</h4>
266<p>Triggered on every page.</p>
267<p>Allow plugin to add content in page footer and include their own JS files.</p>
268<h5 id="data-2">Data</h5>
269<p><code>$data</code> is an array containing:</p>
270<ul>
271<li><code>_PAGE_</code>: current target page (eg: <code>linklist</code>, <code>picwall</code>, etc.).</li>
272<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
273</ul>
274<h5 id="template-placeholders-2">Template placeholders</h5>
275<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
276<p>List of placeholders:</p>
277<ul>
278<li><code>text</code>: called after the end of the footer text.</li>
279<li><code>endofpage</code>: called at the end of the page.</li>
280</ul>
281<p><img src="http://i.imgur.com/L5S2YEH.png" alt="text_example" /><a href=".html"></a></p>
282<ul>
283<li><code>js_files</code>: called at the end of the page, to include custom JS scripts.</li>
284</ul>
285<blockquote>
286<p>Note: only add the path of the JS file. E.g: <code>plugins/demo_plugin/custom_demo.js</code>.</p>
287</blockquote>
288<h4 id="render_linklist">render_linklist</h4>
289<p>Triggered when <code>linklist</code> is displayed (list of links, permalink, search, tag filtered, etc.).</p>
290<p>It allows to add content at the begining and end of the page, after every link displayed and to alter link data.</p>
291<h5 id="data-3">Data</h5>
292<p><code>$data</code> is an array containing:</p>
293<ul>
294<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
295<li>All templates data, including links.</li>
296</ul>
297<h5 id="template-placeholders-3">Template placeholders</h5>
298<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
299<p>List of placeholders:</p>
300<ul>
301<li><code>action_plugin</code>: next to the button &quot;private only&quot; at the top and bottom of the page.</li>
302</ul>
303<p><img src="http://i.imgur.com/Q12PWg0.png" alt="action_plugin_example" /><a href=".html"></a></p>
304<ul>
305<li><code>link_plugin</code>: for every link, between permalink and link URL.</li>
306</ul>
307<p><img src="http://i.imgur.com/3oDPhWx.png" alt="link_plugin_example" /><a href=".html"></a></p>
308<ul>
309<li><code>plugin_start_zone</code>: before displaying the template content.</li>
310</ul>
311<p><img src="http://i.imgur.com/OVBkGy3.png" alt="plugin_start_zone_example" /><a href=".html"></a></p>
312<ul>
313<li><code>plugin_end_zone</code>: after displaying the template content.</li>
314</ul>
315<p><img src="http://i.imgur.com/6IoRuop.png" alt="plugin_end_zone_example" /><a href=".html"></a></p>
316<h4 id="render_editlink">render_editlink</h4>
317<p>Triggered when the link edition form is displayed.</p>
318<p>Allow to add fields in the form, or display elements.</p>
319<h5 id="data-4">Data</h5>
320<p><code>$data</code> is an array containing:</p>
321<ul>
322<li>All templates data.</li>
323</ul>
324<h5 id="template-placeholders-4">Template placeholders</h5>
325<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
326<p>List of placeholders:</p>
327<ul>
328<li><code>edit_link_plugin</code>: after tags field.</li>
329</ul>
330<p><img src="http://i.imgur.com/5u17Ens.png" alt="edit_link_plugin_example" /><a href=".html"></a></p>
331<h4 id="render_tools">render_tools</h4>
332<p>Triggered when the &quot;tools&quot; page is displayed.</p>
333<p>Allow to add content at the end of the page.</p>
334<h5 id="data-5">Data</h5>
335<p><code>$data</code> is an array containing:</p>
336<ul>
337<li>All templates data.</li>
338</ul>
339<h5 id="template-placeholders-5">Template placeholders</h5>
340<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
341<p>List of placeholders:</p>
342<ul>
343<li><code>tools_plugin</code>: at the end of the page.</li>
344</ul>
345<p><img src="http://i.imgur.com/Bqhu9oQ.png" alt="tools_plugin_example" /><a href=".html"></a></p>
346<h4 id="render_picwall">render_picwall</h4>
347<p>Triggered when picwall is displayed.</p>
348<p>Allow to add content at the top and bottom of the page.</p>
349<h5 id="data-6">Data</h5>
350<p><code>$data</code> is an array containing:</p>
351<ul>
352<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
353<li>All templates data.</li>
354</ul>
355<h5 id="template-placeholders-6">Template placeholders</h5>
356<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
357<p>List of placeholders:</p>
358<ul>
359<li><p><code>plugin_start_zone</code>: before displaying the template content.</p></li>
360<li><p><code>plugin_end_zone</code>: after displaying the template content.</p></li>
361</ul>
362<p><img src="http://i.imgur.com/tVTQFER.png" alt="plugin_start_end_zone_example" /><a href=".html"></a></p>
363<h4 id="render_tagcloud">render_tagcloud</h4>
364<p>Triggered when tagcloud is displayed.</p>
365<p>Allow to add content at the top and bottom of the page.</p>
366<h5 id="data-7">Data</h5>
367<p><code>$data</code> is an array containing:</p>
368<ul>
369<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
370<li>All templates data.</li>
371</ul>
372<h5 id="template-placeholders-7">Template placeholders</h5>
373<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
374<p>List of placeholders:</p>
375<ul>
376<li><p><code>plugin_start_zone</code>: before displaying the template content.</p></li>
377<li><p><code>plugin_end_zone</code>: after displaying the template content.</p></li>
378</ul>
379<p><img src="http://i.imgur.com/vHmyT3a.png" alt="plugin_start_end_zone_example" /><a href=".html"></a></p>
380<h4 id="render_daily">render_daily</h4>
381<p>Triggered when tagcloud is displayed.</p>
382<p>Allow to add content at the top and bottom of the page, the bottom of each link and to alter data.</p>
383<h5 id="data-8">Data</h5>
384<p><code>$data</code> is an array containing:</p>
385<ul>
386<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
387<li>All templates data, including links.</li>
388</ul>
389<h5 id="template-placeholders-8">Template placeholders</h5>
390<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
391<p>List of placeholders:</p>
392<ul>
393<li><code>link_plugin</code>: used at bottom of each link.</li>
394</ul>
395<p><img src="http://i.imgur.com/hzhMfSZ.png" alt="link_plugin_example" /><a href=".html"></a></p>
396<ul>
397<li><p><code>plugin_start_zone</code>: before displaying the template content.</p></li>
398<li><p><code>plugin_end_zone</code>: after displaying the template content.</p></li>
399</ul>
400<h4 id="savelink">savelink</h4>
401<p>Triggered when a link is save (new link or edit).</p>
402<p>Allow to alter the link being saved in the datastore.</p>
403<h5 id="data-9">Data</h5>
404<p><code>$data</code> is an array containing the link being saved:</p>
405<ul>
406<li>title</li>
407<li>url</li>
408<li>description</li>
409<li>linkdate</li>
410<li>private</li>
411<li>tags</li>
412</ul>
413<h2 id="guide-for-template-designer">Guide for template designer</h2>
414<h3 id="plugin-administration">Plugin administration</h3>
415<p>Your theme must include a plugin administration page: <code>pluginsadmin.html</code>.</p>
416<blockquote>
417<p>Note: repo's template link needs to be added when the PR is merged.</p>
418</blockquote>
419<p>Use the default one as an example.</p>
420<p>Aside from classic RainTPL loops, plugins order is handle by JavaScript. You can just include <code>plugin_admin.js</code>, only if:</p>
421<ul>
422<li>you're using a table.</li>
423<li>you call orderUp() and orderUp() onclick on arrows.</li>
424<li>you add data-line and data-order to your rows.</li>
425</ul>
426<p>Otherwise, you can use your own JS as long as this field is send by the form:</p>
427<p><input type="hidden" name="order_{$key}" value="{$counter}"></p>
428<h3 id="placeholder-system">Placeholder system</h3>
429<p>In order to make plugins work with every custom themes, you need to add variable placeholder in your templates.</p>
430<p>It's a RainTPL loop like this:</p>
431<pre><code>{loop=&quot;$plugin_variable&quot;}
432 {$value}
433{/loop}</code></pre>
434<p>You should enable <code>demo_plugin</code> for testing purpose, since it uses every placeholder available.</p>
435<h3 id="list-of-placeholders">List of placeholders</h3>
436<p><strong>page.header.html</strong></p>
437<p>At the end of the menu:</p>
438<pre><code>{loop=&quot;$plugins_header.buttons_toolbar&quot;}
439 {$value}
440{/loop}</code></pre>
441<p>At the end of file, before clearing floating blocks:</p>
442<pre><code>{if=&quot;!empty($plugin_errors) &amp;&amp; isLoggedIn()&quot;}
443 &lt;ul class=&quot;errors&quot;&gt;
444 {loop=&quot;plugin_errors&quot;}
445 &lt;li&gt;{$value}&lt;/li&gt;
446 {/loop}
447 &lt;/ul&gt;
448{/if}</code></pre>
449<p><strong>includes.html</strong></p>
450<p>At the end of the file:</p>
451<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$plugins_includes.css_files&quot;}
452<span class="kw">&lt;link</span><span class="ot"> type=</span><span class="st">&quot;text/css&quot;</span><span class="ot"> rel=</span><span class="st">&quot;stylesheet&quot;</span><span class="ot"> href=</span><span class="st">&quot;{$value}#&quot;</span><span class="kw">/&gt;</span>
453{/loop}</code></pre></div>
454<p><strong>page.footer.html</strong></p>
455<p>At the end of your footer notes:</p>
456<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$plugins_footer.text&quot;}
457 {$value}
458{/loop}</code></pre></div>
459<p>At the end of file:</p>
460<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$plugins_footer.js_files&quot;}
461 <span class="kw">&lt;script</span><span class="ot"> src=</span><span class="st">&quot;{$value}#&quot;</span><span class="kw">&gt;&lt;/script&gt;</span>
462{/loop}</code></pre></div>
463<p><strong>linklist.html</strong></p>
464<p>After search fields:</p>
465<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$plugins_header.fields_toolbar&quot;}
466 {$value}
467{/loop}</code></pre></div>
468<p>Before displaying the link list (after paging):</p>
469<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$plugin_start_zone&quot;}
470 {$value}
471{/loop}</code></pre></div>
472<p>For every links (icons):</p>
473<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$value.link_plugin&quot;}
474 <span class="kw">&lt;span&gt;</span>{$value}<span class="kw">&lt;/span&gt;</span>
475{/loop}</code></pre></div>
476<p>Before end paging:</p>
477<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$plugin_end_zone&quot;}
478 {$value}
479{/loop}</code></pre></div>
480<p><strong>linklist.paging.html</strong></p>
481<p>After the &quot;private only&quot; icon:</p>
482<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$action_plugin&quot;}
483 {$value}
484{/loop}</code></pre></div>
485<p><strong>editlink.html</strong></p>
486<p>After tags field:</p>
487<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$edit_link_plugin&quot;}
488 {$value}
489{/loop}</code></pre></div>
490<p><strong>tools.html</strong></p>
491<p>After the last tool:</p>
492<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$tools_plugin&quot;}
493 {$value}
494{/loop}</code></pre></div>
495<p><strong>picwall.html</strong></p>
496<p>Top:</p>
497<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html"><span class="kw">&lt;div</span><span class="ot"> id=</span><span class="st">&quot;plugin_zone_start_picwall&quot;</span><span class="ot"> class=</span><span class="st">&quot;plugin_zone&quot;</span><span class="kw">&gt;</span>
498 {loop=&quot;$plugin_start_zone&quot;}
499 {$value}
500 {/loop}
501<span class="kw">&lt;/div&gt;</span></code></pre></div>
502<p>Bottom:</p>
503<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html"><span class="kw">&lt;div</span><span class="ot"> id=</span><span class="st">&quot;plugin_zone_end_picwall&quot;</span><span class="ot"> class=</span><span class="st">&quot;plugin_zone&quot;</span><span class="kw">&gt;</span>
504 {loop=&quot;$plugin_end_zone&quot;}
505 {$value}
506 {/loop}
507<span class="kw">&lt;/div&gt;</span></code></pre></div>
508<p><strong>tagcloud.html</strong></p>
509<p>Top:</p>
510<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html"> <span class="kw">&lt;div</span><span class="ot"> id=</span><span class="st">&quot;plugin_zone_start_tagcloud&quot;</span><span class="ot"> class=</span><span class="st">&quot;plugin_zone&quot;</span><span class="kw">&gt;</span>
511 {loop=&quot;$plugin_start_zone&quot;}
512 {$value}
513 {/loop}
514 <span class="kw">&lt;/div&gt;</span></code></pre></div>
515<p>Bottom:</p>
516<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html"> <span class="kw">&lt;div</span><span class="ot"> id=</span><span class="st">&quot;plugin_zone_end_tagcloud&quot;</span><span class="ot"> class=</span><span class="st">&quot;plugin_zone&quot;</span><span class="kw">&gt;</span>
517 {loop=&quot;$plugin_end_zone&quot;}
518 {$value}
519 {/loop}
520 <span class="kw">&lt;/div&gt;</span></code></pre></div>
521<p><strong>daily.html</strong></p>
522<p>Top:</p>
523<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html"><span class="kw">&lt;div</span><span class="ot"> id=</span><span class="st">&quot;plugin_zone_start_picwall&quot;</span><span class="ot"> class=</span><span class="st">&quot;plugin_zone&quot;</span><span class="kw">&gt;</span>
524 {loop=&quot;$plugin_start_zone&quot;}
525 {$value}
526 {/loop}
527<span class="kw">&lt;/div&gt;</span></code></pre></div>
528<p>After every link:</p>
529<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html"><span class="kw">&lt;div</span><span class="ot"> class=</span><span class="st">&quot;dailyEntryFooter&quot;</span><span class="kw">&gt;</span>
530 {loop=&quot;$link.link_plugin&quot;}
531 {$value}
532 {/loop}
533<span class="kw">&lt;/div&gt;</span></code></pre></div>
534<p>Bottom:</p>
535<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html"><span class="kw">&lt;div</span><span class="ot"> id=</span><span class="st">&quot;plugin_zone_end_picwall&quot;</span><span class="ot"> class=</span><span class="st">&quot;plugin_zone&quot;</span><span class="kw">&gt;</span>
536 {loop=&quot;$plugin_end_zone&quot;}
537 {$value}
538 {/loop}
539<span class="kw">&lt;/div&gt;</span></code></pre></div>
540</body>
541</html>
diff --git a/doc/Plugins.html b/doc/Plugins.html
deleted file mode 100644
index 435a836f..00000000
--- a/doc/Plugins.html
+++ /dev/null
@@ -1,154 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Plugins</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="plugins">Plugins</h1>
103<h2 id="plugin-installation">Plugin installation</h2>
104<p>There is a bunch of plugins shipped with Shaarli, where there is nothing to do to install them.</p>
105<p>If you want to install a third party plugin:</p>
106<ul>
107<li>Download it.</li>
108<li>Put it in the <code>plugins</code> directory in Shaarli's installation folder.</li>
109<li>Make sure you put it correctly:</li>
110</ul>
111<pre><code>| index.php
112| plugins/
113|---| custom_plugin/
114| |---| custom_plugin.php
115| |---| ...
116</code></pre>
117<ul>
118<li>Make sure your webserver can read and write the files in your plugin folder.</li>
119</ul>
120<h2 id="plugin-configuration">Plugin configuration</h2>
121<p>In Shaarli's administration page (<code>Tools</code> link), go to <code>Plugin administration</code>.</p>
122<p>Here you can enable and disable all plugins available, and configure them.</p>
123<p><img src="https://camo.githubusercontent.com/5da68e191969007492ca0fbeb25f3b2357b748cc/687474703a2f2f692e696d6775722e636f6d2f766837544643712e706e67" alt="administration screenshot" /><a href=".html"></a></p>
124<h2 id="plugin-order">Plugin order</h2>
125<p>In the plugin administration page, you can move enabled plugins to the top or bottom of the list. The first plugins in the list will be processed first.</p>
126<p>This is important in case plugins are depending on each other. Read plugins README details for more information.</p>
127<p><strong>Use case</strong>: The (non existent) plugin <code>shaares_footer</code> adds a footer to every shaare in Markdown syntax. It needs to be processed <em>before</em> (higher in the list) the Markdown plugin. Otherwise its syntax won't be translated in HTML.</p>
128<h2 id="file-mode">File mode</h2>
129<p>Enabled plugin are stored in your <code>config.php</code> parameters file, under the <code>array</code>:</p>
130<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php"><span class="kw">$GLOBALS</span><span class="ot">[</span><span class="st">&#39;config&#39;</span><span class="ot">[</span><span class="st">&#39;ENABLED_PLUGINS&#39;</span><span class="ot">]](</span><span class="st">&#39;ENABLED_PLUGINS&#39;</span><span class="ot">]</span>.html<span class="ot">)</span></code></pre></div>
131<p>You can edit them manually here.<br />
132Example:</p>
133<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php"><span class="kw">$GLOBALS</span><span class="ot">[</span><span class="st">&#39;config&#39;</span><span class="ot">[</span><span class="st">&#39;ENABLED_PLUGINS&#39;</span><span class="ot">]</span> = <span class="fu">array</span><span class="ot">(](</span><span class="st">&#39;ENABLED_PLUGINS&#39;</span><span class="ot">]</span>-=-<span class="fu">array</span><span class="ot">(</span>.html<span class="ot">)</span>
134 <span class="st">&#39;qrcode&#39;</span><span class="ot">,</span>
135 <span class="st">&#39;archiveorg&#39;</span><span class="ot">,</span>
136 <span class="st">&#39;wallabag&#39;</span><span class="ot">,</span>
137 <span class="st">&#39;markdown&#39;</span><span class="ot">,</span>
138<span class="ot">);</span></code></pre></div>
139<h3 id="plugin-usage">Plugin usage</h3>
140<h4 id="official-plugins">Official plugins</h4>
141<p>Usage of each plugin is documented in it's README file:</p>
142<ul>
143<li><code>addlink-toolbar</code>: Adds the addlink input on the linklist page</li>
144<li><code>archiveorg</code>: For each link, add an Archive.org icon</li>
145<li><a href="https://github.com/shaarli/Shaarli/blob/master/plugins/markdown/README.md"><code>markdown</code></a>: Render shaare description with Markdown syntax.<a href=".html"></a></li>
146<li><a href="https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md"><code>playvideos</code></a>: Add a button in the toolbar allowing to watch all videos.<a href=".html"></a></li>
147<li><code>qrcode</code>: For each link, add a QRCode icon.</li>
148<li><code>readityourself</code>: For each link, add a ReadItYourself icon to save the shaared URL</li>
149<li><a href="https://github.com/shaarli/Shaarli/blob/master/plugins/wallabag/README.md"><code>wallabag</code></a>: For each link, add a Wallabag icon to save it in your instance.<a href=".html"></a></li>
150</ul>
151<h4 id="third-party-plugins">Third party plugins</h4>
152<p>See <a href="https://github.com/shaarli/Shaarli/wiki/Community-%26-Related-software#third-party-plugins">Community &amp; related software</a><a href=".html"></a></p>
153</body>
154</html>
diff --git a/doc/RSS-feeds.html b/doc/RSS-feeds.html
deleted file mode 100644
index 0f332b3d..00000000
--- a/doc/RSS-feeds.html
+++ /dev/null
@@ -1,97 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – RSS feeds</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="rss-feeds">RSS feeds</h1>
66<h3 id="feeds-options">Feeds options</h3>
67<p>Feeds are available in ATOM with <code>?do=atom</code> and RSS with <code>do=RSS</code>.</p>
68<p>Options:</p>
69<ul>
70<li>You can use <code>permalinks</code> in the feed URL to get permalink to Shaares instead of direct link to shaared URL.
71<ul>
72<li>E.G. <code>https://my.shaarli.domain/?do=atom&amp;permalinks</code>.</li>
73</ul></li>
74<li>You can use <code>nb</code> parameter in the feed URL to specify the number of Shaares you want in a feed (default if not specified: <code>50</code>). The keyword <code>all</code> is available if you want everything.
75<ul>
76<li><code>https://my.shaarli.domain/?do=atom&amp;permalinks&amp;nb=42</code></li>
77<li><code>https://my.shaarli.domain/?do=atom&amp;permalinks&amp;nb=all</code></li>
78</ul></li>
79</ul>
80<h3 id="rss-feeds-or-picture-wall-for-a-specific-searchtag">RSS Feeds or Picture Wall for a specific search/tag</h3>
81<p>It is possible to filter RSS/ATOM feeds and Picture Wall on a Shaarli to <strong>only display results of a specific search, or for a specific tag</strong>.</p>
82<p>For example, if you want to subscribe only to links tagged <code>photography</code>:</p>
83<ul>
84<li>Go to the desired Shaarli instance.</li>
85<li>Search for the <code>photography</code> tag in the <em>Filter by tag</em> box. Links tagged <code>photography</code> are displayed.</li>
86<li>Click on the <code>RSS Feed</code> button.</li>
87<li>You are presented with an RSS feed showing only these links. Subscribe to it to receive only updates with this tag.</li>
88<li>The same method <strong>also works for a full-text search</strong> (<em>Search</em> box) <strong>and for the Picture Wall</strong> (want to only see pictures about <code>nature</code>?)</li>
89<li>You can also build the URLs manually:
90<ul>
91<li><code>https://my.shaarli.domain/?do=rss&amp;searchtags=nature</code></li>
92<li><code>https://my.shaarli.domain/links/?do=picwall&amp;searchterm=poney</code></li>
93</ul></li>
94</ul>
95<p><embed src="(images/rss-filter-1.png)-!.html" />(images/rss-filter-2.png)</p>
96</body>
97</html>
diff --git a/doc/Release-Shaarli.html b/doc/Release-Shaarli.html
deleted file mode 100644
index 0d9fa3e1..00000000
--- a/doc/Release-Shaarli.html
+++ /dev/null
@@ -1,220 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Release Shaarli</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="release-shaarli">Release Shaarli</h1>
103<p>See <a href="http://git-scm.com/book/en/v2/Distributed-Git-Maintaining-a-Project#Tagging-Your-Releases">Git - Maintaining a project - Tagging your [](.html)<br />
104releases</a>.</p>
105<h2 id="prerequisites">Prerequisites</h2>
106<p>This guide assumes that you have:</p>
107<ul>
108<li>a GPG key matching your GitHub authentication credentials
109<ul>
110<li>i.e., the email address identified by the GPG key is the same as the one in your <code>~/.gitconfig</code></li>
111</ul></li>
112<li>a GitHub fork of Shaarli</li>
113<li>a local clone of your Shaarli fork, with the following remotes:
114<ul>
115<li><code>origin</code> pointing to your GitHub fork</li>
116<li><code>upstream</code> pointing to the main Shaarli repository</li>
117</ul></li>
118<li>maintainer permissions on the main Shaarli repository, to:
119<ul>
120<li>push the signed tag</li>
121<li>create a new release</li>
122</ul></li>
123<li><a href="https://getcomposer.org/">Composer</a> and <a href="http://pandoc.org/">Pandoc</a> need to be installed<a href=".html"></a></li>
124</ul>
125<h2 id="github-release-draft-and-changelog.md">GitHub release draft and <code>CHANGELOG.md</code></h2>
126<p>See <a href="http://keepachangelog.com/en/0.3.0/" class="uri">http://keepachangelog.com/en/0.3.0/</a> for changelog formatting.</p>
127<h3 id="github-release-draft">GitHub release draft</h3>
128<p>GitHub allows drafting the release note for the upcoming release, from the <a href="https://github.com/shaarli/Shaarli/releases">Releases</a> page. This way, the release note can be drafted while contributions are merged to <code>master</code>.<a href=".html"></a></p>
129<h3 id="changelog.md"><code>CHANGELOG.md</code></h3>
130<p>This file should contain the same information as the release note draft for the upcoming version.</p>
131<p>Update it to:</p>
132<ul>
133<li>add new entries (additions, fixes, etc.)</li>
134<li>mark the current version as released by setting its date and link</li>
135<li>add a new section for the future unreleased version</li>
136</ul>
137<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> /path/to/shaarli
138
139$ <span class="fu">nano</span> CHANGELOG.md
140
141[<span class="ex">...</span>][](.html)
142<span class="co">## vA.B.C - UNRELEASED</span>
143<span class="ex">TBA</span>
144
145<span class="co">## [vX.Y.Z](https://github.com/shaarli/Shaarli/releases/tag/vX.Y.Z) - YYYY-MM-DD[](.html)</span>
146[<span class="ex">...</span>][](.html)</code></pre></div>
147<h2 id="increment-the-version-code-create-and-push-a-signed-tag">Increment the version code, create and push a signed tag</h2>
148<h3 id="bump-shaarlis-version">Bump Shaarli's version</h3>
149<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> /path/to/shaarli
150
151<span class="co"># create a new branch</span>
152$ <span class="fu">git</span> fetch upstream
153$ <span class="fu">git</span> checkout upstream/master -b v0.5.0
154
155<span class="co"># bump the version number</span>
156$ <span class="ex">vim</span> index.php shaarli_version.php
157
158<span class="co"># rebuild the documentation from the wiki</span>
159$ <span class="fu">make</span> htmldoc
160
161<span class="co"># commit the changes</span>
162$ <span class="fu">git</span> add index.php shaarli_version.php doc
163$ <span class="fu">git</span> commit -s -m <span class="st">&quot;Bump version to v0.5.0&quot;</span>
164
165<span class="co"># push the commit on your GitHub fork</span>
166$ <span class="fu">git</span> push origin v0.5.0</code></pre></div>
167<h3 id="create-and-merge-a-pull-request">Create and merge a Pull Request</h3>
168<p>This one is pretty straightforward ;-)</p>
169<h3 id="create-and-push-a-signed-tag">Create and push a signed tag</h3>
170<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co"># update your local copy</span>
171$ <span class="fu">git</span> checkout master
172$ <span class="fu">git</span> fetch upstream
173$ <span class="fu">git</span> pull upstream master
174
175<span class="co"># create a signed tag</span>
176$ <span class="fu">git</span> tag -s -m <span class="st">&quot;Release v0.5.0&quot;</span> v0.5.0
177
178<span class="co"># push it to &quot;upstream&quot;</span>
179$ <span class="fu">git</span> push --tags upstream</code></pre></div>
180<h3 id="verify-a-signed-tag">Verify a signed tag</h3>
181<p><a href="https://github.com/shaarli/Shaarli/releases/tag/v0.5.0"><code>v0.5.0</code></a> is the first GPG-signed tag pushed on the Community Shaarli.<a href=".html"></a></p>
182<p>Let's have a look at its signature!</p>
183<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> /path/to/shaarli
184$ <span class="fu">git</span> fetch upstream
185
186<span class="co"># get the SHA1 reference of the tag</span>
187$ <span class="fu">git</span> show-ref tags/v0.5.0
188<span class="ex">f7762cf803f03f5caf4b8078359a63783d0090c1</span> refs/tags/v0.5.0
189
190<span class="co"># verify the tag signature information</span>
191$ <span class="fu">git</span> verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1
192<span class="ex">gpg</span>: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F
193<span class="ex">gpg</span>: Good signature from <span class="st">&quot;VirtualTam &lt;virtualtam@flibidi.net&gt;&quot;</span> [ultimate][](.html)</code></pre></div>
194<h2 id="publish-the-github-release">Publish the GitHub release</h2>
195<h3 id="create-a-github-release-from-a-git-tag">Create a GitHub release from a Git tag</h3>
196<p>From the previously drafted release:</p>
197<ul>
198<li>edit the release notes (if needed)</li>
199<li>specify the appropriate Git tag</li>
200<li>publish the release</li>
201<li>profit!</li>
202</ul>
203<h3 id="generate-and-upload-all-in-one-release-archives">Generate and upload all-in-one release archives</h3>
204<p>Users with a shared hosting may have:</p>
205<ul>
206<li>no SSH access</li>
207<li>no possibility to install PHP packages or server extensions</li>
208<li>no possibility to run scripts</li>
209</ul>
210<p>To ease Shaarli installations, it is possible to generate and upload additional release archives,<br />
211that will contain Shaarli code plus all required third-party libraries:</p>
212<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">make</span> release_archive</code></pre></div>
213<p>This will create the following archives:</p>
214<ul>
215<li><code>shaarli-vX.Y.Z-full.tar</code></li>
216<li><code>shaarli-vX.Y.Z-full.zip</code></li>
217</ul>
218<p>The archives need to be manually uploaded on the previously created GitHub release.</p>
219</body>
220</html>
diff --git a/doc/Security.html b/doc/Security.html
deleted file mode 100644
index cec20590..00000000
--- a/doc/Security.html
+++ /dev/null
@@ -1,133 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Security</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="security">Security</h1>
103<h2 id="client-browser">Client browser</h2>
104<ul>
105<li>Shaarli relies on <code>HTTP_REFERER</code> for some functions (like redirects and clicking on tags). If you have disabled or masqueraded <code>HTTP_REFERER</code> in your browser, some features of Shaarli may not work</li>
106</ul>
107<h2 id="php">PHP</h2>
108<ul>
109<li><code>magic_quotes</code> is an horrible option of PHP which is often activated on servers. No serious developer should rely on this horror to secure their code against SQL injections. You should disable it (and Shaarli expects this option to be disabled). Nevertheless, I have added code to cope with <code>magic_quotes</code> on, so you should not be bothered even on crappy hosts.</li>
110</ul>
111<h2 id="server-and-sessions">Server and sessions</h2>
112<ul>
113<li>Directories are protected using <code>.htaccess</code> files</li>
114<li>Forms are protected against XSRF (Cross-site requests forgery):</li>
115<li>Forms which act on data (save,delete…) contain a token generated by the server.</li>
116<li>Any posted form which does not contain a valid token is rejected.</li>
117<li>Any token can only be used once.</li>
118<li>Tokens are attached to the session and cannot be reused in another session.</li>
119<li>Sessions automatically expire after 60 minutes.</li>
120<li>Sessions are protected against hijacking: the session ID cannot be used from a different IP address.</li>
121</ul>
122<h2 id="shaarli-datastore-and-configuration">Shaarli datastore and configuration</h2>
123<ul>
124<li>The password is salted, hashed and stored in the data subdirectory, in a PHP file, and protected by htaccess. Even if the webserver does not support htaccess, the hash is not readable by URL. Even if the .php file is stolen, the password cannot deduced from the hash. The salt prevents rainbow-tables attacks.</li>
125<li>Links are stored as an associative array which is serialized, compressed (with deflate), base64-encoded and saved as a comment in a <code>.php</code> file.</li>
126<li>Even if the server does not support <code>.htaccess</code> files, the data file will still not be readable by URL.</li>
127<li><p>The database looks like this:</p>
128<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php"><span class="kw">&lt;?php</span> <span class="co">/* zP1ZjxxJtiYIvvevEPJ2lDOaLrZv7o...</span>
129<span class="co">...ka7gaco/Z+TFXM2i7BlfMf8qxpaSSYfKlvqv/x8= */</span> <span class="kw">?&gt;</span></code></pre></div></li>
130<li><p>Small hashes are used to make a link to an entry in Shaarli. They are unique. In fact, the date of the items (eg. <code>20110923_150523</code>) is hashed with CRC32, then converted to base64 and some characters are replaced. They are always 6 characters longs and use only <code>A-Z a-z 0-9 - _</code> and <code>@</code>.</p></li>
131</ul>
132</body>
133</html>
diff --git a/doc/Security.md b/doc/Security.md
deleted file mode 100644
index 7947460c..00000000
--- a/doc/Security.md
+++ /dev/null
@@ -1,28 +0,0 @@
1#Security
2## Client browser
3* Shaarli relies on `HTTP_REFERER` for some functions (like redirects and clicking on tags). If you have disabled or masqueraded `HTTP_REFERER` in your browser, some features of Shaarli may not work
4
5## PHP
6* `magic_quotes` is an horrible option of PHP which is often activated on servers. No serious developer should rely on this horror to secure their code against SQL injections. You should disable it (and Shaarli expects this option to be disabled). Nevertheless, I have added code to cope with `magic_quotes` on, so you should not be bothered even on crappy hosts.
7
8## Server and sessions
9* Directories are protected using `.htaccess` files
10* Forms are protected against XSRF (Cross-site requests forgery):
11 * Forms which act on data (save,delete…) contain a token generated by the server.
12 * Any posted form which does not contain a valid token is rejected.
13 * Any token can only be used once.
14 * Tokens are attached to the session and cannot be reused in another session.
15* Sessions automatically expire after 60 minutes.
16* Sessions are protected against hijacking: the session ID cannot be used from a different IP address.
17
18## Shaarli datastore and configuration
19* The password is salted, hashed and stored in the data subdirectory, in a PHP file, and protected by htaccess. Even if the webserver does not support htaccess, the hash is not readable by URL. Even if the .php file is stolen, the password cannot deduced from the hash. The salt prevents rainbow-tables attacks.
20* Links are stored as an associative array which is serialized, compressed (with deflate), base64-encoded and saved as a comment in a `.php` file.
21* Even if the server does not support `.htaccess` files, the data file will still not be readable by URL.
22* The database looks like this:
23```php
24<?php /* zP1ZjxxJtiYIvvevEPJ2lDOaLrZv7o...
25...ka7gaco/Z+TFXM2i7BlfMf8qxpaSSYfKlvqv/x8= */ ?>
26```
27
28* Small hashes are used to make a link to an entry in Shaarli. They are unique. In fact, the date of the items (eg. `20110923_150523`) is hashed with CRC32, then converted to base64 and some characters are replaced. They are always 6 characters longs and use only `A-Z a-z 0-9 - _` and `@`.
diff --git a/doc/Server-configuration.html b/doc/Server-configuration.html
deleted file mode 100644
index 2f1c25b5..00000000
--- a/doc/Server-configuration.html
+++ /dev/null
@@ -1,443 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Server configuration</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="server-configuration">Server configuration</h1>
103<p><em>Example virtual host configurations for popular web servers</em></p>
104<ul>
105<li><a href="#apache">Apache</a><a href=".html"></a></li>
106<li><a href="#nginx">Nginx</a><a href=".html"></a></li>
107</ul>
108<h2 id="prerequisites">Prerequisites</h2>
109<h3 id="shaarli">Shaarli</h3>
110<ul>
111<li>Shaarli is installed in a directory readable/writeable by the user</li>
112<li>the correct read/write permissions have been granted to the web server <em>user and/or group</em></li>
113<li>for HTTPS / SSL:</li>
114<li>a key pair (public, private) and a certificate have been generated</li>
115<li>the appropriate server SSL extension is installed and active</li>
116</ul>
117<h3 id="https-tls-and-self-signed-certificates">HTTPS, TLS and self-signed certificates</h3>
118<p>Related guides:</p>
119<ul>
120<li><a href="http://www.xenocafe.com/tutorials/linux/centos/openssl/self_signed_certificates/index.php">How to Create Self-Signed SSL Certificates with OpenSSL</a><a href=".html"></a></li>
121<li><a href="https://workaround.org/certificate-authority">How do I create my own Certificate Authority?</a><a href=".html"></a></li>
122<li>Generate a self-signed certificate (will trigger browser warnings) with apache2: <code>make-ssl-cert generate-default-snakeoil --force-overwrite</code> will create <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> and <code>/etc/ssl/private/ssl-cert-snakeoil.key</code></li>
123</ul>
124<h3 id="proxies">Proxies</h3>
125<p>If Shaarli is served behind a proxy (i.e. there is a proxy server between clients and the web server hosting Shaarli), please refer to the proxy server documentation for proper configuration. In particular, you have to ensure that the following server variables are properly set:</p>
126<ul>
127<li><code>X-Forwarded-Proto</code>;</li>
128<li><code>X-Forwarded-Host</code>;</li>
129<li><code>X-Forwarded-For</code>.</li>
130</ul>
131<p>See also <a href="https://github.com/shaarli/Shaarli/issues?utf8=%E2%9C%93&amp;q=label%3Aproxy+">proxy-related</a> issues.<a href=".html"></a></p>
132<h2 id="apache">Apache</h2>
133<h3 id="minimal">Minimal</h3>
134<div class="sourceCode"><pre class="sourceCode apache"><code class="sourceCode apache"><span class="fu">&lt;VirtualHost</span><span class="at"> *:80</span><span class="fu">&gt;</span>
135 ServerName<span class="st"> shaarli.my-domain.org</span>
136 DocumentRoot<span class="st"> /absolute/path/to/shaarli/</span>
137<span class="fu">&lt;/VirtualHost&gt;</span></code></pre></div>
138<h3 id="debug---log-all-the-things">Debug - Log all the things!</h3>
139<p>This configuration will log both Apache and PHP errors, which may prove useful to identify server configuration errors.</p>
140<p>See:</p>
141<ul>
142<li><a href="http://stackoverflow.com/q/176">Apache/PHP - error log per VirtualHost</a> (StackOverflow)<a href=".html"></a></li>
143<li><a href="https://ma.ttias.be/php-php_value-vs-php_admin_value-and-the-use-of-php_flag-explained/">PHP: php_value vs php_admin_value and the use of php_flag explained</a><a href=".html"></a></li>
144</ul>
145<div class="sourceCode"><pre class="sourceCode apache"><code class="sourceCode apache"><span class="fu">&lt;VirtualHost</span><span class="at"> *:80</span><span class="fu">&gt;</span>
146 ServerName<span class="st"> shaarli.my-domain.org</span>
147 DocumentRoot<span class="st"> /absolute/path/to/shaarli/</span>
148
149 <span class="ex">LogLevel</span><span class="ch"> </span><span class="kw">warn</span>
150 ErrorLog<span class="st"> /var/log/apache2/shaarli-error.log</span>
151 CustomLog<span class="st"> /var/log/apache2/shaarli-access.log combined</span>
152
153 php_flag log_errors on
154 php_flag display_errors on
155 php_value error_reporting 2147483647
156 php_value error_log /var/log/apache2/shaarli-php-error.log
157<span class="fu">&lt;/VirtualHost&gt;</span></code></pre></div>
158<h3 id="standard---keep-access-and-error-logs">Standard - Keep access and error logs</h3>
159<div class="sourceCode"><pre class="sourceCode apache"><code class="sourceCode apache"><span class="fu">&lt;VirtualHost</span><span class="at"> *:80</span><span class="fu">&gt;</span>
160 ServerName<span class="st"> shaarli.my-domain.org</span>
161 DocumentRoot<span class="st"> /absolute/path/to/shaarli/</span>
162
163 <span class="ex">LogLevel</span><span class="ch"> </span><span class="kw">warn</span>
164 ErrorLog<span class="st"> /var/log/apache2/shaarli-error.log</span>
165 CustomLog<span class="st"> /var/log/apache2/shaarli-access.log combined</span>
166<span class="fu">&lt;/VirtualHost&gt;</span></code></pre></div>
167<h3 id="paranoid---redirect-http-80-to-https-443">Paranoid - Redirect HTTP (:80) to HTTPS (:443)</h3>
168<p>See <a href="https://wiki.mozilla.org/Security/Server_Side_TLS#Apache">Server-side TLS</a> (Mozilla).<a href=".html"></a></p>
169<div class="sourceCode"><pre class="sourceCode apache"><code class="sourceCode apache"><span class="fu">&lt;VirtualHost</span><span class="at"> *:443</span><span class="fu">&gt;</span>
170 ServerName<span class="st"> shaarli.my-domain.org</span>
171 DocumentRoot<span class="st"> /absolute/path/to/shaarli/</span>
172
173 <span class="ex">SSLEngine</span><span class="ch"> </span><span class="kw">on</span>
174 SSLCertificateFile<span class="st"> /absolute/path/to/the/website/certificate.pem</span>
175 SSLCertificateKeyFile<span class="st"> /absolute/path/to/the/website/key.key</span>
176
177 <span class="fu">&lt;Directory</span><span class="at"> /absolute/path/to/shaarli/</span><span class="fu">&gt;</span>
178 <span class="ex">AllowOverride</span><span class="ch"> </span><span class="kw">All</span>
179 <span class="ex">Options</span><span class="ch"> </span><span class="kw">Indexes</span><span class="ch"> </span><span class="kw">FollowSymLinks</span><span class="ch"> </span><span class="kw">MultiViews</span>
180 <span class="ex">Order</span><span class="ch"> </span><span class="kw">allow,deny</span>
181 allow<span class="st"> from all</span>
182 <span class="fu">&lt;/Directory&gt;</span>
183
184 <span class="ex">LogLevel</span><span class="ch"> </span><span class="kw">warn</span>
185 ErrorLog<span class="st"> /var/log/apache2/shaarli-error.log</span>
186 CustomLog<span class="st"> /var/log/apache2/shaarli-access.log combined</span>
187<span class="fu">&lt;/VirtualHost&gt;</span>
188<span class="fu">&lt;VirtualHost</span><span class="at"> *:80</span><span class="fu">&gt;</span>
189 ServerName<span class="st"> shaarli.my-domain.org</span>
190 Redirect<span class="st"> 301 / https://shaarli.my-domain.org</span>
191
192 <span class="ex">LogLevel</span><span class="ch"> </span><span class="kw">warn</span>
193 ErrorLog<span class="st"> /var/log/apache2/shaarli-error.log</span>
194 CustomLog<span class="st"> /var/log/apache2/shaarli-access.log combined</span>
195<span class="fu">&lt;/VirtualHost&gt;</span></code></pre></div>
196<h3 id="htaccess">.htaccess</h3>
197<p>Shaarli use <code>.htaccess</code> Apache files to deny access to files that shouldn't be directly accessed (datastore, config, etc.). You need the directive <code>AllowOverride All</code> in your virtual host configuration for them to work.</p>
198<p><strong>Warning</strong>: If you use Apache 2.2 or lower, you need <a href="https://httpd.apache.org/docs/current/mod/mod_version.html">mod_version</a> to be installed and enabled.<a href=".html"></a></p>
199<h2 id="lighthttpd">LightHttpd</h2>
200<h2 id="nginx">Nginx</h2>
201<h3 id="foreword">Foreword</h3>
202<p>Nginx does not natively interpret PHP scripts; to this effect, we will run a <a href="https://en.wikipedia.org/wiki/FastCGI">FastCGI</a> service, to which Nginx's FastCGI module will proxy all requests to PHP resources.<a href=".html"></a></p>
203<p>Required packages:</p>
204<ul>
205<li><a href="http://nginx.org">nginx</a><a href=".html"></a></li>
206<li><a href="http://php-fpm.org">php-fpm</a> - PHP FastCGI Process Manager<a href=".html"></a></li>
207</ul>
208<p>Official documentation:</p>
209<ul>
210<li><a href="http://nginx.org/en/docs/beginners_guide.html">Beginner's guide</a><a href=".html"></a></li>
211<li><a href="http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html">ngx_http_fastcgi_module</a><a href=".html"></a></li>
212<li><a href="http://wiki.nginx.org/Pitfalls">Pitfalls</a><a href=".html"></a></li>
213</ul>
214<p>Community resources:</p>
215<ul>
216<li><a href="https://wiki.mozilla.org/Security/Server_Side_TLS#Nginx">Server-side TLS (Nginx)</a> (Mozilla)<a href=".html"></a></li>
217<li><a href="http://kbeezie.com/nginx-configuration-examples/">PHP configuration examples</a> (Karl Blessing)<a href=".html"></a></li>
218</ul>
219<h3 id="common-setup">Common setup</h3>
220<p>Once Nginx and PHP-FPM are installed, we need to ensure:</p>
221<ul>
222<li>Nginx and PHP-FPM are running using the <em>same user and group</em></li>
223<li>both these user and group have
224<ul>
225<li><code>read</code> permissions for Shaarli resources</li>
226<li><code>execute</code> permissions for Shaarli directories <em>AND</em> their parent directories</li>
227</ul></li>
228</ul>
229<p>On a production server:</p>
230<ul>
231<li><code>user:group</code> will likely be <code>http:http</code>, <code>www:www</code> or <code>www-data:www-data</code></li>
232<li>files will be located under <code>/var/www</code>, <code>/var/http</code> or <code>/usr/share/nginx</code></li>
233</ul>
234<p>On a development server:</p>
235<ul>
236<li>files may be located in a user's home directory</li>
237<li>in this case, make sure both Nginx and PHP-FPM are running as the local user/group!</li>
238</ul>
239<p>For all following configuration examples, this user/group pair will be used:</p>
240<ul>
241<li><code>user:group = john:users</code>,</li>
242</ul>
243<p>which corresponds to the following service configuration:</p>
244<div class="sourceCode"><pre class="sourceCode ini"><code class="sourceCode ini"><span class="co">; /etc/php/php-fpm.conf</span>
245<span class="dt">user </span><span class="ot">=</span><span class="st"> john</span>
246<span class="dt">group </span><span class="ot">=</span><span class="st"> users</span>
247
248<span class="kw">[...][]</span><span class="dt">(.html)</span>
249<span class="dt">listen.owner </span><span class="ot">=</span><span class="st"> john</span>
250<span class="dt">listen.group </span><span class="ot">=</span><span class="st"> users</span></code></pre></div>
251<pre class="nginx"><code># /etc/nginx/nginx.conf
252user john users;
253
254http {
255 [...][](.html)
256}</code></pre>
257<h3 id="optional-increase-the-maximum-file-upload-size">(Optional) Increase the maximum file upload size</h3>
258<p>Some bookmark dumps generated by web browsers can be <em>huge</em> due to the presence of Base64-encoded images and favicons, as well as extra verbosity when nesting links in (sub-)folders.</p>
259<p>To increase upload size, you will need to modify both nginx and PHP configuration:</p>
260<pre class="nginx"><code># /etc/nginx/nginx.conf
261
262http {
263 [...][](.html)
264
265 client_max_body_size 10m;
266
267 [...][](.html)
268}</code></pre>
269<div class="sourceCode"><pre class="sourceCode ini"><code class="sourceCode ini"><span class="co"># /etc/php5/fpm/php.ini</span>
270
271<span class="kw">[...][]</span><span class="dt">(.html)</span>
272<span class="dt">post_max_size </span><span class="ot">=</span><span class="st"> 10M</span>
273<span class="kw">[...][]</span><span class="dt">(.html)</span>
274<span class="dt">upload_max_filesize </span><span class="ot">=</span><span class="st"> 10M</span></code></pre></div>
275<h3 id="minimal-1">Minimal</h3>
276<p><em>WARNING: Use for development only!</em></p>
277<pre class="nginx"><code>user john users;
278worker_processes 1;
279events {
280 worker_connections 1024;
281}
282
283http {
284 include mime.types;
285 default_type application/octet-stream;
286 keepalive_timeout 20;
287
288 index index.html index.php;
289
290 server {
291 listen 80;
292 server_name localhost;
293 root /home/john/web;
294
295 access_log /var/log/nginx/access.log;
296 error_log /var/log/nginx/error.log;
297
298 location /shaarli/ {
299 access_log /var/log/nginx/shaarli.access.log;
300 error_log /var/log/nginx/shaarli.error.log;
301 }
302
303 location ~ (index)\.php$ {
304 fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
305 fastcgi_index index.php;
306 include fastcgi.conf;
307 }
308 }
309}</code></pre>
310<h3 id="modular">Modular</h3>
311<p>The previous setup is sufficient for development purposes, but has several major caveats:</p>
312<ul>
313<li>every content that does not match the PHP rule will be sent to client browsers:
314<ul>
315<li>dotfiles - in our case, <code>.htaccess</code></li>
316<li>temporary files, e.g. Vim or Emacs files: <code>index.php~</code></li>
317</ul></li>
318<li>asset / static resource caching is not optimized</li>
319<li>if serving several PHP sites, there will be a lot of duplication: <code>location /shaarli/</code>, <code>location /mysite/</code>, etc.</li>
320</ul>
321<p>To solve this, we will split Nginx configuration in several parts, that will be included when needed:</p>
322<pre class="nginx"><code># /etc/nginx/deny.conf
323location ~ /\. {
324 # deny access to dotfiles
325 access_log off;
326 log_not_found off;
327 deny all;
328}
329
330location ~ ~$ {
331 # deny access to temp editor files, e.g. &quot;script.php~&quot;
332 access_log off;
333 log_not_found off;
334 deny all;
335}</code></pre>
336<pre class="nginx"><code># /etc/nginx/php.conf
337location ~ (index)\.php$ {
338 # filter and proxy PHP requests to PHP-FPM
339 fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
340 fastcgi_index index.php;
341 include fastcgi.conf;
342}
343
344location ~ \.php$ {
345 # deny access to all other PHP scripts
346 deny all;
347}</code></pre>
348<pre class="nginx"><code># /etc/nginx/static_assets.conf
349location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
350 expires max;
351 add_header Pragma public;
352 add_header Cache-Control &quot;public, must-revalidate, proxy-revalidate&quot;;
353}</code></pre>
354<pre class="nginx"><code># /etc/nginx/nginx.conf
355[...][](.html)
356
357http {
358 [...][](.html)
359
360 root /home/john/web;
361 access_log /var/log/nginx/access.log;
362 error_log /var/log/nginx/error.log;
363
364 server {
365 # virtual host for a first domain
366 listen 80;
367 server_name my.first.domain.org;
368
369 location /shaarli/ {
370 access_log /var/log/nginx/shaarli.access.log;
371 error_log /var/log/nginx/shaarli.error.log;
372 }
373
374 location = /shaarli/favicon.ico {
375 # serve the Shaarli favicon from its custom location
376 alias /var/www/shaarli/images/favicon.ico;
377 }
378
379 include deny.conf;
380 include static_assets.conf;
381 include php.conf;
382 }
383
384 server {
385 # virtual host for a second domain
386 listen 80;
387 server_name second.domain.com;
388
389 location /minigal/ {
390 access_log /var/log/nginx/minigal.access.log;
391 error_log /var/log/nginx/minigal.error.log;
392 }
393
394 include deny.conf;
395 include static_assets.conf;
396 include php.conf;
397 }
398}</code></pre>
399<h3 id="redirect-http-to-https">Redirect HTTP to HTTPS</h3>
400<p>Assuming you have generated a (self-signed) key and certificate, and they are located under <code>/home/john/ssl/localhost.{key,crt}</code>, it is pretty straightforward to set an HTTP (:80) to HTTPS (:443) redirection to force SSL/TLS usage.</p>
401<pre class="nginx"><code># /etc/nginx/nginx.conf
402[...][](.html)
403
404http {
405 [...][](.html)
406
407 index index.html index.php;
408
409 root /home/john/web;
410 access_log /var/log/nginx/access.log;
411 error_log /var/log/nginx/error.log;
412
413 server {
414 listen 80;
415 server_name localhost;
416
417 return 301 https://localhost$request_uri;
418 }
419
420 server {
421 listen 443 ssl;
422 server_name localhost;
423
424 ssl_certificate /home/john/ssl/localhost.crt;
425 ssl_certificate_key /home/john/ssl/localhost.key;
426
427 location /shaarli/ {
428 access_log /var/log/nginx/shaarli.access.log;
429 error_log /var/log/nginx/shaarli.error.log;
430 }
431
432 location = /shaarli/favicon.ico {
433 # serve the Shaarli favicon from its custom location
434 alias /var/www/shaarli/images/favicon.ico;
435 }
436
437 include deny.conf;
438 include static_assets.conf;
439 include php.conf;
440 }
441}</code></pre>
442</body>
443</html>
diff --git a/doc/Server-requirements.html b/doc/Server-requirements.html
deleted file mode 100644
index 2c2545bb..00000000
--- a/doc/Server-requirements.html
+++ /dev/null
@@ -1,178 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Server requirements</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="server-requirements">Server requirements</h1>
66<h2 id="php">PHP</h2>
67<h3 id="release-information">Release information</h3>
68<ul>
69<li><a href="http://php.net/supported-versions.php">PHP: Supported versions</a><a href=".html"></a></li>
70<li><a href="http://php.net/eol.php">PHP: Unsupported versions</a> <em>(EOL - End Of Life)</em><a href=".html"></a></li>
71<li><a href="http://php.net/ChangeLog-7.php">PHP 7 Changelog</a><a href=".html"></a></li>
72<li><a href="http://php.net/ChangeLog-5.php">PHP 5 Changelog</a><a href=".html"></a></li>
73<li><a href="https://bugs.php.net/">PHP: Bugs</a><a href=".html"></a></li>
74</ul>
75<h3 id="supported-versions">Supported versions</h3>
76<table>
77<thead>
78<tr class="header">
79<th style="text-align: center;">Version</th>
80<th style="text-align: center;">Status</th>
81<th style="text-align: center;">Shaarli compatibility</th>
82</tr>
83</thead>
84<tbody>
85<tr class="odd">
86<td style="text-align: center;">7.0</td>
87<td style="text-align: center;">Supported</td>
88<td style="text-align: center;">✅</td>
89</tr>
90<tr class="even">
91<td style="text-align: center;">5.6</td>
92<td style="text-align: center;">Supported</td>
93<td style="text-align: center;">✅</td>
94</tr>
95<tr class="odd">
96<td style="text-align: center;">5.5</td>
97<td style="text-align: center;">EOL: 2016-07-10</td>
98<td style="text-align: center;">✅</td>
99</tr>
100<tr class="even">
101<td style="text-align: center;">5.4</td>
102<td style="text-align: center;">EOL: 2015-09-14</td>
103<td style="text-align: center;">✅ (up to Shaarli 0.8.x)</td>
104</tr>
105<tr class="odd">
106<td style="text-align: center;">5.3</td>
107<td style="text-align: center;">EOL: 2014-08-14</td>
108<td style="text-align: center;">✅ (up to Shaarli 0.8.x)</td>
109</tr>
110</tbody>
111</table>
112<p>See also:</p>
113<ul>
114<li><a href="https://github.com/shaarli/Shaarli/blob/master/.travis.yml">Travis configuration</a><a href=".html"></a></li>
115</ul>
116<h3 id="dependency-management">Dependency management</h3>
117<p>Starting with Shaarli <code>v0.8.x</code>, <a href="https://getcomposer.org/">Composer</a> is used to resolve,<a href=".html"></a><br />
118download and install third-party PHP dependencies.</p>
119<table>
120<thead>
121<tr class="header">
122<th>Library</th>
123<th style="text-align: center;">Required?</th>
124<th>Usage</th>
125</tr>
126</thead>
127<tbody>
128<tr class="odd">
129<td><a href="https://packagist.org/packages/shaarli/netscape-bookmark-parser"><code>shaarli/netscape-bookmark-parser</code></a></td>
130<td style="text-align: center;">All</td>
131<td>Import bookmarks from Netscape files<a href=".html"></a></td>
132</tr>
133</tbody>
134</table>
135<h3 id="extensions">Extensions</h3>
136<table style="width:19%;">
137<colgroup>
138<col style="width: 5%" />
139<col style="width: 8%" />
140<col style="width: 5%" />
141</colgroup>
142<thead>
143<tr class="header">
144<th>Extension</th>
145<th style="text-align: center;">Required?</th>
146<th>Usage</th>
147</tr>
148</thead>
149<tbody>
150<tr class="odd">
151<td><a href="http://php.net/manual/en/book.openssl.php"><code>openssl</code></a></td>
152<td style="text-align: center;">All</td>
153<td>OpenSSL, HTTPS<a href=".html"></a></td>
154</tr>
155<tr class="even">
156<td><a href="http://php.net/manual/en/book.mbstring.php"><code>php-mbstring</code></a></td>
157<td style="text-align: center;">CentOS, Fedora, RHEL, Windows</td>
158<td>multibyte (Unicode) string support<a href=".html"></a></td>
159</tr>
160<tr class="odd">
161<td><a href="http://php.net/manual/en/book.image.php"><code>php-gd</code></a></td>
162<td style="text-align: center;">optional</td>
163<td>thumbnail resizing<a href=".html"></a></td>
164</tr>
165<tr class="even">
166<td><a href="http://php.net/manual/en/book.intl.php"><code>php-intl</code></a></td>
167<td style="text-align: center;">optional</td>
168<td>localized text sorting (e.g. <code>e-&gt;è-&gt;f</code>)<a href=".html"></a></td>
169</tr>
170<tr class="odd">
171<td><a href="http://php.net/manual/en/book.curl.php"><code>php-curl</code></a></td>
172<td style="text-align: center;">optional</td>
173<td>using cURL for fetching webpages and thumbnails in a more robust way<a href=".html"></a></td>
174</tr>
175</tbody>
176</table>
177</body>
178</html>
diff --git a/doc/Server-security.html b/doc/Server-security.html
deleted file mode 100644
index 3551deff..00000000
--- a/doc/Server-security.html
+++ /dev/null
@@ -1,173 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Server security</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="server-security">Server security</h1>
103<h2 id="php.ini">php.ini</h2>
104<p>PHP settings are defined in:</p>
105<ul>
106<li>a main configuration file, usually found under <code>/etc/php5/php.ini</code>; some distributions provide different configuration environments, e.g.
107<ul>
108<li><code>/etc/php5/php.ini</code> - used when running console scripts</li>
109<li><code>/etc/php5/apache2/php.ini</code> - used when a client requests PHP resources from Apache</li>
110<li><code>/etc/php5/php-fpm.conf</code> - used when PHP requests are proxied to PHP-FPM</li>
111</ul></li>
112<li>additional configuration files/entries, depending on the installed/enabled extensions:
113<ul>
114<li><code>/etc/php/conf.d/xdebug.ini</code></li>
115</ul></li>
116</ul>
117<h3 id="locate-.ini-files">Locate .ini files</h3>
118<h4 id="console-environment">Console environment</h4>
119<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">php</span> --ini
120<span class="ex">Configuration</span> File (php.ini) <span class="ex">Path</span>: /etc/php
121<span class="ex">Loaded</span> Configuration File: /etc/php/php.ini
122<span class="ex">Scan</span> for additional .ini files in: /etc/php/conf.d
123<span class="ex">Additional</span> .ini files parsed: /etc/php/conf.d/xdebug.ini</code></pre></div>
124<h4 id="server-environment">Server environment</h4>
125<ul>
126<li>create a <code>phpinfo.php</code> script located in a path supported by the web server, e.g.
127<ul>
128<li>Apache (with user dirs enabled): <code>/home/myself/public_html/phpinfo.php</code></li>
129<li><code>/var/www/test/phpinfo.php</code></li>
130</ul></li>
131<li>make sure the script is readable by the web server user/group (usually, <code>www</code>, <code>www-data</code> or <code>httpd</code>)</li>
132<li>access the script from a web browser</li>
133<li><p>look at the <em>Loaded Configuration File</em> and <em>Scan this dir for additional .ini files</em> entries</p>
134<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php"><span class="kw">&lt;?php</span> <span class="fu">phpinfo</span><span class="ot">();</span> <span class="kw">?&gt;</span></code></pre></div></li>
135</ul>
136<h2 id="fail2ban">fail2ban</h2>
137<p><code>fail2ban</code> is an intrusion prevention framework that reads server (Apache, SSH, etc.) and uses <code>iptables</code> profiles to block brute-force attempts:</p>
138<ul>
139<li><a href="http://www.fail2ban.org/wiki/index.php/Main_Page">Official website</a><a href=".html"></a></li>
140<li><a href="https://github.com/fail2ban/fail2ban">Source code</a><a href=".html"></a></li>
141</ul>
142<h3 id="read-shaarli-logs-to-ban-ips">Read Shaarli logs to ban IPs</h3>
143<p>Example configuration:</p>
144<ul>
145<li>allow 3 login attempts per IP address</li>
146<li>after 3 failures, permanently ban the corresponding IP adddress</li>
147</ul>
148<p><code>/etc/fail2ban/jail.local</code></p>
149<div class="sourceCode"><pre class="sourceCode ini"><code class="sourceCode ini"><span class="kw">[shaarli-auth][]</span><span class="dt">(.html)</span>
150<span class="dt">enabled </span><span class="ot">=</span><span class="st"> </span><span class="kw">true</span>
151<span class="dt">port </span><span class="ot">=</span><span class="st"> https,http</span>
152<span class="dt">filter </span><span class="ot">=</span><span class="st"> shaarli-auth</span>
153<span class="dt">logpath </span><span class="ot">=</span><span class="st"> /var/www/path/to/shaarli/data/log.txt</span>
154<span class="dt">maxretry </span><span class="ot">=</span><span class="st"> </span><span class="dv">3</span>
155<span class="dt">bantime </span><span class="ot">=</span><span class="st"> -</span><span class="dv">1</span></code></pre></div>
156<p><code>/etc/fail2ban/filter.d/shaarli-auth.conf</code></p>
157<div class="sourceCode"><pre class="sourceCode ini"><code class="sourceCode ini"><span class="kw">[INCLUDES][]</span><span class="dt">(.html)</span>
158<span class="dt">before </span><span class="ot">=</span><span class="st"> common.conf</span>
159<span class="kw">[Definition][]</span><span class="dt">(.html)</span>
160<span class="dt">failregex </span><span class="ot">=</span><span class="st"> \s-\s&lt;HOST&gt;\s-\sLogin failed for user.*$</span>
161<span class="dt">ignoreregex </span><span class="ot">=</span><span class="st"> </span></code></pre></div>
162<h2 id="robots---restricting-search-engines-and-web-crawler-traffic">Robots - Restricting search engines and web crawler traffic</h2>
163<p>Creating a <code>robots.txt</code> with the following contents at the root of your Shaarli installation will prevent <em>honest</em> web crawlers from indexing each and every link and Daily page from a Shaarli instance, thus getting rid of a certain amount of unsollicited network traffic.</p>
164<pre><code>User-agent: *
165Disallow: /</code></pre>
166<p>See:</p>
167<ul>
168<li><a href="http://www.robotstxt.org/" class="uri">http://www.robotstxt.org/</a></li>
169<li><a href="http://www.robotstxt.org/robotstxt.html" class="uri">http://www.robotstxt.org/robotstxt.html</a></li>
170<li><a href="http://www.robotstxt.org/meta.html" class="uri">http://www.robotstxt.org/meta.html</a></li>
171</ul>
172</body>
173</html>
diff --git a/doc/Shaarli-configuration.html b/doc/Shaarli-configuration.html
deleted file mode 100644
index 6d717c65..00000000
--- a/doc/Shaarli-configuration.html
+++ /dev/null
@@ -1,295 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Shaarli configuration</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="shaarli-configuration">Shaarli configuration</h1>
103<h1 id="shaarli-configuration-1">Shaarli configuration</h1>
104<h2 id="foreword">Foreword</h2>
105<p><strong>Do not edit configuration options in index.php! Your changes would be lost.</strong></p>
106<p>Once your Shaarli instance is installed, the file <code>data/config.json.php</code> is generated:</p>
107<ul>
108<li>it contains all settings in JSON format, and can be edited to customize values</li>
109<li>it defines which <a href="Plugin-System">plugins</a> are enabled<a href="(.html).html">(.html)</a></li>
110<li>its values override those defined in <code>index.php</code></li>
111<li>it is wrap in a PHP comment to prevent anyone accessing it, regardless of server configuration</li>
112</ul>
113<h2 id="file-and-directory-permissions">File and directory permissions</h2>
114<p>The server process running Shaarli must have:</p>
115<ul>
116<li><code>read</code> access to the following resources:
117<ul>
118<li>PHP scripts: <code>index.php</code>, <code>application/*.php</code>, <code>plugins/*.php</code></li>
119<li>3rd party PHP and Javascript libraries: <code>inc/*.php</code>, <code>inc/*.js</code></li>
120<li>static assets:
121<ul>
122<li>CSS stylesheets: <code>inc/*.css</code></li>
123<li><code>images/*</code></li>
124</ul></li>
125<li>RainTPL templates: <code>tpl/*.html</code></li>
126</ul></li>
127<li><code>read</code>, <code>write</code> and <code>execution</code> access to the following directories:
128<ul>
129<li><code>cache</code> - thumbnail cache</li>
130<li><code>data</code> - link data store, configuration options</li>
131<li><code>pagecache</code> - Atom/RSS feed cache</li>
132<li><code>tmp</code> - RainTPL page cache</li>
133</ul></li>
134</ul>
135<p>On a Linux distribution:</p>
136<ul>
137<li>the web server user will likely be <code>www</code> or <code>http</code> (for Apache2)</li>
138<li>it will be a member of a group of the same name: <code>www:www</code>, <code>http:http</code></li>
139<li>to give it access to Shaarli, either:
140<ul>
141<li>unzip Shaarli in the default web server location (usually <code>/var/www/</code>) and set the web server user as the owner</li>
142<li>put users in the same group as the web server, and set the appropriate access rights</li>
143</ul></li>
144<li>if you have a domain / subdomain to serve Shaarli, <a href="Server-configuration">configure the server</a> accordingly<a href="(.html).html">(.html)</a></li>
145</ul>
146<h2 id="configuration">Configuration</h2>
147<p>In <code>data/config.json.php</code>.</p>
148<p>See also <a href="Plugin-System.html">Plugin System</a>.<a href=".html"></a></p>
149<h3 id="credentials">Credentials</h3>
150<blockquote>
151<p>You shouldn't edit those.</p>
152</blockquote>
153<p><strong>login</strong>: Login username.<br />
154<strong>hash</strong>: Generated password hash.<br />
155<strong>salt</strong>: Password salt.</p>
156<h3 id="general">General</h3>
157<p><strong>title</strong>: Shaarli's instance title.<br />
158<strong>header_link</strong>: Link to the homepage.<br />
159<strong>links_per_page</strong>: Number of shaares displayed per page.<br />
160<strong>timezone</strong>: See <a href="http://php.net/manual/en/timezones.php">the list of supported timezones</a>. <a href=".html"></a><br />
161<strong>enabled_plugins</strong>: List of enabled plugins.</p>
162<h3 id="security">Security</h3>
163<p><strong>session_protection_disabled</strong>: Disable session cookie hijacking protection (not recommended).<br />
164It might be useful if your IP adress often changes.<br />
165<strong>ban_after</strong>: Failed login attempts before being IP banned.<br />
166<strong>ban_duration</strong>: IP ban duration in seconds.<br />
167<strong>open_shaarli</strong>: Anyone can add a new link while logged out if enabled.<br />
168<strong>trusted_proxies</strong>: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy.</p>
169<h3 id="resources">Resources</h3>
170<p><strong>data_dir</strong>: Data directory.<br />
171<strong>datastore</strong>: Shaarli's links database file path.<br />
172<strong>updates</strong>: File path for the ran updates file.<br />
173<strong>log</strong>: Log file path.<br />
174<strong>update_check</strong>: Last update check file path.<br />
175<strong>raintpl_tpl</strong>: Templates directory.<br />
176<strong>raintpl_tmp</strong>: Template engine cache directory.<br />
177<strong>thumbnails_cache</strong>: Thumbnails cache directory.<br />
178<strong>page_cache</strong>: Shaarli's internal cache directory.<br />
179<strong>ban_file</strong>: Banned IP file path.</p>
180<h3 id="updates">Updates</h3>
181<p><strong>check_updates</strong>: Enable or disable update check to the git repository.<br />
182<strong>check_updates_branch</strong>: Git branch used to check updates (e.g. <code>stable</code> or <code>master</code>).<br />
183<strong>check_updates_interval</strong>: Look for new version every N seconds (default: every day).</p>
184<h3 id="privacy">Privacy</h3>
185<p><strong>default_private_links</strong>: Check the private checkbox by default for every new link.<br />
186<strong>hide_public_links</strong>: All links are hidden while logged out.<br />
187<strong>hide_timestamps</strong>: Timestamps are hidden.</p>
188<h3 id="feed">Feed</h3>
189<p><strong>rss_permalinks</strong>: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL.<br />
190<strong>show_atom</strong>: Display ATOM feed button.</p>
191<h3 id="thumbnail">Thumbnail</h3>
192<p><strong>enable_thumbnails</strong>: Enable or disable thumbnail display.<br />
193<strong>enable_localcache</strong>: Enable or disable local cache.</p>
194<h3 id="redirector">Redirector</h3>
195<p><strong>url</strong>: Redirector URL, such as <code>anonym.to</code>.<br />
196<strong>encode_url</strong>: Enable this if the redirector needs encoded URL to work properly.</p>
197<h2 id="configuration-file-example">Configuration file example</h2>
198<div class="sourceCode"><pre class="sourceCode json"><code class="sourceCode json"><span class="er">&lt;?php</span> <span class="er">/*</span>
199<span class="fu">{</span>
200 <span class="dt">&quot;credentials&quot;</span><span class="fu">:</span> <span class="fu">{</span>
201 <span class="dt">&quot;login&quot;</span><span class="fu">:</span> <span class="st">&quot;&lt;login&gt;&quot;</span><span class="fu">,</span>
202 <span class="dt">&quot;hash&quot;</span><span class="fu">:</span> <span class="st">&quot;&lt;password hash&gt;&quot;</span><span class="fu">,</span>
203 <span class="dt">&quot;salt&quot;</span><span class="fu">:</span> <span class="st">&quot;&lt;password salt&gt;&quot;</span>
204 <span class="fu">},</span>
205 <span class="dt">&quot;security&quot;</span><span class="fu">:</span> <span class="fu">{</span>
206 <span class="dt">&quot;ban_after&quot;</span><span class="fu">:</span> <span class="dv">4</span><span class="fu">,</span>
207 <span class="dt">&quot;session_protection_disabled&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span>
208 <span class="dt">&quot;ban_duration&quot;</span><span class="fu">:</span> <span class="dv">1800</span><span class="fu">,</span>
209 <span class="dt">&quot;trusted_proxies&quot;</span><span class="fu">:</span> <span class="ot">[[]</span><span class="er">(.html)</span>
210 <span class="st">&quot;1.2.3.4&quot;</span><span class="ot">,</span>
211 <span class="st">&quot;5.6.7.8&quot;</span>
212 <span class="ot">]</span>
213 <span class="fu">},</span>
214 <span class="dt">&quot;resources&quot;</span><span class="fu">:</span> <span class="fu">{</span>
215 <span class="dt">&quot;data_dir&quot;</span><span class="fu">:</span> <span class="st">&quot;data&quot;</span><span class="fu">,</span>
216 <span class="dt">&quot;config&quot;</span><span class="fu">:</span> <span class="st">&quot;data</span><span class="ch">\/</span><span class="st">config.php&quot;</span><span class="fu">,</span>
217 <span class="dt">&quot;datastore&quot;</span><span class="fu">:</span> <span class="st">&quot;data</span><span class="ch">\/</span><span class="st">datastore.php&quot;</span><span class="fu">,</span>
218 <span class="dt">&quot;ban_file&quot;</span><span class="fu">:</span> <span class="st">&quot;data</span><span class="ch">\/</span><span class="st">ipbans.php&quot;</span><span class="fu">,</span>
219 <span class="dt">&quot;updates&quot;</span><span class="fu">:</span> <span class="st">&quot;data</span><span class="ch">\/</span><span class="st">updates.txt&quot;</span><span class="fu">,</span>
220 <span class="dt">&quot;log&quot;</span><span class="fu">:</span> <span class="st">&quot;data</span><span class="ch">\/</span><span class="st">log.txt&quot;</span><span class="fu">,</span>
221 <span class="dt">&quot;update_check&quot;</span><span class="fu">:</span> <span class="st">&quot;data</span><span class="ch">\/</span><span class="st">lastupdatecheck.txt&quot;</span><span class="fu">,</span>
222 <span class="dt">&quot;raintpl_tmp&quot;</span><span class="fu">:</span> <span class="st">&quot;tmp</span><span class="ch">\/</span><span class="st">&quot;</span><span class="fu">,</span>
223 <span class="dt">&quot;raintpl_tpl&quot;</span><span class="fu">:</span> <span class="st">&quot;tpl</span><span class="ch">\/</span><span class="st">&quot;</span><span class="fu">,</span>
224 <span class="dt">&quot;thumbnails_cache&quot;</span><span class="fu">:</span> <span class="st">&quot;cache&quot;</span><span class="fu">,</span>
225 <span class="dt">&quot;page_cache&quot;</span><span class="fu">:</span> <span class="st">&quot;pagecache&quot;</span>
226 <span class="fu">},</span>
227 <span class="dt">&quot;general&quot;</span><span class="fu">:</span> <span class="fu">{</span>
228 <span class="dt">&quot;check_updates&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
229 <span class="dt">&quot;rss_permalinks&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
230 <span class="dt">&quot;links_per_page&quot;</span><span class="fu">:</span> <span class="dv">20</span><span class="fu">,</span>
231 <span class="dt">&quot;default_private_links&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
232 <span class="dt">&quot;enable_thumbnails&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
233 <span class="dt">&quot;enable_localcache&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
234 <span class="dt">&quot;check_updates_branch&quot;</span><span class="fu">:</span> <span class="st">&quot;stable&quot;</span><span class="fu">,</span>
235 <span class="dt">&quot;check_updates_interval&quot;</span><span class="fu">:</span> <span class="dv">86400</span><span class="fu">,</span>
236 <span class="dt">&quot;enabled_plugins&quot;</span><span class="fu">:</span> <span class="ot">[[]</span><span class="er">(.html)</span>
237 <span class="st">&quot;markdown&quot;</span><span class="ot">,</span>
238 <span class="st">&quot;wallabag&quot;</span><span class="ot">,</span>
239 <span class="st">&quot;archiveorg&quot;</span>
240 <span class="ot">]</span><span class="fu">,</span>
241 <span class="dt">&quot;timezone&quot;</span><span class="fu">:</span> <span class="st">&quot;Europe</span><span class="ch">\/</span><span class="st">Paris&quot;</span><span class="fu">,</span>
242 <span class="dt">&quot;title&quot;</span><span class="fu">:</span> <span class="st">&quot;My Shaarli&quot;</span><span class="fu">,</span>
243 <span class="dt">&quot;header_link&quot;</span><span class="fu">:</span> <span class="st">&quot;?&quot;</span>
244 <span class="fu">},</span>
245 <span class="dt">&quot;extras&quot;</span><span class="fu">:</span> <span class="fu">{</span>
246 <span class="dt">&quot;show_atom&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span>
247 <span class="dt">&quot;hide_public_links&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span>
248 <span class="dt">&quot;hide_timestamps&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span>
249 <span class="dt">&quot;open_shaarli&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span>
250 <span class="dt">&quot;redirector&quot;</span><span class="fu">:</span> <span class="st">&quot;http://anonym.to/?&quot;</span><span class="fu">,</span>
251 <span class="dt">&quot;redirector_encode_url&quot;</span><span class="fu">:</span> <span class="kw">false</span>
252 <span class="fu">},</span>
253 <span class="dt">&quot;general&quot;</span><span class="fu">:</span> <span class="fu">{</span>
254 <span class="dt">&quot;header_link&quot;</span><span class="fu">:</span> <span class="st">&quot;?&quot;</span><span class="fu">,</span>
255 <span class="dt">&quot;links_per_page&quot;</span><span class="fu">:</span> <span class="dv">20</span><span class="fu">,</span>
256 <span class="dt">&quot;enabled_plugins&quot;</span><span class="fu">:</span> <span class="ot">[[]</span><span class="er">(.html)</span>
257 <span class="st">&quot;markdown&quot;</span><span class="ot">,</span>
258 <span class="st">&quot;wallabag&quot;</span>
259 <span class="ot">]</span><span class="fu">,</span>
260 <span class="dt">&quot;timezone&quot;</span><span class="fu">:</span> <span class="st">&quot;Europe</span><span class="ch">\/</span><span class="st">Paris&quot;</span><span class="fu">,</span>
261 <span class="dt">&quot;title&quot;</span><span class="fu">:</span> <span class="st">&quot;My Shaarli&quot;</span>
262 <span class="fu">},</span>
263 <span class="dt">&quot;updates&quot;</span><span class="fu">:</span> <span class="fu">{</span>
264 <span class="dt">&quot;check_updates&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
265 <span class="dt">&quot;check_updates_branch&quot;</span><span class="fu">:</span> <span class="st">&quot;stable&quot;</span><span class="fu">,</span>
266 <span class="dt">&quot;check_updates_interval&quot;</span><span class="fu">:</span> <span class="dv">86400</span>
267 <span class="fu">},</span>
268 <span class="dt">&quot;feed&quot;</span><span class="fu">:</span> <span class="fu">{</span>
269 <span class="dt">&quot;rss_permalinks&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
270 <span class="dt">&quot;show_atom&quot;</span><span class="fu">:</span> <span class="kw">false</span>
271 <span class="fu">},</span>
272 <span class="dt">&quot;privacy&quot;</span><span class="fu">:</span> <span class="fu">{</span>
273 <span class="dt">&quot;default_private_links&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
274 <span class="dt">&quot;hide_public_links&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span>
275 <span class="dt">&quot;hide_timestamps&quot;</span><span class="fu">:</span> <span class="kw">false</span>
276 <span class="fu">},</span>
277 <span class="dt">&quot;thumbnail&quot;</span><span class="fu">:</span> <span class="fu">{</span>
278 <span class="dt">&quot;enable_thumbnails&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
279 <span class="dt">&quot;enable_localcache&quot;</span><span class="fu">:</span> <span class="kw">true</span>
280 <span class="fu">},</span>
281 <span class="dt">&quot;redirector&quot;</span><span class="fu">:</span> <span class="fu">{</span>
282 <span class="dt">&quot;url&quot;</span><span class="fu">:</span> <span class="st">&quot;http://anonym.to/?&quot;</span><span class="fu">,</span>
283 <span class="dt">&quot;encode_url&quot;</span><span class="fu">:</span> <span class="kw">false</span>
284 <span class="fu">},</span>
285 <span class="dt">&quot;plugins&quot;</span><span class="fu">:</span> <span class="fu">{</span>
286 <span class="dt">&quot;WALLABAG_URL&quot;</span><span class="fu">:</span> <span class="st">&quot;http://demo.wallabag.org&quot;</span><span class="fu">,</span>
287 <span class="dt">&quot;WALLABAG_VERSION&quot;</span><span class="fu">:</span> <span class="st">&quot;1&quot;</span>
288 <span class="fu">}</span>
289<span class="fu">}</span> <span class="er">?&gt;</span></code></pre></div>
290<h2 id="additional-configuration">Additional configuration</h2>
291<p>The playvideos plugin may require that you adapt your server's<br />
292<a href="https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md#troubleshooting">Content Security Policy</a> <a href=".html"></a><br />
293configuration to work properly.<a href="(.html).html">(.html)</a></p>
294</body>
295</html>
diff --git a/doc/Shaarli-configuration.md b/doc/Shaarli-configuration.md
deleted file mode 100644
index 4a783c0e..00000000
--- a/doc/Shaarli-configuration.md
+++ /dev/null
@@ -1,211 +0,0 @@
1#Shaarli configuration
2# Shaarli configuration
3
4## Foreword
5
6**Do not edit configuration options in index.php! Your changes would be lost.**
7
8Once your Shaarli instance is installed, the file `data/config.json.php` is generated:
9* it contains all settings in JSON format, and can be edited to customize values
10* it defines which [plugins](Plugin-System) are enabled[(.html)]((.html).html)
11* its values override those defined in `index.php`
12* it is wrap in a PHP comment to prevent anyone accessing it, regardless of server configuration
13
14## File and directory permissions
15
16The server process running Shaarli must have:
17- `read` access to the following resources:
18 - PHP scripts: `index.php`, `application/*.php`, `plugins/*.php`
19 - 3rd party PHP and Javascript libraries: `inc/*.php`, `inc/*.js`
20 - static assets:
21 - CSS stylesheets: `inc/*.css`
22 - `images/*`
23 - RainTPL templates: `tpl/*.html`
24- `read`, `write` and `execution` access to the following directories:
25 - `cache` - thumbnail cache
26 - `data` - link data store, configuration options
27 - `pagecache` - Atom/RSS feed cache
28 - `tmp` - RainTPL page cache
29
30On a Linux distribution:
31- the web server user will likely be `www` or `http` (for Apache2)
32- it will be a member of a group of the same name: `www:www`, `http:http`
33- to give it access to Shaarli, either:
34 - unzip Shaarli in the default web server location (usually `/var/www/`) and set the web server user as the owner
35 - put users in the same group as the web server, and set the appropriate access rights
36- if you have a domain / subdomain to serve Shaarli, [configure the server](Server-configuration) accordingly[(.html)]((.html).html)
37
38## Configuration
39
40In `data/config.json.php`.
41
42See also [Plugin System](Plugin-System.html).[](.html)
43
44### Credentials
45
46> You shouldn't edit those.
47
48**login**: Login username.
49**hash**: Generated password hash.
50**salt**: Password salt.
51
52### General
53
54**title**: Shaarli's instance title.
55**header_link**: Link to the homepage.
56**links_per_page**: Number of shaares displayed per page.
57**timezone**: See [the list of supported timezones](http://php.net/manual/en/timezones.php). [](.html)
58**enabled_plugins**: List of enabled plugins.
59
60### Security
61
62**session_protection_disabled**: Disable session cookie hijacking protection (not recommended).
63It might be useful if your IP adress often changes.
64**ban_after**: Failed login attempts before being IP banned.
65**ban_duration**: IP ban duration in seconds.
66**open_shaarli**: Anyone can add a new link while logged out if enabled.
67**trusted_proxies**: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy.
68
69### Resources
70
71**data_dir**: Data directory.
72**datastore**: Shaarli's links database file path.
73**updates**: File path for the ran updates file.
74**log**: Log file path.
75**update_check**: Last update check file path.
76**raintpl_tpl**: Templates directory.
77**raintpl_tmp**: Template engine cache directory.
78**thumbnails_cache**: Thumbnails cache directory.
79**page_cache**: Shaarli's internal cache directory.
80**ban_file**: Banned IP file path.
81
82### Updates
83
84**check_updates**: Enable or disable update check to the git repository.
85**check_updates_branch**: Git branch used to check updates (e.g. `stable` or `master`).
86**check_updates_interval**: Look for new version every N seconds (default: every day).
87
88### Privacy
89
90**default_private_links**: Check the private checkbox by default for every new link.
91**hide_public_links**: All links are hidden while logged out.
92**hide_timestamps**: Timestamps are hidden.
93
94### Feed
95
96**rss_permalinks**: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL.
97**show_atom**: Display ATOM feed button.
98
99### Thumbnail
100
101**enable_thumbnails**: Enable or disable thumbnail display.
102**enable_localcache**: Enable or disable local cache.
103
104### Redirector
105
106**url**: Redirector URL, such as `anonym.to`.
107**encode_url**: Enable this if the redirector needs encoded URL to work properly.
108
109## Configuration file example
110
111```json
112<?php /*
113{
114 "credentials": {
115 "login": "<login>",
116 "hash": "<password hash>",
117 "salt": "<password salt>"
118 },
119 "security": {
120 "ban_after": 4,
121 "session_protection_disabled": false,
122 "ban_duration": 1800,
123 "trusted_proxies": [[](.html)
124 "1.2.3.4",
125 "5.6.7.8"
126 ]
127 },
128 "resources": {
129 "data_dir": "data",
130 "config": "data\/config.php",
131 "datastore": "data\/datastore.php",
132 "ban_file": "data\/ipbans.php",
133 "updates": "data\/updates.txt",
134 "log": "data\/log.txt",
135 "update_check": "data\/lastupdatecheck.txt",
136 "raintpl_tmp": "tmp\/",
137 "raintpl_tpl": "tpl\/",
138 "thumbnails_cache": "cache",
139 "page_cache": "pagecache"
140 },
141 "general": {
142 "check_updates": true,
143 "rss_permalinks": true,
144 "links_per_page": 20,
145 "default_private_links": true,
146 "enable_thumbnails": true,
147 "enable_localcache": true,
148 "check_updates_branch": "stable",
149 "check_updates_interval": 86400,
150 "enabled_plugins": [[](.html)
151 "markdown",
152 "wallabag",
153 "archiveorg"
154 ],
155 "timezone": "Europe\/Paris",
156 "title": "My Shaarli",
157 "header_link": "?"
158 },
159 "extras": {
160 "show_atom": false,
161 "hide_public_links": false,
162 "hide_timestamps": false,
163 "open_shaarli": false,
164 "redirector": "http://anonym.to/?",
165 "redirector_encode_url": false
166 },
167 "general": {
168 "header_link": "?",
169 "links_per_page": 20,
170 "enabled_plugins": [[](.html)
171 "markdown",
172 "wallabag"
173 ],
174 "timezone": "Europe\/Paris",
175 "title": "My Shaarli"
176 },
177 "updates": {
178 "check_updates": true,
179 "check_updates_branch": "stable",
180 "check_updates_interval": 86400
181 },
182 "feed": {
183 "rss_permalinks": true,
184 "show_atom": false
185 },
186 "privacy": {
187 "default_private_links": true,
188 "hide_public_links": false,
189 "hide_timestamps": false
190 },
191 "thumbnail": {
192 "enable_thumbnails": true,
193 "enable_localcache": true
194 },
195 "redirector": {
196 "url": "http://anonym.to/?",
197 "encode_url": false
198 },
199 "plugins": {
200 "WALLABAG_URL": "http://demo.wallabag.org",
201 "WALLABAG_VERSION": "1"
202 }
203} ?>
204```
205
206## Additional configuration
207
208The playvideos plugin may require that you adapt your server's
209[Content Security Policy](https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md#troubleshooting) [](.html)
210configuration to work properly.[(.html)]((.html).html)
211
diff --git a/doc/Sharing-button.html b/doc/Sharing-button.html
deleted file mode 100644
index 93710efe..00000000
--- a/doc/Sharing-button.html
+++ /dev/null
@@ -1,92 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Sharing button</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="sharing-button">Sharing button</h1>
66<h3 id="add-the-sharing-button-bookmarklet-to-your-browser">Add the sharing button (<em>bookmarklet</em>) to your browser</h3>
67<ul>
68<li>Open your Shaarli and <code>Login</code></li>
69<li>Click the <code>Tools</code> button in the top bar</li>
70<li>Drag the <strong><code>✚Shaare link</code> button</strong>, and drop it to your browser's bookmarks bar.</li>
71</ul>
72<p><em>This bookmarklet button is compatible with Firefox, Opera, Chrome and Safari. Under Opera, you can't drag'n drop the button: You have to right-click on it and add a bookmark to your personal toolbar.</em></p>
73<p><embed src="(images/bookmarklet.png).html" /></p>
74<h3 id="share-links-using-the-bookmarklet">Share links using the <em>bookmarklet</em></h3>
75<ul>
76<li>When you are visiting a webpage you would like to share with Shaarli, click the <em>bookmarklet</em> you just added.</li>
77<li>A window opens.</li>
78<li>You can freely edit title, description, tags... to find it later using the text search or tag filtering.</li>
79<li>You will be able to edit this link later using the <embed src="(https://raw.githubusercontent.com/shaarli/Shaarli/master/images/edit_icon.png)-edit-button..html" /></li>
80<li>You can also check the “Private” box so that the link is saved but only visible to you.</li>
81<li>Click <code>Save</code>.<strong>Voilà! Your link is now shared.</strong></li>
82</ul>
83<h3 id="troubleshooting-the-bookmarklet-doesnt-work-with-a-few-website-e.g.-github.com">Troubleshooting: The bookmarklet doesn't work with a few website (e.g. Github.com)</h3>
84<p>Websites which enforce Content Security Policy (CSP), such as github.com, disallow usage of bookmarklets. Unfortunatly, there is nothing Shaarli can do about it.</p>
85<p>See <a href="https://github.com/shaarli/Shaarli#196">#196</a>.<a href=".html"></a></p>
86<p>There is an open bug for both Firefox and Chromium:</p>
87<ul>
88<li><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=866522" class="uri">https://bugzilla.mozilla.org/show_bug.cgi?id=866522</a></li>
89<li><a href="https://code.google.com/p/chromium/issues/detail?id=233903" class="uri">https://code.google.com/p/chromium/issues/detail?id=233903</a></li>
90</ul>
91</body>
92</html>
diff --git a/doc/Sharing-button.md b/doc/Sharing-button.md
deleted file mode 100644
index e4388863..00000000
--- a/doc/Sharing-button.md
+++ /dev/null
@@ -1,31 +0,0 @@
1#Sharing button
2### Add the sharing button (_bookmarklet_) to your browser
3
4 * Open your Shaarli and `Login`
5 * Click the `Tools` button in the top bar
6 * Drag the **`✚Shaare link` button**, and drop it to your browser's bookmarks bar.
7
8_This bookmarklet button is compatible with Firefox, Opera, Chrome and Safari. Under Opera, you can't drag'n drop the button: You have to right-click on it and add a bookmark to your personal toolbar._
9
10![(images/bookmarklet.png)]((images/bookmarklet.png).html)
11
12### Share links using the _bookmarklet_
13
14 * When you are visiting a webpage you would like to share with Shaarli, click the _bookmarklet_ you just added.
15 * A window opens.
16 * You can freely edit title, description, tags... to find it later using the text search or tag filtering.
17 * You will be able to edit this link later using the ![(https://raw.githubusercontent.com/shaarli/Shaarli/master/images/edit_icon.png) edit button.]((https://raw.githubusercontent.com/shaarli/Shaarli/master/images/edit_icon.png)-edit-button..html)
18 * You can also check the “Private” box so that the link is saved but only visible to you.
19 * Click `Save`.**Voilà! Your link is now shared.**
20
21### Troubleshooting: The bookmarklet doesn't work with a few website (e.g. Github.com)
22
23Websites which enforce Content Security Policy (CSP), such as github.com, disallow usage of bookmarklets. Unfortunatly, there is nothing Shaarli can do about it.
24
25See [#196](https://github.com/shaarli/Shaarli#196).[](.html)
26
27There is an open bug for both Firefox and Chromium:
28
29 * https://bugzilla.mozilla.org/show_bug.cgi?id=866522
30 * https://code.google.com/p/chromium/issues/detail?id=233903
31
diff --git a/doc/Static-analysis.html b/doc/Static-analysis.html
deleted file mode 100644
index d964e917..00000000
--- a/doc/Static-analysis.html
+++ /dev/null
@@ -1,80 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Static analysis</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="static-analysis">Static analysis</h1>
66<h2 id="wip">WIP</h2>
67<p>This topic is currently being discussed here:</p>
68<ul>
69<li><a href="https://github.com/shaarli/Shaarli/issues/95">Fix coding style (static analysis)</a> (#95)<a href=".html"></a></li>
70<li><a href="https://github.com/shaarli/Shaarli/issues/130">Continuous Integration tools &amp; features</a> (#130)<a href=".html"></a></li>
71</ul>
72<h3 id="usage">Usage</h3>
73<p>Static analysis tools can be installed with Composer, and used through Shaarli's <a href="https://github.com/shaarli/Shaarli/blob/master/Makefile">Makefile</a>.<a href=".html"></a></p>
74<p>For an overview of the available features, see:</p>
75<ul>
76<li><a href="https://github.com/shaarli/Shaarli/pull/124">Code quality: Makefile to run static code checkers</a> (#124)<a href=".html"></a></li>
77<li><a href="https://github.com/shaarli/Shaarli/pull/276">Run PHPCS against different coding standards</a> (#276)<a href=".html"></a></li>
78</ul>
79</body>
80</html>
diff --git a/doc/Theming.html b/doc/Theming.html
deleted file mode 100644
index 7cbf7aef..00000000
--- a/doc/Theming.html
+++ /dev/null
@@ -1,166 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Theming</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="theming">Theming</h1>
103<h2 id="user-css">User CSS</h2>
104<ul>
105<li>Shaarli's apparence can be modified by editing CSS rules in <code>inc/user.css</code>. This file allows to override rules defined in the main <code>inc/shaarli.css</code> (only add changed rules), or define a whole new theme.</li>
106<li>Do not edit <code>inc/shaarli.css</code>! Your changes would be overriden when updating Shaarli.</li>
107<li>Some themes are available at <a href="https://github.com/shaarli/shaarli-themes" class="uri">https://github.com/shaarli/shaarli-themes</a>.</li>
108</ul>
109<p>See also:</p>
110<ul>
111<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
112</ul>
113<h2 id="raintpl-template">RainTPL template</h2>
114<p><em>WARNING - This feature is currently being worked on and will be improved in the next releases. Experimental.</em></p>
115<ul>
116<li>Find the template you'd like to install (see the list of <a href="available-templates%7CTheming#community-themes--templates.html">available templates|Theming#community-themes--templates</a>)</li>
117<li>Find it's git clone URL or download the zip archive for the template.</li>
118<li>In your Shaarli <code>tpl/</code> directory, run <code>git clone https://url/of/my-template/</code> or unpack the zip archive.
119<ul>
120<li>There should now be a <code>my-template/</code> directory under the <code>tpl/</code> dir, containing directly all the template files.</li>
121</ul></li>
122<li><p>Edit <code>data/config.json.php</code> to have Shaarli use this template, in <code>&quot;resource&quot;</code> e.g.</p>
123<div class="sourceCode"><pre class="sourceCode json"><code class="sourceCode json"><span class="er">&quot;raintpl_tpl&quot;:</span> <span class="er">&quot;tpl\/my-template\/&quot;,</span></code></pre></div></li>
124</ul>
125<h2 id="community-themes-templates">Community themes &amp; templates</h2>
126<ul>
127<li><a href="https://github.com/AkibaTech/Shaarli---SuperHero-Theme">AkibaTech/Shaarli Superhero Theme</a> - A template/theme for Shaarli<a href=".html"></a></li>
128<li><a href="https://github.com/alexisju/albinomouse-template">alexisju/albinomouse-template</a> - A full template for Shaarli<a href=".html"></a></li>
129<li><a href="https://github.com/ArthurHoaro/shaarli-launch">ArthurHoaro/shaarli-launch</a> - Customizable Shaarli theme.<a href=".html"></a></li>
130<li><a href="https://github.com/dhoko/ShaarliTemplate">dhoko/ShaarliTemplate</a> - A template/theme for Shaarli<a href=".html"></a></li>
131<li><a href="https://github.com/kalvn/shaarli-blocks">kalvn/shaarli-blocks</a> - A template/theme for Shaarli<a href=".html"></a></li>
132<li><a href="https://github.com/kalvn/Shaarli-Material">kalvn/Shaarli-Material</a> - A theme (template) based on Google's Material Design for Shaarli, the superfast delicious clone.<a href=".html"></a></li>
133<li><a href="https://github.com/ManufacturaInd/shaarli-2004licious-theme">ManufacturaInd/shaarli-2004licious-theme</a> - A template/theme as a humble homage to the early looks of the del.icio.us site.<a href=".html"></a></li>
134<li><a href="https://github.com/misterair/limonade">misterair/Limonade</a> - A fork of (legacy) Shaarli with a new template<a href=".html"></a></li>
135<li><a href="https://github.com/mrjovanovic/serious-theme-shaarli">mrjovanovic/serious-theme-shaarli</a> - A serious theme for SHaarli.<a href=".html"></a></li>
136<li><a href="https://github.com/vivienhaese/shaarlitheme">vivienhaese/shaarlitheme</a> - A Shaarli fork meant to be run in an openshift instance<a href=".html"></a></li>
137</ul>
138<h3 id="example-installation-albinomouse-template">Example installation: AlbinoMouse template</h3>
139<p>With the following configuration:</p>
140<ul>
141<li>Apache 2 / PHP 5.6</li>
142<li>user sites are enabled, e.g. <code>/home/user/public_html/somedir</code> is served as <code>http://localhost/~user/somedir</code></li>
143<li><code>http</code> is the name of the Apache user</li>
144</ul>
145<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> ~/public_html
146
147<span class="co"># clone repositories</span>
148$ <span class="fu">git</span> clone https://github.com/shaarli/Shaarli.git shaarli
149$ <span class="bu">pushd</span> shaarli/tpl
150$ <span class="fu">git</span> clone https://github.com/alexisju/albinomouse-template.git
151$ <span class="bu">popd</span>
152
153<span class="co"># set access rights for Apache</span>
154$ <span class="fu">chgrp</span> -R http shaarli
155$ <span class="fu">chmod</span> g+rwx shaarli shaarli/cache shaarli/data shaarli/pagecache shaarli/tmp</code></pre></div>
156<p>Get config written:</p>
157<ul>
158<li>go to the freshly installed site</li>
159<li>fill the install form</li>
160<li>log in to Shaarli</li>
161</ul>
162<p>Edit Shaarli's <a href="configuration%7CShaarli-configuration.html">configuration|Shaarli configuration</a>:</p>
163<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co"># the file should be owned by Apache, thus not writeable =&gt; sudo</span>
164$ <span class="fu">sudo</span> sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php</code></pre></div>
165</body>
166</html>
diff --git a/doc/Theming.md b/doc/Theming.md
deleted file mode 100644
index a21899c2..00000000
--- a/doc/Theming.md
+++ /dev/null
@@ -1,65 +0,0 @@
1#Theming
2## User CSS
3
4- Shaarli's apparence can be modified by editing CSS rules in `inc/user.css`. This file allows to override rules defined in the main `inc/shaarli.css` (only add changed rules), or define a whole new theme.
5- Do not edit `inc/shaarli.css`! Your changes would be overriden when updating Shaarli.
6- Some themes are available at https://github.com/shaarli/shaarli-themes.
7
8See also:
9- [Download CSS styles from an OPML list](Download-CSS-styles-from-an-OPML-list.html)
10
11## RainTPL template
12
13_WARNING - This feature is currently being worked on and will be improved in the next releases. Experimental._
14
15- Find the template you'd like to install (see the list of [available templates|Theming#community-themes--templates](available-templates|Theming#community-themes--templates.html))
16- Find it's git clone URL or download the zip archive for the template.
17- In your Shaarli `tpl/` directory, run `git clone https://url/of/my-template/` or unpack the zip archive.
18 - There should now be a `my-template/` directory under the `tpl/` dir, containing directly all the template files.
19- Edit `data/config.json.php` to have Shaarli use this template, in `"resource"` e.g.
20```json
21"raintpl_tpl": "tpl\/my-template\/",
22```
23
24## Community themes & templates
25- [AkibaTech/Shaarli Superhero Theme](https://github.com/AkibaTech/Shaarli---SuperHero-Theme) - A template/theme for Shaarli[](.html)
26- [alexisju/albinomouse-template](https://github.com/alexisju/albinomouse-template) - A full template for Shaarli[](.html)
27- [ArthurHoaro/shaarli-launch](https://github.com/ArthurHoaro/shaarli-launch) - Customizable Shaarli theme.[](.html)
28- [dhoko/ShaarliTemplate](https://github.com/dhoko/ShaarliTemplate) - A template/theme for Shaarli[](.html)
29- [kalvn/shaarli-blocks](https://github.com/kalvn/shaarli-blocks) - A template/theme for Shaarli[](.html)
30- [kalvn/Shaarli-Material](https://github.com/kalvn/Shaarli-Material) - A theme (template) based on Google's Material Design for Shaarli, the superfast delicious clone.[](.html)
31- [ManufacturaInd/shaarli-2004licious-theme](https://github.com/ManufacturaInd/shaarli-2004licious-theme) - A template/theme as a humble homage to the early looks of the del.icio.us site.[](.html)
32- [misterair/Limonade](https://github.com/misterair/limonade) - A fork of (legacy) Shaarli with a new template[](.html)
33- [mrjovanovic/serious-theme-shaarli](https://github.com/mrjovanovic/serious-theme-shaarli) - A serious theme for SHaarli.[](.html)
34- [vivienhaese/shaarlitheme](https://github.com/vivienhaese/shaarlitheme) - A Shaarli fork meant to be run in an openshift instance[](.html)
35
36### Example installation: AlbinoMouse template
37With the following configuration:
38- Apache 2 / PHP 5.6
39- user sites are enabled, e.g. `/home/user/public_html/somedir` is served as `http://localhost/~user/somedir`
40- `http` is the name of the Apache user
41
42```bash
43$ cd ~/public_html
44
45# clone repositories
46$ git clone https://github.com/shaarli/Shaarli.git shaarli
47$ pushd shaarli/tpl
48$ git clone https://github.com/alexisju/albinomouse-template.git
49$ popd
50
51# set access rights for Apache
52$ chgrp -R http shaarli
53$ chmod g+rwx shaarli shaarli/cache shaarli/data shaarli/pagecache shaarli/tmp
54```
55
56Get config written:
57- go to the freshly installed site
58- fill the install form
59- log in to Shaarli
60
61Edit Shaarli's [configuration|Shaarli configuration](configuration|Shaarli-configuration.html):
62```bash
63# the file should be owned by Apache, thus not writeable => sudo
64$ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php
65```
diff --git a/doc/Troubleshooting.html b/doc/Troubleshooting.html
deleted file mode 100644
index ed1c6f09..00000000
--- a/doc/Troubleshooting.html
+++ /dev/null
@@ -1,200 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Troubleshooting</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="troubleshooting">Troubleshooting</h1>
103<h2 id="browser">Browser</h2>
104<h3 id="redirection-issues-http-referer">Redirection issues (HTTP Referer)</h3>
105<p>Depending on its configuration and installed plugins, the browser may remove or alter (spoof) HTTP referers, thus preventing Shaarli from properly redirecting between pages.</p>
106<p>See:</p>
107<ul>
108<li><a href="https://en.wikipedia.org/wiki/HTTP_referer">HTTP referer</a> (Wikipedia)<a href=".html"></a></li>
109<li><a href="http://www.ghacks.net/2015/01/22/improve-online-privacy-by-controlling-referrer-information/">Improve online privacy by controlling referrer information</a><a href=".html"></a></li>
110<li><a href="http://b.agilob.net/better-security-privacy-and-anonymity-in-firefox/">Better security, privacy and anonymity in Firefox</a><a href=".html"></a></li>
111</ul>
112<h3 id="firefox-http-referer-options">Firefox HTTP Referer options</h3>
113<p>HTTP settings are available by browsing <code>about:config</code>, here are the available settings and their values.</p>
114<p><code>network.http.sendRefererHeader</code> - determines when to send the Referer HTTP header</p>
115<ul>
116<li>0: Never send the referring URL
117<ul>
118<li>not recommended, may break some sites</li>
119</ul></li>
120<li>1: Send only on clicked links</li>
121<li>2 (default): Send for links and images</li>
122</ul>
123<p><code>network.http.referer.XOriginPolicy</code> - Cross-domain origin policy</p>
124<ul>
125<li>0 (default): Always send</li>
126<li>1: Send if base domains match</li>
127<li>2: Send if hosts match</li>
128</ul>
129<p><code>network.http.referer.spoofSource</code> - Referer spoofing (~faking)</p>
130<ul>
131<li>false (default): real referer</li>
132<li>true: spoof referer (use target URI as referer)</li>
133<li>known to break some functionality in Shaarli</li>
134</ul>
135<p><code>network.http.referer.trimmingPolicy</code> - trim the URI not to send a full Referer</p>
136<ul>
137<li>0 (default): send full URI</li>
138<li>1: scheme+host+port+path</li>
139<li>2: scheme+host+port</li>
140</ul>
141<h3 id="firefox-localhost-and-redirections">Firefox, localhost and redirections</h3>
142<p><code>localhost</code> is not a proper Fully Qualified Domain Name (FQDN); if Firefox has been set up to spoof referers, or only accept requests from the same base domain/host, Shaarli redirections will not work properly.</p>
143<p>To solve this, assign a local domain to your host, e.g.</p>
144<pre><code>127.0.0.1 localhost desktop localhost.lan
145::1 localhost desktop localhost.lan</code></pre>
146<p>and browse Shaarli at <a href="http://localhost.lan/" class="uri">http://localhost.lan/</a>.</p>
147<p>Related threads:</p>
148<ul>
149<li><a href="https://bbs.archlinux.org/viewtopic.php?id=156064">What is localhost.localdomain for?</a><a href=".html"></a></li>
150<li><a href="https://github.com/shaarli/Shaarli/issues/311">Stop returning to the first page after editing a bookmark from another page</a><a href=".html"></a></li>
151</ul>
152<h2 id="login">Login</h2>
153<h3 id="i-forgot-my-password">I forgot my password!</h3>
154<p>Delete the file <code>data/config.php</code> and display the page again. You will be asked for a new login/password.</p>
155<h3 id="im-locked-out---login-bruteforce-protection">I'm locked out - Login bruteforce protection</h3>
156<p>Login form is protected against brute force attacks: 4 failed logins will ban the IP address from login for 30 minutes. Banned IPs can still browse links.</p>
157<p>To remove the current IP bans, delete the file <code>data/ipbans.php</code></p>
158<h3 id="list-of-all-login-attempts">List of all login attempts</h3>
159<p>The file <code>data/log.txt</code> shows all logins (successful or failed) and bans/lifted bans.<br />
160Search for <code>failed</code> in this file to look for unauthorized login attempts.</p>
161<h2 id="hosting-problems">Hosting problems</h2>
162<h3 id="old-php-versions">Old PHP versions</h3>
163<ul>
164<li>On <strong>free.fr</strong> : free.fr now support php 5.6.x(<a href="http://les.pages.perso.chez.free.fr/migrations/php5v6.io">link</a>)and so support now the tag autocompletion but you have to do the following : At the root of your webspace create a <code>sessions</code> directory and a <code>.htaccess</code> file containing:<a href=".html"></a></li>
165</ul>
166<div class="sourceCode"><pre class="sourceCode ini"><code class="sourceCode ini"><span class="dt">&lt;IfDefine Free&gt;</span>
167<span class="dt">php56 1</span>
168<span class="dt">&lt;/IfDefine&gt;</span></code></pre></div>
169<ul>
170<li>If you have an error such as: <code>Parse error: syntax error, unexpected '=', expecting '(' in /links/index.php on line xxx</code>, it means that your host is using php4, not php5. Shaarli requires php 5.1. Try changing the file extension to <code>.php5</code></li>
171<li>On <strong>1and1</strong> : If you add the link from the page (and not from the bookmarklet), Shaarli will no be able to get the title of the page. You will have to enter it manually. (Because they have disabled the ability to download a file through HTTP).</li>
172<li>If you have the error <code>Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /…/index.php on line xxx</code>, it means that your host has disabled the ability to fetch a file by HTTP in the php config (Typically in 1and1 hosting). Bad host. Change host. Or comment the following lines:<a href=".html"></a></li>
173</ul>
174<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php"><span class="co">//list($status,$headers,$data) = getHTTP($url,4); // Short timeout to keep the application responsive.</span>
175<span class="co">// FIXME: Decode charset according to charset specified in either 1) HTTP response headers or 2) &lt;head&gt; in html </span>
176<span class="co">//if (strpos($status,&#39;200 OK&#39;)) $title=html_extract_title($data);</span></code></pre></div>
177<ul>
178<li>On hosts which forbid outgoing HTTP requests (such as free.fr), some thumbnails will not work.</li>
179<li>On <strong>lost-oasis</strong>, RSS doesn't work correctly, because of this message at the begining of the RSS/ATOM feed : <code>&lt;? // tout ce qui est charge ici (generalement des includes et require) est charge en permanence. ?&gt;</code>. To fix this, remove this message from <code>php-include/prepend.php</code></li>
180</ul>
181<h3 id="dates-are-not-properly-formatted">Dates are not properly formatted</h3>
182<p>Shaarli tries to sniff the language of the browser (using HTTP_ACCEPT_LANGUAGE headers) and choose a date format accordingly. But Shaarli can only use the date formats (and more generaly speaking, the locales) provided by the webserver. So even if you have a browser in French, you may end up with dates in US format (it's the case on sebsauvage.net :-( )</p>
183<h3 id="problems-on-centos-servers">Problems on CentOS servers</h3>
184<p>On <strong>CentOS</strong>/RedHat derivatives, you may need to install the <code>php-mbstring</code> package.</p>
185<h3 id="my-session-expires-i-cant-stay-logged-in">My session expires! I can't stay logged in</h3>
186<p>This can be caused by several things:</p>
187<ul>
188<li>Your php installation may not have a proper directory setup for session files. (eg. on Free.fr you need to create a <code>session</code> directory on the root of your website.) You may need to create the session directory of set it up.</li>
189<li>Most hosts regularly clean the temporary and session directories. Your host may be cleaning those directories too aggressively (eg.OVH hosts), forcing an expire of the session. You may want to set the session directory in your web root. (eg. Create the <code>sessions</code> subdirectory and add <code>ini_set('session.save_path', $_SERVER['DOCUMENT_ROOT'].'/../sessions');</code>. Make sure this directory is not browsable !)<a href=".html"></a></li>
190<li>If your IP address changes during surfing, Shaarli will force expire your session for security reasons (to prevent session cookie hijacking). This can happen when surfing from WiFi or 3G (you may have switched WiFi/3G access point), or in some corporate/university proxies which use load balancing (and may have proxies with several external IP addresses).</li>
191<li>Some browser addons may interfer with HTTP headers (ipfuck/ipflood/GreaseMonkey…). Try disabling those.</li>
192<li>You may be using OperaTurbo or OperaMini, which use their own proxies which may change from time to time.</li>
193<li>If you have another application on the same webserver where Shaarli is installed, these application may forcefully expire php sessions.</li>
194</ul>
195<h2 id="sessions-do-not-seem-to-work-correctly-on-your-server">Sessions do not seem to work correctly on your server</h2>
196<p>Follow the instructions in the error message. Make sure you are accessing shaarli via a direct IP address or a proper hostname. If you have <strong>no dots</strong> in the hostname (e.g. <code>localhost</code> or <code>http://my-webserver/shaarli/</code>), some browsers will not store cookies at all (this respects the <a href="http://curl.haxx.se/rfc/cookie_spec.html">HTTP cookie specification</a>).<a href=".html"></a></p>
197<h3 id="pubsubhubbub-support">pubsubhubbub support</h3>
198<p>Download <a href="https://pubsubhubbub.googlecode.com/git/publisher_clients/php/library/publisher.php">publisher.php</a> at the root of your Shaarli installation and set <code>$GLOBALS['config'['PUBSUBHUB_URL']</code> in your <code>config.php</code>]('PUBSUBHUB_URL']<code>-in-your-</code>config.php`.html)</p>
199</body>
200</html>
diff --git a/doc/Unit-tests.html b/doc/Unit-tests.html
deleted file mode 100644
index 266fd33a..00000000
--- a/doc/Unit-tests.html
+++ /dev/null
@@ -1,212 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Unit tests</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="unit-tests">Unit tests</h1>
103<h3 id="setup-your-environment-for-tests">Setup your environment for tests</h3>
104<p>The framework used is <a href="https://phpunit.de/">PHPUnit</a>; it can be installed with <a href="https://getcomposer.org/">Composer</a>, which is a dependency management tool.<a href=".html"></a></p>
105<p>Regarding Composer, you can either use:</p>
106<ul>
107<li>a system-wide version, e.g. installed through your distro's package manager</li>
108<li>a local version, downloadable <a href="https://getcomposer.org/download/">here</a><a href=".html"></a></li>
109</ul>
110<h4 id="sample-usage">Sample usage</h4>
111<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co"># system-wide version</span>
112$ <span class="ex">composer</span> install
113$ <span class="ex">composer</span> update
114
115<span class="co"># local version</span>
116$ <span class="ex">php</span> composer.phar self-update
117$ <span class="ex">php</span> composer.phar install
118$ <span class="ex">php</span> composer.phar update</code></pre></div>
119<h4 id="install-shaarli-dev-dependencies">Install Shaarli dev dependencies</h4>
120<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> /path/to/shaarli
121$ <span class="ex">composer</span> update</code></pre></div>
122<h4 id="install-and-enable-xdebug-to-generate-phpunit-coverage-reports">Install and enable Xdebug to generate PHPUnit coverage reports</h4>
123<p>For Debian-based distros:</p>
124<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">aptitude</span> install php5-xdebug</code></pre></div>
125<p>For ArchLinux:</p>
126<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">pacman</span> -S xdebug</code></pre></div>
127<p>Then add the following line to <code>/etc/php/php.ini</code>:</p>
128<div class="sourceCode"><pre class="sourceCode ini"><code class="sourceCode ini"><span class="dt">zend_extension</span><span class="ot">=</span><span class="st">xdebug.so</span></code></pre></div>
129<h4 id="run-unit-tests">Run unit tests</h4>
130<p>Successful test suite:</p>
131<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">make</span> test
132
133<span class="ex">-------</span>
134<span class="ex">PHPUNIT</span>
135<span class="ex">-------</span>
136<span class="ex">PHPUnit</span> 4.6.9 by Sebastian Bergmann and contributors.
137
138<span class="ex">Configuration</span> read from /home/virtualtam/public_html/shaarli/phpunit.xml
139
140<span class="ex">....................................</span>
141
142<span class="ex">Time</span>: 759 ms, Memory: 8.25Mb
143
144<span class="ex">OK</span> (36 tests, 65 assertions)</code></pre></div>
145<p>Test suite with failures and errors:</p>
146<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">make</span> test
147<span class="ex">-------</span>
148<span class="ex">PHPUNIT</span>
149<span class="ex">-------</span>
150<span class="ex">PHPUnit</span> 4.6.9 by Sebastian Bergmann and contributors.
151
152<span class="ex">Configuration</span> read from /home/virtualtam/public_html/shaarli/phpunit.xml
153
154<span class="ex">E..FF...............................</span>
155
156<span class="ex">Time</span>: 802 ms, Memory: 8.25Mb
157
158<span class="ex">There</span> was 1 error:
159
160<span class="ex">1</span>) <span class="ex">LinkDBTest</span>::testConstructLoggedIn
161<span class="ex">Missing</span> argument 2 for LinkDB::__construct(), <span class="ex">called</span> in /home/virtualtam/public_html/shaarli/tests/Link\
162DBTest.php on line 79 and defined
163
164<span class="ex">/home/virtualtam/public_html/shaarli/application</span>/LinkDB.php:<span class="ex">58</span>
165<span class="ex">/home/virtualtam/public_html/shaarli/tests</span>/LinkDBTest.php:<span class="ex">79</span>
166
167<span class="ex">--</span>
168
169<span class="ex">There</span> were 2 failures:
170
171<span class="ex">1</span>) <span class="ex">LinkDBTest</span>::testCheckDBNew
172<span class="ex">Failed</span> asserting that two strings are equal.
173<span class="ex">---</span> Expected
174<span class="ex">+++</span> Actual
175<span class="ex">@@</span> @@
176<span class="ex">-</span><span class="st">&#39;e3edea8ea7bb50be4bcb404df53fbb4546a7156e&#39;</span>
177<span class="ex">+</span><span class="st">&#39;85eab0c610d4f68025f6ed6e6b6b5fabd4b55834&#39;</span>
178
179<span class="ex">/home/virtualtam/public_html/shaarli/tests</span>/LinkDBTest.php:<span class="ex">121</span>
180
181<span class="ex">2</span>) <span class="ex">LinkDBTest</span>::testCheckDBLoad
182<span class="ex">Failed</span> asserting that two strings are equal.
183<span class="ex">---</span> Expected
184<span class="ex">+++</span> Actual
185<span class="ex">@@</span> @@
186<span class="ex">-</span><span class="st">&#39;e3edea8ea7bb50be4bcb404df53fbb4546a7156e&#39;</span>
187<span class="ex">+</span><span class="st">&#39;85eab0c610d4f68025f6ed6e6b6b5fabd4b55834&#39;</span>
188
189<span class="ex">/home/virtualtam/public_html/shaarli/tests</span>/LinkDBTest.php:<span class="ex">133</span>
190
191<span class="ex">FAILURES</span>!
192<span class="ex">Tests</span>: 36, Assertions: 63, Errors: 1, Failures: 2.</code></pre></div>
193<h4 id="test-results-and-coverage">Test results and coverage</h4>
194<p>By default, PHPUnit will run all suitable tests found under the <code>tests</code> directory.</p>
195<p>Each test has 3 possible outcomes:</p>
196<ul>
197<li><code>.</code> - success</li>
198<li><code>F</code> - failure: the test was run but its results are invalid</li>
199<li>the code does not behave as expected</li>
200<li>dependencies to external elements: globals, session, cache...</li>
201<li><code>E</code> - error: something went wrong and the tested code has crashed</li>
202<li>typos in the code, or in the test code</li>
203<li>dependencies to missing external elements</li>
204</ul>
205<p>If Xdebug has been installed and activated, two coverage reports will be generated:</p>
206<ul>
207<li>a summary in the console</li>
208<li>a detailed HTML report with metrics for tested code</li>
209<li>to open it in a web browser: <code>firefox coverage/index.html &amp;</code></li>
210</ul>
211</body>
212</html>
diff --git a/doc/Upgrade-and-migration.html b/doc/Upgrade-and-migration.html
deleted file mode 100644
index a5b041d5..00000000
--- a/doc/Upgrade-and-migration.html
+++ /dev/null
@@ -1,242 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Upgrade and migration</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <style type="text/css">
10div.sourceCode { overflow-x: auto; }
11table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
12 margin: 0; padding: 0; vertical-align: baseline; border: none; }
13table.sourceCode { width: 100%; line-height: 100%; }
14td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
15td.sourceCode { padding-left: 5px; }
16code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
17code > span.dt { color: #902000; } /* DataType */
18code > span.dv { color: #40a070; } /* DecVal */
19code > span.bn { color: #40a070; } /* BaseN */
20code > span.fl { color: #40a070; } /* Float */
21code > span.ch { color: #4070a0; } /* Char */
22code > span.st { color: #4070a0; } /* String */
23code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
24code > span.ot { color: #007020; } /* Other */
25code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
26code > span.fu { color: #06287e; } /* Function */
27code > span.er { color: #ff0000; font-weight: bold; } /* Error */
28code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
29code > span.cn { color: #880000; } /* Constant */
30code > span.sc { color: #4070a0; } /* SpecialChar */
31code > span.vs { color: #4070a0; } /* VerbatimString */
32code > span.ss { color: #bb6688; } /* SpecialString */
33code > span.im { } /* Import */
34code > span.va { color: #19177c; } /* Variable */
35code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
36code > span.op { color: #666666; } /* Operator */
37code > span.bu { } /* BuiltIn */
38code > span.ex { } /* Extension */
39code > span.pp { color: #bc7a00; } /* Preprocessor */
40code > span.at { color: #7d9029; } /* Attribute */
41code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
42code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
43code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
44code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
45 </style>
46 <link rel="stylesheet" href="github-markdown.css">
47 <!--[if lt IE 9]>
48 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
49 <![endif]-->
50</head>
51<body>
52<div id="local-sidebar">
53<ul>
54<li><a href="Home.html">Home</a></li>
55<li>Setup
56<ul>
57<li><a href="Download-and-Installation.html">Download and Installation</a></li>
58<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
59<li><a href="Server-requirements.html">Server requirements</a></li>
60<li><a href="Server-configuration.html">Server configuration</a></li>
61<li><a href="Server-security.html">Server security</a></li>
62<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
63<li><a href="Plugins.html">Plugins</a></li>
64</ul></li>
65<li><a href="Docker.html">Docker</a></li>
66<li><a href="Usage.html">Usage</a>
67<ul>
68<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
69<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
70<li><a href="Firefox-share.html">Firefox share</a></li>
71<li><a href="RSS-feeds.html">RSS feeds</a></li>
72</ul></li>
73<li>How To
74<ul>
75<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
76<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
77<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
78<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
79<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
80</ul></li>
81<li><a href="Troubleshooting.html">Troubleshooting</a></li>
82<li><a href="Development.html">Development</a>
83<ul>
84<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
85<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
86<li><a href="Directory-structure.html">Directory structure</a></li>
87<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
88<li><a href="Plugin-System.html">Plugin System</a></li>
89<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
90<li><a href="Security.html">Security</a></li>
91<li><a href="Static-analysis.html">Static analysis</a></li>
92<li><a href="Theming.html">Theming</a></li>
93<li><a href="Unit-tests.html">Unit tests</a></li>
94</ul></li>
95<li>About
96<ul>
97<li><a href="FAQ.html">FAQ</a></li>
98<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
99</ul></li>
100</ul>
101</div>
102<h1 id="upgrade-and-migration">Upgrade and migration</h1>
103<h2 id="preparation">Preparation</h2>
104<h3 id="backup-your-data">Backup your data</h3>
105<p>Shaarli stores all user data under the <code>data</code> directory:</p>
106<ul>
107<li><code>data/config.php</code> - main configuration file</li>
108<li><code>data/datastore.php</code> - bookmarked links</li>
109<li><code>data/ipbans.php</code> - banned IP addresses</li>
110</ul>
111<p>See <a href="Shaarli-configuration.html">Shaarli configuration</a> for more information about Shaarli resources.</p>
112<p>It is recommended to backup this repository <em>before</em> starting updating/upgrading Shaarli:</p>
113<ul>
114<li>users with SSH access: copy or archive the directory to a temporary location</li>
115<li>users with FTP access: download a local copy of your Shaarli installation using your favourite client</li>
116</ul>
117<h3 id="migrating-data-from-a-previous-installation">Migrating data from a previous installation</h3>
118<p>As all user data is kept under <code>data</code>, this is the only directory you need to worry about when migrating to a new installation, which corresponds to the following steps:</p>
119<ul>
120<li>backup the <code>data</code> directory</li>
121<li>install or update Shaarli:
122<ul>
123<li>fresh installation - see <a href="Download-and-installation.html">Download and installation</a></li>
124<li>update - see the following sections</li>
125</ul></li>
126<li>check or restore the <code>data</code> directory</li>
127</ul>
128<h2 id="upgrading-from-release-archives">Upgrading from release archives</h2>
129<p>All tagged revisions can be downloaded as tarballs or ZIP archives from the <a href="https://github.com/shaarli/Shaarli/releases">releases</a> page.<a href=".html"></a></p>
130<p>We <em>recommend</em> using the releases from the <code>stable</code> branch, which are available as:</p>
131<ul>
132<li>gzipped tarball - <a href="https://github.com/shaarli/Shaarli/archive/stable.tar.gz" class="uri">https://github.com/shaarli/Shaarli/archive/stable.tar.gz</a></li>
133<li>ZIP archive - <a href="https://github.com/shaarli/Shaarli/archive/stable.zip" class="uri">https://github.com/shaarli/Shaarli/archive/stable.zip</a></li>
134</ul>
135<p>Once downloaded, extract the archive locally and update your remote installation (e.g. via FTP) -be sure you keep the contents of the <code>data</code> directory!</p>
136<p>After upgrading, access your fresh Shaarli installation from a web browser; the configuration will then be automatically updated, and new settings added to <code>data/config.php</code> (see <a href="Shaarli-configuration.html">Shaarli configuration</a> for more details).</p>
137<h2 id="upgrading-with-git">Upgrading with Git</h2>
138<h3 id="updating-a-community-shaarli">Updating a community Shaarli</h3>
139<p>If you have installed Shaarli from the <a href="Download#clone-with-git-recommended">community Git repository</a>, simply <a href="https://www.git-scm.com/docs/git-pull">pull new changes</a> from your local clone:<a href=".html"></a></p>
140<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> /path/to/shaarli
141$ <span class="fu">git</span> pull
142
143<span class="ex">From</span> github.com:shaarli/Shaarli
144 <span class="ex">*</span> branch master -<span class="op">&gt;</span> FETCH_HEAD
145<span class="ex">Updating</span> ebd67c6..521f0e6
146<span class="ex">Fast-forward</span>
147 <span class="ex">application/Url.php</span> <span class="kw">|</span> <span class="ex">1</span> +
148 <span class="ex">shaarli_version.php</span> <span class="kw">|</span> <span class="ex">2</span> +-
149 <span class="ex">tests/Url/UrlTest.php</span> <span class="kw">|</span> <span class="ex">1</span> +
150 <span class="ex">3</span> files changed, 3 insertions(+), <span class="ex">1</span> deletion(-)</code></pre></div>
151<p>Shaarli &gt;= <code>v0.8.x</code>: install/update third-party PHP dependencies using <a href="https://getcomposer.org/">Composer</a>:<a href=".html"></a></p>
152<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">composer</span> update --no-dev
153
154<span class="ex">Loading</span> composer repositories with package information
155<span class="ex">Updating</span> dependencies
156 <span class="ex">-</span> Installing shaarli/netscape-bookmark-parser (v1.0.1)
157 <span class="ex">Downloading</span>: 100%</code></pre></div>
158<h3 id="migrating-and-upgrading-from-sebsauvages-repository">Migrating and upgrading from Sebsauvage's repository</h3>
159<p>If you have installed Shaarli from <a href="https://github.com/sebsauvage/Shaarli">Sebsauvage's original Git repository</a>, you can use <a href="https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes">Git remotes</a> to update your working copy.<a href=".html"></a></p>
160<p>The following guide assumes that:</p>
161<ul>
162<li>you have a basic knowledge of Git <a href="https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell">branching</a> and <a href="https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes">remote repositories</a><a href=".html"></a></li>
163<li>the default remote is named <code>origin</code> and points to Sebsauvage's repository</li>
164<li>the current branch is <code>master</code>
165<ul>
166<li>if you have personal branches containing customizations, you will need to <a href="https://git-scm.com/book/en/v2/Git-Branching-Rebasing">rebase them</a> after the upgrade; beware though, a lot of changes have been made since the community fork has been created, so things are very likely to break<embed src=".html" /></li>
167</ul></li>
168<li>the working copy is clean:
169<ul>
170<li>no versioned file has been locally modified</li>
171<li>no untracked files are present</li>
172</ul></li>
173</ul>
174<h4 id="step-0-show-repository-information">Step 0: show repository information</h4>
175<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> /path/to/shaarli
176
177$ <span class="fu">git</span> remote -v
178<span class="ex">origin</span> https://github.com/sebsauvage/Shaarli (fetch)
179<span class="ex">origin</span> https://github.com/sebsauvage/Shaarli (push)
180
181$ <span class="fu">git</span> branch -vv
182<span class="ex">*</span> master 029f75f [origin/master] Update README.md[](.html)
183
184$ <span class="fu">git</span> status
185<span class="ex">On</span> branch master
186<span class="ex">Your</span> branch is up-to-date with <span class="st">&#39;origin/master&#39;</span>.
187<span class="ex">nothing</span> to commit, working directory clean</code></pre></div>
188<h4 id="step-1-update-git-remotes">Step 1: update Git remotes</h4>
189<pre><code>$ git remote rename origin sebsauvage
190$ git remote -v
191sebsauvage https://github.com/sebsauvage/Shaarli (fetch)
192sebsauvage https://github.com/sebsauvage/Shaarli (push)
193
194$ git remote add origin https://github.com/shaarli/Shaarli
195$ git fetch origin
196
197remote: Counting objects: 3015, done.
198remote: Compressing objects: 100% (19/19), done.
199remote: Total 3015 (delta 446), reused 457 (delta 446), pack-reused 2550
200Receiving objects: 100% (3015/3015), 2.59 MiB | 918.00 KiB/s, done.
201Resolving deltas: 100% (1899/1899), completed with 48 local objects.
202From https://github.com/shaarli/Shaarli
203 * [new branch] master -&gt; origin/master[](.html)
204 * [new branch] stable -&gt; origin/stable[](.html)
205[...][](.html)
206 * [new tag] v0.6.4 -&gt; v0.6.4[](.html)
207 * [new tag] v0.7.0 -&gt; v0.7.0[](.html)</code></pre>
208<h4 id="step-2-use-the-stable-community-branch">Step 2: use the stable community branch</h4>
209<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">git</span> checkout origin/stable -b stable
210<span class="ex">Branch</span> stable set up to track remote branch stable from origin.
211<span class="ex">Switched</span> to a new branch <span class="st">&#39;stable&#39;</span>
212
213$ <span class="fu">git</span> branch -vv
214 <span class="ex">master</span> 029f75f [sebsauvage/master] Update README.md[](.html)
215<span class="ex">*</span> stable 890afc3 [origin/stable] Merge pull request <span class="co">#509 from ArthurHoaro/v0.6.5[](.html)</span></code></pre></div>
216<p>Shaarli &gt;= <code>v0.8.x</code>: install/update third-party PHP dependencies using <a href="https://getcomposer.org/">Composer</a>:<a href=".html"></a></p>
217<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">composer</span> update --no-dev
218
219<span class="ex">Loading</span> composer repositories with package information
220<span class="ex">Updating</span> dependencies
221 <span class="ex">-</span> Installing shaarli/netscape-bookmark-parser (v1.0.1)
222 <span class="ex">Downloading</span>: 100%</code></pre></div>
223<p>Optionally, you can delete information related to the legacy version:</p>
224<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">git</span> branch -D master
225<span class="ex">Deleted</span> branch master (was 029f75f)<span class="ex">.</span>
226
227$ <span class="fu">git</span> remote remove sebsauvage
228
229$ <span class="fu">git</span> remote -v
230<span class="ex">origin</span> https://github.com/shaarli/Shaarli (fetch)
231<span class="ex">origin</span> https://github.com/shaarli/Shaarli (push)
232
233$ <span class="fu">git</span> gc
234<span class="ex">Counting</span> objects: 3317, done.
235<span class="ex">Delta</span> compression using up to 8 threads.
236<span class="ex">Compressing</span> objects: 100% (1237/1237), <span class="kw">done</span><span class="ex">.</span>
237<span class="ex">Writing</span> objects: 100% (3317/3317), <span class="kw">done</span><span class="ex">.</span>
238<span class="ex">Total</span> 3317 (delta 2050), <span class="ex">reused</span> 3301 (delta 2034)<span class="ex">to</span></code></pre></div>
239<h4 id="step-3-configuration">Step 3: configuration</h4>
240<p>After migrating, access your fresh Shaarli installation from a web browser; the configuration will then be automatically updated, and new settings added to <code>data/config.php</code> (see <a href="Shaarli-configuration.html">Shaarli configuration</a> for more details).</p>
241</body>
242</html>
diff --git a/doc/Usage.html b/doc/Usage.html
deleted file mode 100644
index 63f21d93..00000000
--- a/doc/Usage.html
+++ /dev/null
@@ -1,93 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – Usage</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="usage">Usage</h1>
66<h3 id="main-features">Main features</h3>
67<p>Shaarli is intended:</p>
68<ul>
69<li>to share, comment and save interesting links and news</li>
70<li>to bookmark useful/frequent personal links (as private links) and share them between computers</li>
71<li>as a minimal blog/microblog/writing platform (no character limit)</li>
72<li>as a read-it-later list (for example items tagged <code>readlater</code>)</li>
73<li>to draft and save articles/ideas</li>
74<li>to keep code snippets</li>
75<li>to keep notes and documentation</li>
76<li>as a shared clipboard between machines</li>
77<li>as a todo list</li>
78<li>to store playlists (e.g. with the <code>music</code> or <code>video</code> tags)</li>
79<li>to keep extracts/comments from webpages that may disappear</li>
80<li>to keep track of ongoing discussions (for example items tagged <code>discussion</code>)</li>
81<li><a href="http://shaarli.chassegnouf.net/?9Efeiw">to feed RSS aggregators</a> (planets) with specific tags<a href=".html"></a></li>
82<li>to feed other social networks, blogs... using RSS feeds and external services (dlvr.it, ifttt.com ...)</li>
83</ul>
84<h3 id="using-shaarli-as-a-blog-notepad-pastebin...">Using Shaarli as a blog, notepad, pastebin...</h3>
85<ul>
86<li>Go to your Shaarli setup and log in</li>
87<li>Click the <code>Add Link</code> button</li>
88<li>To share text only, do not enter any URL in the corresponding input field and click <code>Add Link</code></li>
89<li>Pick a title and enter your article, or note, in the description field; add a few tags; optionally check <code>Private</code> then click <code>Save</code></li>
90<li>Voilà! Your article is now published (privately if you selected that option) and accessible using its permalink.</li>
91</ul>
92</body>
93</html>
diff --git a/doc/Usage.md b/doc/Usage.md
deleted file mode 100644
index 30ad1466..00000000
--- a/doc/Usage.md
+++ /dev/null
@@ -1,25 +0,0 @@
1#Usage
2### Main features
3Shaarli is intended:
4 * to share, comment and save interesting links and news
5 * to bookmark useful/frequent personal links (as private links) and share them between computers
6 * as a minimal blog/microblog/writing platform (no character limit)
7 * as a read-it-later list (for example items tagged `readlater`)
8 * to draft and save articles/ideas
9 * to keep code snippets
10 * to keep notes and documentation
11 * as a shared clipboard between machines
12 * as a todo list
13 * to store playlists (e.g. with the `music` or `video` tags)
14 * to keep extracts/comments from webpages that may disappear
15 * to keep track of ongoing discussions (for example items tagged `discussion`)
16 * [to feed RSS aggregators](http://shaarli.chassegnouf.net/?9Efeiw) (planets) with specific tags[](.html)
17 * to feed other social networks, blogs... using RSS feeds and external services (dlvr.it, ifttt.com ...)
18
19### Using Shaarli as a blog, notepad, pastebin...
20
21 * Go to your Shaarli setup and log in
22 * Click the `Add Link` button
23 * To share text only, do not enter any URL in the corresponding input field and click `Add Link`
24 * Pick a title and enter your article, or note, in the description field; add a few tags; optionally check `Private` then click `Save`
25 * Voilà! Your article is now published (privately if you selected that option) and accessible using its permalink.
diff --git a/doc/_Footer.html b/doc/_Footer.html
deleted file mode 100644
index e8a62d2a..00000000
--- a/doc/_Footer.html
+++ /dev/null
@@ -1,68 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – _Footer</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="footer-shaarli-the-personal-minimalist-super-fast-database-free-bookmarking-service">_Footer<br />
66<em>Shaarli, the personal, minimalist, super-fast, database-free bookmarking service</em></h1>
67</body>
68</html>
diff --git a/doc/_Footer.md b/doc/_Footer.md
deleted file mode 100644
index 50fa4f56..00000000
--- a/doc/_Footer.md
+++ /dev/null
@@ -1,2 +0,0 @@
1#_Footer
2_Shaarli, the personal, minimalist, super-fast, database-free bookmarking service_
diff --git a/doc/_Sidebar.html b/doc/_Sidebar.html
deleted file mode 100644
index bb6dad93..00000000
--- a/doc/_Sidebar.html
+++ /dev/null
@@ -1,115 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <meta name="generator" content="pandoc">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7 <title>Shaarli – _Sidebar</title>
8 <style type="text/css">code{white-space: pre;}</style>
9 <link rel="stylesheet" href="github-markdown.css">
10 <!--[if lt IE 9]>
11 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12 <![endif]-->
13</head>
14<body>
15<div id="local-sidebar">
16<ul>
17<li><a href="Home.html">Home</a></li>
18<li>Setup
19<ul>
20<li><a href="Download-and-Installation.html">Download and Installation</a></li>
21<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
22<li><a href="Server-requirements.html">Server requirements</a></li>
23<li><a href="Server-configuration.html">Server configuration</a></li>
24<li><a href="Server-security.html">Server security</a></li>
25<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
26<li><a href="Plugins.html">Plugins</a></li>
27</ul></li>
28<li><a href="Docker.html">Docker</a></li>
29<li><a href="Usage.html">Usage</a>
30<ul>
31<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
32<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
33<li><a href="Firefox-share.html">Firefox share</a></li>
34<li><a href="RSS-feeds.html">RSS feeds</a></li>
35</ul></li>
36<li>How To
37<ul>
38<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
39<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
40<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
41<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
42<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
43</ul></li>
44<li><a href="Troubleshooting.html">Troubleshooting</a></li>
45<li><a href="Development.html">Development</a>
46<ul>
47<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
48<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
49<li><a href="Directory-structure.html">Directory structure</a></li>
50<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
51<li><a href="Plugin-System.html">Plugin System</a></li>
52<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
53<li><a href="Security.html">Security</a></li>
54<li><a href="Static-analysis.html">Static analysis</a></li>
55<li><a href="Theming.html">Theming</a></li>
56<li><a href="Unit-tests.html">Unit tests</a></li>
57</ul></li>
58<li>About
59<ul>
60<li><a href="FAQ.html">FAQ</a></li>
61<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
62</ul></li>
63</ul>
64</div>
65<h1 id="sidebar">_Sidebar</h1>
66<ul>
67<li><a href="Home.html">Home</a></li>
68<li>Setup
69<ul>
70<li><a href="Download-and-Installation.html">Download and Installation</a></li>
71<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
72<li><a href="Server-requirements.html">Server requirements</a></li>
73<li><a href="Server-configuration.html">Server configuration</a></li>
74<li><a href="Server-security.html">Server security</a></li>
75<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
76<li><a href="Plugins.html">Plugins</a></li>
77</ul></li>
78<li><a href="Docker.html">Docker</a></li>
79<li><a href="Usage.html">Usage</a>
80<ul>
81<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
82<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
83<li><a href="Firefox-share.html">Firefox share</a></li>
84<li><a href="RSS-feeds.html">RSS feeds</a></li>
85</ul></li>
86<li>How To
87<ul>
88<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
89<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
90<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
91<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
92<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
93</ul></li>
94<li><a href="Troubleshooting.html">Troubleshooting</a></li>
95<li><a href="Development.html">Development</a>
96<ul>
97<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
98<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
99<li><a href="Directory-structure.html">Directory structure</a></li>
100<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
101<li><a href="Plugin-System.html">Plugin System</a></li>
102<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
103<li><a href="Security.html">Security</a></li>
104<li><a href="Static-analysis.html">Static analysis</a></li>
105<li><a href="Theming.html">Theming</a></li>
106<li><a href="Unit-tests.html">Unit tests</a></li>
107</ul></li>
108<li>About
109<ul>
110<li><a href="FAQ.html">FAQ</a></li>
111<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
112</ul></li>
113</ul>
114</body>
115</html>
diff --git a/doc/_Sidebar.md b/doc/_Sidebar.md
deleted file mode 100644
index 1778e3a3..00000000
--- a/doc/_Sidebar.md
+++ /dev/null
@@ -1,37 +0,0 @@
1#_Sidebar
2- [Home](Home.html)
3- Setup
4 - [Download and Installation](Download-and-Installation.html)
5 - [Upgrade and migration](Upgrade-and-migration.html)
6 - [Server requirements](Server-requirements.html)
7 - [Server configuration](Server-configuration.html)
8 - [Server security](Server-security.html)
9 - [Shaarli configuration](Shaarli-configuration.html)
10 - [Plugins](Plugins.html)
11- [Docker](Docker.html)
12- [Usage](Usage.html)
13 - [Sharing button](Sharing-button.html) (bookmarklet)
14 - [Browsing and Searching](Browsing-and-Searching.html)
15 - [Firefox share](Firefox-share.html)
16 - [RSS feeds](RSS-feeds.html)
17- How To
18 - [Backup, restore, import and export](Backup,-restore,-import-and-export.html)
19 - [Copy an existing installation over SSH and serve it locally](Copy-an-existing-installation-over-SSH-and-serve-it-locally.html)
20 - [Create and serve multiple Shaarlis (farm)](Create-and-serve-multiple-Shaarlis-(farm).html)
21 - [Download CSS styles from an OPML list](Download-CSS-styles-from-an-OPML-list.html)
22 - [Datastore hacks](Datastore-hacks.html)
23- [Troubleshooting](Troubleshooting.html)
24- [Development](Development.html)
25 - [GnuPG signature](GnuPG-signature.html)
26 - [Coding guidelines](Coding-guidelines.html)
27 - [Directory structure](Directory-structure.html)
28 - [3rd party libraries](3rd-party-libraries.html)
29 - [Plugin System](Plugin-System.html)
30 - [Release Shaarli](Release-Shaarli.html)
31 - [Security](Security.html)
32 - [Static analysis](Static-analysis.html)
33 - [Theming](Theming.html)
34 - [Unit tests](Unit-tests.html)
35- About
36 - [FAQ](FAQ.html)
37 - [Community & Related software](Community-&-Related-software.html)
diff --git a/doc/config.json b/doc/config.json
deleted file mode 100644
index cc4de307..00000000
--- a/doc/config.json
+++ /dev/null
@@ -1,6 +0,0 @@
1{
2 "useSideMenu": true,
3 "lineBreaks": "gfm",
4 "additionalFooterText": "",
5 "title": "Shaarli documentation"
6} \ No newline at end of file
diff --git a/doc/github-markdown.css b/doc/github-markdown.css
deleted file mode 100644
index 581350ae..00000000
--- a/doc/github-markdown.css
+++ /dev/null
@@ -1,287 +0,0 @@
1#local-sidebar {
2 width: 230px;
3 float: right;
4 position: relative;
5 z-index: 4;
6 background-color: #fff;
7 border: 1px solid #e2e2e2;
8 border-radius: 3px;
9}
10
11body {
12 font-family: Helvetica, arial, sans-serif;
13 font-size: 14px;
14 line-height: 1.6;
15 padding-top: 10px;
16 padding-bottom: 10px;
17 background-color: white;
18 padding: 10px 20%; }
19
20body > *:first-child {
21 margin-top: 0 !important; }
22body > *:last-child {
23 margin-bottom: 0 !important; }
24
25a {
26 color: #4183C4; }
27a.absent {
28 color: #cc0000; }
29a.anchor {
30 display: block;
31 padding-left: 30px;
32 margin-left: -30px;
33 cursor: pointer;
34 position: absolute;
35 top: 0;
36 left: 0;
37 bottom: 0; }
38
39h1, h2, h3, h4, h5, h6 {
40 margin: 20px 0 10px;
41 padding: 0;
42 font-weight: bold;
43 -webkit-font-smoothing: antialiased;
44 cursor: text;
45 position: relative; }
46
47h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor {
48 background: url("../../images/modules/styleguide/para.png") no-repeat 10px center;
49 text-decoration: none; }
50
51h1 tt, h1 code {
52 font-size: inherit; }
53
54h2 tt, h2 code {
55 font-size: inherit; }
56
57h3 tt, h3 code {
58 font-size: inherit; }
59
60h4 tt, h4 code {
61 font-size: inherit; }
62
63h5 tt, h5 code {
64 font-size: inherit; }
65
66h6 tt, h6 code {
67 font-size: inherit; }
68
69h1 {
70 font-size: 28px;
71 color: black; }
72
73h2 {
74 font-size: 24px;
75 border-bottom: 1px solid #cccccc;
76 color: black; }
77
78h3 {
79 font-size: 18px; }
80
81h4 {
82 font-size: 16px; }
83
84h5 {
85 font-size: 14px; }
86
87h6 {
88 color: #777777;
89 font-size: 14px; }
90
91p, blockquote, ol, dl, table, pre {
92 margin: 15px 0; }
93
94hr {
95 background: transparent url("../../images/modules/pulls/dirty-shade.png") repeat-x 0 0;
96 border: 0 none;
97 color: #cccccc;
98 height: 4px;
99 padding: 0; }
100
101body > h2:first-child {
102 margin-top: 0;
103 padding-top: 0; }
104body > h1:first-child {
105 margin-top: 0;
106 padding-top: 0; }
107 body > h1:first-child + h2 {
108 margin-top: 0;
109 padding-top: 0; }
110body > h3:first-child, body > h4:first-child, body > h5:first-child, body > h6:first-child {
111 margin-top: 0;
112 padding-top: 0; }
113
114a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {
115 margin-top: 0;
116 padding-top: 0; }
117
118h1 p, h2 p, h3 p, h4 p, h5 p, h6 p {
119 margin-top: 0; }
120
121li p.first {
122 display: inline-block; }
123
124ul, ol {
125 padding-left: 30px; }
126
127ul :first-child, ol :first-child {
128 margin-top: 0; }
129
130ul :last-child, ol :last-child {
131 margin-bottom: 0; }
132
133dl {
134 padding: 0; }
135 dl dt {
136 font-size: 14px;
137 font-weight: bold;
138 font-style: italic;
139 padding: 0;
140 margin: 15px 0 5px; }
141 dl dt:first-child {
142 padding: 0; }
143 dl dt > :first-child {
144 margin-top: 0; }
145 dl dt > :last-child {
146 margin-bottom: 0; }
147 dl dd {
148 margin: 0 0 15px;
149 padding: 0 15px; }
150 dl dd > :first-child {
151 margin-top: 0; }
152 dl dd > :last-child {
153 margin-bottom: 0; }
154
155blockquote {
156 border-left: 4px solid #dddddd;
157 padding: 0 15px;
158 color: #777777; }
159 blockquote > :first-child {
160 margin-top: 0; }
161 blockquote > :last-child {
162 margin-bottom: 0; }
163
164table {
165 padding: 0; }
166 table tr {
167 border-top: 1px solid #cccccc;
168 background-color: white;
169 margin: 0;
170 padding: 0; }
171 table tr:nth-child(2n) {
172 background-color: #f8f8f8; }
173 table tr th {
174 font-weight: bold;
175 border: 1px solid #cccccc;
176 text-align: left;
177 margin: 0;
178 padding: 6px 13px; }
179 table tr td {
180 border: 1px solid #cccccc;
181 text-align: left;
182 margin: 0;
183 padding: 6px 13px; }
184 table tr th :first-child, table tr td :first-child {
185 margin-top: 0; }
186 table tr th :last-child, table tr td :last-child {
187 margin-bottom: 0; }
188
189img {
190 max-width: 100%; }
191
192span.frame {
193 display: block;
194 overflow: hidden; }
195 span.frame > span {
196 border: 1px solid #dddddd;
197 display: block;
198 float: left;
199 overflow: hidden;
200 margin: 13px 0 0;
201 padding: 7px;
202 width: auto; }
203 span.frame span img {
204 display: block;
205 float: left; }
206 span.frame span span {
207 clear: both;
208 color: #333333;
209 display: block;
210 padding: 5px 0 0; }
211span.align-center {
212 display: block;
213 overflow: hidden;
214 clear: both; }
215 span.align-center > span {
216 display: block;
217 overflow: hidden;
218 margin: 13px auto 0;
219 text-align: center; }
220 span.align-center span img {
221 margin: 0 auto;
222 text-align: center; }
223span.align-right {
224 display: block;
225 overflow: hidden;
226 clear: both; }
227 span.align-right > span {
228 display: block;
229 overflow: hidden;
230 margin: 13px 0 0;
231 text-align: right; }
232 span.align-right span img {
233 margin: 0;
234 text-align: right; }
235span.float-left {
236 display: block;
237 margin-right: 13px;
238 overflow: hidden;
239 float: left; }
240 span.float-left span {
241 margin: 13px 0 0; }
242span.float-right {
243 display: block;
244 margin-left: 13px;
245 overflow: hidden;
246 float: right; }
247 span.float-right > span {
248 display: block;
249 overflow: hidden;
250 margin: 13px auto 0;
251 text-align: right; }
252
253code, tt {
254 margin: 0 2px;
255 padding: 0 5px;
256 white-space: nowrap;
257 border: 1px solid #eaeaea;
258 background-color: #f8f8f8;
259 border-radius: 3px; }
260
261pre code {
262 margin: 0;
263 padding: 0;
264 white-space: pre;
265 border: none;
266 background: transparent; }
267
268.highlight pre {
269 background-color: #f8f8f8;
270 border: 1px solid #cccccc;
271 font-size: 13px;
272 line-height: 19px;
273 overflow: auto;
274 padding: 6px 10px;
275 border-radius: 3px; }
276
277pre {
278 background-color: #f8f8f8;
279 border: 1px solid #cccccc;
280 font-size: 13px;
281 line-height: 19px;
282 overflow: auto;
283 padding: 6px 10px;
284 border-radius: 3px; }
285 pre code, pre tt {
286 background-color: transparent;
287 border: none; }
diff --git a/doc/3rd-party-libraries.md b/doc/md/3rd-party-libraries.md
index e6370549..ebab7a46 100644
--- a/doc/3rd-party-libraries.md
+++ b/doc/md/3rd-party-libraries.md
@@ -1,14 +1,13 @@
1#3rd party libraries
2## CSS 1## CSS
3- Yahoo UI [CSS Reset](http://yuilibrary.com/yui/docs/cssreset/)[](.html) 2- Yahoo UI [CSS Reset](http://yuilibrary.com/yui/docs/cssreset/)
4 - resets default CSS properties for all HTML elements (overriding browsers' default values) 3 - resets default CSS properties for all HTML elements (overriding browsers' default values)
5 - ensures custom CSS stylessheets will provide the same results on all browsers 4 - ensures custom CSS stylessheets will provide the same results on all browsers
6 5
7## Javascript 6## Javascript
8- [Awesomeplete](https://leaverou.github.io/awesomplete/) ([GitHub](https://github.com/LeaVerou/awesomplete)) - autocompletion in input forms[](.html) 7- [Awesomeplete](https://leaverou.github.io/awesomplete/) ([GitHub](https://github.com/LeaVerou/awesomplete)) - autocompletion in input forms
9- [bLazy](http://dinbror.dk/blazy/) ([GitHub](https://github.com/dinbror/blazy)) - lazy loading for thumbnails[](.html) 8- [bLazy](http://dinbror.dk/blazy/) ([GitHub](https://github.com/dinbror/blazy)) - lazy loading for thumbnails
10- [qr.js](http://neocotic.com/qr.js/) ([GitHub](https://github.com/neocotic/qr.js)) - QR code generation[](.html) 9- [qr.js](http://neocotic.com/qr.js/) ([GitHub](https://github.com/neocotic/qr.js)) - QR code generation
11 10
12## PHP 11## PHP
13- [shaarli/netscape-bookmark-parser](https://github.com/shaarli/netscape-bookmark-parser) - Netscape bookmark parser[](.html) 12- [shaarli/netscape-bookmark-parser](https://github.com/shaarli/netscape-bookmark-parser) - Netscape bookmark parser
14- [RainTPL](https://github.com/rainphp/raintpl) - HTML templating for PHP[](.html) 13- [RainTPL](https://github.com/rainphp/raintpl) - HTML templating for PHP
diff --git a/doc/Backup,-restore,-import-and-export.md b/doc/md/Backup,-restore,-import-and-export.md
index 9f5598ef..bb790074 100644
--- a/doc/Backup,-restore,-import-and-export.md
+++ b/doc/md/Backup,-restore,-import-and-export.md
@@ -1,12 +1,3 @@
1#Backup, restore, import and export
2 * [Backup and restore the datastore file](#backup-and-restore-the-datastore-file)[](.html)
3 * [Export links as...](#export-links-as)[](.html)
4 * [Import links from...](#import-links-from)[](.html)
5 * [Import Shaarli links to Firefox](#import-shaarli-links-to-firefox)[](.html)
6
7
8----------------------
9
10## Backup and restore the datastore file 1## Backup and restore the datastore file
11 2
12Backup the file `data/datastore.php` (by FTP or SSH). Restore by putting the file back in place. 3Backup the file `data/datastore.php` (by FTP or SSH). Restore by putting the file back in place.
@@ -19,12 +10,14 @@ rsync -avzP my.server.com:/var/www/shaarli/data/datastore.php datastore-$(date +
19## Export links as... 10## Export links as...
20 11
21To export links as an HTML file, under _Tools > Export_, choose: 12To export links as an HTML file, under _Tools > Export_, choose:
13
22- _Export all_ to export both public and private links 14- _Export all_ to export both public and private links
23- _Export public_ to export public links only 15- _Export public_ to export public links only
24- _Export private_ to export private links only 16- _Export private_ to export private links only
25 17
26Restore by using the `Import` feature. 18Restore by using the `Import` feature.
27* This can be done using the [shaarchiver](https://github.com/nodiscc/shaarchiver) tool.[](.html) 19
20- This can be done using the [shaarchiver](https://github.com/nodiscc/shaarchiver) tool.
28 21
29Example command: 22Example command:
30```bash 23```bash
@@ -33,34 +26,39 @@ Example command:
33 26
34## Import links from... 27## Import links from...
35 28
36
37### Diigo 29### Diigo
38 30
39If you export your bookmark from Diigo, make sure you use the Delicious export, not the Netscape export. (Their Netscape export is broken, and they don't seem to be interested in fixing it.) 31If you export your bookmark from Diigo, make sure you use the Delicious export, not the Netscape export. (Their Netscape export is broken, and they don't seem to be interested in fixing it.)
40 32
41
42### Mister Wong 33### Mister Wong
43 34
44See [this issue](https://github.com/sebsauvage/Shaarli/issues/146) for import tweaks.[](.html) 35See [this issue](https://github.com/sebsauvage/Shaarli/issues/146) for import tweaks.
45 36
46### SemanticScuttle 37### SemanticScuttle
47 38
48To correctly import the tags from a [SemanticScuttle](http://semanticscuttle.sourceforge.net/) HTML export, edit the HTML file before importing and replace all occurences of `tags=` (lowercase) to `TAGS=` (uppercase).[](.html) 39To correctly import the tags from a [SemanticScuttle](http://semanticscuttle.sourceforge.net/) HTML export, edit the HTML file before importing and replace all occurences of `tags=` (lowercase) to `TAGS=` (uppercase).
49 40
50### Scuttle 41### Scuttle
51 42
52Shaarli cannot import data directly from [Scuttle](https://github.com/scronide/scuttle). However, you can use this third party tool: https://github.com/q2apro/scuttle-to-shaarli to export the Scuttle database to the Netscape HTML format compatible with the Shaarli importer.[](.html) 43Shaarli cannot import data directly from [Scuttle](https://github.com/scronide/scuttle).
44
45However, you can use the third-party [scuttle-to-shaarli](https://github.com/q2apro/scuttle-to-shaarli)
46tool to export the Scuttle database to the Netscape HTML format compatible with the Shaarli importer.
47
48### Refind
49
50You can use the third-party tool [Derefind](https://github.com/ShawnPConroy/Derefind) to convert refind.com bookmark exports to a format that can be imported into Shaarli.
53 51
54## Import Shaarli links to Firefox 52## Import Shaarli links to Firefox
55 53
56 * Export your Shaarli links as described above. 54- Export your Shaarli links as described above.
57 * For compatibility reasons, check `Prepend note permalinks with this Shaarli instance's URL (useful to import bookmarks in a web browser)` 55 - For compatibility reasons, check `Prepend note permalinks with this Shaarli instance's URL (useful to import bookmarks in a web browser)`
58 * In Firefox, open the bookmark manager (not the sidebar! `Bookmarks menu > Show all bookmarks` or `Ctrl+Shift+B`) 56- In Firefox, open the bookmark manager (not the sidebar! `Bookmarks menu > Show all bookmarks` or `Ctrl+Shift+B`)
59 * Select `Import and Backup > Import bookmarks in HTML format` 57- Select `Import and Backup > Import bookmarks in HTML format`
60 58
61Your bookmarks will be imported in Firefox, ready to use, with tags and descriptions retained. "Self" (notes) shaares will still point to the Shaarli instance you exported them from, but the note text can be viewed directly in the bookmark properties inside your browser. Depending on the number of bookmarks, the import can take some time. 59Your bookmarks will be imported in Firefox, ready to use, with tags and descriptions retained. "Self" (notes) shaares will still point to the Shaarli instance you exported them from, but the note text can be viewed directly in the bookmark properties inside your browser. Depending on the number of bookmarks, the import can take some time.
62 60
63You may be interested in these Firefox addons to manage links imported from Shaarli 61You may be interested in these Firefox addons to manage links imported from Shaarli
64 62
65 * [Bookmark Deduplicator](https://addons.mozilla.org/en-US/firefox/addon/bookmark-deduplicator/) - provides an easy way to deduplicate your bookmarks[](.html) 63- [Bookmark Deduplicator](https://addons.mozilla.org/en-US/firefox/addon/bookmark-deduplicator/) - provides an easy way to deduplicate your bookmarks
66 * [TagSieve](https://addons.mozilla.org/en-US/firefox/addon/tagsieve/) - browse your bookmarks by their tags[](.html) 64- [TagSieve](https://addons.mozilla.org/en-US/firefox/addon/tagsieve/) - browse your bookmarks by their tags
diff --git a/doc/md/Bookmarklet.md b/doc/md/Bookmarklet.md
new file mode 100644
index 00000000..c899e3cf
--- /dev/null
+++ b/doc/md/Bookmarklet.md
@@ -0,0 +1,29 @@
1## Add the sharing button (_bookmarklet_) to your browser
2
3- Open your Shaarli and `Login`
4- Click the `Tools` button in the top bar
5- Drag the **`✚Shaare link` button**, and drop it to your browser's bookmarks bar.
6
7_This bookmarklet button is compatible with Firefox, Opera, Chrome and Safari. Under Opera, you can't drag'n drop the button: You have to right-click on it and add a bookmark to your personal toolbar._
8
9![](images/bookmarklet.png)
10
11## Share links using the _bookmarklet_
12
13- When you are visiting a webpage you would like to share with Shaarli, click the _bookmarklet_ you just added.
14- A window opens.
15 - You can freely edit title, description, tags... to find it later using the text search or tag filtering.
16 - You will be able to edit this link later using the ![](https://raw.githubusercontent.com/shaarli/Shaarli/master/images/edit_icon.png) edit button.
17 - You can also check the “Private” box so that the link is saved but only visible to you.
18- Click `Save`.**Voilà! Your link is now shared.**
19
20## Troubleshooting: The bookmarklet doesn't work with a few websites (e.g. Github.com)
21
22Websites which enforce Content Security Policy (CSP), such as github.com, disallow usage of bookmarklets. Unfortunatly, there is nothing Shaarli can do about it.
23
24See [#196](https://github.com/shaarli/Shaarli/issues/196).
25
26There is an open bug for both Firefox and Chromium:
27
28- https://bugzilla.mozilla.org/show_bug.cgi?id=866522
29- https://code.google.com/p/chromium/issues/detail?id=233903
diff --git a/doc/md/Browsing-and-searching.md b/doc/md/Browsing-and-searching.md
new file mode 100644
index 00000000..16c69855
--- /dev/null
+++ b/doc/md/Browsing-and-searching.md
@@ -0,0 +1,37 @@
1## Plain text search
2
3Use the `Search text` field to search in _any_ of the fields of all links (Title, URL, Description...)
4
5**Exclude text/tags:** Use the `-` operator before a word or tag (example `-uninteresting`) to prevent entries containing (or tagged) `uninteresting` from showing up in the search results.
6
7**Exact text search:** Use double-quotes (example `"exact search"`) to search for the exact expression.
8
9Both exclude patterns and exact searches can be combined with normal searches (example `"exact search" term otherterm -notthis "very exact" stuff -notagain`)
10
11## Tags search
12
13Use the `Filter by tags` field to restrict displayed links to entries tagged with one or multiple tags (use space to separate tags).
14
15**Hidden tags:** Tags starting with a dot `.` (example `.secret`) are private. They can only be seen and searched when logged in.
16
17### Tag cloud
18
19The `Tag cloud` page diplays a "cloud" view of all tags in your Shaarli.
20
21 * The most frequently used tags are displayed with a bigger font size.
22 * When sorting by `Most used` or `Alphabetical`, tags are displayed as a _list_, along with counters and edit/delete buttons for each tag.
23 * Clicking on any tag will display a list of all Shaares matching this tag.
24 * Clicking on the counter next to a tag `example`, will filter the tag cloud to only display tags found in Shaares tagged `example`. Repeat this any number of times to further filter the tag cloud. Click `List all links with those tags` to display Shaares matching your current tag filter.
25
26## Filtering RSS feeds/Picture wall
27
28RSS feeds can also be restricted to only return items matching a text/tag search: see [RSS feeds](RSS-feeds).
29
30## Filter buttons
31
32Filter buttons can be found at the top left of the link list. They allow you to apply different filters to the list:
33
34 * **Private links:** When this toggle button is enabled, only shaares set to `private` will be shown.
35 * **Untagged links:** When the this toggle button is enabled (top left of the link list), only shaares _without any tags_ will be shown in the link list.
36
37Filter buttons are only available when logged in.
diff --git a/doc/md/Community-&-Related-software.md b/doc/md/Community-&-Related-software.md
new file mode 100644
index 00000000..207153b6
--- /dev/null
+++ b/doc/md/Community-&-Related-software.md
@@ -0,0 +1,72 @@
1_Unofficial but related work on Shaarli. If you maintain one of these,
2please get in touch with us to help us find a way to adapt your work to our fork._
3
4## Related software
5
6
7### REST API clients
8See [REST API](REST-API) for a list of official and community clients.
9
10
11### Third party plugins
12- [autosave](https://github.com/kalvn/shaarli-plugin-autosave) by [@kalvn](https://github.com/kalvn): Automatically saves data when editing a link to avoid any loss in case of crash or unexpected shutdown.
13- [Code Coloration](https://github.com/ArthurHoaro/code-coloration) by [@ArthurHoaro](https://github.com/ArthurHoaro): client side code syntax highlighter.
14- [Disqus](https://github.com/kalvn/shaarli-plugin-disqus) by [@kalvn](https://github.com/kalvn): Adds Disqus comment system to your Shaarli.
15- [emojione](https://github.com/NerosTie/emojione) by [@NerosTie](https://github.com/NerosTie): Add colorful emojis to your Shaarli.
16- [twemoji](https://github.com/NerosTie/twemoji) by [@NerosTie](https://github.com/NerosTie): Add colorful emojis to your Shaarli (Twemoji version)
17- [google analytics](https://github.com/ericjuden/Shaarli-Google-Analytics-Plugin) by [@ericjuden](http://github.com/ericjuden): Adds Google Analytics tracking support
18- [launch](https://github.com/ArthurHoaro/launch-plugin) - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli.
19- [markdown-toolbar](https://github.com/immanuelfodor/shaarli-markdown-toolbar) by [@immanuelfodor](https://github.com/immanuelfodor) - Easily insert markdown syntax into the Description field when editing a link.
20- [related](https://github.com/ilesinge/shaarli-related) by [@ilesinge](https://github.com/ilesinge) - Show related links based on the number of identical tags.
21- [social](https://github.com/alexisju/social) by [@alexisju](https://github.com/alexisju): share links to social networks.
22- [shaarli2twitter](https://github.com/ArthurHoaro/shaarli2twitter) by [@ArthurHoaro](https://github.com/ArthurHoaro) - Automatically tweet your shared links from Shaarli
23- [shaarli2mastodon](https://github.com/kalvn/shaarli2mastodon) by [@kalvn](https://github.com/kalvn) - This Shaarli plugin allows you to automatically publish links you post on your Mastodon timeline.
24- [shaarli-descriptor](https://github.com/immanuelfodor/shaarli-descriptor) by [@immanuelfodor](https://github.com/immanuelfodor) - Customize the default height/number of rows of the Description field when editing a link.
25
26
27### Third-party themes
28See [Theming](Theming) for a list of community-contributed themes, and an installation guide.
29
30
31### Integration with other platforms
32- [tt-rss-shaarli](https://github.com/jcsaaddupuy/tt-rss-shaarli) - [Tiny-Tiny RSS](http://tt-rss.org/) plugin that adds support for sharing articles with Shaarli
33- [octopress-shaarli](https://github.com/ahmet2mir/octopress-shaarli) - Octopress plugin to retrieve Shaarli links on the sidebar
34- [Scuttle to Shaarli](https://github.com/q2apro/scuttle-to-shaarli) - Import bookmarks from Scuttle
35
36
37### Mobile Apps
38- [ShaarliOS](https://github.com/mro/ShaarliOS) - Apple iOS share extension.
39- [Shaarli for Android](http://sebsauvage.net/links/?ZAyDzg) - Android application that adds Shaarli as a sharing provider
40- [Shaarlier for Android](https://github.com/dimtion/Shaarlier) - Android application to simply add links directly into your Shaarli
41
42### Browser addons
43 * [Shaarli Web Extension](https://github.com/ikipatang/shaarli-web-extension) - toolbar button to share your current tab with Shaarli.
44
45### Server apps
46- [shaarchiver](https://github.com/nodiscc/shaarchiver) - Archive your Shaarli bookmarks and their content
47- [shaarli-river](https://github.com/mknexen/shaarli-river) - An aggregator for shaarlis with many features
48- [Shaarlo](https://github.com/DMeloni/shaarlo) - An aggregator for shaarlis with many features (a very popular running instance among French shaarliers: [shaarli.fr](http://shaarli.fr/))
49- [Shaarlimages](https://github.com/BoboTiG/shaarlimages) - An image-oriented aggregator for Shaarlis
50- [mknexen/shaarli-api](https://github.com/mknexen/shaarli-api) - A REST API for Shaarli
51- [Self dead link](https://github.com/qwertygc/shaarli-dev-code/blob/master/self-dead-link.php) - Detect dead links on shaarli. This version use the database of shaarli. [Another version](https://github.com/qwertygc/shaarli-dev-code/blob/master/dead-link.php), can be used for other shaarli instances (but is more resource consuming).
52- [Bookmark Archiver](https://github.com/pirate/bookmark-archiver) - Save an archived copy of all websites starred using browser bookmarks/Shaarli/Delicious/Instapaper/Unmark.it/Pocket/Pinboard. Outputs browseable html.
53
54## Alternatives to Shaarli
55See [awesome-selfhosted: bookmarks & link sharing](https://github.com/Kickball/awesome-selfhosted/#bookmarks--link-sharing).
56
57## Community
58- [Liens en vrac de sebsauvage](http://sebsauvage.net/links/) - the original Shaarli
59- [A large list of Shaarlis](http://porneia.free.fr/pub/links/ou-est-shaarli.html)
60- [A list of working Shaarli aggregators](https://raw.githubusercontent.com/Oros42/find_shaarlis/master/annuaires.json)
61- [A list of some known Shaarlis](https://github.com/Oros42/shaarlis_list)
62- [Adieu Delicious, Diigo et StumbleUpon. Salut Shaarli ! - sebsauvage.net](http://sebsauvage.net/rhaa/index.php?2011/09/16/09/29/58-adieu-delicious-diigo-et-stumbleupon-salut-shaarli-) (fr) _16/09/2011 - the original post about Shaarli_
63- [Original ideas/fixme/TODO page](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:ideas)
64- [Original discussion page](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:discussion) (fr)
65- [Original revisions history](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:history)
66- [Shaarli.fr/my](https://www.shaarli.fr/my.php) - Unofficial, unsupported (old fork) hosted Shaarlis provider, courtesy of [DMeloni](https://github.com/DMeloni)
67
68### Articles and social media discussions
69- 2016-09-22 - Hacker News - https://news.ycombinator.com/item?id=12552176
70- 2015-08-15 - Reddit - [Question about migrating from WordPress to Shaarli.](https://www.reddit.com/r/selfhosted/comments/3h3zwh/question_about_migrating_from_wordpress_to_shaarli/)
71- 2015-06-22 - Hacker News - https://news.ycombinator.com/item?id=9755366
72- 2015-05-12 - Reddit - [shaarli - Self hosted Bookmarking / Delicious (PHP, MySQL)](https://www.reddit.com/r/selfhosted/comments/35pkkc/shaarli_self_hosted_bookmarking_delicious_php/)
diff --git a/doc/md/Continuous-integration-tools.md b/doc/md/Continuous-integration-tools.md
new file mode 100644
index 00000000..4bd7a0ba
--- /dev/null
+++ b/doc/md/Continuous-integration-tools.md
@@ -0,0 +1,28 @@
1## Local development
2A [`Makefile`](https://github.com/shaarli/Shaarli/blob/master/Makefile) is available to perform project-related operations:
3
4- Documentation - generate a local HTML copy of the GitHub wiki
5- [Static analysis](Static analysis) - check that the code is compliant to PHP conventions
6- [Unit tests](Unit tests) - ensure there are no regressions introduced by new commits
7
8## Automatic builds
9[Travis CI](http://docs.travis-ci.com/) is a Continuous Integration build server, that runs a build:
10
11- each time a commit is merged to the mainline (`master` branch)
12- each time a Pull Request is submitted or updated
13
14A build is composed of several jobs: one for each supported PHP version (see [Server requirements](Server requirements)).
15
16Each build job:
17
18- updates Composer
19- installs 3rd-party test dependencies with Composer
20- runs [Unit tests](Unit tests)
21
22After all jobs have finished, Travis returns the results to GitHub:
23
24- a status icon represents the result for the `master` branch: [![](https://api.travis-ci.org/shaarli/Shaarli.svg)](https://travis-ci.org/shaarli/Shaarli)
25- Pull Requests are updated with the Travis result
26 - Green: all tests have passed
27 - Red: some tests failed
28 - Orange: tests are pending
diff --git a/doc/md/Development-guidelines.md b/doc/md/Development-guidelines.md
new file mode 100644
index 00000000..532ec2e4
--- /dev/null
+++ b/doc/md/Development-guidelines.md
@@ -0,0 +1,10 @@
1## Development guidelines
2
3Please have a look at the following pages:
4
5- [Contributing to Shaarli](https://github.com/shaarli/Shaarli/tree/master/CONTRIBUTING.md)
6- [Static analysis](Static analysis) - patches should try to stick to the [PHP Standard Recommendations](http://www.php-fig.org/psr/) (PSR), especially:
7 - [PSR-1](http://www.php-fig.org/psr/psr-1/) - Basic Coding Standard
8 - [PSR-2](http://www.php-fig.org/psr/psr-2/) - Coding Style Guide
9- [Unit tests](Unit tests)
10- [GnuPG signature](GnuPG signature) for tags/releases
diff --git a/doc/Directory-structure.md b/doc/md/Directory-structure.md
index 3a1c4309..eb50965b 100644
--- a/doc/Directory-structure.md
+++ b/doc/md/Directory-structure.md
@@ -1,4 +1,5 @@
1#Directory structure 1TODO: This page is out of date
2
2Here is the directory structure of Shaarli and the purpose of the different files: 3Here is the directory structure of Shaarli and the purpose of the different files:
3 4
4```bash 5```bash
diff --git a/doc/md/Download-and-Installation.md b/doc/md/Download-and-Installation.md
new file mode 100644
index 00000000..0fdbd27d
--- /dev/null
+++ b/doc/md/Download-and-Installation.md
@@ -0,0 +1,120 @@
1To install Shaarli, simply place the files in a directory under your webserver's
2Document Root (or directly at the document root).
3
4Also, please make sure your server meets the [requirements](Server-requirements)
5and is properly [configured](Server-configuration).
6
7Multiple releases branches are available:
8
9- latest (last release)
10- stable (previous major release)
11- master (development)
12
13Using one of the following methods:
14
15- by downloading full release archives including all dependencies
16- by downloading Github archives
17- by cloning the Git repository
18- using Docker: [see the documentation](docker/shaarli-images.md)
19
20--------------------------------------------------------------------------------
21
22## Latest release (recommended)
23
24### Download as an archive
25
26In most cases, you should download the latest Shaarli release from the [releases](https://github.com/shaarli/Shaarli/releases) page. **Download our *shaarli-full* archive** to include dependencies.
27
28The current latest released version is `v0.9.3`
29
30```bash
31$ wget https://github.com/shaarli/Shaarli/releases/download/v0.9.3/shaarli-v0.9.3-full.zip
32$ unzip shaarli-v0.9.3-full.zip
33$ mv Shaarli /path/to/shaarli/
34```
35
36### Using git
37
38Cloning using `git` or downloading Github branches as zip files requires additional steps:
39
40 * Install [Composer](Unit-tests.md#install_composer) to manage Shaarli dependencies.
41 * Install [python3-virtualenv](https://pypi.python.org/pypi/virtualenv) to build the local HTML documentation.
42
43```
44$ mkdir -p /path/to/shaarli && cd /path/to/shaarli/
45$ git clone -b latest https://github.com/shaarli/Shaarli.git .
46$ composer install --no-dev --prefer-dist
47$ make translate
48$ make htmldoc
49```
50
51--------------------------------------------------------------------------------
52
53## Stable version
54
55The stable version has been experienced by Shaarli users, and will receive security updates.
56
57
58### Download as an archive
59
60As a .zip archive:
61
62```bash
63$ wget https://github.com/shaarli/Shaarli/archive/stable.zip
64$ unzip stable.zip
65$ mv Shaarli-stable /path/to/shaarli/
66```
67
68As a .tar.gz archive :
69
70```bash
71$ wget https://github.com/shaarli/Shaarli/archive/stable.tar.gz
72$ tar xvf stable.tar.gz
73$ mv Shaarli-stable /path/to/shaarli/
74```
75
76### Using git
77
78Install [Composer](Unit-tests.md#install_composer) to manage Shaarli dependencies.
79
80```bash
81$ git clone https://github.com/shaarli/Shaarli.git -b stable /path/to/shaarli/
82# install/update third-party dependencies
83$ cd /path/to/shaarli/
84$ composer install --no-dev --prefer-dist
85```
86
87
88--------------------------------------------------------------------------------
89
90## Development version (mainline)
91
92_Use at your own risk!_
93
94Install [Composer](Unit-tests.md#install_composer) to manage Shaarli dependencies.
95
96To get the latest changes from the `master` branch:
97
98```bash
99# clone the repository
100$ git clone https://github.com/shaarli/Shaarli.git -b master /path/to/shaarli/
101# install/update third-party dependencies
102$ cd /path/to/shaarli
103$ composer install --no-dev --prefer-dist
104$ make translate
105$ make htmldoc
106```
107
108-------------------------------------------------------------------------------
109
110## Finish Installation
111
112Once Shaarli is downloaded and files have been placed at the correct location, open it this location your favorite browser.
113
114![install screenshot](images/install-shaarli.png)
115
116Setup your Shaarli installation, and it's ready to use!
117
118## Updating Shaarli
119
120See [Upgrade and Migration](Upgrade-and-migration)
diff --git a/doc/FAQ.md b/doc/md/FAQ.md
index 4c69763f..77faf117 100644
--- a/doc/FAQ.md
+++ b/doc/md/FAQ.md
@@ -1,7 +1,6 @@
1#FAQ
2### Why did you create Shaarli ? 1### Why did you create Shaarli ?
3 2
4I was a StumbleUpon user. Then I got fed up with they big toolbar. I switched to delicious, which was lighter, faster and more beautiful. Until Yahoo bought it. Then the export API broke all the time, delicious became slow and was ditched by Yahoo. I switched to Diigo, which is not bad, but does too much. And Diigo is sslllooooowww and their Firefox extension a bit buggy. And… oh… **their Firefox addon sends to Diigo every single URL you visit** (Don't believe me ? Use [Tamper Data](https://addons.mozilla.org/en-US/firefox/addon/tamper-data/) and open any page).[](.html) 3I was a StumbleUpon user. Then I got fed up with they big toolbar. I switched to delicious, which was lighter, faster and more beautiful. Until Yahoo bought it. Then the export API broke all the time, delicious became slow and was ditched by Yahoo. I switched to Diigo, which is not bad, but does too much. And Diigo is sslllooooowww and their Firefox extension a bit buggy. And… oh… **their Firefox addon sends to Diigo every single URL you visit** (Don't believe me ? Use [Tamper Data](https://addons.mozilla.org/en-US/firefox/addon/tamper-data/) and open any page).
5 4
6Enough is enough. Saving simple links should not be a complicated heavy thing. I ditched them all and wrote my own: Shaarli. It's simple, but it does the job and does it well. And my data is not hosted on a foreign server, but on my server. 5Enough is enough. Saving simple links should not be a complicated heavy thing. I ditched them all and wrote my own: Shaarli. It's simple, but it does the job and does it well. And my data is not hosted on a foreign server, but on my server.
7 6
@@ -9,35 +8,36 @@ Enough is enough. Saving simple links should not be a complicated heavy thing. I
9 8
10With Shaarli: 9With Shaarli:
11 10
12* The data is yours: It's hosted on your server. 11- The data is yours: It's hosted on your server.
13* Never fear of having your data locked-in. 12- Never fear of having your data locked-in.
14* Never fear to have your data sold to third party. 13- Never fear to have your data sold to third party.
15* Your private links are not hosted on a third party server. 14- Your private links are not hosted on a third party server.
16* You are not tracked by browser addons (like Diigo does) 15- You are not tracked by browser addons (like Diigo does)
17* You can change the look and feel of the pages if you want. 16- You can change the look and feel of the pages if you want.
18* You can change the behaviour of the program. 17- You can change the behaviour of the program.
19* It's magnitude faster than most bookmarking services. 18- It's magnitude faster than most bookmarking services.
20 19
21### What does Shaarli mean? 20### What does Shaarli mean?
22 21
23Shaarli is for shaaring your links. 22Shaarli stands for _shaaring_ your _links_.
24 23
25### My Shaarli is broken! 24### My Shaarli is broken!
26First of all, ensure that both the [web server](Server-configuration) and [Shaarli](Shaarli-configuration) are correctly configured, and that your installation is [supported](Server-requirements).[](.html) 25First of all, ensure that both the [web server](Server-configuration) and [Shaarli](Shaarli-configuration) are correctly configured, and that your installation is [supported](Server-requirements).
27 26
28If everything looks right but the issue(s) remain(s), please: 27If everything looks right but the issue(s) remain(s), please:
29- take a look at the [troubleshooting](Troubleshooting) section[](.html) 28
30- come [chat with us](https://gitter.im/shaarli/Shaarli) on Gitter, we'll be happy to help ;-)[](.html) 29- take a look at the [troubleshooting](Troubleshooting) section
31- browse active [issues](https://github.com/shaarli/Shaarli/issues) and [Pull Requests](https://github.com/shaarli/Shaarli/pulls)[](.html) 30- come [chat with us](https://gitter.im/shaarli/Shaarli) on Gitter, we'll be happy to help ;-)
31- browse active [issues](https://github.com/shaarli/Shaarli/issues) and [Pull Requests](https://github.com/shaarli/Shaarli/pulls)
32 - if you find one that is related to the issue, feel free to comment and provide additional details (host/Shaarli setup) 32 - if you find one that is related to the issue, feel free to comment and provide additional details (host/Shaarli setup)
33 - else, [open a new issue](https://github.com/shaarli/Shaarli/issues/new), and provide information about the problem:[](.html) 33 - else, [open a new issue](https://github.com/shaarli/Shaarli/issues/new), and provide information about the problem:
34 - _what happens?_ - display glitches, invalid data, security flaws... 34 - _what happens?_ - display glitches, invalid data, security flaws...
35 - _what is your configuration?_ - OS, server version, activated extensions, web browser... 35 - _what is your configuration?_ - OS, server version, activated extensions, web browser...
36 - _is it reproducible?_ 36 - _is it reproducible?_
37 37
38### Why not use a real database? Files are slow! 38### Why not use a real database? Files are slow!
39 39
40Does browsing [this page](http://sebsauvage.net/links/) feel slow? Try browsing older pages, too.[](.html) 40Does browsing [this page](http://sebsauvage.net/links/) feel slow? Try browsing older pages, too.
41 41
42It's not slow at all, is it? And don't forget the database contains more than 16000 links, and it's on a shared host, with 32000 visitors/day for my website alone. And it's still damn fast. Why? 42It's not slow at all, is it? And don't forget the database contains more than 16000 links, and it's on a shared host, with 32000 visitors/day for my website alone. And it's still damn fast. Why?
43 43
diff --git a/doc/md/Firefox-share.md b/doc/md/Firefox-share.md
new file mode 100644
index 00000000..9a46b185
--- /dev/null
+++ b/doc/md/Firefox-share.md
@@ -0,0 +1,20 @@
1| Note | Firefox Share is no longer available for Firefox 57 and later versions. |
2|---------|---------|
3
4### Add Shaarli as a sharing service to Firefox
5
6- Open your Shaarli and `Login`
7- Click the `Tools` button in the top bar
8- Click the `✚Add to Firefox social` button and accept the activation.
9
10
11### Sharing links using Firefox share
12
13- Add the sharing service as described above
14- When you are visiting a webpage you would like to share with Shaarli,
15 click the Firefox _Share_ button [images/firefoxshare.png](images/firefoxshare.png)
16- You can edit your link before and after saving, just like the bookmarklet above.
17
18_Your Shaarli instance must be hosted on an HTTPS (SSL/TLS secure connection)
19enabled server for Firefox Share to work. Firefox Share will not work over
20plain HTTP connections._
diff --git a/doc/GnuPG-signature.md b/doc/md/GnuPG-signature.md
index b0028d55..d1fc10a5 100644
--- a/doc/GnuPG-signature.md
+++ b/doc/md/GnuPG-signature.md
@@ -1,27 +1,28 @@
1#GnuPG signature
2## Introduction 1## Introduction
3### PGP and GPG 2### PGP and GPG
4[Gnu Privacy Guard](https://gnupg.org/) (GnuPG) is an Open Source implementation of the [Pretty Good [](.html) 3[Gnu Privacy Guard](https://gnupg.org/) (GnuPG) is an Open Source implementation of the
5Privacy](https://en.wikipedia.org/wiki/Pretty_Good_Privacy#OpenPGP) (OpenPGP) specification. Its main purposes are digital authentication, 4[Pretty Good Privacy](https://en.wikipedia.org/wiki/Pretty_Good_Privacy#OpenPGP)
6signature and encryption. 5(OpenPGP) specification. Its main purposes are digital authentication, signature and encryption.
7 6
8It is often used by the [FLOSS](https://en.wikipedia.org/wiki/Free_and_open-source_software) community to verify:[](.html) 7It is often used by the [FLOSS](https://en.wikipedia.org/wiki/Free_and_open-source_software) community to verify:
9- Linux package signatures: Debian [SecureApt](https://wiki.debian.org/SecureApt), ArchLinux [Master [](.html) 8
9- Linux package signatures: Debian [SecureApt](https://wiki.debian.org/SecureApt), ArchLinux [Master
10Keys](https://www.archlinux.org/master-keys/) 10Keys](https://www.archlinux.org/master-keys/)
11- [SCM](https://en.wikipedia.org/wiki/Revision_control) releases & maintainer identity[](.html) 11- [SCM](https://en.wikipedia.org/wiki/Revision_control) releases & maintainer identity
12 12
13### Trust 13### Trust
14To quote Phil Pennock (the author of the [SKS](https://bitbucket.org/skskeyserver/sks-keyserver/wiki/Home) key server - http://sks.spodhuis.org/):[](.html) 14To quote Phil Pennock (the author of the [SKS](https://bitbucket.org/skskeyserver/sks-keyserver/wiki/Home) key server - http://sks.spodhuis.org/):
15 15
16> You MUST understand that presence of data in the keyserver (pools) in no way connotes trust. Anyone can generate a key, with any name or email address, and upload it. All security and trust comes from evaluating security at the “object level”, via PGP Web-Of-Trust signatures. This keyserver makes it possible to retrieve keys, looking them up via various indices, but the collection of keys in this public pool is KNOWN to contain malicious and fraudulent keys. It is the common expectation of server operators that users understand this and use software which, like all known common OpenPGP implementations, evaluates trust accordingly. This expectation is so common that it is not normally explicitly stated. 16> You MUST understand that presence of data in the keyserver (pools) in no way connotes trust. Anyone can generate a key, with any name or email address, and upload it. All security and trust comes from evaluating security at the “object level”, via PGP Web-Of-Trust signatures. This keyserver makes it possible to retrieve keys, looking them up via various indices, but the collection of keys in this public pool is KNOWN to contain malicious and fraudulent keys. It is the common expectation of server operators that users understand this and use software which, like all known common OpenPGP implementations, evaluates trust accordingly. This expectation is so common that it is not normally explicitly stated.
17 17
18Trust can be gained by having your key signed by other people (and signing their key back, too :) ), for instance during [key signing parties](https://en.wikipedia.org/wiki/Key_signing_party), see:[](.html) 18Trust can be gained by having your key signed by other people (and signing their key back, too :) ), for instance during [key signing parties](https://en.wikipedia.org/wiki/Key_signing_party), see:
19- [The Keysigning party HOWTO](http://www.cryptnet.net/fdp/crypto/keysigning_party/en/keysigning_party.html)[](.html) 19
20- [Web of trust](https://en.wikipedia.org/wiki/Web_of_trust)[](.html) 20- [The Keysigning party HOWTO](http://www.cryptnet.net/fdp/crypto/keysigning_party/en/keysigning_party.html)
21- [Web of trust](https://en.wikipedia.org/wiki/Web_of_trust)
21 22
22## Generate a GPG key 23## Generate a GPG key
23- [Generating a GPG key for Git tagging](http://stackoverflow.com/a/16725717) (StackOverflow)[](.html) 24- [Generating a GPG key for Git tagging](http://stackoverflow.com/a/16725717) (StackOverflow)
24- [Generating a GPG key](https://help.github.com/articles/generating-a-gpg-key/) (GitHub)[](.html) 25- [Generating a GPG key](https://help.github.com/articles/generating-a-gpg-key/) (GitHub)
25 26
26### gpg - provide identity information 27### gpg - provide identity information
27```bash 28```bash
@@ -62,7 +63,7 @@ gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
62gpg: depth: 0 valid: 2 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 2u 63gpg: depth: 0 valid: 2 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 2u
63pub rsa2048/A9D53A3E 2015-07-31 64pub rsa2048/A9D53A3E 2015-07-31
64 Key fingerprint = AF2A 5381 E54B 2FD2 14C4 A9A3 0E35 ACA4 A9D5 3A3E 65 Key fingerprint = AF2A 5381 E54B 2FD2 14C4 A9A3 0E35 ACA4 A9D5 3A3E
65uid [ultimate] Marvin the Paranoid Android <marvin@h2g2.net>[](.html) 66uid [ultimate] Marvin the Paranoid Android <marvin@h2g2.net>
66sub rsa2048/8C0EACF1 2015-07-31 67sub rsa2048/8C0EACF1 2015-07-31
67``` 68```
68 69
@@ -74,4 +75,4 @@ gpg: sending key A9D53A3E to hkp server pgp.mit.edu
74 75
75## Create and push a GPG-signed tag 76## Create and push a GPG-signed tag
76 77
77See [Release Shaarli](Release-Shaarli.html). 78See [Release Shaarli](Release Shaarli).
diff --git a/doc/Plugin-System.md b/doc/md/Plugin-System.md
index 623627dd..cbec04c0 100644
--- a/doc/Plugin-System.md
+++ b/doc/md/Plugin-System.md
@@ -1,9 +1,8 @@
1#Plugin System 1[**I am a developer: ** Developer API](#developer-api)
2> Note: Plugin current status - in development (not merged into master).
3 2
4[**I am a developer.** Developer API.](#developer-api)[](.html) 3[**I am a template designer: ** Guide for template designers](#guide-for-template-designer)
5 4
6[**I am a template designer.** Guide for template designer.](#guide-for-template-designer)[](.html) 5---
7 6
8## Developer API 7## Developer API
9 8
@@ -11,9 +10,9 @@
11 10
12The plugin system let you: 11The plugin system let you:
13 12
14 * insert content into specific places across templates. 13- insert content into specific places across templates.
15 * alter data before templates rendering. 14- alter data before templates rendering.
16 * alter data before saving new links. 15- alter data before saving new links.
17 16
18### How can I create a plugin for Shaarli? 17### How can I create a plugin for Shaarli?
19 18
@@ -30,6 +29,14 @@ You should have the following tree view:
30| |---| demo_plugin.php 29| |---| demo_plugin.php
31``` 30```
32 31
32### Plugin initialization
33
34At the beginning of Shaarli execution, all enabled plugins are loaded. At this point, the plugin system looks for an `init()` function to execute and run it if it exists. This function must be named this way, and takes the `ConfigManager` as parameter.
35
36 <plugin_name>_init($conf)
37
38This function can be used to create initial data, load default settings, etc. But also to set *plugin errors*. If the initialization function returns an array of strings, they will be understand as errors, and displayed in the header to logged in users.
39
33### Understanding hooks 40### Understanding hooks
34 41
35A plugin is a set of functions. Each function will be triggered by the plugin system at certain point in Shaarli execution. 42A plugin is a set of functions. Each function will be triggered by the plugin system at certain point in Shaarli execution.
@@ -37,12 +44,17 @@ A plugin is a set of functions. Each function will be triggered by the plugin sy
37These functions need to be named with this pattern: 44These functions need to be named with this pattern:
38 45
39``` 46```
40hook_<plugin_name>_<hook_name> 47hook_<plugin_name>_<hook_name>($data, $conf)
41``` 48```
42 49
43For exemple, if my plugin want to add data to the header, this function is needed: 50Parameters:
44 51
45 hook_demo_plugin_render_header() 52- data: see [$data section](https://shaarli.readthedocs.io/en/master/Plugin-System/#plugins-data)
53- conf: the `ConfigManager` instance.
54
55For example, if my plugin want to add data to the header, this function is needed:
56
57 hook_demo_plugin_render_header
46 58
47If this function is declared, and the plugin enabled, it will be called every time Shaarli is rendering the header. 59If this function is declared, and the plugin enabled, it will be called every time Shaarli is rendering the header.
48 60
@@ -65,9 +77,9 @@ RainTPL displays every element contained in the placeholder's array. These eleme
65For example, let's add a value in the placeholder `top_placeholder` which is displayed at the top of my page: 77For example, let's add a value in the placeholder `top_placeholder` which is displayed at the top of my page:
66 78
67```php 79```php
68$data['top_placeholder'[] = 'My content';](]-=-'My-content';.html) 80$data['top_placeholder'][] = 'My content';
69# OR 81# OR
70array_push($data['top_placeholder'], 'My', 'content');[](.html) 82array_push($data['top_placeholder'], 'My', 'content');
71 83
72return $data; 84return $data;
73``` 85```
@@ -82,9 +94,9 @@ For exemple, in linklist, it is possible to alter every title:
82 94
83```php 95```php
84// mind the reference if you want $data to be altered 96// mind the reference if you want $data to be altered
85foreach ($data['links'] as &$value) {[](.html) 97foreach ($data['links'] as &$value) {
86 // String reverse every title. 98 // String reverse every title.
87 $value['title'] = strrev($value['title']);[](.html) 99 $value['title'] = strrev($value['title']);
88} 100}
89 101
90return $data; 102return $data;
@@ -96,8 +108,9 @@ Every plugin needs a `<plugin_name>.meta` file, which is in fact an `.ini` file
96 108
97Each file contain two keys: 109Each file contain two keys:
98 110
99 * `description`: plugin description 111- `description`: plugin description
100 * `parameters`: user parameter names, separated by a `;`. 112- `parameters`: user parameter names, separated by a `;`.
113- `parameter.<PARAMETER_NAME>`: add a text description the specified parameter.
101 114
102> Note: In PHP, `parse_ini_file()` seems to want strings to be between by quotes `"` in the ini file. 115> Note: In PHP, `parse_ini_file()` seems to want strings to be between by quotes `"` in the ini file.
103 116
@@ -105,22 +118,26 @@ Each file contain two keys:
105 118
106Use `demo_plugin` as a functional example. It covers most of the plugin system features. 119Use `demo_plugin` as a functional example. It covers most of the plugin system features.
107 120
108If it's still not working, please [open an issue](https://github.com/shaarli/Shaarli/issues/new).[](.html) 121If it's still not working, please [open an issue](https://github.com/shaarli/Shaarli/issues/new).
109 122
110### Hooks 123### Hooks
111 124
112| Hooks | Description | 125| Hooks | Description |
113| ------------- |:-------------:| 126| ------------- |:-------------:|
114| [render_header](#render_header) | Allow plugin to add content in page headers. |[](.html) 127| [render_header](#render_header) | Allow plugin to add content in page headers. |
115| [render_includes](#render_includes) | Allow plugin to include their own CSS files. |[](.html) 128| [render_includes](#render_includes) | Allow plugin to include their own CSS files. |
116| [render_footer](#render_footer) | Allow plugin to add content in page footer and include their own JS files. | [](.html) 129| [render_footer](#render_footer) | Allow plugin to add content in page footer and include their own JS files. |
117| [render_linklist](#render_linklist) | It allows to add content at the begining and end of the page, after every link displayed and to alter link data. |[](.html) 130| [render_linklist](#render_linklist) | It allows to add content at the begining and end of the page, after every link displayed and to alter link data. |
118| [render_editlink](#render_editlink) | Allow to add fields in the form, or display elements. |[](.html) 131| [render_editlink](#render_editlink) | Allow to add fields in the form, or display elements. |
119| [render_tools](#render_tools) | Allow to add content at the end of the page. |[](.html) 132| [render_tools](#render_tools) | Allow to add content at the end of the page. |
120| [render_picwall](#render_picwall) | Allow to add content at the top and bottom of the page. |[](.html) 133| [render_picwall](#render_picwall) | Allow to add content at the top and bottom of the page. |
121| [render_tagcloud](#render_tagcloud) | Allow to add content at the top and bottom of the page. |[](.html) 134| [render_tagcloud](#render_tagcloud) | Allow to add content at the top and bottom of the page, and after all tags. |
122| [render_daily](#render_daily) | Allow to add content at the top and bottom of the page, the bottom of each link and to alter data. |[](.html) 135| [render_taglist](#render_taglist) | Allow to add content at the top and bottom of the page, and after all tags. |
123| [savelink](#savelink) | Allow to alter the link being saved in the datastore. |[](.html) 136| [render_daily](#render_daily) | Allow to add content at the top and bottom of the page, the bottom of each link and to alter data. |
137| [render_feed](#render_feed) | Allow to do add tags in RSS and ATOM feeds. |
138| [save_link](#save_link) | Allow to alter the link being saved in the datastore. |
139| [delete_link](#delete_link) | Allow to do an action before a link is deleted from the datastore. |
140
124 141
125 142
126#### render_header 143#### render_header
@@ -133,24 +150,24 @@ Allow plugin to add content in page headers.
133 150
134`$data` is an array containing: 151`$data` is an array containing:
135 152
136 * `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.). 153- `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.).
137 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 154- `_LOGGEDIN_`: true if user is logged in, false otherwise.
138 155
139##### Template placeholders 156##### Template placeholders
140 157
141Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html) 158Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
142 159
143List of placeholders: 160List of placeholders:
144 161
145 * `buttons_toolbar`: after the list of buttons in the header. 162- `buttons_toolbar`: after the list of buttons in the header.
146 163
147![buttons_toolbar_example](http://i.imgur.com/ssJUOrt.png)[](.html) 164![buttons_toolbar_example](http://i.imgur.com/ssJUOrt.png)
148 165
149 * `fields_toolbar`: after search fields in the header. 166- `fields_toolbar`: after search fields in the header.
150 167
151> Note: This will only be called in linklist. 168> Note: This will only be called in linklist.
152 169
153![fields_toolbar_example](http://i.imgur.com/3GMifI2.png)[](.html) 170![fields_toolbar_example](http://i.imgur.com/3GMifI2.png)
154 171
155#### render_includes 172#### render_includes
156 173
@@ -162,16 +179,16 @@ Allow plugin to include their own CSS files.
162 179
163`$data` is an array containing: 180`$data` is an array containing:
164 181
165 * `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.). 182- `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.).
166 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 183- `_LOGGEDIN_`: true if user is logged in, false otherwise.
167 184
168##### Template placeholders 185##### Template placeholders
169 186
170Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html) 187Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
171 188
172List of placeholders: 189List of placeholders:
173 190
174 * `css_files`: called after loading default CSS. 191- `css_files`: called after loading default CSS.
175 192
176> Note: only add the path of the CSS file. E.g: `plugins/demo_plugin/custom_demo.css`. 193> Note: only add the path of the CSS file. E.g: `plugins/demo_plugin/custom_demo.css`.
177 194
@@ -185,21 +202,21 @@ Allow plugin to add content in page footer and include their own JS files.
185 202
186`$data` is an array containing: 203`$data` is an array containing:
187 204
188 * `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.). 205- `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.).
189 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 206- `_LOGGEDIN_`: true if user is logged in, false otherwise.
190 207
191##### Template placeholders 208##### Template placeholders
192 209
193Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html) 210Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
194 211
195List of placeholders: 212List of placeholders:
196 213
197 * `text`: called after the end of the footer text. 214- `text`: called after the end of the footer text.
198 * `endofpage`: called at the end of the page. 215- `endofpage`: called at the end of the page.
199 216
200![text_example](http://i.imgur.com/L5S2YEH.png)[](.html) 217![text_example](http://i.imgur.com/L5S2YEH.png)
201 218
202 * `js_files`: called at the end of the page, to include custom JS scripts. 219- `js_files`: called at the end of the page, to include custom JS scripts.
203 220
204> Note: only add the path of the JS file. E.g: `plugins/demo_plugin/custom_demo.js`. 221> Note: only add the path of the JS file. E.g: `plugins/demo_plugin/custom_demo.js`.
205 222
@@ -213,30 +230,30 @@ It allows to add content at the begining and end of the page, after every link d
213 230
214`$data` is an array containing: 231`$data` is an array containing:
215 232
216 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 233- `_LOGGEDIN_`: true if user is logged in, false otherwise.
217 * All templates data, including links. 234- All templates data, including links.
218 235
219##### Template placeholders 236##### Template placeholders
220 237
221Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html) 238Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
222 239
223List of placeholders: 240List of placeholders:
224 241
225 * `action_plugin`: next to the button "private only" at the top and bottom of the page. 242- `action_plugin`: next to the button "private only" at the top and bottom of the page.
226 243
227![action_plugin_example](http://i.imgur.com/Q12PWg0.png)[](.html) 244![action_plugin_example](http://i.imgur.com/Q12PWg0.png)
228 245
229 * `link_plugin`: for every link, between permalink and link URL. 246- `link_plugin`: for every link, between permalink and link URL.
230 247
231![link_plugin_example](http://i.imgur.com/3oDPhWx.png)[](.html) 248![link_plugin_example](http://i.imgur.com/3oDPhWx.png)
232 249
233 * `plugin_start_zone`: before displaying the template content. 250- `plugin_start_zone`: before displaying the template content.
234 251
235![plugin_start_zone_example](http://i.imgur.com/OVBkGy3.png)[](.html) 252![plugin_start_zone_example](http://i.imgur.com/OVBkGy3.png)
236 253
237 * `plugin_end_zone`: after displaying the template content. 254- `plugin_end_zone`: after displaying the template content.
238 255
239![plugin_end_zone_example](http://i.imgur.com/6IoRuop.png)[](.html) 256![plugin_end_zone_example](http://i.imgur.com/6IoRuop.png)
240 257
241#### render_editlink 258#### render_editlink
242 259
@@ -248,17 +265,17 @@ Allow to add fields in the form, or display elements.
248 265
249`$data` is an array containing: 266`$data` is an array containing:
250 267
251 * All templates data. 268- All templates data.
252 269
253##### Template placeholders 270##### Template placeholders
254 271
255Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html) 272Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
256 273
257List of placeholders: 274List of placeholders:
258 275
259 * `edit_link_plugin`: after tags field. 276- `edit_link_plugin`: after tags field.
260 277
261![edit_link_plugin_example](http://i.imgur.com/5u17Ens.png)[](.html) 278![edit_link_plugin_example](http://i.imgur.com/5u17Ens.png)
262 279
263#### render_tools 280#### render_tools
264 281
@@ -270,17 +287,17 @@ Allow to add content at the end of the page.
270 287
271`$data` is an array containing: 288`$data` is an array containing:
272 289
273 * All templates data. 290- All templates data.
274 291
275##### Template placeholders 292##### Template placeholders
276 293
277Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html) 294Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
278 295
279List of placeholders: 296List of placeholders:
280 297
281 * `tools_plugin`: at the end of the page. 298- `tools_plugin`: at the end of the page.
282 299
283![tools_plugin_example](http://i.imgur.com/Bqhu9oQ.png)[](.html) 300![tools_plugin_example](http://i.imgur.com/Bqhu9oQ.png)
284 301
285#### render_picwall 302#### render_picwall
286 303
@@ -292,20 +309,19 @@ Allow to add content at the top and bottom of the page.
292 309
293`$data` is an array containing: 310`$data` is an array containing:
294 311
295 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 312- `_LOGGEDIN_`: true if user is logged in, false otherwise.
296 * All templates data. 313- All templates data.
297 314
298##### Template placeholders 315##### Template placeholders
299 316
300Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html) 317Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
301 318
302List of placeholders: 319List of placeholders:
303 320
304 * `plugin_start_zone`: before displaying the template content. 321- `plugin_start_zone`: before displaying the template content.
305 322- `plugin_end_zone`: after displaying the template content.
306 * `plugin_end_zone`: after displaying the template content.
307 323
308![plugin_start_end_zone_example](http://i.imgur.com/tVTQFER.png)[](.html) 324![plugin_start_end_zone_example](http://i.imgur.com/tVTQFER.png)
309 325
310#### render_tagcloud 326#### render_tagcloud
311 327
@@ -317,20 +333,50 @@ Allow to add content at the top and bottom of the page.
317 333
318`$data` is an array containing: 334`$data` is an array containing:
319 335
320 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 336- `_LOGGEDIN_`: true if user is logged in, false otherwise.
321 * All templates data. 337- All templates data.
322 338
323##### Template placeholders 339##### Template placeholders
324 340
325Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html) 341Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
326 342
327List of placeholders: 343List of placeholders:
328 344
329 * `plugin_start_zone`: before displaying the template content. 345- `plugin_start_zone`: before displaying the template content.
346- `plugin_end_zone`: after displaying the template content.
330 347
331 * `plugin_end_zone`: after displaying the template content. 348For each tag, the following placeholder can be used:
332 349
333![plugin_start_end_zone_example](http://i.imgur.com/vHmyT3a.png)[](.html) 350- `tag_plugin`: after each tag
351
352![plugin_start_end_zone_example](http://i.imgur.com/vHmyT3a.png)
353
354
355#### render_taglist
356
357Triggered when taglist is displayed.
358
359Allow to add content at the top and bottom of the page.
360
361##### Data
362
363`$data` is an array containing:
364
365- `_LOGGEDIN_`: true if user is logged in, false otherwise.
366- All templates data.
367
368##### Template placeholders
369
370Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
371
372List of placeholders:
373
374- `plugin_start_zone`: before displaying the template content.
375- `plugin_end_zone`: after displaying the template content.
376
377For each tag, the following placeholder can be used:
378
379- `tag_plugin`: after each tag
334 380
335#### render_daily 381#### render_daily
336 382
@@ -342,24 +388,49 @@ Allow to add content at the top and bottom of the page, the bottom of each link
342 388
343`$data` is an array containing: 389`$data` is an array containing:
344 390
345 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 391- `_LOGGEDIN_`: true if user is logged in, false otherwise.
346 * All templates data, including links. 392- All templates data, including links.
347 393
348##### Template placeholders 394##### Template placeholders
349 395
350Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html) 396Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
351 397
352List of placeholders: 398List of placeholders:
353 399
354 * `link_plugin`: used at bottom of each link. 400- `link_plugin`: used at bottom of each link.
401
402![link_plugin_example](http://i.imgur.com/hzhMfSZ.png)
403
404- `plugin_start_zone`: before displaying the template content.
405- `plugin_end_zone`: after displaying the template content.
355 406
356![link_plugin_example](http://i.imgur.com/hzhMfSZ.png)[](.html) 407#### render_feed
357 408
358 * `plugin_start_zone`: before displaying the template content. 409Triggered when the ATOM or RSS feed is displayed.
359 410
360 * `plugin_end_zone`: after displaying the template content. 411Allow to add tags in the feed, either in the header or for each items. Items (links) can also be altered before being rendered.
361 412
362#### savelink 413##### Data
414
415`$data` is an array containing:
416
417- `_LOGGEDIN_`: true if user is logged in, false otherwise.
418- `_PAGE_`: containing either `rss` or `atom`.
419- All templates data, including links.
420
421##### Template placeholders
422
423Tags can be added in feeds by adding an entry in `$data['<placeholder>']` array.
424
425List of placeholders:
426
427- `feed_plugins_header`: used as a header tag in the feed.
428
429For each links:
430
431- `feed_plugins`: additional tag for every link entry.
432
433#### save_link
363 434
364Triggered when a link is save (new link or edit). 435Triggered when a link is save (new link or edit).
365 436
@@ -369,12 +440,36 @@ Allow to alter the link being saved in the datastore.
369 440
370`$data` is an array containing the link being saved: 441`$data` is an array containing the link being saved:
371 442
372 * title 443- id
373 * url 444- title
374 * description 445- url
375 * linkdate 446- shorturl
376 * private 447- description
377 * tags 448- private
449- tags
450- created
451- updated
452
453
454#### delete_link
455
456Triggered when a link is deleted.
457
458Allow to execute any action before the link is actually removed from the datastore
459
460##### Data
461
462`$data` is an array containing the link being saved:
463
464- id
465- title
466- url
467- shorturl
468- description
469- private
470- tags
471- created
472- updated
378 473
379## Guide for template designer 474## Guide for template designer
380 475
@@ -388,9 +483,9 @@ Use the default one as an example.
388 483
389Aside from classic RainTPL loops, plugins order is handle by JavaScript. You can just include `plugin_admin.js`, only if: 484Aside from classic RainTPL loops, plugins order is handle by JavaScript. You can just include `plugin_admin.js`, only if:
390 485
391 * you're using a table. 486- you're using a table.
392 * you call orderUp() and orderUp() onclick on arrows. 487- you call orderUp() and orderUp() onclick on arrows.
393 * you add data-line and data-order to your rows. 488- you add data-line and data-order to your rows.
394 489
395Otherwise, you can use your own JS as long as this field is send by the form: 490Otherwise, you can use your own JS as long as this field is send by the form:
396 491
@@ -595,3 +690,19 @@ Bottom:
595 {/loop} 690 {/loop}
596</div> 691</div>
597``` 692```
693
694**feed.atom.xml** and **feed.rss.xml**:
695
696In headers tags section:
697```xml
698{loop="$feed_plugins_header"}
699 {$value}
700{/loop}
701```
702
703After each entry:
704```xml
705{loop="$value.feed_plugins"}
706 {$value}
707{/loop}
708```
diff --git a/doc/Plugins.md b/doc/md/Plugins.md
index 81167fcf..463dae17 100644
--- a/doc/Plugins.md
+++ b/doc/md/Plugins.md
@@ -1,13 +1,12 @@
1#Plugins
2## Plugin installation 1## Plugin installation
3 2
4There is a bunch of plugins shipped with Shaarli, where there is nothing to do to install them. 3There is a bunch of plugins shipped with Shaarli, where there is nothing to do to install them.
5 4
6If you want to install a third party plugin: 5If you want to install a third party plugin:
7 6
8 * Download it. 7- Download it.
9 * Put it in the `plugins` directory in Shaarli's installation folder. 8- Put it in the `plugins` directory in Shaarli's installation folder.
10 * Make sure you put it correctly: 9- Make sure you put it correctly:
11 10
12``` 11```
13| index.php 12| index.php
@@ -26,7 +25,7 @@ In Shaarli's administration page (`Tools` link), go to `Plugin administration`.
26 25
27Here you can enable and disable all plugins available, and configure them. 26Here you can enable and disable all plugins available, and configure them.
28 27
29![administration screenshot](https://camo.githubusercontent.com/5da68e191969007492ca0fbeb25f3b2357b748cc/687474703a2f2f692e696d6775722e636f6d2f766837544643712e706e67)[](.html) 28![administration screenshot](https://camo.githubusercontent.com/5da68e191969007492ca0fbeb25f3b2357b748cc/687474703a2f2f692e696d6775722e636f6d2f766837544643712e706e67)
30 29
31## Plugin order 30## Plugin order
32 31
@@ -41,14 +40,14 @@ This is important in case plugins are depending on each other. Read plugins READ
41Enabled plugin are stored in your `config.php` parameters file, under the `array`: 40Enabled plugin are stored in your `config.php` parameters file, under the `array`:
42 41
43```php 42```php
44$GLOBALS['config'['ENABLED_PLUGINS']]('ENABLED_PLUGINS'].html) 43$GLOBALS['config']['ENABLED_PLUGINS']
45``` 44```
46 45
47You can edit them manually here. 46You can edit them manually here.
48Example: 47Example:
49 48
50```php 49```php
51$GLOBALS['config'['ENABLED_PLUGINS'] = array(]('ENABLED_PLUGINS']-=-array(.html) 50$GLOBALS['config']['ENABLED_PLUGINS'] = array(
52 'qrcode', 51 'qrcode',
53 'archiveorg', 52 'archiveorg',
54 'wallabag', 53 'wallabag',
@@ -64,14 +63,13 @@ Usage of each plugin is documented in it's README file:
64 63
65 * `addlink-toolbar`: Adds the addlink input on the linklist page 64 * `addlink-toolbar`: Adds the addlink input on the linklist page
66 * `archiveorg`: For each link, add an Archive.org icon 65 * `archiveorg`: For each link, add an Archive.org icon
67 * [`markdown`](https://github.com/shaarli/Shaarli/blob/master/plugins/markdown/README.md): Render shaare description with Markdown syntax.[](.html) 66 * [`markdown`](https://github.com/shaarli/Shaarli/blob/master/plugins/markdown/README.md): Render shaare description with Markdown syntax.
68 * [`playvideos`](https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md): Add a button in the toolbar allowing to watch all videos.[](.html) 67 * [`playvideos`](https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md): Add a button in the toolbar allowing to watch all videos.
69 * `qrcode`: For each link, add a QRCode icon. 68 * `qrcode`: For each link, add a QRCode icon.
70 * `readityourself`: For each link, add a ReadItYourself icon to save the shaared URL 69 * [`wallabag`](https://github.com/shaarli/Shaarli/blob/master/plugins/wallabag/README.md): For each link, add a Wallabag icon to save it in your instance.
71 * [`wallabag`](https://github.com/shaarli/Shaarli/blob/master/plugins/wallabag/README.md): For each link, add a Wallabag icon to save it in your instance.[](.html)
72 70
73 71
74 72
75#### Third party plugins 73#### Third party plugins
76 74
77See [Community & related software](https://github.com/shaarli/Shaarli/wiki/Community-%26-Related-software#third-party-plugins)[](.html) 75See [Community & related software](https://shaarli.readthedocs.io/en/master/Community-&-Related-software/)
diff --git a/doc/md/REST-API.md b/doc/md/REST-API.md
new file mode 100644
index 00000000..68a83c00
--- /dev/null
+++ b/doc/md/REST-API.md
@@ -0,0 +1,153 @@
1## Usage and Prerequisites
2
3See the [REST API documentation](http://shaarli.github.io/api-documentation/)
4for a list of available endpoints and parameters.
5
6Please ensure that your server meets the [requirements](Server-requirements)
7and is properly [configured](Server-configuration):
8
9- URL rewriting is enabled (see specific Apache and Nginx sections)
10- the server's timezone is properly defined
11- the server's clock is synchronized with
12 [NTP](https://en.wikipedia.org/wiki/Network_Time_Protocol)
13
14The host where the API client is invoked should also be synchronized with NTP,
15see [token expiration](#payload).
16
17## Authentication
18
19All requests to Shaarli's API must include a JWT token to verify their authenticity.
20
21This token has to be included as an HTTP header called `Authentication: Bearer <jwt token>`.
22
23JWT resources :
24
25- [jwt.io](https://jwt.io) (including a list of client per language).
26- RFC : https://tools.ietf.org/html/rfc7519
27- https://float-middle.com/json-web-tokens-jwt-vs-sessions/
28- HackerNews thread: https://news.ycombinator.com/item?id=11929267
29
30
31### Shaarli JWT Token
32
33JWT tokens are composed by three parts, separated by a dot `.` and encoded in base64:
34
35```
36[header].[payload].[signature]
37```
38
39#### Header
40
41Shaarli only allow one hash algorithm, so the header will always be the same:
42
43```json
44{
45 "typ": "JWT",
46 "alg": "HS512"
47}
48```
49
50Encoded in base64, it gives:
51
52```
53ewogICAgICAgICJ0eXAiOiAiSldUIiwKICAgICAgICAiYWxnIjogIkhTNTEyIgogICAgfQ==
54```
55
56#### Payload
57
58**Token expiration**
59
60To avoid infinite token validity, JWT tokens must include their creation date
61in UNIX timestamp format (timezone independent - UTC) under the key `iat` (issued at).
62This token will be valid during **9 minutes**.
63
64```json
65{
66 "iat": 1468663519
67}
68```
69
70See [RFC reference](https://tools.ietf.org/html/rfc7519#section-4.1.6).
71
72
73#### Signature
74
75The signature authenticate the token validity. It contains the base64 of the header and the body, separated by a dot `.`, hashed in SHA512 with the API secret available in Shaarli administration page.
76
77Signature example with PHP:
78
79```php
80$content = base64_encode($header) . '.' . base64_encode($payload);
81$signature = hash_hmac('sha512', $content, $secret);
82```
83
84
85## Clients and examples
86### Android, Java, Kotlin
87
88- [Android client example with Kotlin](https://gitlab.com/snippets/1665808)
89 by [Braincoke](https://github.com/Braincoke)
90
91### Javascript, NodeJS
92
93- [shaarli-client](https://www.npmjs.com/package/shaarli-client)
94 ([source code](https://github.com/laBecasse/shaarli-client))
95 by [laBecasse](https://github.com/laBecasse)
96
97### PHP
98
99This example uses the [PHP cURL](http://php.net/manual/en/book.curl.php) library.
100
101```php
102<?php
103$baseUrl = 'https://shaarli.mydomain.net';
104$secret = 'thats_my_api_secret';
105
106function base64url_encode($data) {
107 return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
108}
109
110function generateToken($secret) {
111 $header = base64url_encode('{
112 "typ": "JWT",
113 "alg": "HS512"
114 }');
115 $payload = base64url_encode('{
116 "iat": '. time() .'
117 }');
118 $signature = base64url_encode(hash_hmac('sha512', $header .'.'. $payload , $secret, true));
119 return $header . '.' . $payload . '.' . $signature;
120}
121
122
123function getInfo($baseUrl, $secret) {
124 $token = generateToken($secret);
125 $endpoint = rtrim($baseUrl, '/') . '/api/v1/info';
126
127 $headers = [
128 'Content-Type: text/plain; charset=UTF-8',
129 'Authorization: Bearer ' . $token,
130 ];
131
132 $ch = curl_init($endpoint);
133 curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
134 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
135 curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
136 curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
137
138 $result = curl_exec($ch);
139 curl_close($ch);
140
141 return $result;
142}
143
144var_dump(getInfo($baseUrl, $secret));
145```
146
147
148### Python
149
150See the reference API client:
151
152- [Documentation](http://python-shaarli-client.readthedocs.io/en/latest/) on ReadTheDocs
153- [python-shaarli-client](https://github.com/shaarli/python-shaarli-client) on Github
diff --git a/doc/RSS-feeds.md b/doc/md/RSS-feeds.md
index 757bed9a..d943218e 100644
--- a/doc/RSS-feeds.md
+++ b/doc/md/RSS-feeds.md
@@ -1,9 +1,9 @@
1#RSS feeds
2### Feeds options 1### Feeds options
3 2
4Feeds are available in ATOM with `?do=atom` and RSS with `do=RSS`. 3Feeds are available in ATOM with `?do=atom` and RSS with `do=RSS`.
5 4
6Options: 5Options:
6
7- You can use `permalinks` in the feed URL to get permalink to Shaares instead of direct link to shaared URL. 7- You can use `permalinks` in the feed URL to get permalink to Shaares instead of direct link to shaared URL.
8 - E.G. `https://my.shaarli.domain/?do=atom&permalinks`. 8 - E.G. `https://my.shaarli.domain/?do=atom&permalinks`.
9- You can use `nb` parameter in the feed URL to specify the number of Shaares you want in a feed (default if not specified: `50`). The keyword `all` is available if you want everything. 9- You can use `nb` parameter in the feed URL to specify the number of Shaares you want in a feed (default if not specified: `50`). The keyword `all` is available if you want everything.
@@ -15,6 +15,7 @@ Options:
15It is possible to filter RSS/ATOM feeds and Picture Wall on a Shaarli to **only display results of a specific search, or for a specific tag**. 15It is possible to filter RSS/ATOM feeds and Picture Wall on a Shaarli to **only display results of a specific search, or for a specific tag**.
16 16
17For example, if you want to subscribe only to links tagged `photography`: 17For example, if you want to subscribe only to links tagged `photography`:
18
18- Go to the desired Shaarli instance. 19- Go to the desired Shaarli instance.
19- Search for the `photography` tag in the _Filter by tag_ box. Links tagged `photography` are displayed. 20- Search for the `photography` tag in the _Filter by tag_ box. Links tagged `photography` are displayed.
20- Click on the `RSS Feed` button. 21- Click on the `RSS Feed` button.
@@ -24,4 +25,4 @@ For example, if you want to subscribe only to links tagged `photography`:
24 - `https://my.shaarli.domain/?do=rss&searchtags=nature` 25 - `https://my.shaarli.domain/?do=rss&searchtags=nature`
25 - `https://my.shaarli.domain/links/?do=picwall&searchterm=poney` 26 - `https://my.shaarli.domain/links/?do=picwall&searchterm=poney`
26 27
27![(images/rss-filter-1.png) !]((images/rss-filter-1.png)-!.html)(images/rss-filter-2.png) 28![](images/rss-filter-1.png) ![](images/rss-filter-2.png)
diff --git a/doc/Release-Shaarli.md b/doc/md/Release-Shaarli.md
index 556a96ee..e22eabc9 100644
--- a/doc/Release-Shaarli.md
+++ b/doc/md/Release-Shaarli.md
@@ -1,9 +1,9 @@
1#Release Shaarli 1See [Git - Maintaining a project - Tagging your
2See [Git - Maintaining a project - Tagging your [](.html)
3releases](http://git-scm.com/book/en/v2/Distributed-Git-Maintaining-a-Project#Tagging-Your-Releases). 2releases](http://git-scm.com/book/en/v2/Distributed-Git-Maintaining-a-Project#Tagging-Your-Releases).
4 3
5## Prerequisites 4## Prerequisites
6This guide assumes that you have: 5This guide assumes that you have:
6
7- a GPG key matching your GitHub authentication credentials 7- a GPG key matching your GitHub authentication credentials
8 - i.e., the email address identified by the GPG key is the same as the one in your `~/.gitconfig` 8 - i.e., the email address identified by the GPG key is the same as the one in your `~/.gitconfig`
9- a GitHub fork of Shaarli 9- a GitHub fork of Shaarli
@@ -13,18 +13,20 @@ This guide assumes that you have:
13- maintainer permissions on the main Shaarli repository, to: 13- maintainer permissions on the main Shaarli repository, to:
14 - push the signed tag 14 - push the signed tag
15 - create a new release 15 - create a new release
16- [Composer](https://getcomposer.org/) and [Pandoc](http://pandoc.org/) need to be installed[](.html) 16- [Composer](https://getcomposer.org/) needs to be installed
17- The [venv](https://docs.python.org/3/library/venv.html) Python 3 module needs to be installed for HTML documentation generation.
17 18
18## GitHub release draft and `CHANGELOG.md` 19## GitHub release draft and `CHANGELOG.md`
19See http://keepachangelog.com/en/0.3.0/ for changelog formatting. 20See http://keepachangelog.com/en/0.3.0/ for changelog formatting.
20 21
21### GitHub release draft 22### GitHub release draft
22GitHub allows drafting the release note for the upcoming release, from the [Releases](https://github.com/shaarli/Shaarli/releases) page. This way, the release note can be drafted while contributions are merged to `master`.[](.html) 23GitHub allows drafting the release note for the upcoming release, from the [Releases](https://github.com/shaarli/Shaarli/releases) page. This way, the release note can be drafted while contributions are merged to `master`.
23 24
24### `CHANGELOG.md` 25### `CHANGELOG.md`
25This file should contain the same information as the release note draft for the upcoming version. 26This file should contain the same information as the release note draft for the upcoming version.
26 27
27Update it to: 28Update it to:
29
28- add new entries (additions, fixes, etc.) 30- add new entries (additions, fixes, etc.)
29- mark the current version as released by setting its date and link 31- mark the current version as released by setting its date and link
30- add a new section for the future unreleased version 32- add a new section for the future unreleased version
@@ -34,47 +36,51 @@ $ cd /path/to/shaarli
34 36
35$ nano CHANGELOG.md 37$ nano CHANGELOG.md
36 38
37[...][](.html) 39[...]
38## vA.B.C - UNRELEASED 40## vA.B.C - UNRELEASED
39TBA 41TBA
40 42
41## [vX.Y.Z](https://github.com/shaarli/Shaarli/releases/tag/vX.Y.Z) - YYYY-MM-DD[](.html) 43## [vX.Y.Z](https://github.com/shaarli/Shaarli/releases/tag/vX.Y.Z) - YYYY-MM-DD
42[...][](.html) 44[...]
43``` 45```
44 46
45 47
46## Increment the version code, create and push a signed tag 48## Increment the version code, update docs, create and push a signed tag
47### Bump Shaarli's version 49### Update the list of Git contributors
48```bash 50```bash
49$ cd /path/to/shaarli 51$ make authors
50 52$ git commit -s -m "Update AUTHORS"
51# create a new branch 53```
52$ git fetch upstream
53$ git checkout upstream/master -b v0.5.0
54 54
55# bump the version number 55### Create and merge a Pull Request
56$ vim index.php shaarli_version.php 56This one is pretty straightforward ;-)
57 57
58# rebuild the documentation from the wiki 58### Bump Shaarli version to v0.x branch
59$ make htmldoc
60 59
61# commit the changes 60```bash
62$ git add index.php shaarli_version.php doc 61$ git checkout master
63$ git commit -s -m "Bump version to v0.5.0" 62$ git fetch upstream
63$ git pull upstream master
64 64
65# push the commit on your GitHub fork 65# IF the branch doesn't exists
66$ git push origin v0.5.0 66$ git checkout -b v0.5
67# OR if the branch already exists
68$ git checkout v0.5
69$ git rebase upstream/master
70
71# Bump shaarli version from dev to 0.5.0, **without the `v`**
72$ vim shaarli_version.php
73$ git add shaarli_version
74$ git commit -s -m "Bump Shaarli version to v0.5.0"
75$ git push upstream v0.5
67``` 76```
68 77
69### Create and merge a Pull Request
70This one is pretty straightforward ;-)
71
72### Create and push a signed tag 78### Create and push a signed tag
73```bash 79```bash
74# update your local copy 80# update your local copy
75$ git checkout master 81$ git checkout v0.5
76$ git fetch upstream 82$ git fetch upstream
77$ git pull upstream master 83$ git pull upstream v0.5
78 84
79# create a signed tag 85# create a signed tag
80$ git tag -s -m "Release v0.5.0" v0.5.0 86$ git tag -s -m "Release v0.5.0" v0.5.0
@@ -84,7 +90,7 @@ $ git push --tags upstream
84``` 90```
85 91
86### Verify a signed tag 92### Verify a signed tag
87[`v0.5.0`](https://github.com/shaarli/Shaarli/releases/tag/v0.5.0) is the first GPG-signed tag pushed on the Community Shaarli.[](.html) 93[`v0.5.0`](https://github.com/shaarli/Shaarli/releases/tag/v0.5.0) is the first GPG-signed tag pushed on the Community Shaarli.
88 94
89Let's have a look at its signature! 95Let's have a look at its signature!
90 96
@@ -99,12 +105,16 @@ f7762cf803f03f5caf4b8078359a63783d0090c1 refs/tags/v0.5.0
99# verify the tag signature information 105# verify the tag signature information
100$ git verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1 106$ git verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1
101gpg: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F 107gpg: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F
102gpg: Good signature from "VirtualTam <virtualtam@flibidi.net>" [ultimate][](.html) 108gpg: Good signature from "VirtualTam <virtualtam@flibidi.net>" [ultimate]
103``` 109```
104 110
105## Publish the GitHub release 111## Publish the GitHub release
112### Update release badges
113Update `README.md` so version badges display and point to the newly released Shaarli version(s), in the `master` branch.
114
106### Create a GitHub release from a Git tag 115### Create a GitHub release from a Git tag
107From the previously drafted release: 116From the previously drafted release:
117
108- edit the release notes (if needed) 118- edit the release notes (if needed)
109- specify the appropriate Git tag 119- specify the appropriate Git tag
110- publish the release 120- publish the release
@@ -112,19 +122,40 @@ From the previously drafted release:
112 122
113### Generate and upload all-in-one release archives 123### Generate and upload all-in-one release archives
114Users with a shared hosting may have: 124Users with a shared hosting may have:
125
115- no SSH access 126- no SSH access
116- no possibility to install PHP packages or server extensions 127- no possibility to install PHP packages or server extensions
117- no possibility to run scripts 128- no possibility to run scripts
118 129
119To ease Shaarli installations, it is possible to generate and upload additional release archives, 130To ease Shaarli installations, it is possible to generate and upload additional release archives,
120that will contain Shaarli code plus all required third-party libraries: 131that will contain Shaarli code plus all required third-party libraries.
132
133**From the `v0.5` branch:**
121 134
122```bash 135```bash
123$ make release_archive 136$ make release_archive
124``` 137```
125 138
126This will create the following archives: 139This will create the following archives:
140
127- `shaarli-vX.Y.Z-full.tar` 141- `shaarli-vX.Y.Z-full.tar`
128- `shaarli-vX.Y.Z-full.zip` 142- `shaarli-vX.Y.Z-full.zip`
129 143
130The archives need to be manually uploaded on the previously created GitHub release. 144The archives need to be manually uploaded on the previously created GitHub release.
145
146### Update `stable` and `latest` branches
147
148```
149$ git checkout latest
150# latest release
151$ git merge v0.5.0
152# fix eventual conflicts
153$ make test
154$ git push upstream latest
155$ git checkout stable
156# latest previous major
157$ git merge v0.4.5
158# fix eventual conflicts
159$ make test
160$ git push upstream stable
161```
diff --git a/doc/md/Security.md b/doc/md/Security.md
new file mode 100644
index 00000000..65db4225
--- /dev/null
+++ b/doc/md/Security.md
@@ -0,0 +1,25 @@
1## Client browser
2- Shaarli relies on `HTTP_REFERER` for some functions (like redirects and clicking on tags). If you have disabled or masqueraded `HTTP_REFERER` in your browser, some features of Shaarli may not work
3
4## Server and sessions
5- Directories are protected using `.htaccess` files
6- Forms are protected against XSRF (Cross-site requests forgery):
7 - Forms which act on data (save,delete…) contain a token generated by the server.
8 - Any posted form which does not contain a valid token is rejected.
9 - Any token can only be used once.
10 - Tokens are attached to the session and cannot be reused in another session.
11- Sessions automatically expire after 60 minutes.
12- Sessions are protected against hijacking: the session ID cannot be used from a different IP address.
13
14## Shaarli datastore and configuration
15- The password is salted, hashed and stored in the data subdirectory, in a PHP file, and protected by htaccess. Even if the webserver does not support htaccess, the hash is not readable by URL. Even if the .php file is stolen, the password cannot deduced from the hash. The salt prevents rainbow-tables attacks.
16- Links are stored as an associative array which is serialized, compressed (with deflate), base64-encoded and saved as a comment in a `.php` file.
17- Even if the server does not support `.htaccess` files, the data file will still not be readable by URL.
18- The database looks like this:
19
20```php
21<?php /* zP1ZjxxJtiYIvvevEPJ2lDOaLrZv7o...
22...ka7gaco/Z+TFXM2i7BlfMf8qxpaSSYfKlvqv/x8= */ ?>
23```
24
25- Small hashes are used to make a link to an entry in Shaarli. They are unique. In fact, the date of the items (eg. `20110923_150523`) is hashed with CRC32, then converted to base64 and some characters are replaced. They are always 6 characters longs and use only `A-Z a-z 0-9 - _` and `@`.
diff --git a/doc/Server-configuration.md b/doc/md/Server-configuration.md
index df10feb2..25dd49fe 100644
--- a/doc/Server-configuration.md
+++ b/doc/md/Server-configuration.md
@@ -1,30 +1,32 @@
1#Server configuration
2*Example virtual host configurations for popular web servers* 1*Example virtual host configurations for popular web servers*
3 2
4- [Apache](#apache)[](.html) 3- [Apache](#apache)
5- [Nginx](#nginx)[](.html) 4- [Nginx](#nginx)
6 5
7## Prerequisites 6## Prerequisites
8### Shaarli 7### Shaarli
9* Shaarli is installed in a directory readable/writeable by the user 8- Shaarli is installed in a directory readable/writeable by the user
10* the correct read/write permissions have been granted to the web server _user and/or group_ 9- the correct read/write permissions have been granted to the web server _user and/or group_
11* for HTTPS / SSL: 10- for HTTPS / SSL:
12 * a key pair (public, private) and a certificate have been generated 11 - a key pair (public, private) and a certificate have been generated
13 * the appropriate server SSL extension is installed and active 12 - the appropriate server SSL extension is installed and active
14 13
15### HTTPS, TLS and self-signed certificates 14### HTTPS, TLS and self-signed certificates
16Related guides: 15Related guides:
17* [How to Create Self-Signed SSL Certificates with OpenSSL](http://www.xenocafe.com/tutorials/linux/centos/openssl/self_signed_certificates/index.php)[](.html) 16
18* [How do I create my own Certificate Authority?](https://workaround.org/certificate-authority)[](.html) 17- [How to Create Self-Signed SSL Certificates with OpenSSL](http://www.xenocafe.com/tutorials/linux/centos/openssl/self_signed_certificates/index.php)
19* Generate a self-signed certificate (will trigger browser warnings) with apache2: `make-ssl-cert generate-default-snakeoil --force-overwrite` will create `/etc/ssl/certs/ssl-cert-snakeoil.pem` and `/etc/ssl/private/ssl-cert-snakeoil.key` 18- [How do I create my own Certificate Authority?](https://workaround.org/certificate-authority)
19- Generate a self-signed certificate (will trigger browser warnings) with apache2:
20 `make-ssl-cert generate-default-snakeoil --force-overwrite` will create `/etc/ssl/certs/ssl-cert-snakeoil.pem` and `/etc/ssl/private/ssl-cert-snakeoil.key`
20 21
21### Proxies 22### Proxies
22If Shaarli is served behind a proxy (i.e. there is a proxy server between clients and the web server hosting Shaarli), please refer to the proxy server documentation for proper configuration. In particular, you have to ensure that the following server variables are properly set: 23If Shaarli is served behind a proxy (i.e. there is a proxy server between clients and the web server hosting Shaarli), please refer to the proxy server documentation for proper configuration. In particular, you have to ensure that the following server variables are properly set:
23- `X-Forwarded-Proto`;
24- `X-Forwarded-Host`;
25- `X-Forwarded-For`.
26 24
27See also [proxy-related](https://github.com/shaarli/Shaarli/issues?utf8=%E2%9C%93&q=label%3Aproxy+) issues.[](.html) 25- `X-Forwarded-Proto`
26- `X-Forwarded-Host`
27- `X-Forwarded-For`
28
29See also [proxy-related](https://github.com/shaarli/Shaarli/issues?utf8=%E2%9C%93&q=label%3Aproxy+) issues.
28 30
29## Apache 31## Apache
30### Minimal 32### Minimal
@@ -38,8 +40,9 @@ See also [proxy-related](https://github.com/shaarli/Shaarli/issues?utf8=%E2%9C%9
38This configuration will log both Apache and PHP errors, which may prove useful to identify server configuration errors. 40This configuration will log both Apache and PHP errors, which may prove useful to identify server configuration errors.
39 41
40See: 42See:
41* [Apache/PHP - error log per VirtualHost](http://stackoverflow.com/q/176) (StackOverflow)[](.html) 43
42* [PHP: php_value vs php_admin_value and the use of php_flag explained](https://ma.ttias.be/php-php_value-vs-php_admin_value-and-the-use-of-php_flag-explained/)[](.html) 44- [Apache/PHP - error log per VirtualHost](http://stackoverflow.com/q/176) (StackOverflow)
45- [PHP: php_value vs php_admin_value and the use of php_flag explained](https://ma.ttias.be/php-php_value-vs-php_admin_value-and-the-use-of-php_flag-explained/)
43 46
44```apache 47```apache
45<VirtualHost *:80> 48<VirtualHost *:80>
@@ -70,7 +73,7 @@ See:
70``` 73```
71 74
72### Paranoid - Redirect HTTP (:80) to HTTPS (:443) 75### Paranoid - Redirect HTTP (:80) to HTTPS (:443)
73See [Server-side TLS](https://wiki.mozilla.org/Security/Server_Side_TLS#Apache) (Mozilla).[](.html) 76See [Server-side TLS](https://wiki.mozilla.org/Security/Server_Side_TLS#Apache) (Mozilla).
74 77
75```apache 78```apache
76<VirtualHost *:443> 79<VirtualHost *:443>
@@ -106,43 +109,52 @@ See [Server-side TLS](https://wiki.mozilla.org/Security/Server_Side_TLS#Apache)
106 109
107Shaarli use `.htaccess` Apache files to deny access to files that shouldn't be directly accessed (datastore, config, etc.). You need the directive `AllowOverride All` in your virtual host configuration for them to work. 110Shaarli use `.htaccess` Apache files to deny access to files that shouldn't be directly accessed (datastore, config, etc.). You need the directive `AllowOverride All` in your virtual host configuration for them to work.
108 111
109**Warning**: If you use Apache 2.2 or lower, you need [mod_version](https://httpd.apache.org/docs/current/mod/mod_version.html) to be installed and enabled.[](.html) 112**Warning**: If you use Apache 2.2 or lower, you need [mod_version](https://httpd.apache.org/docs/current/mod/mod_version.html) to be installed and enabled.
113
114Apache module `mod_rewrite` **must** be enabled to use the REST API. URL rewriting rules for the Slim microframework are stated in the root `.htaccess` file.
110 115
111## LightHttpd 116## LightHttpd
112 117
113## Nginx 118## Nginx
114### Foreword 119### Foreword
115Nginx does not natively interpret PHP scripts; to this effect, we will run a [FastCGI](https://en.wikipedia.org/wiki/FastCGI) service, to which Nginx's FastCGI module will proxy all requests to PHP resources.[](.html) 120Nginx does not natively interpret PHP scripts; to this effect, we will run a [FastCGI](https://en.wikipedia.org/wiki/FastCGI) service, to which Nginx's FastCGI module will proxy all requests to PHP resources.
116 121
117Required packages: 122Required packages:
118- [nginx](http://nginx.org)[](.html) 123
119- [php-fpm](http://php-fpm.org) - PHP FastCGI Process Manager[](.html) 124- [nginx](http://nginx.org)
125- [php-fpm](http://php-fpm.org) - PHP FastCGI Process Manager
120 126
121Official documentation: 127Official documentation:
122- [Beginner's guide](http://nginx.org/en/docs/beginners_guide.html)[](.html) 128
123- [ngx_http_fastcgi_module](http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html)[](.html) 129- [Beginner's guide](http://nginx.org/en/docs/beginners_guide.html)
124- [Pitfalls](http://wiki.nginx.org/Pitfalls)[](.html) 130- [ngx_http_fastcgi_module](http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html)
131- [Pitfalls](http://wiki.nginx.org/Pitfalls)
125 132
126Community resources: 133Community resources:
127- [Server-side TLS (Nginx)](https://wiki.mozilla.org/Security/Server_Side_TLS#Nginx) (Mozilla)[](.html) 134
128- [PHP configuration examples](http://kbeezie.com/nginx-configuration-examples/) (Karl Blessing)[](.html) 135- [Server-side TLS (Nginx)](https://wiki.mozilla.org/Security/Server_Side_TLS#Nginx) (Mozilla)
136- [PHP configuration examples](http://kbeezie.com/nginx-configuration-examples/) (Karl Blessing)
129 137
130### Common setup 138### Common setup
131Once Nginx and PHP-FPM are installed, we need to ensure: 139Once Nginx and PHP-FPM are installed, we need to ensure:
140
132- Nginx and PHP-FPM are running using the _same user and group_ 141- Nginx and PHP-FPM are running using the _same user and group_
133- both these user and group have 142- both these user and group have
134 - `read` permissions for Shaarli resources 143 - `read` permissions for Shaarli resources
135 - `execute` permissions for Shaarli directories _AND_ their parent directories 144 - `execute` permissions for Shaarli directories _AND_ their parent directories
136 145
137On a production server: 146On a production server:
147
138- `user:group` will likely be `http:http`, `www:www` or `www-data:www-data` 148- `user:group` will likely be `http:http`, `www:www` or `www-data:www-data`
139- files will be located under `/var/www`, `/var/http` or `/usr/share/nginx` 149- files will be located under `/var/www`, `/var/http` or `/usr/share/nginx`
140 150
141On a development server: 151On a development server:
152
142- files may be located in a user's home directory 153- files may be located in a user's home directory
143- in this case, make sure both Nginx and PHP-FPM are running as the local user/group! 154- in this case, make sure both Nginx and PHP-FPM are running as the local user/group!
144 155
145For all following configuration examples, this user/group pair will be used: 156For all following configuration examples, this user/group pair will be used:
157
146- `user:group = john:users`, 158- `user:group = john:users`,
147 159
148which corresponds to the following service configuration: 160which corresponds to the following service configuration:
@@ -152,7 +164,7 @@ which corresponds to the following service configuration:
152user = john 164user = john
153group = users 165group = users
154 166
155[...][](.html) 167[...]
156listen.owner = john 168listen.owner = john
157listen.group = users 169listen.group = users
158``` 170```
@@ -162,7 +174,7 @@ listen.group = users
162user john users; 174user john users;
163 175
164http { 176http {
165 [...][](.html) 177 [...]
166} 178}
167``` 179```
168 180
@@ -175,20 +187,20 @@ To increase upload size, you will need to modify both nginx and PHP configuratio
175# /etc/nginx/nginx.conf 187# /etc/nginx/nginx.conf
176 188
177http { 189http {
178 [...][](.html) 190 [...]
179 191
180 client_max_body_size 10m; 192 client_max_body_size 10m;
181 193
182 [...][](.html) 194 [...]
183} 195}
184``` 196```
185 197
186```ini 198```ini
187# /etc/php5/fpm/php.ini 199# /etc/php5/fpm/php.ini
188 200
189[...][](.html) 201[...]
190post_max_size = 10M 202post_max_size = 10M
191[...][](.html) 203[...]
192upload_max_filesize = 10M 204upload_max_filesize = 10M
193``` 205```
194 206
@@ -218,11 +230,14 @@ http {
218 error_log /var/log/nginx/error.log; 230 error_log /var/log/nginx/error.log;
219 231
220 location /shaarli/ { 232 location /shaarli/ {
233 try_files $uri /shaarli/index.php$is_args$args;
221 access_log /var/log/nginx/shaarli.access.log; 234 access_log /var/log/nginx/shaarli.access.log;
222 error_log /var/log/nginx/shaarli.error.log; 235 error_log /var/log/nginx/shaarli.error.log;
223 } 236 }
224 237
225 location ~ (index)\.php$ { 238 location ~ (index)\.php$ {
239 try_files $uri =404;
240 fastcgi_split_path_info ^(.+\.php)(/.+)$;
226 fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; 241 fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
227 fastcgi_index index.php; 242 fastcgi_index index.php;
228 include fastcgi.conf; 243 include fastcgi.conf;
@@ -233,6 +248,7 @@ http {
233 248
234### Modular 249### Modular
235The previous setup is sufficient for development purposes, but has several major caveats: 250The previous setup is sufficient for development purposes, but has several major caveats:
251
236- every content that does not match the PHP rule will be sent to client browsers: 252- every content that does not match the PHP rule will be sent to client browsers:
237 - dotfiles - in our case, `.htaccess` 253 - dotfiles - in our case, `.htaccess`
238 - temporary files, e.g. Vim or Emacs files: `index.php~` 254 - temporary files, e.g. Vim or Emacs files: `index.php~`
@@ -261,6 +277,10 @@ location ~ ~$ {
261```nginx 277```nginx
262# /etc/nginx/php.conf 278# /etc/nginx/php.conf
263location ~ (index)\.php$ { 279location ~ (index)\.php$ {
280 # Slim - split URL path into (script_filename, path_info)
281 try_files $uri =404;
282 fastcgi_split_path_info ^(.+\.php)(/.+)$;
283
264 # filter and proxy PHP requests to PHP-FPM 284 # filter and proxy PHP requests to PHP-FPM
265 fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; 285 fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
266 fastcgi_index index.php; 286 fastcgi_index index.php;
@@ -284,10 +304,10 @@ location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
284 304
285```nginx 305```nginx
286# /etc/nginx/nginx.conf 306# /etc/nginx/nginx.conf
287[...][](.html) 307[...]
288 308
289http { 309http {
290 [...][](.html) 310 [...]
291 311
292 root /home/john/web; 312 root /home/john/web;
293 access_log /var/log/nginx/access.log; 313 access_log /var/log/nginx/access.log;
@@ -299,6 +319,9 @@ http {
299 server_name my.first.domain.org; 319 server_name my.first.domain.org;
300 320
301 location /shaarli/ { 321 location /shaarli/ {
322 # Slim - rewrite URLs
323 try_files $uri /shaarli/index.php$is_args$args;
324
302 access_log /var/log/nginx/shaarli.access.log; 325 access_log /var/log/nginx/shaarli.access.log;
303 error_log /var/log/nginx/shaarli.error.log; 326 error_log /var/log/nginx/shaarli.error.log;
304 } 327 }
@@ -331,14 +354,16 @@ http {
331``` 354```
332 355
333### Redirect HTTP to HTTPS 356### Redirect HTTP to HTTPS
334Assuming you have generated a (self-signed) key and certificate, and they are located under `/home/john/ssl/localhost.{key,crt}`, it is pretty straightforward to set an HTTP (:80) to HTTPS (:443) redirection to force SSL/TLS usage. 357Assuming you have generated a (self-signed) key and certificate, and they are
358located under `/home/john/ssl/localhost.{key,crt}`, it is pretty straightforward
359to set an HTTP (:80) to HTTPS (:443) redirection to force SSL/TLS usage.
335 360
336```nginx 361```nginx
337# /etc/nginx/nginx.conf 362# /etc/nginx/nginx.conf
338[...][](.html) 363[...]
339 364
340http { 365http {
341 [...][](.html) 366 [...]
342 367
343 index index.html index.php; 368 index index.html index.php;
344 369
@@ -361,6 +386,9 @@ http {
361 ssl_certificate_key /home/john/ssl/localhost.key; 386 ssl_certificate_key /home/john/ssl/localhost.key;
362 387
363 location /shaarli/ { 388 location /shaarli/ {
389 # Slim - rewrite URLs
390 try_files $uri /index.php$is_args$args;
391
364 access_log /var/log/nginx/shaarli.access.log; 392 access_log /var/log/nginx/shaarli.access.log;
365 error_log /var/log/nginx/shaarli.error.log; 393 error_log /var/log/nginx/shaarli.error.log;
366 } 394 }
diff --git a/doc/Server-requirements.md b/doc/md/Server-requirements.md
index 4962193e..2dc442df 100644
--- a/doc/Server-requirements.md
+++ b/doc/md/Server-requirements.md
@@ -1,37 +1,42 @@
1#Server requirements
2## PHP 1## PHP
2
3### Release information 3### Release information
4- [PHP: Supported versions](http://php.net/supported-versions.php)[](.html) 4- [PHP: Supported versions](http://php.net/supported-versions.php)
5- [PHP: Unsupported versions](http://php.net/eol.php) _(EOL - End Of Life)_[](.html) 5- [PHP: Unsupported versions](http://php.net/eol.php) _(EOL - End Of Life)_
6- [PHP 7 Changelog](http://php.net/ChangeLog-7.php)[](.html) 6- [PHP 7 Changelog](http://php.net/ChangeLog-7.php)
7- [PHP 5 Changelog](http://php.net/ChangeLog-5.php)[](.html) 7- [PHP 5 Changelog](http://php.net/ChangeLog-5.php)
8- [PHP: Bugs](https://bugs.php.net/)[](.html) 8- [PHP: Bugs](https://bugs.php.net/)
9 9
10### Supported versions 10### Supported versions
11Version | Status | Shaarli compatibility 11Version | Status | Shaarli compatibility
12:---:|:---:|:---: 12:---:|:---:|:---:
137.0 | Supported | :white_check_mark: 137.1 | Supported (v0.9.x) | Yes
145.6 | Supported | :white_check_mark: 147.0 | Supported | Yes
155.5 | EOL: 2016-07-10 | :white_check_mark: 155.6 | Supported | Yes
165.4 | EOL: 2015-09-14 | :white_check_mark: (up to Shaarli 0.8.x) 165.5 | EOL: 2016-07-10 | Yes
175.3 | EOL: 2014-08-14 | :white_check_mark: (up to Shaarli 0.8.x) 175.4 | EOL: 2015-09-14 | Yes (up to Shaarli 0.8.x)
185.3 | EOL: 2014-08-14 | Yes (up to Shaarli 0.8.x)
18 19
19See also: 20See also:
20- [Travis configuration](https://github.com/shaarli/Shaarli/blob/master/.travis.yml)[](.html) 21
22- [Travis configuration](https://github.com/shaarli/Shaarli/blob/master/.travis.yml)
21 23
22### Dependency management 24### Dependency management
23Starting with Shaarli `v0.8.x`, [Composer](https://getcomposer.org/) is used to resolve,[](.html) 25Starting with Shaarli `v0.8.x`, [Composer](https://getcomposer.org/) is used to resolve,
24download and install third-party PHP dependencies. 26download and install third-party PHP dependencies.
25 27
26Library | Required? | Usage 28Library | Required? | Usage
27---|:---:|--- 29---|:---:|---
28[`shaarli/netscape-bookmark-parser`](https://packagist.org/packages/shaarli/netscape-bookmark-parser) | All | Import bookmarks from Netscape files[](.html) 30[`shaarli/netscape-bookmark-parser`](https://packagist.org/packages/shaarli/netscape-bookmark-parser) | All | Import bookmarks from Netscape files
31[`erusev/parsedown`](https://packagist.org/packages/erusev/parsedown) | All | Parse MarkDown syntax for the MarkDown plugin
32[`slim/slim`](https://packagist.org/packages/slim/slim) | All | Handle routes and middleware for the REST API
29 33
30### Extensions 34### Extensions
31Extension | Required? | Usage 35Extension | Required? | Usage
32---|:---:|--- 36---|:---:|---
33[`openssl`](http://php.net/manual/en/book.openssl.php) | All | OpenSSL, HTTPS[](.html) 37[`openssl`](http://php.net/manual/en/book.openssl.php) | All | OpenSSL, HTTPS
34[`php-mbstring`](http://php.net/manual/en/book.mbstring.php) | CentOS, Fedora, RHEL, Windows | multibyte (Unicode) string support[](.html) 38[`php-mbstring`](http://php.net/manual/en/book.mbstring.php) | CentOS, Fedora, RHEL, Windows, some hosting providers | multibyte (Unicode) string support
35[`php-gd`](http://php.net/manual/en/book.image.php) | optional | thumbnail resizing[](.html) 39[`php-gd`](http://php.net/manual/en/book.image.php) | optional | thumbnail resizing
36[`php-intl`](http://php.net/manual/en/book.intl.php) | optional | localized text sorting (e.g. `e->è->f`)[](.html) 40[`php-intl`](http://php.net/manual/en/book.intl.php) | optional | localized text sorting (e.g. `e->è->f`)
37[`php-curl`](http://php.net/manual/en/book.curl.php) | optional | using cURL for fetching webpages and thumbnails in a more robust way[](.html) 41[`php-curl`](http://php.net/manual/en/book.curl.php) | optional | using cURL for fetching webpages and thumbnails in a more robust way
42[`php-gettext`](http://php.net/manual/en/book.gettext.php) | optional | Use the translation system in gettext mode (faster)
diff --git a/doc/Server-security.md b/doc/md/Server-security.md
index 50549a21..700084e2 100644
--- a/doc/Server-security.md
+++ b/doc/md/Server-security.md
@@ -1,6 +1,6 @@
1#Server security
2## php.ini 1## php.ini
3PHP settings are defined in: 2PHP settings are defined in:
3
4- a main configuration file, usually found under `/etc/php5/php.ini`; some distributions provide different configuration environments, e.g. 4- a main configuration file, usually found under `/etc/php5/php.ini`; some distributions provide different configuration environments, e.g.
5 - `/etc/php5/php.ini` - used when running console scripts 5 - `/etc/php5/php.ini` - used when running console scripts
6 - `/etc/php5/apache2/php.ini` - used when a client requests PHP resources from Apache 6 - `/etc/php5/apache2/php.ini` - used when a client requests PHP resources from Apache
@@ -31,8 +31,9 @@ Additional .ini files parsed: /etc/php/conf.d/xdebug.ini
31 31
32## fail2ban 32## fail2ban
33`fail2ban` is an intrusion prevention framework that reads server (Apache, SSH, etc.) and uses `iptables` profiles to block brute-force attempts: 33`fail2ban` is an intrusion prevention framework that reads server (Apache, SSH, etc.) and uses `iptables` profiles to block brute-force attempts:
34- [Official website](http://www.fail2ban.org/wiki/index.php/Main_Page)[](.html) 34
35- [Source code](https://github.com/fail2ban/fail2ban)[](.html) 35- [Official website](http://www.fail2ban.org/wiki/index.php/Main_Page)
36- [Source code](https://github.com/fail2ban/fail2ban)
36 37
37### Read Shaarli logs to ban IPs 38### Read Shaarli logs to ban IPs
38Example configuration: 39Example configuration:
@@ -41,7 +42,7 @@ Example configuration:
41 42
42`/etc/fail2ban/jail.local` 43`/etc/fail2ban/jail.local`
43```ini 44```ini
44[shaarli-auth][](.html) 45[shaarli-auth]
45enabled = true 46enabled = true
46port = https,http 47port = https,http
47filter = shaarli-auth 48filter = shaarli-auth
@@ -52,9 +53,9 @@ bantime = -1
52 53
53`/etc/fail2ban/filter.d/shaarli-auth.conf` 54`/etc/fail2ban/filter.d/shaarli-auth.conf`
54```ini 55```ini
55[INCLUDES][](.html) 56[INCLUDES]
56before = common.conf 57before = common.conf
57[Definition][](.html) 58[Definition]
58failregex = \s-\s<HOST>\s-\sLogin failed for user.*$ 59failregex = \s-\s<HOST>\s-\sLogin failed for user.*$
59ignoreregex = 60ignoreregex =
60``` 61```
@@ -69,6 +70,7 @@ Disallow: /
69``` 70```
70 71
71See: 72See:
72- http://www.robotstxt.org/ 73
74- http://www.robotstxt.org
73- http://www.robotstxt.org/robotstxt.html 75- http://www.robotstxt.org/robotstxt.html
74- http://www.robotstxt.org/meta.html 76- http://www.robotstxt.org/meta.html
diff --git a/doc/md/Shaarli-configuration.md b/doc/md/Shaarli-configuration.md
new file mode 100644
index 00000000..920c7e27
--- /dev/null
+++ b/doc/md/Shaarli-configuration.md
@@ -0,0 +1,244 @@
1## Foreword
2
3**Do not edit configuration options in index.php! Your changes would be lost.**
4
5Once your Shaarli instance is installed, the file `data/config.json.php` is generated:
6* it contains all settings in JSON format, and can be edited to customize values
7* it defines which [plugins](Plugin-System) are enabled[](.html)
8* its values override those defined in `index.php`
9* it is wrap in a PHP comment to prevent anyone accessing it, regardless of server configuration
10
11## File and directory permissions
12
13The server process running Shaarli must have:
14
15- `read` access to the following resources:
16 - PHP scripts: `index.php`, `application/*.php`, `plugins/*.php`
17 - 3rd party PHP and Javascript libraries: `inc/*.php`, `inc/*.js`
18 - static assets:
19 - CSS stylesheets: `inc/*.css`
20 - `images/*`
21 - RainTPL templates: `tpl/*.html`
22- `read`, `write` and `execution` access to the following directories:
23 - `cache` - thumbnail cache
24 - `data` - link data store, configuration options
25 - `pagecache` - Atom/RSS feed cache
26 - `tmp` - RainTPL page cache
27
28On a Linux distribution:
29
30- the web server user will likely be `www` or `http` (for Apache2)
31- it will be a member of a group of the same name: `www:www`, `http:http`
32- to give it access to Shaarli, either:
33 - unzip Shaarli in the default web server location (usually `/var/www/`) and set the web server user as the owner
34 - put users in the same group as the web server, and set the appropriate access rights
35- if you have a domain / subdomain to serve Shaarli, [configure the server](Server-configuration) accordingly[](.html)
36
37## Configuration
38
39In `data/config.json.php`.
40
41See also [Plugin System](Plugin-System.html).
42
43### Credentials
44
45_These settings should not be edited_
46
47- **login**: Login username.
48- **hash**: Generated password hash.
49- **salt**: Password salt.
50
51### General
52
53- **title**: Shaarli's instance title.
54- **header_link**: Link to the homepage.
55- **links_per_page**: Number of shaares displayed per page.
56- **timezone**: See [the list of supported timezones](http://php.net/manual/en/timezones.php).
57- **enabled_plugins**: List of enabled plugins.
58- **default_note_title**: Default title of a new note.
59
60### Security
61
62- **session_protection_disabled**: Disable session cookie hijacking protection (not recommended).
63 It might be useful if your IP adress often changes.
64- **ban_after**: Failed login attempts before being IP banned.
65- **ban_duration**: IP ban duration in seconds.
66- **open_shaarli**: Anyone can add a new link while logged out if enabled.
67- **trusted_proxies**: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy.
68- **allowed_protocols**: List of allowed protocols in shaare URLs or markdown-rendered descriptions. Useful if you want to store `javascript:` links (bookmarklets) in Shaarli (default: `["ftp", "ftps", "magnet"]`).
69
70### Resources
71
72- **data_dir**: Data directory.
73- **datastore**: Shaarli's links database file path.
74- **history**: Shaarli's operation history file path.
75- **updates**: File path for the ran updates file.
76- **log**: Log file path.
77- **update_check**: Last update check file path.
78- **raintpl_tpl**: Templates directory.
79- **raintpl_tmp**: Template engine cache directory.
80- **thumbnails_cache**: Thumbnails cache directory.
81- **page_cache**: Shaarli's internal cache directory.
82- **ban_file**: Banned IP file path.
83
84### Translation
85
86- **language**: translation language (also see [Translations](Translations))
87 - **auto** (default): The translation language is chosen from the browser locale.
88 It means that the language can be different for 2 different visitors depending on their locale.
89 - **en**: Use the English translation.
90 - **fr**: Use the French translation.
91- **mode**:
92 - **auto** or **php** (default): Use the PHP implementation of gettext (slower)
93 - **gettext**: Use PHP builtin gettext extension
94 (faster, but requires `php-gettext` to be installed and to reload the web server on update)
95- **extension**: Translation extensions for custom themes or plugins.
96Must be an associative array: `translation domain => translation path`.
97
98### Updates
99
100- **check_updates**: Enable or disable update check to the git repository.
101- **check_updates_branch**: Git branch used to check updates (e.g. `stable` or `master`).
102- **check_updates_interval**: Look for new version every N seconds (default: every day).
103
104### Privacy
105
106- **default_private_links**: Check the private checkbox by default for every new link.
107- **hide_public_links**: All links are hidden while logged out.
108- **force_login**: if **hide_public_links** and this are set to `true`, all anonymous users are redirected to the login page.
109- **hide_timestamps**: Timestamps are hidden.
110- **remember_user_default**: Default state of the login page's *remember me* checkbox
111 - `true`: checked by default, `false`: unchecked by default
112
113### Feed
114
115- **rss_permalinks**: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL.
116- **show_atom**: Display ATOM feed button.
117
118### Thumbnail
119
120- **enable_thumbnails**: Enable or disable thumbnail display.
121- **enable_localcache**: Enable or disable local cache.
122
123### Redirector
124
125- **url**: Redirector URL, such as `anonym.to`.
126- **encode_url**: Enable this if the redirector needs encoded URL to work properly.
127
128## Configuration file example
129
130```json
131<?php /*
132{
133 "credentials": {
134 "login": "<login>",
135 "hash": "<password hash>",
136 "salt": "<password salt>"
137 },
138 "security": {
139 "ban_after": 4,
140 "session_protection_disabled": false,
141 "ban_duration": 1800,
142 "trusted_proxies": [
143 "1.2.3.4",
144 "5.6.7.8"
145 ],
146 "allowed_protocols": [
147 "ftp",
148 "ftps",
149 "magnet"
150 ]
151 },
152 "resources": {
153 "data_dir": "data",
154 "config": "data\/config.php",
155 "datastore": "data\/datastore.php",
156 "ban_file": "data\/ipbans.php",
157 "updates": "data\/updates.txt",
158 "log": "data\/log.txt",
159 "update_check": "data\/lastupdatecheck.txt",
160 "raintpl_tmp": "tmp\/",
161 "raintpl_tpl": "tpl\/",
162 "thumbnails_cache": "cache",
163 "page_cache": "pagecache"
164 },
165 "general": {
166 "check_updates": true,
167 "rss_permalinks": true,
168 "links_per_page": 20,
169 "default_private_links": true,
170 "enable_thumbnails": true,
171 "enable_localcache": true,
172 "check_updates_branch": "stable",
173 "check_updates_interval": 86400,
174 "enabled_plugins": [
175 "markdown",
176 "wallabag",
177 "archiveorg"
178 ],
179 "timezone": "Europe\/Paris",
180 "title": "My Shaarli",
181 "header_link": "?"
182 },
183 "extras": {
184 "show_atom": false,
185 "hide_public_links": false,
186 "hide_timestamps": false,
187 "open_shaarli": false,
188 "redirector": "http://anonym.to/?",
189 "redirector_encode_url": false
190 },
191 "general": {
192 "header_link": "?",
193 "links_per_page": 20,
194 "enabled_plugins": [
195 "markdown",
196 "wallabag"
197 ],
198 "timezone": "Europe\/Paris",
199 "title": "My Shaarli"
200 },
201 "updates": {
202 "check_updates": true,
203 "check_updates_branch": "stable",
204 "check_updates_interval": 86400
205 },
206 "feed": {
207 "rss_permalinks": true,
208 "show_atom": false
209 },
210 "privacy": {
211 "default_private_links": true,
212 "hide_public_links": false,
213 "force_login": false,
214 "hide_timestamps": false,
215 "remember_user_default": true
216 },
217 "thumbnail": {
218 "enable_thumbnails": true,
219 "enable_localcache": true
220 },
221 "redirector": {
222 "url": "http://anonym.to/?",
223 "encode_url": false
224 },
225 "plugins": {
226 "WALLABAG_URL": "http://demo.wallabag.org",
227 "WALLABAG_VERSION": "1"
228 },
229 "translation": {
230 "language": "fr",
231 "mode": "php",
232 "extensions": {
233 "demo": "plugins/demo_plugin/languages/"
234 }
235 }
236} ?>
237```
238
239## Additional configuration
240
241The `playvideos` plugin may require that you adapt your server's
242[Content Security Policy](https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md#troubleshooting)
243configuration to work properly.
244
diff --git a/doc/Static-analysis.md b/doc/md/Static-analysis.md
index 5781e055..29d98362 100644
--- a/doc/Static-analysis.md
+++ b/doc/md/Static-analysis.md
@@ -1,12 +1,13 @@
1#Static analysis
2## WIP 1## WIP
3This topic is currently being discussed here: 2This topic is currently being discussed here:
4- [Fix coding style (static analysis)](https://github.com/shaarli/Shaarli/issues/95) (#95)[](.html) 3
5- [Continuous Integration tools & features](https://github.com/shaarli/Shaarli/issues/130) (#130)[](.html) 4- [Fix coding style (static analysis)](https://github.com/shaarli/Shaarli/issues/95) (#95)
5- [Continuous Integration tools & features](https://github.com/shaarli/Shaarli/issues/130) (#130)
6 6
7### Usage 7### Usage
8Static analysis tools can be installed with Composer, and used through Shaarli's [Makefile](https://github.com/shaarli/Shaarli/blob/master/Makefile).[](.html) 8Static analysis tools can be installed with Composer, and used through Shaarli's [Makefile](https://github.com/shaarli/Shaarli/blob/master/Makefile).
9 9
10For an overview of the available features, see: 10For an overview of the available features, see:
11- [Code quality: Makefile to run static code checkers](https://github.com/shaarli/Shaarli/pull/124) (#124)[](.html) 11
12- [Run PHPCS against different coding standards](https://github.com/shaarli/Shaarli/pull/276) (#276)[](.html) 12- [Code quality: Makefile to run static code checkers](https://github.com/shaarli/Shaarli/pull/124) (#124)
13- [Run PHPCS against different coding standards](https://github.com/shaarli/Shaarli/pull/276) (#276)
diff --git a/doc/md/Theming.md b/doc/md/Theming.md
new file mode 100644
index 00000000..bd400776
--- /dev/null
+++ b/doc/md/Theming.md
@@ -0,0 +1,85 @@
1## Foreword
2
3There are two ways of customizing how Shaarli looks:
4
51. by using a custom CSS to override Shaarli's CSS
62. by using a full theme that provides its own RainTPL templates, CSS and Javascript resources
7
8## Custom CSS
9
10Shaarli's appearance can be modified by adding CSS rules to:
11
12- Shaarli < `v0.9.0`: `inc/user.css`
13- Shaarli >= `v0.9.0`: `data/user.css`
14
15This file allows overriding rules defined in the template CSS files (only add changed rules), or define a whole new theme.
16
17**Note**: Do not edit `tpl/default/css/shaarli.css`! Your changes would be overridden when updating Shaarli.
18
19See also [Download CSS styles from an OPML list](Download CSS styles from an OPML list)
20
21## Themes
22
23Installation:
24
25- find a theme you'd like to install
26- copy or clone the theme folder under `tpl/<a_sweet_theme>`
27- enable the theme:
28 - Shaarli < `v0.9.0`: edit `data/config.json.php` and set the value of `raintpl_tpl` to the new theme name:
29 `"raintpl_tpl": "tpl\/my-template\/"`
30 - Shaarli >= `v0.9.0`: select the theme through the _Tools_ page
31
32## Community CSS & themes
33
34### Custom CSS
35
36- [mrjovanovic/serious-theme-shaarli](https://github.com/mrjovanovic/serious-theme-shaarli) - A serious theme for Shaarli
37- [shaarli/shaarli-themes](https://github.com/shaarli/shaarli-themes)
38
39### Themes
40
41- [AkibaTech/Shaarli Superhero Theme](https://github.com/AkibaTech/Shaarli---SuperHero-Theme) - A template/theme for Shaarli
42- [alexisju/albinomouse-template](https://github.com/alexisju/albinomouse-template) - A full template for Shaarli
43- [ArthurHoaro/shaarli-launch](https://github.com/ArthurHoaro/shaarli-launch) - Customizable Shaarli theme
44- [dhoko/ShaarliTemplate](https://github.com/dhoko/ShaarliTemplate) - A template/theme for Shaarli
45- [kalvn/shaarli-blocks](https://github.com/kalvn/shaarli-blocks) - A template/theme for Shaarli
46- [kalvn/Shaarli-Material](https://github.com/kalvn/Shaarli-Material) - A theme (template) based on Google's Material Design for Shaarli, the superfast delicious clone
47- [ManufacturaInd/shaarli-2004licious-theme](https://github.com/ManufacturaInd/shaarli-2004licious-theme) - A template/theme as a humble homage to the early looks of the del.icio.us site
48
49### Shaarli forks
50
51- [misterair/Limonade](https://github.com/misterair/limonade) - A fork of (legacy) Shaarli with a new template
52- [vivienhaese/shaarlitheme](https://github.com/vivienhaese/shaarlitheme) - A Shaarli fork meant to be run in an openshift instance
53
54## Example installation: AlbinoMouse theme
55
56With the following configuration:
57
58- Apache 2 / PHP 5.6
59- user sites are enabled, e.g. `/home/user/public_html/somedir` is served as `http://localhost/~user/somedir`
60- `http` is the name of the Apache user
61
62```bash
63$ cd ~/public_html
64
65# clone repositories
66$ git clone https://github.com/shaarli/Shaarli.git shaarli
67$ pushd shaarli/tpl
68$ git clone https://github.com/alexisju/albinomouse-template.git
69$ popd
70
71# set access rights for Apache
72$ chgrp -R http shaarli
73$ chmod g+rwx shaarli shaarli/cache shaarli/data shaarli/pagecache shaarli/tmp
74```
75
76Get config written:
77- go to the freshly installed site
78- fill the install form
79- log in to Shaarli
80
81Edit Shaarli's [configuration](Shaarli-configuration):
82```bash
83# the file should be owned by Apache, thus not writeable => sudo
84$ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php
85```
diff --git a/doc/md/Translations.md b/doc/md/Translations.md
new file mode 100644
index 00000000..54a36655
--- /dev/null
+++ b/doc/md/Translations.md
@@ -0,0 +1,152 @@
1## Translations
2
3Shaarli supports [gettext](https://www.gnu.org/software/gettext/manual/gettext.html) translations
4since `>= v0.9.2`.
5
6Note that only the `default` theme supports translations.
7
8### Contributing
9
10We encourage the community to contribute to Shaarli's translation either by improving existing
11translations or submitting a new language.
12
13Contributing to the translation does not require development skill.
14
15Please submit a pull request with the `.po` file updated/created. Note that the compiled file (`.mo`)
16is not stored on the repository, and is generated during the release process.
17
18### How to
19
20First, install [Poedit](https://poedit.net/) tool.
21
22Poedit will extract strings to translate from the PHP source code.
23
24**Important**: due to the usage of a template engine, it's important to generate PHP cache files to extract
25every translatable string.
26
27You can either use [this script](https://gist.github.com/ArthurHoaro/5d0323f758ab2401ef444a53f54e9a07) (recommended)
28or visit every template page in your browser to generate cache files, while logged in.
29
30Here is a list :
31
32```
33http://<replace_domain>/
34http://<replace_domain>/?nonope
35http://<replace_domain>/?do=addlink
36http://<replace_domain>/?do=changepasswd
37http://<replace_domain>/?do=changetag
38http://<replace_domain>/?do=configure
39http://<replace_domain>/?do=tools
40http://<replace_domain>/?do=daily
41http://<replace_domain>/?post
42http://<replace_domain>/?do=export
43http://<replace_domain>/?do=import
44http://<replace_domain>/?do=login
45http://<replace_domain>/?do=picwall
46http://<replace_domain>/?do=pluginadmin
47http://<replace_domain>/?do=tagcloud
48http://<replace_domain>/?do=taglist
49```
50
51#### Improve existing translation
52
53In Poedit, click on "Edit a Translation", and from Shaarli's directory open
54`inc/languages/<lang>/LC_MESSAGES/shaarli.po`.
55
56The existing list of translatable strings should have been loaded, then click on the "Update" button.
57
58You can start editing the translation.
59
60![poedit-screenshot](images/poedit-1.jpg)
61
62Save when you're done, then you can submit a pull request containing the updated `shaarli.po`.
63
64#### Add a new language
65
66Open Poedit and select "Create New Translation", then from Shaarli's directory open
67`inc/languages/<lang>/LC_MESSAGES/shaarli.po`.
68
69Then select the language you want to create.
70
71Click on `File > Save as...`, and save your file in `<shaarli directory>/inc/language/<new language>/LC_MESSAGES/shaarli.po`.
72`<new language>` here should be the language code respecting the [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-2)
73format in lowercase (e.g. `de` for German).
74
75Then click on the "Update" button, and you can start to translate every available string.
76
77Save when you're done, then you can submit a pull request containing the new `shaarli.po`.
78
79### Extend Shaarli's translation
80
81If you're writing a custom theme, or a non official plugin, you might want to use the translation system,
82but you won't be able to able to override Shaarli's translation.
83
84However, you can add your own translation domain which extends the main translation list.
85
86> Note that you can find a live example of translation extension in the `demo_plugin`.
87
88First, create your translation files tree directory:
89
90```
91<your_module>/languages/<ISO 3166-1 alpha-2 language code>/LC_MESSAGES/
92```
93
94Your `.po` files must be named like your domain. E.g. if your translation domain is `my_theme`, then your file will be
95`my_theme.po`.
96
97Users have to register your extension in their configuration with the parameter
98`translation.extensions.<domain>: <translation files path>`.
99
100Example:
101
102```php
103if (! $conf->exists('translation.extensions.my_theme')) {
104 $conf->set('translation.extensions.my_theme', '<your_module>/languages/');
105 $conf->write(true);
106}
107```
108
109> Note that the page needs to be reloaded after the registration.
110
111It is then recommended to create a custom translation function which will call the `t()` function with your domain.
112For example :
113
114```php
115function my_theme_t($text, $nText = '', $nb = 1)
116{
117 return t($text, $nText, $nb, 'my_theme'); // the last parameter is your translation domain.
118}
119```
120
121All strings which can be translated should be processed through your function:
122
123```php
124my_theme_t('Comment');
125my_theme_t('Comment', 'Comments', 2);
126```
127
128Or in templates:
129
130```php
131{'Comment'|my_theme_t}
132{function="my_theme_t('Comment', 'Comments', 2)"}
133```
134
135> Note than in template, you need to visit your page at least once to generate a cache file.
136
137When you're done, open Poedit and load translation strings from sources:
138
139 1. `File > New`
140 2. Choose your language
141 3. Save your `PO` file in `<your_module>/languages/<language code>/LC_MESSAGES/my_theme.po`.
142 4. Go to `Catalog > Properties...`
143 5. Fill the `Translation Properties` tab
144 6. Add your source path in the `Sources Paths` tab
145 7. In the `Sources Keywords` tab uncheck "Also use default keywords" and add the following lines:
146
147```
148my_theme_t
149my_theme_t:1,2
150```
151
152Click on the "Update" button and you're free to start your translations!
diff --git a/doc/Troubleshooting.md b/doc/md/Troubleshooting.md
index 8e30fce5..b2d86d40 100644
--- a/doc/Troubleshooting.md
+++ b/doc/md/Troubleshooting.md
@@ -1,39 +1,51 @@
1#Troubleshooting 1# Troubleshooting
2
2## Browser 3## Browser
4
3### Redirection issues (HTTP Referer) 5### Redirection issues (HTTP Referer)
6
4Depending on its configuration and installed plugins, the browser may remove or alter (spoof) HTTP referers, thus preventing Shaarli from properly redirecting between pages. 7Depending on its configuration and installed plugins, the browser may remove or alter (spoof) HTTP referers, thus preventing Shaarli from properly redirecting between pages.
5 8
6See: 9See:
7- [HTTP referer](https://en.wikipedia.org/wiki/HTTP_referer) (Wikipedia)[](.html) 10
8- [Improve online privacy by controlling referrer information](http://www.ghacks.net/2015/01/22/improve-online-privacy-by-controlling-referrer-information/)[](.html) 11- [HTTP referer](https://en.wikipedia.org/wiki/HTTP_referer) (Wikipedia)
9- [Better security, privacy and anonymity in Firefox](http://b.agilob.net/better-security-privacy-and-anonymity-in-firefox/)[](.html) 12- [Improve online privacy by controlling referrer information](http://www.ghacks.net/2015/01/22/improve-online-privacy-by-controlling-referrer-information/)
13- [Better security, privacy and anonymity in Firefox](http://b.agilob.net/better-security-privacy-and-anonymity-in-firefox/)
10 14
11### Firefox HTTP Referer options 15### Firefox HTTP Referer options
16
12HTTP settings are available by browsing `about:config`, here are the available settings and their values. 17HTTP settings are available by browsing `about:config`, here are the available settings and their values.
13 18
14`network.http.sendRefererHeader` - determines when to send the Referer HTTP header 19`network.http.sendRefererHeader` - determines when to send the Referer HTTP header
15- 0: Never send the referring URL 20
21- `0`: Never send the referring URL
16 - not recommended, may break some sites 22 - not recommended, may break some sites
17- 1: Send only on clicked links 23- `1`: Send only on clicked links
18- 2 (default): Send for links and images 24- `2` (default): Send for links and images
19 25
20`network.http.referer.XOriginPolicy` - Cross-domain origin policy 26`network.http.referer.XOriginPolicy` - Cross-domain origin policy
21- 0 (default): Always send 27
22- 1: Send if base domains match 28- `0` (default): Always send
23- 2: Send if hosts match 29- `1`: Send if base domains match
30- `2`: Send if hosts match
24 31
25`network.http.referer.spoofSource` - Referer spoofing (~faking) 32`network.http.referer.spoofSource` - Referer spoofing (~faking)
26- false (default): real referer 33
27- true: spoof referer (use target URI as referer) 34- `false` (default): real referer
28 - known to break some functionality in Shaarli 35- `true`: spoof referer (use target URI as referer)
36 - known to break some functionality in Shaarli
29 37
30`network.http.referer.trimmingPolicy` - trim the URI not to send a full Referer 38`network.http.referer.trimmingPolicy` - trim the URI not to send a full Referer
31- 0 (default): send full URI 39
32- 1: scheme+host+port+path 40- `0`: (default): send full URI
33- 2: scheme+host+port 41- `1`: scheme+host+port+path
42- `2`: scheme+host+port
34 43
35### Firefox, localhost and redirections 44### Firefox, localhost and redirections
36`localhost` is not a proper Fully Qualified Domain Name (FQDN); if Firefox has been set up to spoof referers, or only accept requests from the same base domain/host, Shaarli redirections will not work properly. 45
46`localhost` is not a proper Fully Qualified Domain Name (FQDN); if Firefox has
47been set up to spoof referers, or only accept requests from the same base domain/host,
48Shaarli redirections will not work properly.
37 49
38To solve this, assign a local domain to your host, e.g. 50To solve this, assign a local domain to your host, e.g.
39``` 51```
@@ -44,35 +56,44 @@ To solve this, assign a local domain to your host, e.g.
44and browse Shaarli at http://localhost.lan/. 56and browse Shaarli at http://localhost.lan/.
45 57
46Related threads: 58Related threads:
47- [What is localhost.localdomain for?](https://bbs.archlinux.org/viewtopic.php?id=156064)[](.html) 59- [What is localhost.localdomain for?](https://bbs.archlinux.org/viewtopic.php?id=156064)
48- [Stop returning to the first page after editing a bookmark from another page](https://github.com/shaarli/Shaarli/issues/311)[](.html) 60- [Stop returning to the first page after editing a bookmark from another page](https://github.com/shaarli/Shaarli/issues/311)
49 61
50## Login 62## Login
63
51### I forgot my password! 64### I forgot my password!
65
52Delete the file `data/config.php` and display the page again. You will be asked for a new login/password. 66Delete the file `data/config.php` and display the page again. You will be asked for a new login/password.
53 67
54### I'm locked out - Login bruteforce protection 68### I'm locked out - Login bruteforce protection
69
55Login form is protected against brute force attacks: 4 failed logins will ban the IP address from login for 30 minutes. Banned IPs can still browse links. 70Login form is protected against brute force attacks: 4 failed logins will ban the IP address from login for 30 minutes. Banned IPs can still browse links.
56 71
57To remove the current IP bans, delete the file `data/ipbans.php` 72To remove the current IP bans, delete the file `data/ipbans.php`
58 73
59### List of all login attempts 74### List of all login attempts
75
60The file `data/log.txt` shows all logins (successful or failed) and bans/lifted bans. 76The file `data/log.txt` shows all logins (successful or failed) and bans/lifted bans.
61Search for `failed` in this file to look for unauthorized login attempts. 77Search for `failed` in this file to look for unauthorized login attempts.
62 78
63## Hosting problems 79## Hosting problems
80
64### Old PHP versions 81### Old PHP versions
65 * On **free.fr** : free.fr now support php 5.6.x([link](http://les.pages.perso.chez.free.fr/migrations/php5v6.io))and so support now the tag autocompletion but you have to do the following : At the root of your webspace create a `sessions` directory and a `.htaccess` file containing:[](.html)
66 82
67```ini 83On **free.fr**: free.fr now supports php 5.6.x([link](http://les.pages.perso.chez.free.fr/migrations/php5v6.io))
84and so support now the tag autocompletion but you have to do the following.
85
86At the root of your webspace create a `sessions` directory and a `.htaccess` file containing:
87
88```xml
68<IfDefine Free> 89<IfDefine Free>
69php56 1 90php56 1
70</IfDefine> 91</IfDefine>
71``` 92```
72 93
73 * If you have an error such as: `Parse error: syntax error, unexpected '=', expecting '(' in /links/index.php on line xxx`, it means that your host is using php4, not php5. Shaarli requires php 5.1. Try changing the file extension to `.php5` 94- If you have an error such as: `Parse error: syntax error, unexpected '=', expecting '(' in /links/index.php on line xxx`, it means that your host is using php4, not php5. Shaarli requires php 5.1. Try changing the file extension to `.php5`
74 * On **1and1** : If you add the link from the page (and not from the bookmarklet), Shaarli will no be able to get the title of the page. You will have to enter it manually. (Because they have disabled the ability to download a file through HTTP). 95- On **1and1** : If you add the link from the page (and not from the bookmarklet), Shaarli will no be able to get the title of the page. You will have to enter it manually. (Because they have disabled the ability to download a file through HTTP).
75 * If you have the error `Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /…/index.php on line xxx`, it means that your host has disabled the ability to fetch a file by HTTP in the php config (Typically in 1and1 hosting). Bad host. Change host. Or comment the following lines:[](.html) 96- If you have the error `Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /…/index.php on line xxx`, it means that your host has disabled the ability to fetch a file by HTTP in the php config (Typically in 1and1 hosting). Bad host. Change host. Or comment the following lines:
76 97
77```php 98```php
78//list($status,$headers,$data) = getHTTP($url,4); // Short timeout to keep the application responsive. 99//list($status,$headers,$data) = getHTTP($url,4); // Short timeout to keep the application responsive.
@@ -80,28 +101,32 @@ php56 1
80//if (strpos($status,'200 OK')) $title=html_extract_title($data); 101//if (strpos($status,'200 OK')) $title=html_extract_title($data);
81``` 102```
82 103
83 * On hosts which forbid outgoing HTTP requests (such as free.fr), some thumbnails will not work. 104- On hosts which forbid outgoing HTTP requests (such as free.fr), some thumbnails will not work.
84 * On **lost-oasis**, RSS doesn't work correctly, because of this message at the begining of the RSS/ATOM feed : `<? // tout ce qui est charge ici (generalement des includes et require) est charge en permanence. ?>`. To fix this, remove this message from `php-include/prepend.php` 105- On **lost-oasis**, RSS doesn't work correctly, because of this message at the begining of the RSS/ATOM feed : `<? // tout ce qui est charge ici (generalement des includes et require) est charge en permanence. ?>`. To fix this, remove this message from `php-include/prepend.php`
85 106
86### Dates are not properly formatted 107### Dates are not properly formatted
108
87Shaarli tries to sniff the language of the browser (using HTTP_ACCEPT_LANGUAGE headers) and choose a date format accordingly. But Shaarli can only use the date formats (and more generaly speaking, the locales) provided by the webserver. So even if you have a browser in French, you may end up with dates in US format (it's the case on sebsauvage.net :-( ) 109Shaarli tries to sniff the language of the browser (using HTTP_ACCEPT_LANGUAGE headers) and choose a date format accordingly. But Shaarli can only use the date formats (and more generaly speaking, the locales) provided by the webserver. So even if you have a browser in French, you may end up with dates in US format (it's the case on sebsauvage.net :-( )
88 110
89### Problems on CentOS servers 111### Problems on CentOS servers
90On **CentOS**/RedHat derivatives, you may need to install the `php-mbstring` package.
91 112
113On **CentOS**/RedHat derivatives, you may need to install the `php-mbstring` package.
92 114
93### My session expires! I can't stay logged in 115### My session expires! I can't stay logged in
116
94This can be caused by several things: 117This can be caused by several things:
95 118
96* Your php installation may not have a proper directory setup for session files. (eg. on Free.fr you need to create a `session` directory on the root of your website.) You may need to create the session directory of set it up. 119- Your php installation may not have a proper directory setup for session files. (eg. on Free.fr you need to create a `session` directory on the root of your website.) You may need to create the session directory of set it up.
97* Most hosts regularly clean the temporary and session directories. Your host may be cleaning those directories too aggressively (eg.OVH hosts), forcing an expire of the session. You may want to set the session directory in your web root. (eg. Create the `sessions` subdirectory and add `ini_set('session.save_path', $_SERVER['DOCUMENT_ROOT'].'/../sessions');`. Make sure this directory is not browsable !)[](.html) 120- Most hosts regularly clean the temporary and session directories. Your host may be cleaning those directories too aggressively (eg.OVH hosts), forcing an expire of the session. You may want to set the session directory in your web root. (eg. Create the `sessions` subdirectory and add `ini_set('session.save_path', $_SERVER['DOCUMENT_ROOT'].'/../sessions');`. Make sure this directory is not browsable !)
98* If your IP address changes during surfing, Shaarli will force expire your session for security reasons (to prevent session cookie hijacking). This can happen when surfing from WiFi or 3G (you may have switched WiFi/3G access point), or in some corporate/university proxies which use load balancing (and may have proxies with several external IP addresses). 121- If your IP address changes during surfing, Shaarli will force expire your session for security reasons (to prevent session cookie hijacking). This can happen when surfing from WiFi or 3G (you may have switched WiFi/3G access point), or in some corporate/university proxies which use load balancing (and may have proxies with several external IP addresses).
99* Some browser addons may interfer with HTTP headers (ipfuck/ipflood/GreaseMonkey…). Try disabling those. 122- Some browser addons may interfer with HTTP headers (ipfuck/ipflood/GreaseMonkey…). Try disabling those.
100* You may be using OperaTurbo or OperaMini, which use their own proxies which may change from time to time. 123- You may be using OperaTurbo or OperaMini, which use their own proxies which may change from time to time.
101* If you have another application on the same webserver where Shaarli is installed, these application may forcefully expire php sessions. 124- If you have another application on the same webserver where Shaarli is installed, these application may forcefully expire php sessions.
102 125
103## Sessions do not seem to work correctly on your server 126## Sessions do not seem to work correctly on your server
104Follow the instructions in the error message. Make sure you are accessing shaarli via a direct IP address or a proper hostname. If you have **no dots** in the hostname (e.g. `localhost` or `http://my-webserver/shaarli/`), some browsers will not store cookies at all (this respects the [HTTP cookie specification](http://curl.haxx.se/rfc/cookie_spec.html)).[](.html) 127
128Follow the instructions in the error message. Make sure you are accessing shaarli via a direct IP address or a proper hostname. If you have **no dots** in the hostname (e.g. `localhost` or `http://my-webserver/shaarli/`), some browsers will not store cookies at all (this respects the [HTTP cookie specification](http://curl.haxx.se/rfc/cookie_spec.html)).
105 129
106### pubsubhubbub support 130### pubsubhubbub support
107Download [publisher.php](https://pubsubhubbub.googlecode.com/git/publisher_clients/php/library/publisher.php) at the root of your Shaarli installation and set `$GLOBALS['config'['PUBSUBHUB_URL']` in your `config.php`]('PUBSUBHUB_URL']`-in-your-`config.php`.html) 131
132Download [publisher.php](https://pubsubhubbub.googlecode.com/git/publisher_clients/php/library/publisher.php) at the root of your Shaarli installation and set `$GLOBALS['config']['PUBSUBHUB_URL']` in your `config.php`
diff --git a/doc/md/Unit-tests-Docker.md b/doc/md/Unit-tests-Docker.md
new file mode 100644
index 00000000..c2de7cc7
--- /dev/null
+++ b/doc/md/Unit-tests-Docker.md
@@ -0,0 +1,56 @@
1## Running tests inside Docker containers
2
3Read first:
4
5- [Docker 101](docker/docker-101.md)
6- [Docker resources](docker/resources.md)
7- [Unit tests](Unit-tests.md)
8
9### Docker test images
10
11Test Dockerfiles are located under `docker/tests/<distribution>/Dockerfile`,
12and can be used to build Docker images to run Shaarli test suites under common
13Linux environments.
14
15Dockerfiles are provided for the following environments:
16
17- `alpine36` - [Alpine 3.6](https://www.alpinelinux.org/downloads/)
18- `debian8` - [Debian 8 Jessie](https://www.debian.org/DebianJessie) (oldstable)
19- `debian9` - [Debian 9 Stretch](https://wiki.debian.org/DebianStretch) (stable)
20- `ubuntu16` - [Ubuntu 16.04 Xenial Xerus](http://releases.ubuntu.com/16.04/) (LTS)
21
22What's behind the curtains:
23
24- each image provides:
25 - a base Linux OS
26 - Shaarli PHP dependencies (OS packages)
27 - test PHP dependencies (OS packages)
28 - Composer
29- the local workspace is mapped to the container's `/shaarli/` directory,
30- the files are rsync'd to so tests are run using a standard Linux user account
31 (running tests as `root` would bypass permission checks and may hide issues)
32- the tests are run inside the container.
33
34### Building test images
35
36```bash
37# build the Debian 9 Docker image
38$ cd /path/to/shaarli
39$ cd docker/test/debian9
40$ docker build -t shaarli-test:debian9 .
41```
42
43### Running tests
44
45```bash
46$ cd /path/to/shaarli
47
48# install/update 3rd-party test dependencies
49$ composer install --prefer-dist
50
51# run tests using the freshly built image
52$ docker run -v $PWD:/shaarli shaarli-test:debian9 docker_test
53
54# run the full test campaign
55$ docker run -v $PWD:/shaarli shaarli-test:debian9 docker_all_tests
56```
diff --git a/doc/Unit-tests.md b/doc/md/Unit-tests.md
index f2888780..f6030d5c 100644
--- a/doc/Unit-tests.md
+++ b/doc/md/Unit-tests.md
@@ -1,13 +1,14 @@
1#Unit tests
2
3### Setup your environment for tests 1### Setup your environment for tests
4The framework used is [PHPUnit](https://phpunit.de/); it can be installed with [Composer](https://getcomposer.org/), which is a dependency management tool.[](.html)
5 2
6Regarding Composer, you can either use: 3The framework used is [PHPUnit](https://phpunit.de/); it can be installed with [Composer](https://getcomposer.org/), which is a dependency management tool.
7* a system-wide version, e.g. installed through your distro's package manager 4
8* a local version, downloadable [here](https://getcomposer.org/download/)[](.html) 5### Install composer
6
7You can either use:
8
9- a system-wide version, e.g. installed through your distro's package manager
10- a local version, downloadable [here](https://getcomposer.org/download/).
9 11
10#### Sample usage
11```bash 12```bash
12# system-wide version 13# system-wide version
13$ composer install 14$ composer install
@@ -20,12 +21,16 @@ $ php composer.phar update
20``` 21```
21 22
22#### Install Shaarli dev dependencies 23#### Install Shaarli dev dependencies
24
23```bash 25```bash
24$ cd /path/to/shaarli 26$ cd /path/to/shaarli
25$ composer update 27$ composer update
26``` 28```
27 29
28#### Install and enable Xdebug to generate PHPUnit coverage reports 30#### Install and enable Xdebug to generate PHPUnit coverage reports
31
32See http://xdebug.org/docs/install
33
29For Debian-based distros: 34For Debian-based distros:
30```bash 35```bash
31$ aptitude install php5-xdebug 36$ aptitude install php5-xdebug
@@ -41,6 +46,7 @@ zend_extension=xdebug.so
41``` 46```
42 47
43#### Run unit tests 48#### Run unit tests
49
44Successful test suite: 50Successful test suite:
45```bash 51```bash
46$ make test 52$ make test
@@ -111,18 +117,41 @@ Tests: 36, Assertions: 63, Errors: 1, Failures: 2.
111``` 117```
112 118
113#### Test results and coverage 119#### Test results and coverage
120
114By default, PHPUnit will run all suitable tests found under the `tests` directory. 121By default, PHPUnit will run all suitable tests found under the `tests` directory.
115 122
116Each test has 3 possible outcomes: 123Each test has 3 possible outcomes:
117* `.` - success 124
118* `F` - failure: the test was run but its results are invalid 125- `.` - success
119 * the code does not behave as expected 126- `F` - failure: the test was run but its results are invalid
120 * dependencies to external elements: globals, session, cache... 127 - the code does not behave as expected
121* `E` - error: something went wrong and the tested code has crashed 128 - dependencies to external elements: globals, session, cache...
122 * typos in the code, or in the test code 129- `E` - error: something went wrong and the tested code has crashed
123 * dependencies to missing external elements 130 - typos in the code, or in the test code
131 - dependencies to missing external elements
124 132
125If Xdebug has been installed and activated, two coverage reports will be generated: 133If Xdebug has been installed and activated, two coverage reports will be generated:
126* a summary in the console 134
127* a detailed HTML report with metrics for tested code 135- a summary in the console
128 * to open it in a web browser: `firefox coverage/index.html &` 136- a detailed HTML report with metrics for tested code
137 - to open it in a web browser: `firefox coverage/index.html &`
138
139### Executing specific tests
140
141Add a [`@group`](https://phpunit.de/manual/current/en/appendixes.annotations.html#appendixes.annotations.group) annotation in a test class or method comment:
142
143```php
144/**
145 * Netscape bookmark import
146 * @group WIP
147 */
148class BookmarkImportTest extends PHPUnit_Framework_TestCase
149{
150 [...]
151}
152```
153
154To run all tests annotated with `@group WIP`:
155```bash
156$ vendor/bin/phpunit --group WIP tests/
157```
diff --git a/doc/Upgrade-and-migration.md b/doc/md/Upgrade-and-migration.md
index 0bc33824..1dc07339 100644
--- a/doc/Upgrade-and-migration.md
+++ b/doc/md/Upgrade-and-migration.md
@@ -1,41 +1,54 @@
1#Upgrade and migration
2## Preparation 1## Preparation
2
3### Note your current version
4
5If anything goes wrong, it's important for us to know which version you're upgrading from.
6The current version is present in the `version.php` file.
7
3### Backup your data 8### Backup your data
4 9
5Shaarli stores all user data under the `data` directory: 10Shaarli stores all user data under the `data` directory:
11
6- `data/config.php` - main configuration file 12- `data/config.php` - main configuration file
7- `data/datastore.php` - bookmarked links 13- `data/datastore.php` - bookmarked links
8- `data/ipbans.php` - banned IP addresses 14- `data/ipbans.php` - banned IP addresses
15- `data/updates.txt` - contains all automatic update to the configuration and datastore files already run
9 16
10See [Shaarli configuration](Shaarli-configuration.html) for more information about Shaarli resources. 17See [Shaarli configuration](Shaarli-configuration) for more information about Shaarli resources.
11 18
12It is recommended to backup this repository _before_ starting updating/upgrading Shaarli: 19It is recommended to backup this repository _before_ starting updating/upgrading Shaarli:
20
13- users with SSH access: copy or archive the directory to a temporary location 21- users with SSH access: copy or archive the directory to a temporary location
14- users with FTP access: download a local copy of your Shaarli installation using your favourite client 22- users with FTP access: download a local copy of your Shaarli installation using your favourite client
15 23
16### Migrating data from a previous installation 24### Migrating data from a previous installation
25
17As all user data is kept under `data`, this is the only directory you need to worry about when migrating to a new installation, which corresponds to the following steps: 26As all user data is kept under `data`, this is the only directory you need to worry about when migrating to a new installation, which corresponds to the following steps:
18 27
19- backup the `data` directory 28- backup the `data` directory
20- install or update Shaarli: 29- install or update Shaarli:
21 - fresh installation - see [Download and installation](Download-and-installation.html) 30 - fresh installation - see [Download and installation](Download-and-installation)
22 - update - see the following sections 31 - update - see the following sections
23- check or restore the `data` directory 32- check or restore the `data` directory
24 33
25## Upgrading from release archives 34## Recommended : Upgrading from release archives
26All tagged revisions can be downloaded as tarballs or ZIP archives from the [releases](https://github.com/shaarli/Shaarli/releases) page.[](.html) 35
36All tagged revisions can be downloaded as tarballs or ZIP archives from the [releases](https://github.com/shaarli/Shaarli/releases) page.
27 37
28We _recommend_ using the releases from the `stable` branch, which are available as: 38We recommend that you use the latest release tarball with the `-full` suffix. It contains the dependencies, please read [Download and installation](Download-and-installation) for `git` complete instructions.
29- gzipped tarball - https://github.com/shaarli/Shaarli/archive/stable.tar.gz
30- ZIP archive - https://github.com/shaarli/Shaarli/archive/stable.zip
31 39
32Once downloaded, extract the archive locally and update your remote installation (e.g. via FTP) -be sure you keep the contents of the `data` directory! 40Once downloaded, extract the archive locally and update your remote installation (e.g. via FTP) -be sure you keep the content of the `data` directory!
33 41
34After upgrading, access your fresh Shaarli installation from a web browser; the configuration will then be automatically updated, and new settings added to `data/config.php` (see [Shaarli configuration](Shaarli-configuration.html) for more details). 42If you use translations in gettext mode - meaning you manually changed the default mode -,
43reload your web server.
44
45After upgrading, access your fresh Shaarli installation from a web browser; the configuration and data store will then be automatically updated, and new settings added to `data/config.json.php` (see [Shaarli configuration](Shaarli configuration) for more details).
35 46
36## Upgrading with Git 47## Upgrading with Git
48
37### Updating a community Shaarli 49### Updating a community Shaarli
38If you have installed Shaarli from the [community Git repository](Download#clone-with-git-recommended), simply [pull new changes](https://www.git-scm.com/docs/git-pull) from your local clone:[](.html) 50
51If you have installed Shaarli from the [community Git repository](Download#clone-with-git-recommended), simply [pull new changes](https://www.git-scm.com/docs/git-pull) from your local clone:
39 52
40```bash 53```bash
41$ cd /path/to/shaarli 54$ cd /path/to/shaarli
@@ -51,10 +64,10 @@ Fast-forward
51 3 files changed, 3 insertions(+), 1 deletion(-) 64 3 files changed, 3 insertions(+), 1 deletion(-)
52``` 65```
53 66
54Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/):[](.html) 67Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/):
55 68
56```bash 69```bash
57$ composer update --no-dev 70$ composer install --no-dev
58 71
59Loading composer repositories with package information 72Loading composer repositories with package information
60Updating dependencies 73Updating dependencies
@@ -62,19 +75,30 @@ Updating dependencies
62 Downloading: 100% 75 Downloading: 100%
63``` 76```
64 77
78Shaarli >= `v0.9.2` supports translations:
79
80```bash
81$ make translate
82```
83
84If you use translations in gettext mode, reload your web server.
85
65### Migrating and upgrading from Sebsauvage's repository 86### Migrating and upgrading from Sebsauvage's repository
66If you have installed Shaarli from [Sebsauvage's original Git repository](https://github.com/sebsauvage/Shaarli), you can use [Git remotes](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes) to update your working copy.[](.html) 87
88If you have installed Shaarli from [Sebsauvage's original Git repository](https://github.com/sebsauvage/Shaarli), you can use [Git remotes](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes) to update your working copy.
67 89
68The following guide assumes that: 90The following guide assumes that:
69- you have a basic knowledge of Git [branching](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell) and [remote repositories](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes)[](.html) 91
92- you have a basic knowledge of Git [branching](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell) and [remote repositories](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes)
70- the default remote is named `origin` and points to Sebsauvage's repository 93- the default remote is named `origin` and points to Sebsauvage's repository
71- the current branch is `master` 94- the current branch is `master`
72 - if you have personal branches containing customizations, you will need to [rebase them](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) after the upgrade; beware though, a lot of changes have been made since the community fork has been created, so things are very likely to break![](.html) 95 - if you have personal branches containing customizations, you will need to [rebase them](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) after the upgrade; beware though, a lot of changes have been made since the community fork has been created, so things are very likely to break!
73- the working copy is clean: 96- the working copy is clean:
74 - no versioned file has been locally modified 97 - no versioned file has been locally modified
75 - no untracked files are present 98 - no untracked files are present
76 99
77#### Step 0: show repository information 100#### Step 0: show repository information
101
78```bash 102```bash
79$ cd /path/to/shaarli 103$ cd /path/to/shaarli
80 104
@@ -83,7 +107,7 @@ origin https://github.com/sebsauvage/Shaarli (fetch)
83origin https://github.com/sebsauvage/Shaarli (push) 107origin https://github.com/sebsauvage/Shaarli (push)
84 108
85$ git branch -vv 109$ git branch -vv
86* master 029f75f [origin/master] Update README.md[](.html) 110* master 029f75f [origin/master] Update README.md
87 111
88$ git status 112$ git status
89On branch master 113On branch master
@@ -92,6 +116,7 @@ nothing to commit, working directory clean
92``` 116```
93 117
94#### Step 1: update Git remotes 118#### Step 1: update Git remotes
119
95``` 120```
96$ git remote rename origin sebsauvage 121$ git remote rename origin sebsauvage
97$ git remote -v 122$ git remote -v
@@ -107,11 +132,11 @@ remote: Total 3015 (delta 446), reused 457 (delta 446), pack-reused 2550
107Receiving objects: 100% (3015/3015), 2.59 MiB | 918.00 KiB/s, done. 132Receiving objects: 100% (3015/3015), 2.59 MiB | 918.00 KiB/s, done.
108Resolving deltas: 100% (1899/1899), completed with 48 local objects. 133Resolving deltas: 100% (1899/1899), completed with 48 local objects.
109From https://github.com/shaarli/Shaarli 134From https://github.com/shaarli/Shaarli
110 * [new branch] master -> origin/master[](.html) 135 * [new branch] master -> origin/master
111 * [new branch] stable -> origin/stable[](.html) 136 * [new branch] stable -> origin/stable
112[...][](.html) 137[...]
113 * [new tag] v0.6.4 -> v0.6.4[](.html) 138 * [new tag] v0.6.4 -> v0.6.4
114 * [new tag] v0.7.0 -> v0.7.0[](.html) 139 * [new tag] v0.7.0 -> v0.7.0
115``` 140```
116 141
117#### Step 2: use the stable community branch 142#### Step 2: use the stable community branch
@@ -122,14 +147,14 @@ Branch stable set up to track remote branch stable from origin.
122Switched to a new branch 'stable' 147Switched to a new branch 'stable'
123 148
124$ git branch -vv 149$ git branch -vv
125 master 029f75f [sebsauvage/master] Update README.md[](.html) 150 master 029f75f [sebsauvage/master] Update README.md
126* stable 890afc3 [origin/stable] Merge pull request #509 from ArthurHoaro/v0.6.5[](.html) 151* stable 890afc3 [origin/stable] Merge pull request #509 from ArthurHoaro/v0.6.5
127``` 152```
128 153
129Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/):[](.html) 154Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/):
130 155
131```bash 156```bash
132$ composer update --no-dev 157$ composer install --no-dev
133 158
134Loading composer repositories with package information 159Loading composer repositories with package information
135Updating dependencies 160Updating dependencies
@@ -137,6 +162,14 @@ Updating dependencies
137 Downloading: 100% 162 Downloading: 100%
138``` 163```
139 164
165Shaarli >= `v0.9.2` supports translations:
166
167```bash
168$ make translate
169```
170
171If you use translations in gettext mode, reload your web server.
172
140Optionally, you can delete information related to the legacy version: 173Optionally, you can delete information related to the legacy version:
141 174
142```bash 175```bash
@@ -158,4 +191,26 @@ Total 3317 (delta 2050), reused 3301 (delta 2034)to
158``` 191```
159 192
160#### Step 3: configuration 193#### Step 3: configuration
161After migrating, access your fresh Shaarli installation from a web browser; the configuration will then be automatically updated, and new settings added to `data/config.php` (see [Shaarli configuration](Shaarli-configuration.html) for more details). 194
195After migrating, access your fresh Shaarli installation from a web browser; the configuration will then be automatically updated, and new settings added to `data/config.php` (see [Shaarli configuration](Shaarli-configuration) for more details).
196
197## Troubleshooting
198
199If the solutions provided here don't work, please open an issue specifying which version you're upgrading from and to.
200
201### You must specify an integer as a key
202
203In `v0.8.1` we changed how link keys are handled (from timestamps to incremental integers).
204Take a look at `data/updates.txt` content.
205
206#### `updates.txt` contains `updateMethodDatastoreIds`
207
208Try to delete it and refresh your page while being logged in.
209
210#### `updates.txt` doesn't exist or doesn't contain `updateMethodDatastoreIds`
211
2121. Create `data/updates.txt` if it doesn't exist
2132. Paste this string in the update file `;updateMethodRenameDashTags;`
2143. Login to Shaarli
2154. Delete the update file
2165. Refresh
diff --git a/doc/md/Various-hacks.md b/doc/md/Various-hacks.md
new file mode 100644
index 00000000..0074ae9f
--- /dev/null
+++ b/doc/md/Various-hacks.md
@@ -0,0 +1,33 @@
1### Decode datastore content
2
3To display the array representing the data saved in `data/datastore.php`, use the following snippet:
4
5```php
6$data = "tZNdb9MwFIb... <Commented content inside datastore.php>";
7$out = unserialize(gzinflate(base64_decode($data)));
8echo "<pre>"; // Pretty printing is love, pretty printing is life
9print_r($out);
10echo "</pre>";
11exit;
12```
13This will output the internal representation of the datastore, "unobfuscated" (if this can really be considered obfuscation).
14
15Alternatively, you can transform to JSON format (and pretty-print if you have `jq` installed):
16```
17php -r 'print(json_encode(unserialize(gzinflate(base64_decode(preg_replace("!.*/\* (.+) \*/.*!", "$1", file_get_contents("data/datastore.php")))))));' | jq .
18```
19
20### Changing the timestamp for a shaare
21
22- Look for `<input type="hidden" name="lf_linkdate" value="{$link.linkdate}">` in `tpl/editlink.tpl` (line 14)
23- Replace `type="hidden"` with `type="text"` from this line
24- A new date/time field becomes available in the edit/new link dialog.
25- You can set the timestamp manually by entering it in the format `YYYMMDD_HHMMS`.
26
27
28### See also
29
30- [Add a new custom field to shaares (example patch)](https://gist.github.com/nodiscc/8b0194921f059d7b9ad89a581ecd482c)
31- [Download CSS styles for shaarlis listed in an opml file](https://gist.github.com/nodiscc/dede231c92cab22c3ad2cc24d5035012)
32- [Copy an existing Shaarli installation over SSH, and serve it locally](https://gist.github.com/nodiscc/ed161c66e5b028b5299b0a3733d01c77)
33- [Create multiple Shaarli instances, generate an HTML index of them](https://gist.github.com/nodiscc/52e711cda3bc47717c16065231cf6b20)
diff --git a/doc/md/Versioning-and-Branches.md b/doc/md/Versioning-and-Branches.md
new file mode 100644
index 00000000..7097ca0a
--- /dev/null
+++ b/doc/md/Versioning-and-Branches.md
@@ -0,0 +1,75 @@
1**WORK IN PROGRESS**
2
3It's important to understand how Shaarli branches work, especially if you're maintaining a 3rd party tools for Shaarli (theme, plugin, etc.), to be sure stay compatible.
4
5## `master` branch
6
7The `master` branch is the development branch. Any new change MUST go through this branch using Pull Requests.
8
9Remarks:
10
11- This branch shouldn't be used for production as it isn't necessary stable.
12- 3rd party aren't required to be compatible with the latest changes.
13- Official plugins, themes and libraries (contained within Shaarli organization repos) must be compatible with the master branch.
14- The version in this branch is always `dev`.
15
16## `v0.x` branch
17
18This `v0.x` branch, points to the latest `v0.x.y` release.
19
20Explanation:
21
22When a new version is released, it might contains a major bug which isn't detected right away. For example, a new PHP version is released, containing backward compatibility issue which doesn't work with Shaarli.
23
24In this case, the issue is fixed in the `master` branch, and the fix is backported the to the `v0.x` branch. Then a new release is made from the `v0.x` branch.
25
26This workflow allow us to fix any major bug detected, without having to release bleeding edge feature too soon.
27
28## `latest` branch
29
30This branch point the latest release. It recommended to use it to get the latest tested changes.
31
32## `stable` branch
33
34The `stable` branch doesn't contain any major bug, and is one major digit version behind the latest release.
35
36For example, the current latest release is `v0.8.3`, the stable branch is an alias to the latest `v0.7.x` release. When the `v0.9.0` version will be released, the stable will move to the latest `v0.8.x` release.
37
38Remarks:
39
40- Shaarli release pace isn't fast, and the stable branch might be a few months behind the latest release.
41
42## Releases
43
44Releases are always made from the latest `v0.x` branch.
45
46Note that for every release, we manually generate a tarball which contains all Shaarli dependencies, making Shaarli's installation only one step.
47
48## Advices on 3rd party git repos workflow
49
50### Versioning
51
52Any time a new Shaarli release is published, you should publish a new release of your repo if the changes affected you since the latest release (take a look at the [changelog](https://github.com/shaarli/Shaarli/releases) (*Draft* means not released yet) and the commit log (like [`tpl` folder](https://github.com/shaarli/Shaarli/commits/master/tpl/default) for themes)). You can either:
53
54 - use the Shaarli version number, with your repo version. For example, if Shaarli `v0.8.3` is released, publish a `v0.8.3-1` release, where `v0.8.3` states Shaarli compatibility and `-1` is your own version digit for the current Shaarli version.
55 - use your own versioning scheme, and state Shaarli compatibility in the release description.
56
57Using this, any user will be able to pick the release matching his own Shaarli version.
58
59### Major bugfix backport releases
60
61To be able to support backported fixes, it recommended to use our workflow:
62
63```bash
64# In master, fix the major bug
65git commit -m "Katastrophe"
66git push origin master
67# Get your commit hash
68git log --format="%H" -n 1
69# Create a new branch from your latest release, let's say v0.8.2-1 (the tag name)
70git checkout -b katastrophe v0.8.2-1
71# Backport the fix commit to your brand new branch
72git cherry-pick <fix commit hash>
73git push origin katastrophe
74# Then you just have to make a new release from the `katastrophe` branch tagged `v0.8.3-1`
75```
diff --git a/doc/md/docker/docker-101.md b/doc/md/docker/docker-101.md
new file mode 100644
index 00000000..a9c00b85
--- /dev/null
+++ b/doc/md/docker/docker-101.md
@@ -0,0 +1,140 @@
1## Basics
2Install [Docker](https://www.docker.com/), by following the instructions relevant
3to your OS / distribution, and start the service.
4
5### Search an image on [DockerHub](https://hub.docker.com/)
6
7```bash
8$ docker search debian
9
10NAME DESCRIPTION STARS OFFICIAL AUTOMATED
11ubuntu Ubuntu is a Debian-based Linux operating s... 2065 [OK]
12debian Debian is a Linux distribution that's comp... 603 [OK]
13google/debian 47 [OK]
14```
15
16### Show available tags for a repository
17```bash
18$ curl https://index.docker.io/v1/repositories/debian/tags | python -m json.tool
19
20% Total % Received % Xferd Average Speed Time Time Time Current
21Dload Upload Total Spent Left Speed
22100 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433
23```
24
25Sample output:
26```json
27[
28 {
29 "layer": "85a02782",
30 "name": "stretch"
31 },
32 {
33 "layer": "59abecbc",
34 "name": "testing"
35 },
36 {
37 "layer": "bf0fd686",
38 "name": "unstable"
39 },
40 {
41 "layer": "60c52dbe",
42 "name": "wheezy"
43 },
44 {
45 "layer": "c5b806fe",
46 "name": "wheezy-backports"
47 }
48]
49
50```
51
52### Pull an image from DockerHub
53```bash
54$ docker pull repository[:tag]
55
56$ docker pull debian:wheezy
57wheezy: Pulling from debian
584c8cbfd2973e: Pull complete
5960c52dbe9d91: Pull complete
60Digest: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe
61Status: Downloaded newer image for debian:wheezy
62```
63
64Docker re-uses layers already downloaded. In other words if you have images based on Alpine or some Ubuntu version for example, those can share disk space.
65
66### Start a container
67A container is an instance created from an image, that can be run and that keeps running until its main process exits. Or until the user stops the container.
68
69The simplest way to start a container from image is ``docker run``. It also pulls the image for you if it is not locally available. For more advanced use, refer to ``docker create``.
70
71Stopped containers are not destroyed, unless you specify ``--rm``. To view all created, running and stopped containers, enter:
72```bash
73$ docker ps -a
74```
75
76Some containers may be designed or configured to be restarted, others are not. Also remember both network ports and volumes of a container are created on start, and not editable later.
77
78### Access a running container
79A running container is accessible using ``docker exec``, or ``docker copy``. You can use ``exec`` to start a root shell in the Shaarli container:
80```bash
81$ docker exec -ti <container-name-or-id> bash
82```
83Note the names and ID's of containers are listed in ``docker ps``. You can even type only one or two letters of the ID, given they are unique.
84
85Access can also be through one or more network ports, or disk volumes. Both are specified on and fixed on ``docker create`` or ``run``.
86
87You can view the console output of the main container process too:
88```bash
89$ docker logs -f <container-name-or-id>
90```
91
92### Docker disk use
93Trying out different images can fill some gigabytes of disk quickly. Besides images, the docker volumes usually take up most disk space.
94
95If you care only about trying out docker and not about what is running or saved, the following commands should help you out quickly if you run low on disk space:
96
97```bash
98$ docker rmi -f $(docker images -aq) # remove or mark all images for disposal
99$ docker volume rm $(docker volume ls -q) # remove all volumes
100```
101
102### Systemd config
103Systemd is the process manager of choice on Debian-based distributions. Once you have a ``docker`` service installed, you can use the following steps to set up Shaarli to run on system start.
104
105```bash
106systemctl enable /etc/systemd/system/docker.shaarli.service
107systemctl start docker.shaarli
108systemctl status docker.*
109journalctl -f # inspect system log if needed
110```
111
112You will need sudo or a root terminal to perform some or all of the steps above. Here are the contents for the service file:
113```
114[Unit]
115Description=Shaarli Bookmark Manager Container
116After=docker.service
117Requires=docker.service
118
119
120[Service]
121Restart=always
122
123# Put any environment you want in an included file, like $host- or $domainname in this example
124EnvironmentFile=/etc/sysconfig/box-environment
125
126# It's just an example..
127ExecStart=/usr/bin/docker run \
128 -p 28010:80 \
129 --name ${hostname}-shaarli \
130 --hostname shaarli.${domainname} \
131 -v /srv/docker-volumes-local/shaarli-data:/var/www/shaarli/data:rw \
132 -v /etc/localtime:/etc/localtime:ro \
133 shaarli/shaarli:latest
134
135ExecStop=/usr/bin/docker rm -f ${hostname}-shaarli
136
137
138[Install]
139WantedBy=multi-user.target
140```
diff --git a/doc/md/docker/resources.md b/doc/md/docker/resources.md
new file mode 100644
index 00000000..082d4a46
--- /dev/null
+++ b/doc/md/docker/resources.md
@@ -0,0 +1,19 @@
1### Docker
2
3- [Interactive Docker training portal](https://www.katacoda.com/courses/docker/) on [Katakoda](https://www.katacoda.com/)
4- [Where are Docker images stored?](http://blog.thoward37.me/articles/where-are-docker-images-stored/)
5- [Dockerfile reference](https://docs.docker.com/reference/builder/)
6- [Dockerfile best practices](https://docs.docker.com/articles/dockerfile_best-practices/)
7- [Volumes](https://docs.docker.com/userguide/dockervolumes/)
8
9### DockerHub
10
11- [Repositories](https://docs.docker.com/userguide/dockerrepos/)
12- [Teams and organizations](https://docs.docker.com/docker-hub/orgs/)
13- [GitHub automated build](https://docs.docker.com/docker-hub/github/)
14
15### Service management
16
17- [Using supervisord](https://docs.docker.com/articles/using_supervisord/)
18- [Nginx in the foreground](http://nginx.org/en/docs/ngx_core_module.html#daemon)
19- [supervisord](http://supervisord.org/)
diff --git a/doc/md/docker/reverse-proxy-configuration.md b/doc/md/docker/reverse-proxy-configuration.md
new file mode 100644
index 00000000..6066140e
--- /dev/null
+++ b/doc/md/docker/reverse-proxy-configuration.md
@@ -0,0 +1,120 @@
1## Foreword
2
3This guide assumes that:
4
5- Shaarli runs in a Docker container
6- The host's `10080` port is mapped to the container's `80` port
7- Shaarli's Fully Qualified Domain Name (FQDN) is `shaarli.domain.tld`
8- HTTP traffic is redirected to HTTPS
9
10## Apache
11
12- [Apache 2.4 documentation](https://httpd.apache.org/docs/2.4/)
13 - [mod_proxy](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html)
14 - [Reverse Proxy Request Headers](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#x-headers)
15
16The following HTTP headers are set by using the `ProxyPass` directive:
17
18- `X-Forwarded-For`
19- `X-Forwarded-Host`
20- `X-Forwarded-Server`
21
22```apache
23<VirtualHost *:80>
24 ServerName shaarli.domain.tld
25 Redirect permanent / https://shaarli.domain.tld
26</VirtualHost>
27
28<VirtualHost *:443>
29 ServerName shaarli.domain.tld
30
31 SSLEngine on
32 SSLCertificateFile /path/to/cert
33 SSLCertificateKeyFile /path/to/certkey
34
35 LogLevel warn
36 ErrorLog /var/log/apache2/shaarli-error.log
37 CustomLog /var/log/apache2/shaarli-access.log combined
38
39 RequestHeader set X-Forwarded-Proto "https"
40
41 ProxyPass / http://127.0.0.1:10080/
42 ProxyPassReverse / http://127.0.0.1:10080/
43</VirtualHost>
44```
45
46
47## HAProxy
48
49- [HAProxy documentation](https://cbonte.github.io/haproxy-dconv/)
50
51```conf
52global
53 [...]
54
55defaults
56 [...]
57
58frontend http-in
59 bind :80
60 redirect scheme https code 301 if !{ ssl_fc }
61
62 bind :443 ssl crt /path/to/cert.pem
63
64 default_backend shaarli
65
66
67backend shaarli
68 mode http
69 option http-server-close
70 option forwardfor
71 reqadd X-Forwarded-Proto: https
72
73 server shaarli1 127.0.0.1:10080
74```
75
76
77## Nginx
78
79- [Nginx documentation](https://nginx.org/en/docs/)
80
81```nginx
82http {
83 [...]
84
85 index index.html index.php;
86
87 root /home/john/web;
88 access_log /var/log/nginx/access.log;
89 error_log /var/log/nginx/error.log;
90
91 server {
92 listen 80;
93 server_name shaarli.domain.tld;
94 return 301 https://shaarli.domain.tld$request_uri;
95 }
96
97 server {
98 listen 443 ssl http2;
99 server_name shaarli.domain.tld;
100
101 ssl_certificate /path/to/cert
102 ssl_certificate_key /path/to/certkey
103
104 location / {
105 proxy_set_header X-Real-IP $remote_addr;
106 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
107 proxy_set_header X-Forwarded-Proto $scheme;
108 proxy_set_header X-Forwarded-Host $host;
109
110 proxy_pass http://localhost:10080/;
111 proxy_set_header Host $host;
112 proxy_connect_timeout 30s;
113 proxy_read_timeout 120s;
114
115 access_log /var/log/nginx/shaarli.access.log;
116 error_log /var/log/nginx/shaarli.error.log;
117 }
118 }
119}
120```
diff --git a/doc/md/docker/shaarli-images.md b/doc/md/docker/shaarli-images.md
new file mode 100644
index 00000000..12f7b5d1
--- /dev/null
+++ b/doc/md/docker/shaarli-images.md
@@ -0,0 +1,95 @@
1A brief guide on getting starting using docker is given in [Docker 101](docker-101.md).
2To learn more about user data and how to keep it across versions, please see [Upgrade and Migration](../Upgrade-and-migration.md).
3
4## Get and run a Shaarli image
5
6### DockerHub repository
7The images can be found in the [`shaarli/shaarli`](https://hub.docker.com/r/shaarli/shaarli/)
8repository.
9
10### Available image tags
11- `latest`: latest branch (tarball release)
12- `master`: master branch (tarball release)
13- `stable`: stable branch (tarball release)
14
15The `latest` and `master` images rely on:
16
17- [Alpine Linux](https://www.alpinelinux.org/)
18- [PHP7-FPM](http://php-fpm.org/)
19- [Nginx](http://nginx.org/)
20
21The `stable` image relies on:
22
23- [Debian 8 Jessie](https://hub.docker.com/_/debian/)
24- [PHP5-FPM](http://php-fpm.org/)
25- [Nginx](http://nginx.org/)
26
27Additional [Dockerfiles](https://github.com/shaarli/Shaarli/tree/master/docker) are provided for the `arm32v7` platform, relying on [Linuxserver.io Alpine armhf images](https://hub.docker.com/r/lsiobase/alpine.armhf/). These images must be built using [`docker build`](https://docs.docker.com/engine/reference/commandline/build/) on an `arm32v7` machine or using an emulator such as [qemu](https://resin.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/).
28
29### Download from DockerHub
30```bash
31$ docker pull shaarli/shaarli
32latest: Pulling from shaarli/shaarli
3332716d9fcddb: Pull complete
3484899d045435: Pull complete
354b6ad7444763: Pull complete
36e0345ef7a3e0: Pull complete
375c1dd344094f: Pull complete
386422305a200b: Pull complete
397d63f861dbef: Pull complete
403eb97210645c: Pull complete
41869319d746ff: Already exists
42869319d746ff: Pulling fs layer
43902b87aaaec9: Already exists
44Digest: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98
45Status: Downloaded newer image for shaarli/shaarli:latest
46```
47
48### Create and start a new container from the image
49```bash
50# map the host's :8000 port to the container's :80 port
51$ docker create -p 8000:80 shaarli/shaarli
52d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
53
54# launch the container in the background
55$ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
56d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
57
58# list active containers
59$ docker ps
60CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
61d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo
62```
63
64### Stop and destroy a container
65```bash
66$ docker stop backstabbing_galileo # those docker guys are really rude to physicists!
67backstabbing_galileo
68
69# check the container is stopped
70$ docker ps
71CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
72
73# list ALL containers
74$ docker ps -a
75CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
76d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo
77
78# destroy the container
79$ docker rm backstabbing_galileo # let's put an end to these barbarian practices
80backstabbing_galileo
81
82$ docker ps -a
83CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
84```
85
86### Automatic builds
87
88Docker users can start a personal instance from an [autobuild image](https://hub.docker.com/r/shaarli/shaarli/). For example to start a temporary Shaarli at ``localhost:8000``, and keep session data (config, storage):
89```
90MY_SHAARLI_VOLUME=$(cd /path/to/shaarli/data/ && pwd -P)
91docker run -ti --rm \
92 -p 8000:80 \
93 -v $MY_SHAARLI_VOLUME:/var/www/shaarli/data \
94 shaarli/shaarli
95```
diff --git a/doc/images/bookmarklet.png b/doc/md/images/bookmarklet.png
index 0262578e..0262578e 100644
--- a/doc/images/bookmarklet.png
+++ b/doc/md/images/bookmarklet.png
Binary files differ
diff --git a/doc/images/doc-logo.png b/doc/md/images/doc-logo.png
index 3d8d1787..3d8d1787 100644
--- a/doc/images/doc-logo.png
+++ b/doc/md/images/doc-logo.png
Binary files differ
diff --git a/doc/images/doc-logo.svg b/doc/md/images/doc-logo.svg
index 37fc6658..37fc6658 100644
--- a/doc/images/doc-logo.svg
+++ b/doc/md/images/doc-logo.svg
diff --git a/doc/images/firefoxshare.png b/doc/md/images/firefoxshare.png
index 98c2fdd3..98c2fdd3 100644
--- a/doc/images/firefoxshare.png
+++ b/doc/md/images/firefoxshare.png
Binary files differ
diff --git a/doc/md/images/install-shaarli.png b/doc/md/images/install-shaarli.png
new file mode 100644
index 00000000..7ae33816
--- /dev/null
+++ b/doc/md/images/install-shaarli.png
Binary files differ
diff --git a/doc/md/images/poedit-1.jpg b/doc/md/images/poedit-1.jpg
new file mode 100644
index 00000000..673ae6d6
--- /dev/null
+++ b/doc/md/images/poedit-1.jpg
Binary files differ
diff --git a/doc/images/rss-filter-1.png b/doc/md/images/rss-filter-1.png
index d2a03f67..d2a03f67 100644
--- a/doc/images/rss-filter-1.png
+++ b/doc/md/images/rss-filter-1.png
Binary files differ
diff --git a/doc/images/rss-filter-2.png b/doc/md/images/rss-filter-2.png
index 538b126e..538b126e 100644
--- a/doc/images/rss-filter-2.png
+++ b/doc/md/images/rss-filter-2.png
Binary files differ
diff --git a/doc/md/index.md b/doc/md/index.md
new file mode 100644
index 00000000..e77b4d3a
--- /dev/null
+++ b/doc/md/index.md
@@ -0,0 +1,129 @@
1# [Shaarli](https://github.com/shaarli/Shaarli/) documentation
2
3Here you can find some info on how to use, configure, tweak and solve problems with your Shaarli.
4
5For general info, read the [README](https://github.com/shaarli/Shaarli/blob/master/README.md).
6
7If you have any questions or ideas, please join the [chat](https://gitter.im/shaarli/Shaarli) (also reachable via [IRC](https://irc.gitter.im/)), post them in our [general discussion](https://github.com/shaarli/Shaarli/issues/308) or read the current [issues](https://github.com/shaarli/Shaarli/issues).
8If you've found a bug, please create a [new issue](https://github.com/shaarli/Shaarli/issues/new).
9
10If you would like a feature added to Shaarli, check the issues labeled [`feature`](https://github.com/shaarli/Shaarli/labels/feature), [`enhancement`](https://github.com/shaarli/Shaarli/labels/enhancement), and [`plugin`](https://github.com/shaarli/Shaarli/labels/plugin).
11
12_Note: This documentation is available online at https://shaarli.readthedocs.io/, and locally in the `doc/html/` directory of your Shaarli installation._
13
14[![Join the chat at https://gitter.im/shaarli/Shaarli](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/shaarli/Shaarli)
15[![Bountysource](https://www.bountysource.com/badge/team?team_id=19583&style=bounties_received)](https://www.bountysource.com/teams/shaarli/issues)
16[![Docker repository](https://img.shields.io/docker/pulls/shaarli/shaarli.svg)](https://hub.docker.com/r/shaarli/shaarli/)
17
18### Demo
19
20You can use this [public demo instance of Shaarli](https://demo.shaarli.org).
21It runs the latest development version of Shaarli and is updated/reset daily.
22
23Login: `demo`; Password: `demo`
24
25## Features
26
27Shaarli can be used:
28
29- to share, comment and save interesting links and news.
30- to bookmark useful/frequent personal links (as private links) and share them between computers.
31- as a minimal blog/microblog/writing platform (no character limit).
32- as a read-it-later list (for example items tagged `readlater`).
33- to draft and save articles/posts/ideas.
34- to keep code snippets.
35- to keep notes and documentation.
36- as a shared clipboard/notepad/pastebin between machines.
37- as a todo list.
38- to store playlists (e.g. with the `music` or `video` tags).
39- to keep extracts/comments from webpages that may disappear.
40- to keep track of ongoing discussions (for example items tagged `discussion`).
41- [to feed RSS aggregators](http://shaarli.chassegnouf.net/?9Efeiw) (planets) with specific tags.
42- to feed other social networks, blogs... using RSS feeds and external services (dlvr.it, ifttt.com ...).
43
44### Interface
45- minimalist design (simple is beautiful)
46- FAST
47- ATOM and RSS feeds
48- views:
49 - paginated link list
50 - tag cloud
51 - picture wall: image and video thumbnails
52 - daily: newspaper-like daily digest
53 - daily RSS feed
54- permalinks for easy reference
55- links can be public or private
56- extensible through [plugins](https://shaarli.readthedocs.io/en/master/Plugins/#plugin-usage)
57
58### Tag, view and search your links!
59- add a custom title and description to archived links
60- add tags to classify and search links
61 - features tag autocompletion, renaming, merging and deletion
62- full-text and tag search
63
64### Easy setup
65- dead-simple installation: drop the files, open the page
66- links are stored in a file
67 - compact storage
68 - no database required
69 - easy backup: simply copy the datastore file
70- import and export links as Netscape bookmarks
71
72### Accessibility
73- Firefox bookmarlet to share links in one click
74- support for mobile browsers
75- works with Javascript disabled
76- easy page customization through HTML/CSS/RainTPL
77
78### Security
79- bruteforce-proof login form
80- protected against [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)
81and session cookie hijacking
82
83### Goodies
84- thumbnail generation for images and video services:
85dailymotion, flickr, imageshack, imgur, vimeo, xkcd, youtube...
86 - lazy-loading with [bLazy](http://dinbror.dk/blazy/)
87- [PubSubHubbub](https://code.google.com/p/pubsubhubbub/) protocol support
88- URL cleanup: automatic removal of `?utm_source=...`, `fb=...`
89- discreet pop-up notification when a new release is available
90
91### REST API
92
93Easily extensible by any client using the REST API exposed by Shaarli.
94
95See the [API documentation](http://shaarli.github.io/api-documentation/).
96
97### Using Shaarli as a blog, notepad, pastebin...
98- Go to your Shaarli setup and log in
99- Click the `Add Link` button
100- To share text only, do not enter any URL in the corresponding input field and click `Add Link`
101- Pick a title and enter your article, or note, in the description field; add a few tags; optionally check `Private` then click `Save`
102- Voilà! Your article is now published (privately if you selected that option) and accessible using its permalink.
103
104## About
105### Shaarli community fork
106This friendly fork is maintained by the Shaarli community at https://github.com/shaarli/Shaarli
107
108This is a community fork of the original [Shaarli](https://github.com/sebsauvage/Shaarli/) project by [Sébastien Sauvage](http://sebsauvage.net/).
109
110The original project is currently unmaintained, and the developer [has informed us](https://github.com/sebsauvage/Shaarli/issues/191)
111that he would have no time to work on Shaarli in the near future.
112The Shaarli community has carried on the work to provide
113[many patches](https://github.com/shaarli/Shaarli/compare/sebsauvage:master...master)
114for [bug fixes and enhancements](https://github.com/shaarli/Shaarli/issues?q=is%3Aclosed+)
115in this repository, and will keep maintaining the project for the foreseeable future, while keeping Shaarli simple and efficient.
116
117### Contributing
118If you'd like to help, please:
119- have a look at the open [issues](https://github.com/shaarli/Shaarli/issues)
120and [pull requests](https://github.com/shaarli/Shaarli/pulls)
121- feel free to report bugs (feedback is much appreciated)
122- suggest new features and improvements to both code and [documentation](https://github.com/shaarli/Shaarli/wiki)
123- propose solutions to existing problems
124- submit pull requests :-)
125
126
127### License
128Shaarli is [Free Software](http://en.wikipedia.org/wiki/Free_software). See [COPYING](COPYING) for a detail of the contributors and licenses for each individual component.
129
diff --git a/doc/sidebar.html b/doc/sidebar.html
deleted file mode 100644
index 4dad0161..00000000
--- a/doc/sidebar.html
+++ /dev/null
@@ -1,50 +0,0 @@
1<div id="local-sidebar">
2<ul>
3<li><a href="Home.html">Home</a></li>
4<li>Setup
5<ul>
6<li><a href="Download-and-Installation.html">Download and Installation</a></li>
7<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
8<li><a href="Server-requirements.html">Server requirements</a></li>
9<li><a href="Server-configuration.html">Server configuration</a></li>
10<li><a href="Server-security.html">Server security</a></li>
11<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
12<li><a href="Plugins.html">Plugins</a></li>
13</ul></li>
14<li><a href="Docker.html">Docker</a></li>
15<li><a href="Usage.html">Usage</a>
16<ul>
17<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
18<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
19<li><a href="Firefox-share.html">Firefox share</a></li>
20<li><a href="RSS-feeds.html">RSS feeds</a></li>
21</ul></li>
22<li>How To
23<ul>
24<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
25<li><a href="Copy-an-existing-installation-over-SSH-and-serve-it-locally.html">Copy an existing installation over SSH and serve it locally</a></li>
26<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
27<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
28<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
29</ul></li>
30<li><a href="Troubleshooting.html">Troubleshooting</a></li>
31<li><a href="Development.html">Development</a>
32<ul>
33<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
34<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
35<li><a href="Directory-structure.html">Directory structure</a></li>
36<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
37<li><a href="Plugin-System.html">Plugin System</a></li>
38<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
39<li><a href="Security.html">Security</a></li>
40<li><a href="Static-analysis.html">Static analysis</a></li>
41<li><a href="Theming.html">Theming</a></li>
42<li><a href="Unit-tests.html">Unit tests</a></li>
43</ul></li>
44<li>About
45<ul>
46<li><a href="FAQ.html">FAQ</a></li>
47<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
48</ul></li>
49</ul>
50</div>