aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/3rd-party-libraries.html88
-rw-r--r--doc/Backup,-restore,-import-and-export.html152
-rw-r--r--doc/Browsing-and-searching.html83
-rw-r--r--doc/Coding-guidelines.html75
-rw-r--r--doc/Coding-guidelines.md5
-rw-r--r--doc/Community-&-Related-software.html131
-rw-r--r--doc/Community-&-Related-software.md61
-rw-r--r--doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.html165
-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).html159
-rw-r--r--doc/Create-and-serve-multiple-Shaarlis-(farm).md58
-rw-r--r--doc/Datastore-hacks.html124
-rw-r--r--doc/Datastore-hacks.md24
-rw-r--r--doc/Development.html112
-rw-r--r--doc/Development.md35
-rw-r--r--doc/Directory-structure.html135
-rw-r--r--doc/Docker.html245
-rw-r--r--doc/Docker.md158
-rw-r--r--doc/Download-CSS-styles-from-an-OPML-list.html257
-rw-r--r--doc/Download-CSS-styles-from-an-OPML-list.md155
-rw-r--r--doc/Download-and-Installation.html172
-rw-r--r--doc/Example-patch---add-new-via-field-for-links.html254
-rw-r--r--doc/Example-patch---add-new-via-field-for-links.md190
-rw-r--r--doc/FAQ.html107
-rw-r--r--doc/Firefox-share.html95
-rw-r--r--doc/Firefox-share.md16
-rw-r--r--doc/GnuPG-signature.html175
-rw-r--r--doc/Home.html76
-rw-r--r--doc/Home.md14
-rw-r--r--doc/Plugin-System.html634
-rw-r--r--doc/Plugins.html155
-rw-r--r--doc/REST-API.html169
-rw-r--r--doc/REST-API.md105
-rw-r--r--doc/RSS-feeds.html99
-rw-r--r--doc/Release-Shaarli.html224
-rw-r--r--doc/Security.html135
-rw-r--r--doc/Server-configuration.html459
-rw-r--r--doc/Server-requirements.html195
-rw-r--r--doc/Server-security.html175
-rw-r--r--doc/Shaarli-configuration.html298
-rw-r--r--doc/Sharing-button.html94
-rw-r--r--doc/Sharing-button.md31
-rw-r--r--doc/Static-analysis.html82
-rw-r--r--doc/Theming.html182
-rw-r--r--doc/Troubleshooting.html202
-rw-r--r--doc/Unit-tests.html226
-rw-r--r--doc/Upgrade-and-migration.html259
-rw-r--r--doc/Usage.html95
-rw-r--r--doc/Usage.md25
-rw-r--r--doc/Versioning-and-Branches.html156
-rw-r--r--doc/_Footer.html70
-rw-r--r--doc/_Footer.md2
-rw-r--r--doc/_Sidebar.html119
-rw-r--r--doc/_Sidebar.md39
-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)36
-rw-r--r--doc/md/Bookmarklet.md29
-rw-r--r--doc/md/Browsing-and-searching.md (renamed from doc/Browsing-and-searching.md)7
-rw-r--r--doc/md/Community-&-Related-software.md67
-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.md (renamed from doc/Download-and-Installation.md)48
-rw-r--r--doc/md/FAQ.md (renamed from doc/FAQ.md)34
-rw-r--r--doc/md/Features.md25
-rw-r--r--doc/md/Firefox-share.md17
-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)243
-rw-r--r--doc/md/Plugins.md (renamed from doc/Plugins.md)21
-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)90
-rw-r--r--doc/md/Security.md (renamed from doc/Security.md)32
-rw-r--r--doc/md/Server-configuration.md (renamed from doc/Server-configuration.md)89
-rw-r--r--doc/md/Server-requirements.md (renamed from doc/Server-requirements.md)45
-rw-r--r--doc/md/Server-security.md (renamed from doc/Server-security.md)16
-rw-r--r--doc/md/Shaarli-configuration.md (renamed from doc/Shaarli-configuration.md)105
-rw-r--r--doc/md/Static-analysis.md (renamed from doc/Static-analysis.md)13
-rw-r--r--doc/md/Theming.md (renamed from doc/Theming.md)38
-rw-r--r--doc/md/Troubleshooting.md (renamed from doc/Troubleshooting.md)95
-rw-r--r--doc/md/Unit-tests.md (renamed from doc/Unit-tests.md)42
-rw-r--r--doc/md/Upgrade-and-migration.md (renamed from doc/Upgrade-and-migration.md)67
-rw-r--r--doc/md/Various-hacks.md33
-rw-r--r--doc/md/Versioning-and-Branches.md (renamed from doc/Versioning-and-Branches.md)15
-rw-r--r--doc/md/docker/docker-101.md62
-rw-r--r--doc/md/docker/resources.md19
-rw-r--r--doc/md/docker/reverse-proxy-configuration.md6
-rw-r--r--doc/md/docker/shaarli-images.md71
-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/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.md115
-rw-r--r--doc/sidebar.html52
98 files changed, 1218 insertions, 8468 deletions
diff --git a/doc/3rd-party-libraries.html b/doc/3rd-party-libraries.html
deleted file mode 100644
index 50aba6c0..00000000
--- a/doc/3rd-party-libraries.html
+++ /dev/null
@@ -1,88 +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<li><a href="REST-API.html">REST API</a></li>
36</ul></li>
37<li>How To
38<ul>
39<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
40<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>
41<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
42<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
43<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
44</ul></li>
45<li><a href="Troubleshooting.html">Troubleshooting</a></li>
46<li><a href="Development.html">Development</a>
47<ul>
48<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
49<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
50<li><a href="Directory-structure.html">Directory structure</a></li>
51<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
52<li><a href="Plugin-System.html">Plugin System</a></li>
53<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
54<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
55<li><a href="Security.html">Security</a></li>
56<li><a href="Static-analysis.html">Static analysis</a></li>
57<li><a href="Theming.html">Theming</a></li>
58<li><a href="Unit-tests.html">Unit tests</a></li>
59</ul></li>
60<li>About
61<ul>
62<li><a href="FAQ.html">FAQ</a></li>
63<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
64</ul></li>
65</ul>
66</div>
67<h1 id="rd-party-libraries">3rd party libraries</h1>
68<h2 id="css">CSS</h2>
69<ul>
70<li>Yahoo UI <a href="http://yuilibrary.com/yui/docs/cssreset/">CSS Reset</a><a href=".html"></a>
71<ul>
72<li>resets default CSS properties for all HTML elements (overriding browsers' default values)</li>
73<li>ensures custom CSS stylessheets will provide the same results on all browsers</li>
74</ul></li>
75</ul>
76<h2 id="javascript">Javascript</h2>
77<ul>
78<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>
79<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>
80<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>
81</ul>
82<h2 id="php">PHP</h2>
83<ul>
84<li><a href="https://github.com/shaarli/netscape-bookmark-parser">shaarli/netscape-bookmark-parser</a> - Netscape bookmark parser<a href=".html"></a></li>
85<li><a href="https://github.com/rainphp/raintpl">RainTPL</a> - HTML templating for PHP<a href=".html"></a></li>
86</ul>
87</body>
88</html>
diff --git a/doc/Backup,-restore,-import-and-export.html b/doc/Backup,-restore,-import-and-export.html
deleted file mode 100644
index 3c168824..00000000
--- a/doc/Backup,-restore,-import-and-export.html
+++ /dev/null
@@ -1,152 +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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="backup-restore-import-and-export">Backup, restore, import and export</h1>
105<ul>
106<li><a href="#backup-and-restore-the-datastore-file">Backup and restore the datastore file</a><a href=".html"></a></li>
107<li><a href="#export-links-as">Export links as...</a><a href=".html"></a></li>
108<li><a href="#import-links-from">Import links from...</a><a href=".html"></a></li>
109<li><a href="#import-shaarli-links-to-firefox">Import Shaarli links to Firefox</a><a href=".html"></a></li>
110</ul>
111<hr />
112<h2 id="backup-and-restore-the-datastore-file">Backup and restore the datastore file</h2>
113<p>Backup the file <code>data/datastore.php</code> (by FTP or SSH). Restore by putting the file back in place.</p>
114<p>Example command:</p>
115<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>
116<h2 id="export-links-as...">Export links as...</h2>
117<p>To export links as an HTML file, under <em>Tools &gt; Export</em>, choose:</p>
118<ul>
119<li><em>Export all</em> to export both public and private links</li>
120<li><em>Export public</em> to export public links only</li>
121<li><em>Export private</em> to export private links only</li>
122</ul>
123<p>Restore by using the <code>Import</code> feature.</p>
124<ul>
125<li>This can be done using the <a href="https://github.com/nodiscc/shaarchiver">shaarchiver</a> tool.<a href=".html"></a></li>
126</ul>
127<p>Example command:</p>
128<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>
129<h2 id="import-links-from...">Import links from...</h2>
130<h3 id="diigo">Diigo</h3>
131<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>
132<h3 id="mister-wong">Mister Wong</h3>
133<p>See <a href="https://github.com/sebsauvage/Shaarli/issues/146">this issue</a> for import tweaks.<a href=".html"></a></p>
134<h3 id="semanticscuttle">SemanticScuttle</h3>
135<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>
136<h3 id="scuttle">Scuttle</h3>
137<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>
138<h2 id="import-shaarli-links-to-firefox">Import Shaarli links to Firefox</h2>
139<ul>
140<li>Export your Shaarli links as described above.</li>
141<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>
142<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>
143<li>Select <code>Import and Backup &gt; Import bookmarks in HTML format</code></li>
144</ul>
145<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>
146<p>You may be interested in these Firefox addons to manage links imported from Shaarli</p>
147<ul>
148<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>
149<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>
150</ul>
151</body>
152</html>
diff --git a/doc/Browsing-and-searching.html b/doc/Browsing-and-searching.html
deleted file mode 100644
index ef5b5245..00000000
--- a/doc/Browsing-and-searching.html
+++ /dev/null
@@ -1,83 +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<li><a href="REST-API.html">REST API</a></li>
36</ul></li>
37<li>How To
38<ul>
39<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
40<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>
41<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
42<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
43<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
44</ul></li>
45<li><a href="Troubleshooting.html">Troubleshooting</a></li>
46<li><a href="Development.html">Development</a>
47<ul>
48<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
49<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
50<li><a href="Directory-structure.html">Directory structure</a></li>
51<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
52<li><a href="Plugin-System.html">Plugin System</a></li>
53<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
54<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
55<li><a href="Security.html">Security</a></li>
56<li><a href="Static-analysis.html">Static analysis</a></li>
57<li><a href="Theming.html">Theming</a></li>
58<li><a href="Unit-tests.html">Unit tests</a></li>
59</ul></li>
60<li>About
61<ul>
62<li><a href="FAQ.html">FAQ</a></li>
63<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
64</ul></li>
65</ul>
66</div>
67<h1 id="browsing-and-searching">Browsing and searching</h1>
68<h1 id="browsing-and-searching-1">Browsing and Searching</h1>
69<p><embed src="(http://pix.toile-libre.org/upload/original/1455571378.png).html" /></p>
70<h2 id="plain-text-search">Plain text search</h2>
71<p>Use the <code>Search text</code> field to search in <em>any</em> of the fields of all links (Title, URL, Description...)</p>
72<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>
73<p><strong>Exact text search:</strong> Use double-quotes (example <code>&quot;exact search&quot;</code>) to search for the exact expression.</p>
74<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>
75<h2 id="tags-search">Tags search</h2>
76<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>
77<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>
78<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>
79<p>To search for links that are not tagged, enter <code>&quot;&quot;</code> in the tag search field.</p>
80<h2 id="filtering-rss-feedspicture-wall">Filtering RSS feeds/Picture wall</h2>
81<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>
82</body>
83</html>
diff --git a/doc/Coding-guidelines.html b/doc/Coding-guidelines.html
deleted file mode 100644
index 8df12182..00000000
--- a/doc/Coding-guidelines.html
+++ /dev/null
@@ -1,75 +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<li><a href="REST-API.html">REST API</a></li>
36</ul></li>
37<li>How To
38<ul>
39<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
40<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>
41<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
42<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
43<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
44</ul></li>
45<li><a href="Troubleshooting.html">Troubleshooting</a></li>
46<li><a href="Development.html">Development</a>
47<ul>
48<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
49<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
50<li><a href="Directory-structure.html">Directory structure</a></li>
51<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
52<li><a href="Plugin-System.html">Plugin System</a></li>
53<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
54<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
55<li><a href="Security.html">Security</a></li>
56<li><a href="Static-analysis.html">Static analysis</a></li>
57<li><a href="Theming.html">Theming</a></li>
58<li><a href="Unit-tests.html">Unit tests</a></li>
59</ul></li>
60<li>About
61<ul>
62<li><a href="FAQ.html">FAQ</a></li>
63<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
64</ul></li>
65</ul>
66</div>
67<h1 id="coding-guidelines">Coding guidelines</h1>
68<h2 id="wip">WIP</h2>
69<p>This topic is currently being discussed here:</p>
70<ul>
71<li><a href="https://github.com/shaarli/Shaarli/issues/95">Fix coding style (static analysis)</a> (#95)<a href=".html"></a></li>
72<li><a href="https://github.com/shaarli/Shaarli/issues/130">Continuous Integration tools &amp; features</a> (#130)<a href=".html"></a></li>
73</ul>
74</body>
75</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 28b96185..00000000
--- a/doc/Community-&-Related-software.html
+++ /dev/null
@@ -1,131 +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<li><a href="REST-API.html">REST API</a></li>
36</ul></li>
37<li>How To
38<ul>
39<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
40<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>
41<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
42<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
43<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
44</ul></li>
45<li><a href="Troubleshooting.html">Troubleshooting</a></li>
46<li><a href="Development.html">Development</a>
47<ul>
48<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
49<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
50<li><a href="Directory-structure.html">Directory structure</a></li>
51<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
52<li><a href="Plugin-System.html">Plugin System</a></li>
53<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
54<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
55<li><a href="Security.html">Security</a></li>
56<li><a href="Static-analysis.html">Static analysis</a></li>
57<li><a href="Theming.html">Theming</a></li>
58<li><a href="Unit-tests.html">Unit tests</a></li>
59</ul></li>
60<li>About
61<ul>
62<li><a href="FAQ.html">FAQ</a></li>
63<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
64</ul></li>
65</ul>
66</div>
67<h1 id="community-related-software">Community &amp; Related software</h1>
68<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>
69<p><em>TODO: contact repos owners to see if they'd like to standardize their work with the community fork.</em></p>
70<h2 id="community">Community</h2>
71<ul>
72<li><a href="http://sebsauvage.net/links/">Liens en vrac de sebsauvage</a> - the original Shaarli<a href=".html"></a></li>
73<li><a href="http://porneia.free.fr/pub/links/ou-est-shaarli.html">A large list of Shaarlis</a><a href=".html"></a></li>
74<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>
75<li><a href="https://github.com/Oros42/shaarlis_list">A list of some known Shaarlis</a><a href=".html"></a></li>
76<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>
77<li><a href="http://sebsauvage.net/wiki/doku.php?id=php:shaarli:ideas">Original ideas/fixme/TODO page</a><a href=".html"></a></li>
78<li><a href="http://sebsauvage.net/wiki/doku.php?id=php:shaarli:discussion">Original discussion page</a> (fr)<a href=".html"></a></li>
79<li><a href="http://sebsauvage.net/wiki/doku.php?id=php:shaarli:history">Original revisions history</a><a href=".html"></a></li>
80<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>
81</ul>
82<h3 id="articles-and-social-media-discussions">Articles and social media discussions</h3>
83<ul>
84<li>2016-09-22 - Hacker News - <a href="https://news.ycombinator.com/item?id=12552176" class="uri">https://news.ycombinator.com/item?id=12552176</a></li>
85<li>2015-08-15 - Reddit - <a href="https://www.reddit.com/r/selfhosted/comments/3h3zwh/question_about_migrating_from_wordpress_to_shaarli/">Question about migrating from WordPress to Shaarli.</a><a href=".html"></a></li>
86<li>2015-06-22 - Hacker News - <a href="https://news.ycombinator.com/item?id=9755366" class="uri">https://news.ycombinator.com/item?id=9755366</a></li>
87<li>2015-05-12 - Reddit - <a href="https://www.reddit.com/r/selfhosted/comments/35pkkc/shaarli_self_hosted_bookmarking_delicious_php/">shaarli - Self hosted Bookmarking / Delicious (PHP, MySQL)</a><a href=".html"></a></li>
88</ul>
89<h3 id="third-party-plugins">Third party plugins</h3>
90<ul>
91<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>
92<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>
93<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>
94<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>
95<li><a href="https://github.com/ericjuden/Shaarli-Google-Analytics-Plugin">google analytics</a> by <a href="http://github.com/ericjuden">@ericjuden</a>: Adds Google Analytics tracking support<a href=".html"></a></li>
96<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>
97<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>
98<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>
99</ul>
100<h3 id="themes">Themes</h3>
101<p>See <a href="Theming.html">Theming</a> for the list of community-contributed themes, and an installation guide.</p>
102<h3 id="server-apps">Server apps</h3>
103<ul>
104<li><a href="https://github.com/nodiscc/shaarchiver">shaarchiver</a> - Archive your Shaarli bookmarks and their content<a href=".html"></a></li>
105<li><a href="https://github.com/mknexen/shaarli-river">shaarli-river</a> - An aggregator for shaarlis with many features <a href=".html"></a></li>
106<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>
107<li><a href="https://github.com/BoboTiG/shaarlimages">Shaarlimages</a> - An image-oriented aggregator for Shaarlis<a href=".html"></a></li>
108<li><a href="https://github.com/mknexen/shaarli-api">mknexen/shaarli-api</a> - A REST API for Shaarli<a href=".html"></a></li>
109<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>
110</ul>
111<h3 id="mobile-apps">Mobile Apps</h3>
112<ul>
113<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>
114<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>
115<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>
116</ul>
117<h2 id="integration-with-other-platforms">Integration with other platforms</h2>
118<ul>
119<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>
120<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>
121<li><a href="https://github.com/q2apro/scuttle-to-shaarli">Scuttle to Shaarli</a> - Import bookmarks from Scuttle<a href=".html"></a></li>
122</ul>
123<h2 id="alternatives-to-shaarli">Alternatives to Shaarli</h2>
124<ul>
125<li><a href="http://alternativeto.net/software/shaarli/">Shaarli alternatives</a> (alternativeto.net)<a href=".html"></a></li>
126<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>
127<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>
128<li><a href="https://wordpress.org/plugins/wp-bookmarks/">Wordpress bookmarks</a><a href=".html"></a></li>
129</ul>
130</body>
131</html>
diff --git a/doc/Community-&-Related-software.md b/doc/Community-&-Related-software.md
deleted file mode 100644
index 52123a1e..00000000
--- a/doc/Community-&-Related-software.md
+++ /dev/null
@@ -1,61 +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### Articles and social media discussions
18- 2016-09-22 - Hacker News - https://news.ycombinator.com/item?id=12552176
19- 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/)[](.html)
20- 2015-06-22 - Hacker News - https://news.ycombinator.com/item?id=9755366
21- 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/)[](.html)
22
23### Third party plugins
24
25
26 * [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)
27 * [Code Coloration](https://github.com/ArthurHoaro/code-coloration) by [@ArthurHoaro](https://github.com/ArthurHoaro): client side code syntax highlighter.[](.html)
28 * [Disqus](https://github.com/kalvn/shaarli-plugin-disqus) by [@kalvn](https://github.com/kalvn): Adds Disqus comment system to your Shaarli.[](.html)
29 * [emojione](https://github.com/NerosTie/emojione) by [@NerosTie](https://github.com/NerosTie): Add colorful emojis to your Shaarli.[](.html)
30 * [google analytics](https://github.com/ericjuden/Shaarli-Google-Analytics-Plugin) by [@ericjuden](http://github.com/ericjuden): Adds Google Analytics tracking support[](.html)
31 * [launch](https://github.com/ArthurHoaro/launch-plugin) - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli.[](.html)
32 * [social](https://github.com/alexisju/social) by [@alexisju](https://github.com/alexisju): share links to social networks.[](.html)
33 * [shaarli2twitter](https://github.com/ArthurHoaro/shaarli2twitter) by [@ArthurHoaro](https://github.com/ArthurHoaro) - Automatically tweet your shared links from Shaarli[](.html)
34
35
36### Themes
37See [Theming](Theming.html) for the list of community-contributed themes, and an installation guide.
38
39### Server apps
40- [shaarchiver](https://github.com/nodiscc/shaarchiver) - Archive your Shaarli bookmarks and their content[](.html)
41- [shaarli-river](https://github.com/mknexen/shaarli-river) - An aggregator for shaarlis with many features [](.html)
42- [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)
43- [Shaarlimages](https://github.com/BoboTiG/shaarlimages) - An image-oriented aggregator for Shaarlis[](.html)
44- [mknexen/shaarli-api](https://github.com/mknexen/shaarli-api) - A REST API for Shaarli[](.html)
45- [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)
46
47### Mobile Apps
48- [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)
49- [Shaarli for Android](http://sebsauvage.net/links/?ZAyDzg) - Android application that adds Shaarli as a sharing provider[](.html)
50- [Shaarlier for Android](https://github.com/dimtion/Shaarlier) - Android application to simply add links directly into your Shaarli[](.html)
51
52## Integration with other platforms
53- [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)
54- [octopress-shaarli](https://github.com/ahmet2mir/octopress-shaarli) - Octopress plugin to retrieve Shaarli links on the sidebar[](.html)
55- [Scuttle to Shaarli](https://github.com/q2apro/scuttle-to-shaarli) - Import bookmarks from Scuttle[](.html)
56
57## Alternatives to Shaarli
58- [Shaarli alternatives](http://alternativeto.net/software/shaarli/) (alternativeto.net)[](.html)
59- [Bookie](https://github.com/bookieio/bookie) - Another self-hostable, free bookmark sharing software, written in Python[](.html)
60- [Unmark](https://github.com/plainmade/unmark) - An open source todo app for bookmarks ([Homepage](https://unmark.it/))[](.html)
61- [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 d6b76add..00000000
--- a/doc/Copy-an-existing-installation-over-SSH-and-serve-it-locally.html
+++ /dev/null
@@ -1,165 +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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="copy-an-existing-installation-over-ssh-and-serve-it-locally">Copy an existing installation over SSH and serve it locally</h1>
105<p>Example bash script:</p>
106<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co">#!/bin/bash</span>
107<span class="co">#Description: Copy a Shaarli installation over SSH/SCP, serve it locally with php-cli</span>
108<span class="co">#Will create a local-shaarli/ directory when you run it, backup your Shaarli there, and serve it locally.</span>
109<span class="co">#Will NOT download linked pages. It&#39;s just a directly usable backup/copy/mirror of your Shaarli</span>
110<span class="co">#Requires: ssh, scp and a working SSH access to the server where your Shaarli is installed</span>
111<span class="co">#Usage: ./local-shaarli.sh</span>
112<span class="co">#Author: nodiscc (nodiscc@gmail.com)</span>
113<span class="co">#License: MIT (http://opensource.org/licenses/MIT)</span>
114<span class="kw">set</span> <span class="ex">-o</span> errexit
115<span class="kw">set</span> <span class="ex">-o</span> nounset
116
117<span class="co">##### CONFIG #################</span>
118<span class="co">#The port used by php&#39;s local server</span>
119<span class="va">php_local_port=</span>7431
120
121<span class="co">#Name of the SSH server and path where Shaarli is installed</span>
122<span class="co">#TODO: pass these as command-line arguments</span>
123<span class="va">remotehost=</span><span class="st">&quot;my.ssh.server&quot;</span>
124<span class="va">remote_shaarli_dir=</span><span class="st">&quot;/var/www/shaarli&quot;</span>
125
126
127<span class="co">###### FUNCTIONS #############</span>
128<span class="fu">_main()</span> <span class="kw">{</span>
129 <span class="ex">_CBSyncShaarli</span>
130 <span class="ex">_CBServeShaarli</span>
131<span class="kw">}</span>
132
133<span class="fu">_CBSyncShaarli()</span> <span class="kw">{</span>
134 <span class="va">remote_temp_dir=$(</span><span class="fu">ssh</span> <span class="va">$remotehost</span> mktemp -d<span class="va">)</span>
135 <span class="va">remote_ssh_user=$(</span><span class="fu">ssh</span> <span class="va">$remotehost</span> whoami<span class="va">)</span>
136 <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>
137 <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>
138 <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
139 <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>
140<span class="kw">}</span>
141
142<span class="fu">_CBServeShaarli()</span> <span class="kw">{</span>
143 <span class="co">#TODO: allow serving a previously downloaded Shaarli</span>
144 <span class="co">#TODO: ask before overwriting local copy, if it exists</span>
145 <span class="bu">cd</span> local-shaarli/
146 <span class="ex">php</span> -S localhost:<span class="va">${php_local_port}</span>
147 <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>
148<span class="kw">}</span>
149
150
151<span class="co">##### MAIN #################</span>
152
153<span class="ex">_main</span></code></pre></div>
154<p>This outputs:</p>
155<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">./local-shaarli.sh</span>
156<span class="ex">PHP</span> 5.6.0RC4 Development Server started at Mon Sep 1 21:56:19 2014
157<span class="ex">Listening</span> on http://localhost:7431
158<span class="ex">Document</span> root is /home/user/local-shaarli/shaarli
159<span class="ex">Press</span> Ctrl-C to quit.
160
161[<span class="ex">Mon</span> Sep 1 21:56:27 2014] ::1:57868 [200]: /[](.html)
162[<span class="ex">Mon</span> Sep 1 21:56:27 2014] ::1:57869 [200]: /index.html[](.html)
163[<span class="ex">Mon</span> Sep 1 21:56:37 2014] ::1:57881 [200]: /...[](.html)</code></pre></div>
164</body>
165</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 0be81d56..00000000
--- a/doc/Create-and-serve-multiple-Shaarlis-(farm).html
+++ /dev/null
@@ -1,159 +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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="create-and-serve-multiple-shaarlis-farm">Create and serve multiple Shaarlis (farm)</h1>
105<p>Example bash script (creates multiple shaarli instances and generates an HTML index of them)</p>
106<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co">#!/bin/bash</span>
107<span class="kw">set</span> <span class="ex">-o</span> errexit
108<span class="kw">set</span> <span class="ex">-o</span> nounset
109
110<span class="co">#config</span>
111<span class="va">shaarli_base_dir=</span><span class="st">&#39;/var/www/shaarli&#39;</span>
112<span class="va">accounts=</span><span class="st">&#39;bob john whatever username&#39;</span>
113<span class="va">shaarli_repo_url=</span><span class="st">&#39;https://github.com/shaarli/Shaarli&#39;</span>
114<span class="va">ref=</span><span class="st">&quot;master&quot;</span>
115
116<span class="co">#clone multiple shaarli instances</span>
117<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>
118
119<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>
120 <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>
121 <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>
122 <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>
123<span class="kw">done</span>
124
125<span class="co">#generate html index of shaarlis</span>
126<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>
127<span class="st">&lt;!-- Minimal html template thanks to http://www.sitepoint.com/a-minimal-html-document/ --&gt;</span>
128<span class="st">&lt;html lang=&quot;en&quot;&gt;</span>
129<span class="st"> &lt;head&gt;</span>
130<span class="st"> &lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;</span>
131<span class="st"> &lt;title&gt;My Shaarli farm&lt;/title&gt;</span>
132<span class="st"> &lt;style&gt;body {font-family: &quot;Open Sans&quot;}&lt;/style&gt;</span>
133<span class="st"> &lt;/head&gt;</span>
134<span class="st"> &lt;body&gt;</span>
135<span class="st"> &lt;div&gt;</span>
136<span class="st"> &lt;h1&gt;My Shaarli farm&lt;/h1&gt;</span>
137<span class="st"> &lt;ul style=&quot;list-style-type: none;&quot;&gt;&#39;</span>
138
139<span class="va">accountlinks=</span><span class="st">&#39;&#39;</span>
140
141<span class="va">htmlfooter=</span><span class="st">&#39;</span>
142<span class="st"> &lt;/ul&gt;</span>
143<span class="st"> &lt;/div&gt;</span>
144<span class="st"> &lt;/body&gt;</span>
145<span class="st">&lt;/html&gt;&#39;</span>
146
147
148
149<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>
150<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>
151<span class="bu">echo</span> <span class="st">&quot;[info] generating new index of shaarlis&quot;</span>[](.html)
152<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>
153<span class="bu">echo</span> <span class="st">&#39;[info] done.&#39;</span>[](.html)
154<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)
155<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)
156<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>
157<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>
158</body>
159</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 ef3e17bb..00000000
--- a/doc/Datastore-hacks.html
+++ /dev/null
@@ -1,124 +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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="datastore-hacks">Datastore hacks</h1>
105<h3 id="decode-datastore-content">Decode datastore content</h3>
106<p>To display the array representing the data saved in <code>data/datastore.php</code>, use the following snippet:</p>
107<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>
108<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>
109<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>
110<span class="fu">print_r</span><span class="ot">(</span><span class="kw">$out</span><span class="ot">);</span>
111<span class="fu">echo</span> <span class="st">&quot;&lt;/pre&gt;&quot;</span><span class="ot">;</span>
112<span class="fu">exit</span><span class="ot">;</span></code></pre></div>
113<p>This will output the internal representation of the datastore, &quot;unobfuscated&quot; (if this can really be considered obfuscation).</p>
114<p>Alternatively, you can transform to JSON format (and pretty-print if you have <code>jq</code> installed):</p>
115<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>
116<h3 id="changing-the-timestamp-for-a-link">Changing the timestamp for a link</h3>
117<ul>
118<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>
119<li>Replace <code>type=&quot;hidden&quot;</code> with <code>type=&quot;text&quot;</code> from this line</li>
120<li>A new date/time field becomes available in the edit/new link dialog.</li>
121<li>You can set the timestamp manually by entering it in the format <code>YYYMMDD_HHMMS</code>.</li>
122</ul>
123</body>
124</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 8a2be413..00000000
--- a/doc/Development.html
+++ /dev/null
@@ -1,112 +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<li><a href="REST-API.html">REST API</a></li>
36</ul></li>
37<li>How To
38<ul>
39<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
40<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>
41<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
42<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
43<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
44</ul></li>
45<li><a href="Troubleshooting.html">Troubleshooting</a></li>
46<li><a href="Development.html">Development</a>
47<ul>
48<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
49<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
50<li><a href="Directory-structure.html">Directory structure</a></li>
51<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
52<li><a href="Plugin-System.html">Plugin System</a></li>
53<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
54<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
55<li><a href="Security.html">Security</a></li>
56<li><a href="Static-analysis.html">Static analysis</a></li>
57<li><a href="Theming.html">Theming</a></li>
58<li><a href="Unit-tests.html">Unit tests</a></li>
59</ul></li>
60<li>About
61<ul>
62<li><a href="FAQ.html">FAQ</a></li>
63<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
64</ul></li>
65</ul>
66</div>
67<h1 id="development">Development</h1>
68<h2 id="guidelines">Guidelines</h2>
69<p>Please have a look at the following pages:</p>
70<ul>
71<li><a href="https://github.com/shaarli/Shaarli/tree/master/CONTRIBUTING.md">Contributing to Shaarli</a><a href=".html"></a></li>
72<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:
73<ul>
74<li><a href="http://www.php-fig.org/psr/psr-1/">PSR-1</a> - Basic Coding Standard<a href=".html"></a></li>
75<li><a href="http://www.php-fig.org/psr/psr-2/">PSR-2</a> - Coding Style Guide<a href=".html"></a></li>
76</ul></li>
77<li><a href="Unit-tests.html">Unit tests</a></li>
78<li><a href="GnuPG-signature.html">GnuPG signature</a> for tags/releases</li>
79</ul>
80<h2 id="continuous-integration-tools">Continuous integration tools</h2>
81<h3 id="local-development">Local development</h3>
82<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>
83<ul>
84<li>Documentation - generate a local HTML copy of the GitHub wiki</li>
85<li><a href="Static-analysis.html">Static analysis</a> - check that the code is compliant to PHP conventions</li>
86<li><a href="Unit-tests.html">Unit tests</a> - ensure there are no regressions introduced by new commits</li>
87</ul>
88<h3 id="automatic-builds">Automatic builds</h3>
89<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>
90<ul>
91<li>each time a commit is merged to the mainline (<code>master</code> branch)</li>
92<li>each time a Pull Request is submitted or updated</li>
93</ul>
94<p>A build is composed of several jobs: one for each supported PHP version (see <a href="Server-requirements.html">Server requirements</a>).</p>
95<p>Each build job:</p>
96<ul>
97<li>updates Composer</li>
98<li>installs 3rd-party test dependencies with Composer</li>
99<li>runs <a href="Unit-tests.html">Unit tests</a></li>
100</ul>
101<p>After all jobs have finished, Travis returns the results to GitHub:</p>
102<ul>
103<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>
104<li>Pull Requests are updated with the Travis result
105<ul>
106<li>Green: all tests have passed</li>
107<li>Red: some tests failed</li>
108<li>Orange: tests are pending</li>
109</ul></li>
110</ul>
111</body>
112</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 3f75db8e..00000000
--- a/doc/Directory-structure.html
+++ /dev/null
@@ -1,135 +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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="directory-structure">Directory structure</h1>
105<p>Here is the directory structure of Shaarli and the purpose of the different files:</p>
106<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"> <span class="ex">index.php</span> # Main program
107 <span class="ex">application/</span> # Shaarli classes
108 ├── <span class="ex">LinkDB.php</span>
109 └── <span class="ex">Utils.php</span>
110 <span class="ex">tests/</span> # Shaarli unitary <span class="kw">&amp;</span> <span class="ex">functional</span> tests
111 ├── <span class="ex">LinkDBTest.php</span>
112 ├── <span class="ex">utils</span> # utilities to ease testing
113 │ └── <span class="ex">ReferenceLinkDB.php</span>
114 └── <span class="ex">UtilsTest.php</span>
115 <span class="ex">COPYING</span> # Shaarli license
116 <span class="ex">inc/</span> # static assets and 3rd party libraries
117 ├── <span class="ex">awesomplete.*</span> # tags autocompletion library
118 ├── <span class="ex">blazy.*</span> # picture wall lazy image loading library
119 ├── <span class="ex">shaarli.css</span>, reset.css <span class="co"># Shaarli stylesheet.</span>
120 ├── <span class="ex">qr.*</span> # qr code generation library
121 └──<span class="ex">rain.tpl.class.php</span> # RainTPL templating library
122 <span class="ex">tpl/</span> # RainTPL templates for Shaarli. They are used to build the pages.
123 <span class="ex">images/</span> # Images and icons used in Shaarli
124 <span class="ex">data/</span> # data storage: bookmark database, configuration, logs, banlist…
125 ├── <span class="ex">config.php</span> # Shaarli configuration (login, password, timezone, title…)
126 ├── <span class="ex">datastore.php</span> # Your link database (compressed)<span class="ex">.</span>
127 ├── <span class="ex">ipban.php</span> # IP address ban system data
128 ├── <span class="ex">lastupdatecheck.txt</span> # Update check timestamp file
129 └──<span class="ex">log.txt</span> # login/IPban log.
130 <span class="ex">cache/</span> # thumbnails cache
131 <span class="co"># This directory is automatically created. You can erase it anytime you want.</span>
132 <span class="ex">tmp/</span> # Temporary directory for compiled RainTPL templates.
133 <span class="co"># This directory is automatically created. You can erase it anytime you want.</span></code></pre></div>
134</body>
135</html>
diff --git a/doc/Docker.html b/doc/Docker.html
deleted file mode 100644
index fd0dec4b..00000000
--- a/doc/Docker.html
+++ /dev/null
@@ -1,245 +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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="docker">Docker</h1>
105<ul>
106<li><a href="#docker-usage">Docker usage</a><a href=".html"></a></li>
107<li><a href="#get-and-run-a-shaarli-image">Get and run a Shaarli image</a><a href=".html"></a></li>
108<li><a href="#resources">Resources</a><a href=".html"></a></li>
109</ul>
110<h2 id="docker-usage">Docker usage</h2>
111<h3 id="basics">Basics</h3>
112<p>Install <a href="https://www.docker.com/">Docker</a>, by following the instructions relevant<a href=".html"></a><br />
113to your OS / distribution, and start the service.</p>
114<h4 id="search-an-image-on-dockerhub">Search an image on <a href="https://hub.docker.com/">DockerHub</a><a href=".html"></a></h4>
115<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">docker</span> search debian
116
117<span class="ex">NAME</span> DESCRIPTION STARS OFFICIAL AUTOMATED
118<span class="ex">ubuntu</span> Ubuntu is a Debian-based Linux operating s... 2065 [OK][](.html)
119<span class="ex">debian</span> Debian is a Linux distribution that<span class="st">&#39;s comp... 603 [OK][](.html)</span>
120<span class="st">google/debian 47 [OK][](.html)</span></code></pre></div>
121<h4 id="show-available-tags-for-a-repository">Show available tags for a repository</h4>
122<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
123
124<span class="ex">%</span> Total % Received % Xferd Average Speed Time Time Time Current
125<span class="ex">Dload</span> Upload Total Spent Left Speed
126<span class="ex">100</span> 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433</code></pre></div>
127<p>Sample output:</p>
128<div class="sourceCode"><pre class="sourceCode json"><code class="sourceCode json"><span class="ot">[[]</span><span class="er">(.html)</span>
129 <span class="fu">{</span>
130 <span class="dt">&quot;layer&quot;</span><span class="fu">:</span> <span class="st">&quot;85a02782&quot;</span><span class="fu">,</span>
131 <span class="dt">&quot;name&quot;</span><span class="fu">:</span> <span class="st">&quot;stretch&quot;</span>
132 <span class="fu">}</span><span class="ot">,</span>
133 <span class="fu">{</span>
134 <span class="dt">&quot;layer&quot;</span><span class="fu">:</span> <span class="st">&quot;59abecbc&quot;</span><span class="fu">,</span>
135 <span class="dt">&quot;name&quot;</span><span class="fu">:</span> <span class="st">&quot;testing&quot;</span>
136 <span class="fu">}</span><span class="ot">,</span>
137 <span class="fu">{</span>
138 <span class="dt">&quot;layer&quot;</span><span class="fu">:</span> <span class="st">&quot;bf0fd686&quot;</span><span class="fu">,</span>
139 <span class="dt">&quot;name&quot;</span><span class="fu">:</span> <span class="st">&quot;unstable&quot;</span>
140 <span class="fu">}</span><span class="ot">,</span>
141 <span class="fu">{</span>
142 <span class="dt">&quot;layer&quot;</span><span class="fu">:</span> <span class="st">&quot;60c52dbe&quot;</span><span class="fu">,</span>
143 <span class="dt">&quot;name&quot;</span><span class="fu">:</span> <span class="st">&quot;wheezy&quot;</span>
144 <span class="fu">}</span><span class="ot">,</span>
145 <span class="fu">{</span>
146 <span class="dt">&quot;layer&quot;</span><span class="fu">:</span> <span class="st">&quot;c5b806fe&quot;</span><span class="fu">,</span>
147 <span class="dt">&quot;name&quot;</span><span class="fu">:</span> <span class="st">&quot;wheezy-backports&quot;</span>
148 <span class="fu">}</span>
149<span class="ot">]</span></code></pre></div>
150<h4 id="pull-an-image-from-dockerhub">Pull an image from DockerHub</h4>
151<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">docker</span> pull repository[:tag][](.html)
152
153$ <span class="ex">docker</span> pull debian:wheezy
154<span class="ex">wheezy</span>: Pulling from debian
155<span class="ex">4c8cbfd2973e</span>: Pull complete
156<span class="ex">60c52dbe9d91</span>: Pull complete
157<span class="ex">Digest</span>: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe
158<span class="ex">Status</span>: Downloaded newer image for debian:wheezy</code></pre></div>
159<h2 id="get-and-run-a-shaarli-image">Get and run a Shaarli image</h2>
160<h3 id="dockerhub-repository">DockerHub repository</h3>
161<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 />
162repository.</p>
163<h3 id="available-image-tags">Available image tags</h3>
164<ul>
165<li><code>latest</code>: master branch (tarball release)</li>
166<li><code>stable</code>: stable branch (tarball release)</li>
167<li><code>dev</code>: master branch (Git clone)</li>
168</ul>
169<p>All images rely on:</p>
170<ul>
171<li><a href="https://hub.docker.com/_/debian/">Debian 8 Jessie</a><a href=".html"></a></li>
172<li><a href="http://php-fpm.org/">PHP5-FPM</a><a href=".html"></a></li>
173<li><a href="http://nginx.org/">Nginx</a><a href=".html"></a></li>
174</ul>
175<h3 id="download-from-dockerhub">Download from DockerHub</h3>
176<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">docker</span> pull shaarli/shaarli
177<span class="ex">latest</span>: Pulling from shaarli/shaarli
178<span class="ex">32716d9fcddb</span>: Pull complete
179<span class="ex">84899d045435</span>: Pull complete
180<span class="ex">4b6ad7444763</span>: Pull complete
181<span class="ex">e0345ef7a3e0</span>: Pull complete
182<span class="ex">5c1dd344094f</span>: Pull complete
183<span class="ex">6422305a200b</span>: Pull complete
184<span class="ex">7d63f861dbef</span>: Pull complete
185<span class="ex">3eb97210645c</span>: Pull complete
186<span class="ex">869319d746ff</span>: Already exists
187<span class="ex">869319d746ff</span>: Pulling fs layer
188<span class="ex">902b87aaaec9</span>: Already exists
189<span class="ex">Digest</span>: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98
190<span class="ex">Status</span>: Downloaded newer image for shaarli/shaarli:latest</code></pre></div>
191<h3 id="create-and-start-a-new-container-from-the-image">Create and start a new container from the image</h3>
192<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>
193$ <span class="ex">docker</span> create -p 8000:80 shaarli/shaarli
194<span class="ex">d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101</span>
195
196<span class="co"># launch the container in the background</span>
197$ <span class="ex">docker</span> start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
198<span class="ex">d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101</span>
199
200<span class="co"># list active containers</span>
201$ <span class="ex">docker</span> ps
202<span class="ex">CONTAINER</span> ID IMAGE COMMAND CREATED STATUS PORTS NAMES
203<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>
204<h3 id="stop-and-destroy-a-container">Stop and destroy a container</h3>
205<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">docker</span> stop backstabbing_galileo # those docker guys are really rude to physicists!
206<span class="ex">backstabbing_galileo</span>
207
208<span class="co"># check the container is stopped</span>
209$ <span class="ex">docker</span> ps
210<span class="ex">CONTAINER</span> ID IMAGE COMMAND CREATED STATUS PORTS NAMES
211
212<span class="co"># list ALL containers</span>
213$ <span class="ex">docker</span> ps -a
214<span class="ex">CONTAINER</span> ID IMAGE COMMAND CREATED STATUS PORTS NAMES
215<span class="ex">d40b7af693d6</span> shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) <span class="ex">48</span> seconds ago backstabbing_galileo
216
217<span class="co"># destroy the container</span>
218$ <span class="ex">docker</span> rm backstabbing_galileo # let<span class="st">&#39;s put an end to these barbarian practices</span>
219<span class="st">backstabbing_galileo</span>
220
221<span class="st">$ docker ps -a</span>
222<span class="st">CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES</span></code></pre></div>
223<h2 id="resources">Resources</h2>
224<h3 id="docker-1">Docker</h3>
225<ul>
226<li><a href="https://www.katacoda.com/courses/docker/">Interactive Docker training portal</a> on <a href="https://www.katacoda.com/">Katakoda</a><a href=".html"></a></li>
227<li><a href="http://blog.thoward37.me/articles/where-are-docker-images-stored/">Where are Docker images stored?</a><a href=".html"></a></li>
228<li><a href="https://docs.docker.com/reference/builder/">Dockerfile reference</a><a href=".html"></a></li>
229<li><a href="https://docs.docker.com/articles/dockerfile_best-practices/">Dockerfile best practices</a><a href=".html"></a></li>
230<li><a href="https://docs.docker.com/userguide/dockervolumes/">Volumes</a><a href=".html"></a></li>
231</ul>
232<h3 id="dockerhub">DockerHub</h3>
233<ul>
234<li><a href="https://docs.docker.com/userguide/dockerrepos/">Repositories</a><a href=".html"></a></li>
235<li><a href="https://docs.docker.com/docker-hub/orgs/">Teams and organizations</a><a href=".html"></a></li>
236<li><a href="https://docs.docker.com/docker-hub/github/">GitHub automated build</a><a href=".html"></a></li>
237</ul>
238<h3 id="service-management">Service management</h3>
239<ul>
240<li><a href="https://docs.docker.com/articles/using_supervisord/">Using supervisord</a><a href=".html"></a></li>
241<li><a href="http://nginx.org/en/docs/ngx_core_module.html#daemon">Nginx in the foreground</a><a href=".html"></a></li>
242<li><a href="http://supervisord.org/">supervisord</a><a href=".html"></a></li>
243</ul>
244</body>
245</html>
diff --git a/doc/Docker.md b/doc/Docker.md
deleted file mode 100644
index a7d2efb5..00000000
--- a/doc/Docker.md
+++ /dev/null
@@ -1,158 +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- [Interactive Docker training portal](https://www.katacoda.com/courses/docker/) on [Katakoda](https://www.katacoda.com/)[](.html)
145- [Where are Docker images stored?](http://blog.thoward37.me/articles/where-are-docker-images-stored/)[](.html)
146- [Dockerfile reference](https://docs.docker.com/reference/builder/)[](.html)
147- [Dockerfile best practices](https://docs.docker.com/articles/dockerfile_best-practices/)[](.html)
148- [Volumes](https://docs.docker.com/userguide/dockervolumes/)[](.html)
149
150### DockerHub
151- [Repositories](https://docs.docker.com/userguide/dockerrepos/)[](.html)
152- [Teams and organizations](https://docs.docker.com/docker-hub/orgs/)[](.html)
153- [GitHub automated build](https://docs.docker.com/docker-hub/github/)[](.html)
154
155### Service management
156- [Using supervisord](https://docs.docker.com/articles/using_supervisord/)[](.html)
157- [Nginx in the foreground](http://nginx.org/en/docs/ngx_core_module.html#daemon)[](.html)
158- [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 18cc5d9a..00000000
--- a/doc/Download-CSS-styles-from-an-OPML-list.html
+++ /dev/null
@@ -1,257 +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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="download-css-styles-from-an-opml-list">Download CSS styles from an OPML list</h1>
105<h3 id="download-css-styles-for-shaarlis-listed-in-an-opml-file">Download CSS styles for shaarlis listed in an opml file</h3>
106<p>Example php script:</p>
107<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php">&lt;!---- <span class="ot">?</span>php --&gt;
108&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>
109&lt;!---- License: zlib <span class="ot">(</span>http:<span class="co">//www.gzip.org/zlib/zlib_license.html) --&gt;</span>
110
111<span class="co">/**</span>
112<span class="co"> * Source: https://github.com/Riduidel</span>
113<span class="co"> * Download css styles for shaarlis listed in an opml file</span>
114<span class="co"> */</span>
115<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>
116
117<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>
118
119<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> {
120 <span class="fu">mkdir</span><span class="ot">(</span><span class="kw">THEMES_TEMP_FOLDER</span><span class="ot">);</span>
121}
122
123<span class="kw">function</span> siteUrl<span class="ot">(</span><span class="kw">$pathInSite</span><span class="ot">)</span> {
124 <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>
125 <span class="kw">if</span><span class="ot">(</span>!<span class="kw">$indexPos</span><span class="ot">)</span> {
126 <span class="kw">return</span> <span class="kw">$pathInSite</span><span class="ot">;</span>
127 } <span class="kw">else</span> {
128 <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>
129 }
130}
131
132<span class="kw">function</span> createShaarliHashFromOPMLL<span class="ot">(</span><span class="kw">$opmlFile</span><span class="ot">)</span> {
133 <span class="kw">$result</span> = <span class="fu">array</span><span class="ot">();</span>
134 <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>
135 <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>
136 <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>
137 <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> {
138 <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>
139 <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>
140 }
141 <span class="kw">return</span> <span class="kw">$result</span><span class="ot">;</span>
142}
143
144<span class="kw">function</span> getSiteFolder<span class="ot">(</span><span class="kw">$url</span><span class="ot">)</span> {
145 <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>
146 <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>
147}
148
149<span class="kw">function</span> get_http_response_code<span class="ot">(</span><span class="kw">$theURL</span><span class="ot">)</span> {
150 <span class="kw">$headers</span> = <span class="fu">get_headers</span><span class="ot">(</span><span class="kw">$theURL</span><span class="ot">);</span>
151 <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>
152}
153
154<span class="co">/**</span>
155<span class="co"> * This makes the code PHP-5 only (particularly the call to &quot;get_headers&quot;)</span>
156<span class="co"> */</span>
157<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> {
158 <span class="kw">$userStyle</span> = <span class="kw">$url</span>.<span class="st">&quot;inc/user.css&quot;</span><span class="ot">;</span>
159 <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> {
160 <span class="co">// </span><span class="al">TODO</span><span class="co"> add log message</span>
161 } <span class="kw">else</span> {
162 <span class="kw">$statusCode</span> = get_http_response_code<span class="ot">(</span><span class="kw">$userStyle</span><span class="ot">);</span>
163 <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> {
164 <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>
165 <span class="kw">$siteFolder</span> = getSiteFolder<span class="ot">(</span><span class="kw">$url</span><span class="ot">);</span>
166 <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> {
167 <span class="fu">mkdir</span><span class="ot">(</span><span class="kw">$siteFolder</span><span class="ot">);</span>
168 }
169 <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> {
170 <span class="co">// Copy stylesheet</span>
171 <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>
172 }
173 <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> {
174 <span class="co">// Then write a readme.md file</span>
175 <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>
176 <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>
177 .<span class="st">&quot;=============================&quot;</span>
178 .<span class="st">&quot;</span><span class="kw">\n\n</span><span class="st">&quot;</span>
179 .<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>
180 <span class="ot">);</span>
181 }
182 <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> {
183 <span class="co">// Write a config file containing useful informations</span>
184 <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>
185 <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>
186 .<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>
187 <span class="ot">);</span>
188 }
189 <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> {
190 <span class="co">// And finally copy generated thumbnail</span>
191 <span class="kw">$homeThumb</span> = <span class="kw">$siteFolder</span>.<span class="st">&#39;/home.png&#39;</span><span class="ot">;</span>
192 <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>
193 }
194 <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>
195 .<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>
196 }
197 }
198}
199
200<span class="kw">function</span> getThumbnailUrl<span class="ot">(</span><span class="kw">$url</span><span class="ot">)</span> {
201 <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>
202}
203
204<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> {
205 <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> {
206 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>
207 }
208}
209
210<span class="co">/**</span>
211<span class="co"> * Reading directory list, courtesy of http://www.laughing-buddha.net/php/dirlist/</span>
212<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>
213<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>
214<span class="co"> * are not listed here</span>
215<span class="co"> */</span>
216<span class="kw">function</span> getDirectoryList <span class="ot">(</span><span class="kw">$directory</span><span class="ot">)</span> {
217 <span class="kw">$realPath</span> = <span class="fu">realpath</span><span class="ot">(</span><span class="kw">$directory</span><span class="ot">);</span>
218 <span class="co">// create an array to hold directory list</span>
219 <span class="kw">$results</span> = <span class="fu">array</span><span class="ot">();</span>
220 <span class="co">// create a handler for the directory</span>
221 <span class="kw">$handler</span> = <span class="fu">opendir</span><span class="ot">(</span><span class="kw">$directory</span><span class="ot">);</span>
222 <span class="co">// open directory and walk through the filenames</span>
223 <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> {
224 <span class="co">// if file isn&#39;t this directory or its parent, add it to the results</span>
225 <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> {
226 <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>
227 }
228 }
229 <span class="co">// tidy up: close the handler</span>
230 <span class="fu">closedir</span><span class="ot">(</span><span class="kw">$handler</span><span class="ot">);</span>
231 <span class="co">// done!</span>
232 <span class="kw">return</span> <span class="kw">$results</span><span class="ot">;</span>
233}
234
235<span class="co">/**</span>
236<span class="co"> * Start in themes folder and look in all subfolders for config.ini files. </span>
237<span class="co"> * These config.ini files allow us not to download styles again and again</span>
238<span class="co"> */</span>
239<span class="kw">function</span> findKnownStyles<span class="ot">()</span> {
240 <span class="kw">$result</span> = <span class="fu">array</span><span class="ot">();</span>
241 <span class="kw">$subFolders</span> = getDirectoryList<span class="ot">(</span><span class="st">&quot;themes&quot;</span><span class="ot">);</span>
242 <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> {
243 <span class="kw">$configFile</span> = <span class="kw">$folder</span>.<span class="st">&quot;/config.ini&quot;</span><span class="ot">;</span>
244 <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> {
245 <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>
246 <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>
247 }
248 }
249 <span class="kw">return</span> <span class="kw">$result</span><span class="ot">;</span>
250}
251
252<span class="kw">$knownStyles</span> = findKnownStyles<span class="ot">();</span>
253copyUserStylesFrom<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>
254
255&lt;!--- <span class="ot">?</span> ----&gt;</code></pre></div>
256</body>
257</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 2c5b3be2..00000000
--- a/doc/Download-and-Installation.html
+++ /dev/null
@@ -1,172 +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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="download-and-installation">Download and Installation</h1>
105<h1 id="get-shaarli">Get Shaarli!</h1>
106<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>
107<p>Several releases are available:</p>
108<hr />
109<h2 id="latest-release-recommended">Latest release (recommended)</h2>
110<h3 id="download-as-an-archive">Download as an archive</h3>
111<p>Get the latest released version from the <a href="https://github.com/shaarli/Shaarli/releases">releases</a> page.<a href=".html"></a></p>
112<p><strong>Download our <em>shaarli-full</em> archive</strong> to include dependencies.</p>
113<p>The current latest released version is <code>v0.8.4</code></p>
114<p>Or in command lines:</p>
115<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.4/shaarli-v0.8.4-full.zip
116$ <span class="fu">unzip</span> shaarli-v0.8.4-full.zip
117$ <span class="fu">mv</span> Shaarli /path/to/shaarli/</code></pre></div>
118<table style="width:46%;">
119<colgroup>
120<col style="width: 8%" />
121<col style="width: 37%" />
122</colgroup>
123<thead>
124<tr class="header">
125<th>!</th>
126<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>
127</tr>
128</thead>
129<tbody>
130</tbody>
131</table>
132<h3 id="using-git">Using git</h3>
133<pre><code>mkdir -p /path/to/shaarli &amp;&amp; cd /path/to/shaarli/
134git clone -b v0.8 https://github.com/shaarli/Shaarli.git .
135composer install --no-dev</code></pre>
136<hr />
137<h2 id="stable-version">Stable version</h2>
138<p>The stable version has been experienced by Shaarli users, and will receive security updates.</p>
139<h3 id="download-as-an-archive-1">Download as an archive</h3>
140<p>As a .zip archive:</p>
141<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">wget</span> https://github.com/shaarli/Shaarli/archive/stable.zip
142$ <span class="fu">unzip</span> stable.zip
143$ <span class="fu">mv</span> Shaarli-stable /path/to/shaarli/</code></pre></div>
144<p>As a .tar.gz archive :</p>
145<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
146$ <span class="fu">tar</span> xvf stable.tar.gz
147$ <span class="fu">mv</span> Shaarli-stable /path/to/shaarli/</code></pre></div>
148<h3 id="clone-with-git">Clone with Git</h3>
149<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>
150<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/
151<span class="co"># install/update third-party dependencies</span>
152$ <span class="bu">cd</span> /path/to/shaarli/
153$ <span class="ex">composer</span> install --no-dev</code></pre></div>
154<hr />
155<h2 id="development-version-mainline">Development version (mainline)</h2>
156<p><em>Use at your own risk!</em></p>
157<p>To get the latest changes from the <code>master</code> branch:</p>
158<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co"># clone the repository </span>
159$ <span class="fu">git</span> clone https://github.com/shaarli/Shaarli.git -b master /path/to/shaarli/
160<span class="co"># install/update third-party dependencies</span>
161$ <span class="bu">cd</span> /path/to/shaarli
162$ <span class="ex">composer</span> install --no-dev</code></pre></div>
163<hr />
164<h2 id="finish-installation">Finish Installation</h2>
165<p>Once Shaarli is downloaded and files have been placed at the correct location, open it this location your favorite browser.</p>
166<p><img src="http://i.imgur.com/wuMpDSN.png" alt="install screenshot" /><a href=".html"></a></p>
167<p>Setup your Shaarli installation, and it's ready to use!</p>
168<hr />
169<h2 id="updating-shaarli">Updating Shaarli</h2>
170<p>See <a href="Upgrade-and-migration">Upgrade and Migration</a><a href=".html"></a></p>
171</body>
172</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 49036a74..00000000
--- a/doc/Example-patch---add-new-via-field-for-links.html
+++ /dev/null
@@ -1,254 +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<li><a href="REST-API.html">REST API</a></li>
36</ul></li>
37<li>How To
38<ul>
39<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
40<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>
41<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
42<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
43<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
44</ul></li>
45<li><a href="Troubleshooting.html">Troubleshooting</a></li>
46<li><a href="Development.html">Development</a>
47<ul>
48<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
49<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
50<li><a href="Directory-structure.html">Directory structure</a></li>
51<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
52<li><a href="Plugin-System.html">Plugin System</a></li>
53<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
54<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
55<li><a href="Security.html">Security</a></li>
56<li><a href="Static-analysis.html">Static analysis</a></li>
57<li><a href="Theming.html">Theming</a></li>
58<li><a href="Unit-tests.html">Unit tests</a></li>
59</ul></li>
60<li>About
61<ul>
62<li><a href="FAQ.html">FAQ</a></li>
63<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
64</ul></li>
65</ul>
66</div>
67<h1 id="example-patch-add-new-via-field-for-links">Example patch add new via field for links</h1>
68<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>
69<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>
70<pre><code>From e0f363c18e8fe67990ed2bb1a08652e24e70bbcb Mon Sep 17 00:00:00 2001
71From: Knah Tsaeb &lt;knah-tsaeb@knah-tsaeb.org&gt;
72Date: Fri, 11 Oct 2013 15:18:37 +0200
73Subject: [PATCH] Add a &quot;via&quot;/origin property for links, add new input in &quot;edit link&quot; dialog[](.html)
74Thanks to:
75* https://github.com/Knah-Tsaeb/Shaarli/commit/040eb18ec8cdabd5ea855e108f81f97fbf0478c4
76* https://github.com/Knah-Tsaeb/Shaarli/commit/4123658eae44d7564d1128ce52ddd5689efee813
77* https://github.com/Knah-Tsaeb/Shaarli/commit/f1a8ca9cc8fe49b119d51b2d8382cc1a34542f96
78
79---
80 index.php | 43 ++++++++++++++++++++++++++++++++-----------
81 tpl/editlink.html | 1 +
82 tpl/linklist.html | 1 +
83 3 files changed, 34 insertions(+), 11 deletions(-)
84
85diff --git a/index.php b/index.php
86index 6fae2f8..53f798e 100644
87--- a/index.php
88+++ b/index.php
89@@ -436,6 +436,12 @@ if (isset($_POST[&#39;login&#39;]))[](.html)
90 // ------------------------------------------------------------------------------------------
91 // Misc utility functions:
92
93+// Try to get just domain for @via
94+function getJustDomain($url){
95+ $parts = parse_url($url);
96+ return trim($parts[&#39;host&#39;]);[](.html)
97+ }
98+
99 // Returns the server URL (including port and http/https), without path.
100 // e.g. &quot;http://myserver.com:8080&quot;
101 // You can append $_SERVER[&#39;SCRIPT_NAME&#39;] to get the current script URL.[](.html)
102@@ -799,7 +805,8 @@ class linkdb implements Iterator, Countable, ArrayAccess
103 $found= (strpos(strtolower($l[&#39;title&#39;]),$s)!==false)[](.html)
104 || (strpos(strtolower($l[&#39;description&#39;]),$s)!==false)[](.html)
105 || (strpos(strtolower($l[&#39;url&#39;]),$s)!==false)[](.html)
106- || (strpos(strtolower($l[&#39;tags&#39;]),$s)!==false);[](.html)
107+ || (strpos(strtolower($l[&#39;tags&#39;]),$s)!==false)[](.html)
108+ || (!empty($l[&#39;via&#39;]) &amp;&amp; (strpos(strtolower($l[&#39;via&#39;]),$s)!==false));[](.html)
109 if ($found) $filtered[$l[&#39;linkdate&#39;[ = $l;](-=-$l;.html)
110 }
111 krsort($filtered);
112@@ -814,7 +821,7 @@ class linkdb implements Iterator, Countable, ArrayAccess
113 $t = str_replace(&#39;,&#39;,&#39; &#39;,($casesensitive?$tags:strtolower($tags)));
114 $searchtags=explode(&#39; &#39;,$t);
115 $filtered=array();
116- foreach($this-&gt;links as $l)
117+ foreach($this-&gt; links as $l)
118 {
119 $linktags = explode(&#39; &#39;,($casesensitive?$l[&#39;tags&#39;]:strtolower($l[&#39;tags&#39;])));[](.html)
120 if (count(array_intersect($linktags,$searchtags)) == count($searchtags))
121@@ -905,7 +912,7 @@ function showRSS()
122 else $linksToDisplay = $LINKSDB;
123 $nblinksToDisplay = 50; // Number of links to display.
124 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)
125- {
126+ {
127 $nblinksToDisplay = $_GET[&#39;nb&#39;]==&#39;all&#39; ? count($linksToDisplay) : max($_GET[&#39;nb&#39;]+0,1) ;[](.html)
128 }
129
130@@ -944,7 +951,12 @@ function showRSS()
131 // If user wants permalinks first, put the final link in description
132 if ($usepermalinks===true) $descriptionlink = &#39;(&lt;a href=&quot;&#39;.$absurl.&#39;&quot;&gt;Link&lt;/a&gt;)&#39;;
133 if (strlen($link[&#39;description&#39;])&gt;0) $descriptionlink = &#39;&lt;br&gt;&#39;.$descriptionlink;[](.html)
134- 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)
135+ if(!empty($link[&#39;via&#39;])){[](.html)
136+ $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)
137+ } else {
138+ $via = &#39;&#39;;
139+ }
140+ 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)
141 $i++;
142 }
143 echo &#39;&lt;/channel&gt;&lt;/rss&gt;&lt;!-- Cached version of &#39;.htmlspecialchars(pageUrl()).&#39; --&gt;&#39;;
144@@ -980,7 +992,7 @@ function showATOM()
145 else $linksToDisplay = $LINKSDB;
146 $nblinksToDisplay = 50; // Number of links to display.
147 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)
148- {
149+ {
150 $nblinksToDisplay = $_GET[&#39;nb&#39;]==&#39;all&#39; ? count($linksToDisplay) : max($_GET[&#39;nb&#39;]+0,1) ;[](.html)
151 }
152
153@@ -1006,11 +1018,16 @@ function showATOM()
154
155 // Add permalink in description
156 $descriptionlink = htmlspecialchars(&#39;(&lt;a href=&quot;&#39;.$guid.&#39;&quot;&gt;Permalink&lt;/a&gt;)&#39;);
157+ if(isset($link[&#39;via&#39;]) &amp;&amp; !empty($link[&#39;via&#39;])){[](.html)
158+ $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)
159+ } else {
160+ $via = &#39;&#39;;
161+ }
162 // If user wants permalinks first, put the final link in description
163 if ($usepermalinks===true) $descriptionlink = htmlspecialchars(&#39;(&lt;a href=&quot;&#39;.$absurl.&#39;&quot;&gt;Link&lt;/a&gt;)&#39;);
164 if (strlen($link[&#39;description&#39;])&gt;0) $descriptionlink = &#39;&amp;lt;br&amp;gt;&#39;.$descriptionlink;[](.html)
165
166- $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)
167+ $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)
168 if ($link[&#39;tags&#39;]!=&#39;&#39;) // Adding tags to each ATOM entry (as mentioned in ATOM specification)[](.html)
169 {
170 foreach(explode(&#39; &#39;,$link[&#39;tags&#39;]) as $tag)[](.html)
171@@ -1478,7 +1495,7 @@ function renderPage()
172 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;))
173 $url = &#39;http://&#39;.$url;
174 $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)
175- &#39;linkdate&#39;=&gt;$linkdate,&#39;tags&#39;=&gt;str_replace(&#39;,&#39;,&#39; &#39;,$tags));
176+ &#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)
177 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)
178 $LINKSDB[$linkdate] = $link;[](.html)
179 $LINKSDB-&gt;savedb(); // Save to disk.
180@@ -1556,7 +1573,8 @@ function renderPage()
181 $title = (empty($_GET[&#39;title&#39;]) ? &#39;&#39; : $_GET[&#39;title&#39;] ); // Get title if it was provided in URL (by the bookmarklet).[](.html)
182 $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)
183 $tags = (empty($_GET[&#39;tags&#39;]) ? &#39;&#39; : $_GET[&#39;tags&#39;] ); // Get tags if it was provided in URL[](.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+ $via = (empty($_GET[&#39;via&#39;]) ? &#39;&#39; : $_GET[&#39;via&#39;] );[](.html)
186+ $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)
187 if (($url!=&#39;&#39;) &amp;&amp; parse_url($url,PHP_URL_SCHEME)==&#39;&#39;) $url = &#39;http://&#39;.$url;
188 // 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.)
189 if (empty($title) &amp;&amp; parse_url($url,PHP_URL_SCHEME)==&#39;http&#39;)
190@@ -1567,7 +1585,7 @@ function renderPage()
191 {
192 // Look for charset in html header.
193 preg_match(&#39;#&lt;meta .*charset=.*&gt;#Usi&#39;, $data, $meta);
194-
195+
196 // If found, extract encoding.
197 if (!empty($meta[0]))[](.html)
198 {
199@@ -1577,7 +1595,7 @@ function renderPage()
200 $html_charset = (!empty($enc[1])) ? strtolower($enc[1]) : &#39;utf-8&#39;;[](.html)
201 }
202 else { $html_charset = &#39;utf-8&#39;; }
203-
204+
205 // Extract title
206 $title = html_extract_title($data);
207 if (!empty($title))
208@@ -1592,7 +1610,7 @@ function renderPage()
209 $url=&#39;?&#39;.smallHash($linkdate);
210 $title=&#39;Note: &#39;;
211 }
212- $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);
213+ $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);
214 }
215
216 $PAGE = new pageBuilder;
217@@ -1842,6 +1860,9 @@ function buildLinkList($PAGE,$LINKSDB)
218 $taglist = explode(&#39; &#39;,$link[&#39;tags&#39;]);[](.html)
219 uasort($taglist, &#39;strcasecmp&#39;);
220 $link[&#39;taglist&#39;]=$taglist;[](.html)
221+ if(!empty($link[&#39;via&#39;])){[](.html)
222+ $link[&#39;via&#39;]=htmlspecialchars($link[&#39;via&#39;]);[](.html)
223+ }
224 $linkDisp[$keys[$i[ = $link;](-=-$link;.html)
225 $i++;
226 }
227diff --git a/tpl/editlink.html b/tpl/editlink.html
228index 4a2c30c..14d4f9c 100644
229--- a/tpl/editlink.html
230+++ b/tpl/editlink.html
231@@ -16,6 +16,7 @@
232 &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;
233 &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;
234 &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;
235+ &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;
236 {if condition=&quot;($link_is_new &amp;&amp; $GLOBALS[&#39;privateLinkByDefault&#39;]==true) || $link.private == true&quot;}[](.html)
237 &lt;input type=&quot;checkbox&quot; checked=&quot;checked&quot; name=&quot;lf_private&quot; id=&quot;lf_private&quot;&gt;
238 &amp;nbsp;&lt;label for=&quot;lf_private&quot;&gt;&lt;i&gt;Private&lt;/i&gt;&lt;/label&gt;&lt;br&gt;
239diff --git a/tpl/linklist.html b/tpl/linklist.html
240index ddc38cb..0a8475f 100644
241--- a/tpl/linklist.html
242+++ b/tpl/linklist.html
243@@ -43,6 +43,7 @@
244 &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;
245 &lt;br&gt;
246 {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}
247+ {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}
248 {if=&quot;!$GLOBALS[&#39;config&#39;[&#39;HIDE_TIMESTAMPS&#39;] || isLoggedIn()&quot;}](&#39;HIDE_TIMESTAMPS&#39;]-||-isLoggedIn()&quot;}.html)
249 &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;
250 {else}
251--
2522.1.1</code></pre>
253</body>
254</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 25584f22..00000000
--- a/doc/FAQ.html
+++ /dev/null
@@ -1,107 +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<li><a href="REST-API.html">REST API</a></li>
36</ul></li>
37<li>How To
38<ul>
39<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
40<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>
41<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
42<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
43<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
44</ul></li>
45<li><a href="Troubleshooting.html">Troubleshooting</a></li>
46<li><a href="Development.html">Development</a>
47<ul>
48<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
49<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
50<li><a href="Directory-structure.html">Directory structure</a></li>
51<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
52<li><a href="Plugin-System.html">Plugin System</a></li>
53<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
54<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
55<li><a href="Security.html">Security</a></li>
56<li><a href="Static-analysis.html">Static analysis</a></li>
57<li><a href="Theming.html">Theming</a></li>
58<li><a href="Unit-tests.html">Unit tests</a></li>
59</ul></li>
60<li>About
61<ul>
62<li><a href="FAQ.html">FAQ</a></li>
63<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
64</ul></li>
65</ul>
66</div>
67<h1 id="faq">FAQ</h1>
68<h3 id="why-did-you-create-shaarli">Why did you create Shaarli ?</h3>
69<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>
70<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>
71<h3 id="why-use-shaarli-and-not-deliciousdiigo">Why use Shaarli and not Delicious/Diigo ?</h3>
72<p>With Shaarli:</p>
73<ul>
74<li>The data is yours: It's hosted on your server.</li>
75<li>Never fear of having your data locked-in.</li>
76<li>Never fear to have your data sold to third party.</li>
77<li>Your private links are not hosted on a third party server.</li>
78<li>You are not tracked by browser addons (like Diigo does)</li>
79<li>You can change the look and feel of the pages if you want.</li>
80<li>You can change the behaviour of the program.</li>
81<li>It's magnitude faster than most bookmarking services.</li>
82</ul>
83<h3 id="what-does-shaarli-mean">What does Shaarli mean?</h3>
84<p>Shaarli is for shaaring your links.</p>
85<h3 id="my-shaarli-is-broken">My Shaarli is broken!</h3>
86<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>
87<p>If everything looks right but the issue(s) remain(s), please:</p>
88<ul>
89<li>take a look at the <a href="Troubleshooting">troubleshooting</a> section<a href=".html"></a></li>
90<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>
91<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>
92<ul>
93<li>if you find one that is related to the issue, feel free to comment and provide additional details (host/Shaarli setup)</li>
94<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>
95<ul>
96<li><em>what happens?</em> - display glitches, invalid data, security flaws...</li>
97<li><em>what is your configuration?</em> - OS, server version, activated extensions, web browser...</li>
98<li><em>is it reproducible?</em></li>
99</ul></li>
100</ul></li>
101</ul>
102<h3 id="why-not-use-a-real-database-files-are-slow">Why not use a real database? Files are slow!</h3>
103<p>Does browsing <a href="http://sebsauvage.net/links/">this page</a> feel slow? Try browsing older pages, too.<a href=".html"></a></p>
104<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>
105<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>
106</body>
107</html>
diff --git a/doc/Firefox-share.html b/doc/Firefox-share.html
deleted file mode 100644
index 707119a6..00000000
--- a/doc/Firefox-share.html
+++ /dev/null
@@ -1,95 +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<li><a href="REST-API.html">REST API</a></li>
36</ul></li>
37<li>How To
38<ul>
39<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
40<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>
41<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
42<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
43<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
44</ul></li>
45<li><a href="Troubleshooting.html">Troubleshooting</a></li>
46<li><a href="Development.html">Development</a>
47<ul>
48<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
49<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
50<li><a href="Directory-structure.html">Directory structure</a></li>
51<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
52<li><a href="Plugin-System.html">Plugin System</a></li>
53<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
54<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
55<li><a href="Security.html">Security</a></li>
56<li><a href="Static-analysis.html">Static analysis</a></li>
57<li><a href="Theming.html">Theming</a></li>
58<li><a href="Unit-tests.html">Unit tests</a></li>
59</ul></li>
60<li>About
61<ul>
62<li><a href="FAQ.html">FAQ</a></li>
63<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
64</ul></li>
65</ul>
66</div>
67<h1 id="firefox-share">Firefox share</h1>
68<h3 id="add-shaarli-as-a-sharing-service-to-firefox">Add Shaarli as a sharing service to Firefox</h3>
69<ul>
70<li>Open your Shaarli and <code>Login</code></li>
71<li>Click the <code>Tools</code> button in the top bar</li>
72<li>Click the <code>✚Add to Firefox social</code> button and accept the activation.</li>
73</ul>
74<h3 id="sharing-links-using-firefox-share">Sharing links using Firefox share</h3>
75<ul>
76<li>Add the sharing service as described above</li>
77<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>
78<li>You can edit your link before and after saving, just like the bookmarklet above.</li>
79</ul>
80<table style="width:100%;">
81<colgroup>
82<col style="width: 8%" />
83<col style="width: 91%" />
84</colgroup>
85<thead>
86<tr class="header">
87<th></th>
88<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>
89</tr>
90</thead>
91<tbody>
92</tbody>
93</table>
94</body>
95</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 182a71d4..00000000
--- a/doc/GnuPG-signature.html
+++ /dev/null
@@ -1,175 +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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="gnupg-signature">GnuPG signature</h1>
105<h2 id="introduction">Introduction</h2>
106<h3 id="pgp-and-gpg">PGP and GPG</h3>
107<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 />
108Privacy</a> (OpenPGP) specification. Its main purposes are digital authentication,<br />
109signature and encryption.</p>
110<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>
111<ul>
112<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 />
113Keys</a></li>
114<li><a href="https://en.wikipedia.org/wiki/Revision_control">SCM</a> releases &amp; maintainer identity<a href=".html"></a></li>
115</ul>
116<h3 id="trust">Trust</h3>
117<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>
118<blockquote>
119<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>
120</blockquote>
121<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>
122<ul>
123<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>
124<li><a href="https://en.wikipedia.org/wiki/Web_of_trust">Web of trust</a><a href=".html"></a></li>
125</ul>
126<h2 id="generate-a-gpg-key">Generate a GPG key</h2>
127<ul>
128<li><a href="http://stackoverflow.com/a/16725717">Generating a GPG key for Git tagging</a> (StackOverflow)<a href=".html"></a></li>
129<li><a href="https://help.github.com/articles/generating-a-gpg-key/">Generating a GPG key</a> (GitHub)<a href=".html"></a></li>
130</ul>
131<h3 id="gpg---provide-identity-information">gpg - provide identity information</h3>
132<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">gpg</span> --gen-key
133
134<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.
135<span class="ex">This</span> is free software: you are free to change and redistribute it.
136<span class="ex">There</span> is NO WARRANTY, to the extent permitted by law.
137
138<span class="ex">Note</span>: Use <span class="st">&quot;gpg2 --full-gen-key&quot;</span> for a full featured key generation dialog.
139
140<span class="ex">GnuPG</span> needs to construct a user ID to identify your key.
141
142<span class="ex">Real</span> name: Marvin the Paranoid Android
143<span class="ex">Email</span> address: marvin@h2g2.net
144<span class="ex">You</span> selected this USER-ID:
145 <span class="st">&quot;Marvin the Paranoid Android &lt;marvin@h2g2.net&gt;&quot;</span>
146
147<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
148<span class="ex">We</span> need to generate a lot of random bytes. It is a good idea to perform
149<span class="ex">some</span> other action (type on the keyboard, move the mouse, utilize the
150<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
151<span class="ex">generator</span> a better chance to gain enough entropy.</code></pre></div>
152<h3 id="gpg---entropy-interlude">gpg - entropy interlude</h3>
153<p>At this point, you will:</p>
154<ul>
155<li>be prompted for a secure password to protect your key (the input method will depend on your Desktop Environment and configuration)</li>
156<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>
157</ul>
158<h3 id="gpg---key-creation-confirmation">gpg - key creation confirmation</h3>
159<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="ex">gpg</span>: key A9D53A3E marked as ultimately trusted
160<span class="ex">public</span> and secret key created and signed.
161
162<span class="ex">gpg</span>: checking the trustdb
163<span class="ex">gpg</span>: 3 marginal(s) <span class="ex">needed</span>, 1 complete(s) <span class="ex">needed</span>, PGP trust model
164<span class="ex">gpg</span>: depth: 0 valid: 2 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 2u
165<span class="ex">pub</span> rsa2048/A9D53A3E 2015-07-31
166 <span class="ex">Key</span> fingerprint = AF2A 5381 E54B 2FD2 14C4 A9A3 0E35 ACA4 A9D5 3A3E
167<span class="ex">uid</span> [ultimate] Marvin the Paranoid Android <span class="op">&lt;</span>marvin@h2g2.net<span class="op">&gt;</span>[](.html)
168<span class="ex">sub</span> rsa2048/8C0EACF1 2015-07-31</code></pre></div>
169<h3 id="gpg---submit-your-public-key-to-a-pgp-server-optional">gpg - submit your public key to a PGP server (Optional)</h3>
170<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">gpg</span> --keyserver pgp.mit.edu --send-keys A9D53A3E
171<span class="ex">gpg</span>: sending key A9D53A3E to hkp server pgp.mit.edu</code></pre></div>
172<h2 id="create-and-push-a-gpg-signed-tag">Create and push a GPG-signed tag</h2>
173<p>See <a href="Release-Shaarli.html">Release Shaarli</a>.</p>
174</body>
175</html>
diff --git a/doc/Home.html b/doc/Home.html
deleted file mode 100644
index 7f51b93b..00000000
--- a/doc/Home.html
+++ /dev/null
@@ -1,76 +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<li><a href="REST-API.html">REST API</a></li>
36</ul></li>
37<li>How To
38<ul>
39<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
40<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>
41<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
42<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
43<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
44</ul></li>
45<li><a href="Troubleshooting.html">Troubleshooting</a></li>
46<li><a href="Development.html">Development</a>
47<ul>
48<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
49<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
50<li><a href="Directory-structure.html">Directory structure</a></li>
51<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
52<li><a href="Plugin-System.html">Plugin System</a></li>
53<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
54<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
55<li><a href="Security.html">Security</a></li>
56<li><a href="Static-analysis.html">Static analysis</a></li>
57<li><a href="Theming.html">Theming</a></li>
58<li><a href="Unit-tests.html">Unit tests</a></li>
59</ul></li>
60<li>About
61<ul>
62<li><a href="FAQ.html">FAQ</a></li>
63<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
64</ul></li>
65</ul>
66</div>
67<h1 id="home">Home</h1>
68<h1 id="shaarli-wiki">Shaarli wiki</h1>
69<p>Welcome to the <a href="https://github.com/shaarli/Shaarli/">Shaarli</a> wiki<embed src=".html" /></p>
70<p>Here you can find some info on how to use, configure, tweak and solve problems with your Shaarli.</p>
71<p>For general info, read the <a href="https://github.com/shaarli/Shaarli/blob/master/README.md">README</a>.<a href=".html"></a></p>
72<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>
73<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>
74<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>
75</body>
76</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 123bf106..00000000
--- a/doc/Plugin-System.html
+++ /dev/null
@@ -1,634 +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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="plugin-system">Plugin System</h1>
105<p><a href="#developer-api"><strong>I am a developer.</strong> Developer API.</a><a href=".html"></a></p>
106<p><a href="#guide-for-template-designer"><strong>I am a template designer.</strong> Guide for template designer.</a><a href=".html"></a></p>
107<h2 id="developer-api">Developer API</h2>
108<h3 id="what-can-i-do-with-plugins">What can I do with plugins?</h3>
109<p>The plugin system let you:</p>
110<ul>
111<li>insert content into specific places across templates.</li>
112<li>alter data before templates rendering.</li>
113<li>alter data before saving new links.</li>
114</ul>
115<h3 id="how-can-i-create-a-plugin-for-shaarli">How can I create a plugin for Shaarli?</h3>
116<p>First, chose a plugin name, such as <code>demo_plugin</code>.</p>
117<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>
118<p>You should have the following tree view:</p>
119<pre><code>| index.php
120| plugins/
121|---| demo_plugin/
122| |---| demo_plugin.php</code></pre>
123<h3 id="plugin-initialization">Plugin initialization</h3>
124<p>At the beginning of Shaarli execution, all enabled plugins are loaded. At this point, the plugin system looks for an <code>init()</code> function to execute and run it if it exists. This function must be named this way, and takes the <code>ConfigManager</code> as parameter.</p>
125<pre><code>&lt;plugin_name&gt;_init($conf)</code></pre>
126<p>This function can be used to create initial data, load default settings, etc. But also to set <em>plugin errors</em>. If the initialization function returns an array of strings, they will be understand as errors, and displayed in the header to logged in users.</p>
127<h3 id="understanding-hooks">Understanding hooks</h3>
128<p>A plugin is a set of functions. Each function will be triggered by the plugin system at certain point in Shaarli execution.</p>
129<p>These functions need to be named with this pattern:</p>
130<pre><code>hook_&lt;plugin_name&gt;_&lt;hook_name&gt;($data, $conf)</code></pre>
131<p>Parameters:</p>
132<ul>
133<li>data: see <a href="https://github.com/shaarli/Shaarli/wiki/Plugin-System#plugins-data">$data section</a><a href=".html"></a></li>
134<li>conf: the <code>ConfigManager</code> instance.</li>
135</ul>
136<p>For exemple, if my plugin want to add data to the header, this function is needed:</p>
137<pre><code>hook_demo_plugin_render_header</code></pre>
138<p>If this function is declared, and the plugin enabled, it will be called every time Shaarli is rendering the header.</p>
139<h3 id="plugins-data">Plugin's data</h3>
140<h4 id="parameters">Parameters</h4>
141<p>Every hook function has a <code>$data</code> parameter. Its content differs for each hooks.</p>
142<p><strong>This parameter needs to be returned every time</strong>, otherwise data is lost.</p>
143<pre><code>return $data;</code></pre>
144<h4 id="filling-templates-placeholder">Filling templates placeholder</h4>
145<p>Template placeholders are displayed in template in specific places.</p>
146<p>RainTPL displays every element contained in the placeholder's array. These element can be added by plugins.</p>
147<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>
148<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>
149<span class="co"># OR</span>
150<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>
151
152<span class="kw">return</span> <span class="kw">$data</span><span class="ot">;</span></code></pre></div>
153<h4 id="data-manipulation">Data manipulation</h4>
154<p>When a page is displayed, every variable send to the template engine is passed to plugins before that in <code>$data</code>.</p>
155<p>The data contained by this array can be altered before template rendering.</p>
156<p>For exemple, in linklist, it is possible to alter every title:</p>
157<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>
158<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>
159 <span class="co">// String reverse every title.</span>
160 <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>
161}
162
163<span class="kw">return</span> <span class="kw">$data</span><span class="ot">;</span></code></pre></div>
164<h3 id="metadata">Metadata</h3>
165<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>
166<p>Each file contain two keys:</p>
167<ul>
168<li><code>description</code>: plugin description</li>
169<li><code>parameters</code>: user parameter names, separated by a <code>;</code>.</li>
170<li><code>parameter.&lt;PARAMETER_NAME&gt;</code>: add a text description the specified parameter.</li>
171</ul>
172<blockquote>
173<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>
174</blockquote>
175<h3 id="its-not-working">It's not working!</h3>
176<p>Use <code>demo_plugin</code> as a functional example. It covers most of the plugin system features.</p>
177<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>
178<h3 id="hooks">Hooks</h3>
179<table style="width:42%;">
180<colgroup>
181<col style="width: 19%" />
182<col style="width: 22%" />
183</colgroup>
184<thead>
185<tr class="header">
186<th>Hooks</th>
187<th style="text-align: center;">Description</th>
188</tr>
189</thead>
190<tbody>
191<tr class="odd">
192<td><a href="#render_header">render_header</a></td>
193<td style="text-align: center;">Allow plugin to add content in page headers.</td>
194</tr>
195<tr class="even">
196<td><a href="#render_includes">render_includes</a></td>
197<td style="text-align: center;">Allow plugin to include their own CSS files.</td>
198</tr>
199<tr class="odd">
200<td><a href="#render_footer">render_footer</a></td>
201<td style="text-align: center;">Allow plugin to add content in page footer and include their own JS files.</td>
202</tr>
203<tr class="even">
204<td><a href="#render_linklist">render_linklist</a></td>
205<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>
206</tr>
207<tr class="odd">
208<td><a href="#render_editlink">render_editlink</a></td>
209<td style="text-align: center;">Allow to add fields in the form, or display elements.</td>
210</tr>
211<tr class="even">
212<td><a href="#render_tools">render_tools</a></td>
213<td style="text-align: center;">Allow to add content at the end of the page.</td>
214</tr>
215<tr class="odd">
216<td><a href="#render_picwall">render_picwall</a></td>
217<td style="text-align: center;">Allow to add content at the top and bottom of the page.</td>
218</tr>
219<tr class="even">
220<td><a href="#render_tagcloud">render_tagcloud</a></td>
221<td style="text-align: center;">Allow to add content at the top and bottom of the page, and after all tags.</td>
222</tr>
223<tr class="odd">
224<td><a href="#render_taglist">render_taglist</a></td>
225<td style="text-align: center;">Allow to add content at the top and bottom of the page, and after all tags.</td>
226</tr>
227<tr class="even">
228<td><a href="#render_daily">render_daily</a></td>
229<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>
230</tr>
231<tr class="odd">
232<td><a href="#render_feed">render_feed</a></td>
233<td style="text-align: center;">Allow to do add tags in RSS and ATOM feeds.</td>
234</tr>
235<tr class="even">
236<td><a href="#save_link">save_link</a></td>
237<td style="text-align: center;">Allow to alter the link being saved in the datastore.</td>
238</tr>
239<tr class="odd">
240<td><a href="#delete_link">delete_link</a></td>
241<td style="text-align: center;">Allow to do an action before a link is deleted from the datastore.</td>
242</tr>
243</tbody>
244</table>
245<h4 id="render_header">render_header</h4>
246<p>Triggered on every page.</p>
247<p>Allow plugin to add content in page headers.</p>
248<h5 id="data">Data</h5>
249<p><code>$data</code> is an array containing:</p>
250<ul>
251<li><code>_PAGE_</code>: current target page (eg: <code>linklist</code>, <code>picwall</code>, etc.).</li>
252<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
253</ul>
254<h5 id="template-placeholders">Template placeholders</h5>
255<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
256<p>List of placeholders:</p>
257<ul>
258<li><code>buttons_toolbar</code>: after the list of buttons in the header.</li>
259</ul>
260<p><img src="http://i.imgur.com/ssJUOrt.png" alt="buttons_toolbar_example" /><a href=".html"></a></p>
261<ul>
262<li><code>fields_toolbar</code>: after search fields in the header.</li>
263</ul>
264<blockquote>
265<p>Note: This will only be called in linklist.</p>
266</blockquote>
267<p><img src="http://i.imgur.com/3GMifI2.png" alt="fields_toolbar_example" /><a href=".html"></a></p>
268<h4 id="render_includes">render_includes</h4>
269<p>Triggered on every page.</p>
270<p>Allow plugin to include their own CSS files.</p>
271<h5 id="data-1">Data</h5>
272<p><code>$data</code> is an array containing:</p>
273<ul>
274<li><code>_PAGE_</code>: current target page (eg: <code>linklist</code>, <code>picwall</code>, etc.).</li>
275<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
276</ul>
277<h5 id="template-placeholders-1">Template placeholders</h5>
278<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
279<p>List of placeholders:</p>
280<ul>
281<li><code>css_files</code>: called after loading default CSS.</li>
282</ul>
283<blockquote>
284<p>Note: only add the path of the CSS file. E.g: <code>plugins/demo_plugin/custom_demo.css</code>.</p>
285</blockquote>
286<h4 id="render_footer">render_footer</h4>
287<p>Triggered on every page.</p>
288<p>Allow plugin to add content in page footer and include their own JS files.</p>
289<h5 id="data-2">Data</h5>
290<p><code>$data</code> is an array containing:</p>
291<ul>
292<li><code>_PAGE_</code>: current target page (eg: <code>linklist</code>, <code>picwall</code>, etc.).</li>
293<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
294</ul>
295<h5 id="template-placeholders-2">Template placeholders</h5>
296<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
297<p>List of placeholders:</p>
298<ul>
299<li><code>text</code>: called after the end of the footer text.</li>
300<li><code>endofpage</code>: called at the end of the page.</li>
301</ul>
302<p><img src="http://i.imgur.com/L5S2YEH.png" alt="text_example" /><a href=".html"></a></p>
303<ul>
304<li><code>js_files</code>: called at the end of the page, to include custom JS scripts.</li>
305</ul>
306<blockquote>
307<p>Note: only add the path of the JS file. E.g: <code>plugins/demo_plugin/custom_demo.js</code>.</p>
308</blockquote>
309<h4 id="render_linklist">render_linklist</h4>
310<p>Triggered when <code>linklist</code> is displayed (list of links, permalink, search, tag filtered, etc.).</p>
311<p>It allows to add content at the begining and end of the page, after every link displayed and to alter link data.</p>
312<h5 id="data-3">Data</h5>
313<p><code>$data</code> is an array containing:</p>
314<ul>
315<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
316<li>All templates data, including links.</li>
317</ul>
318<h5 id="template-placeholders-3">Template placeholders</h5>
319<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
320<p>List of placeholders:</p>
321<ul>
322<li><code>action_plugin</code>: next to the button &quot;private only&quot; at the top and bottom of the page.</li>
323</ul>
324<p><img src="http://i.imgur.com/Q12PWg0.png" alt="action_plugin_example" /><a href=".html"></a></p>
325<ul>
326<li><code>link_plugin</code>: for every link, between permalink and link URL.</li>
327</ul>
328<p><img src="http://i.imgur.com/3oDPhWx.png" alt="link_plugin_example" /><a href=".html"></a></p>
329<ul>
330<li><code>plugin_start_zone</code>: before displaying the template content.</li>
331</ul>
332<p><img src="http://i.imgur.com/OVBkGy3.png" alt="plugin_start_zone_example" /><a href=".html"></a></p>
333<ul>
334<li><code>plugin_end_zone</code>: after displaying the template content.</li>
335</ul>
336<p><img src="http://i.imgur.com/6IoRuop.png" alt="plugin_end_zone_example" /><a href=".html"></a></p>
337<h4 id="render_editlink">render_editlink</h4>
338<p>Triggered when the link edition form is displayed.</p>
339<p>Allow to add fields in the form, or display elements.</p>
340<h5 id="data-4">Data</h5>
341<p><code>$data</code> is an array containing:</p>
342<ul>
343<li>All templates data.</li>
344</ul>
345<h5 id="template-placeholders-4">Template placeholders</h5>
346<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
347<p>List of placeholders:</p>
348<ul>
349<li><code>edit_link_plugin</code>: after tags field.</li>
350</ul>
351<p><img src="http://i.imgur.com/5u17Ens.png" alt="edit_link_plugin_example" /><a href=".html"></a></p>
352<h4 id="render_tools">render_tools</h4>
353<p>Triggered when the &quot;tools&quot; page is displayed.</p>
354<p>Allow to add content at the end of the page.</p>
355<h5 id="data-5">Data</h5>
356<p><code>$data</code> is an array containing:</p>
357<ul>
358<li>All templates data.</li>
359</ul>
360<h5 id="template-placeholders-5">Template placeholders</h5>
361<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
362<p>List of placeholders:</p>
363<ul>
364<li><code>tools_plugin</code>: at the end of the page.</li>
365</ul>
366<p><img src="http://i.imgur.com/Bqhu9oQ.png" alt="tools_plugin_example" /><a href=".html"></a></p>
367<h4 id="render_picwall">render_picwall</h4>
368<p>Triggered when picwall is displayed.</p>
369<p>Allow to add content at the top and bottom of the page.</p>
370<h5 id="data-6">Data</h5>
371<p><code>$data</code> is an array containing:</p>
372<ul>
373<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
374<li>All templates data.</li>
375</ul>
376<h5 id="template-placeholders-6">Template placeholders</h5>
377<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
378<p>List of placeholders:</p>
379<ul>
380<li><p><code>plugin_start_zone</code>: before displaying the template content.</p></li>
381<li><p><code>plugin_end_zone</code>: after displaying the template content.</p></li>
382</ul>
383<p><img src="http://i.imgur.com/tVTQFER.png" alt="plugin_start_end_zone_example" /><a href=".html"></a></p>
384<h4 id="render_tagcloud">render_tagcloud</h4>
385<p>Triggered when tagcloud is displayed.</p>
386<p>Allow to add content at the top and bottom of the page.</p>
387<h5 id="data-7">Data</h5>
388<p><code>$data</code> is an array containing:</p>
389<ul>
390<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
391<li>All templates data.</li>
392</ul>
393<h5 id="template-placeholders-7">Template placeholders</h5>
394<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
395<p>List of placeholders:</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<p>For each tag, the following placeholder can be used:</p>
401<ul>
402<li><code>tag_plugin</code>: after each tag</li>
403</ul>
404<p><img src="http://i.imgur.com/vHmyT3a.png" alt="plugin_start_end_zone_example" /><a href=".html"></a></p>
405<h4 id="render_taglist">render_taglist</h4>
406<p>Triggered when taglist is displayed.</p>
407<p>Allow to add content at the top and bottom of the page.</p>
408<h5 id="data-8">Data</h5>
409<p><code>$data</code> is an array containing:</p>
410<ul>
411<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
412<li>All templates data.</li>
413</ul>
414<h5 id="template-placeholders-8">Template placeholders</h5>
415<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
416<p>List of placeholders:</p>
417<ul>
418<li><p><code>plugin_start_zone</code>: before displaying the template content.</p></li>
419<li><p><code>plugin_end_zone</code>: after displaying the template content.</p></li>
420</ul>
421<p>For each tag, the following placeholder can be used:</p>
422<ul>
423<li><code>tag_plugin</code>: after each tag</li>
424</ul>
425<h4 id="render_daily">render_daily</h4>
426<p>Triggered when tagcloud is displayed.</p>
427<p>Allow to add content at the top and bottom of the page, the bottom of each link and to alter data.</p>
428<h5 id="data-9">Data</h5>
429<p><code>$data</code> is an array containing:</p>
430<ul>
431<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
432<li>All templates data, including links.</li>
433</ul>
434<h5 id="template-placeholders-9">Template placeholders</h5>
435<p>Items can be displayed in templates by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
436<p>List of placeholders:</p>
437<ul>
438<li><code>link_plugin</code>: used at bottom of each link.</li>
439</ul>
440<p><img src="http://i.imgur.com/hzhMfSZ.png" alt="link_plugin_example" /><a href=".html"></a></p>
441<ul>
442<li><p><code>plugin_start_zone</code>: before displaying the template content.</p></li>
443<li><p><code>plugin_end_zone</code>: after displaying the template content.</p></li>
444</ul>
445<h4 id="render_feed">render_feed</h4>
446<p>Triggered when the ATOM or RSS feed is displayed.</p>
447<p>Allow to add tags in the feed, either in the header or for each items. Items (links) can also be altered before being rendered.</p>
448<h5 id="data-10">Data</h5>
449<p><code>$data</code> is an array containing:</p>
450<ul>
451<li><code>_LOGGEDIN_</code>: true if user is logged in, false otherwise.</li>
452<li><code>_PAGE_</code>: containing either <code>rss</code> or <code>atom</code>.</li>
453<li>All templates data, including links.</li>
454</ul>
455<h5 id="template-placeholders-10">Template placeholders</h5>
456<p>Tags can be added in feeds by adding an entry in <code>$data['&lt;placeholder&gt;']</code> array.<a href=".html"></a></p>
457<p>List of placeholders:</p>
458<ul>
459<li><code>feed_plugins_header</code>: used as a header tag in the feed.</li>
460</ul>
461<p>For each links:</p>
462<ul>
463<li><code>feed_plugins</code>: additional tag for every link entry.</li>
464</ul>
465<h4 id="save_link">save_link</h4>
466<p>Triggered when a link is save (new link or edit).</p>
467<p>Allow to alter the link being saved in the datastore.</p>
468<h5 id="data-11">Data</h5>
469<p><code>$data</code> is an array containing the link being saved:</p>
470<ul>
471<li>id</li>
472<li>title</li>
473<li>url</li>
474<li>shorturl</li>
475<li>description</li>
476<li>private</li>
477<li>tags</li>
478<li>created</li>
479<li>updated</li>
480</ul>
481<h4 id="delete_link">delete_link</h4>
482<p>Triggered when a link is deleted.</p>
483<p>Allow to execute any action before the link is actually removed from the datastore</p>
484<h5 id="data-12">Data</h5>
485<p><code>$data</code> is an array containing the link being saved:</p>
486<ul>
487<li>id</li>
488<li>title</li>
489<li>url</li>
490<li>shorturl</li>
491<li>description</li>
492<li>private</li>
493<li>tags</li>
494<li>created</li>
495<li>updated</li>
496</ul>
497<h2 id="guide-for-template-designer">Guide for template designer</h2>
498<h3 id="plugin-administration">Plugin administration</h3>
499<p>Your theme must include a plugin administration page: <code>pluginsadmin.html</code>.</p>
500<blockquote>
501<p>Note: repo's template link needs to be added when the PR is merged.</p>
502</blockquote>
503<p>Use the default one as an example.</p>
504<p>Aside from classic RainTPL loops, plugins order is handle by JavaScript. You can just include <code>plugin_admin.js</code>, only if:</p>
505<ul>
506<li>you're using a table.</li>
507<li>you call orderUp() and orderUp() onclick on arrows.</li>
508<li>you add data-line and data-order to your rows.</li>
509</ul>
510<p>Otherwise, you can use your own JS as long as this field is send by the form:</p>
511<p><input type="hidden" name="order_{$key}" value="{$counter}"></p>
512<h3 id="placeholder-system">Placeholder system</h3>
513<p>In order to make plugins work with every custom themes, you need to add variable placeholder in your templates.</p>
514<p>It's a RainTPL loop like this:</p>
515<pre><code>{loop=&quot;$plugin_variable&quot;}
516 {$value}
517{/loop}</code></pre>
518<p>You should enable <code>demo_plugin</code> for testing purpose, since it uses every placeholder available.</p>
519<h3 id="list-of-placeholders">List of placeholders</h3>
520<p><strong>page.header.html</strong></p>
521<p>At the end of the menu:</p>
522<pre><code>{loop=&quot;$plugins_header.buttons_toolbar&quot;}
523 {$value}
524{/loop}</code></pre>
525<p>At the end of file, before clearing floating blocks:</p>
526<pre><code>{if=&quot;!empty($plugin_errors) &amp;&amp; isLoggedIn()&quot;}
527 &lt;ul class=&quot;errors&quot;&gt;
528 {loop=&quot;plugin_errors&quot;}
529 &lt;li&gt;{$value}&lt;/li&gt;
530 {/loop}
531 &lt;/ul&gt;
532{/if}</code></pre>
533<p><strong>includes.html</strong></p>
534<p>At the end of the file:</p>
535<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$plugins_includes.css_files&quot;}
536<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>
537{/loop}</code></pre></div>
538<p><strong>page.footer.html</strong></p>
539<p>At the end of your footer notes:</p>
540<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$plugins_footer.text&quot;}
541 {$value}
542{/loop}</code></pre></div>
543<p>At the end of file:</p>
544<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$plugins_footer.js_files&quot;}
545 <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>
546{/loop}</code></pre></div>
547<p><strong>linklist.html</strong></p>
548<p>After search fields:</p>
549<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$plugins_header.fields_toolbar&quot;}
550 {$value}
551{/loop}</code></pre></div>
552<p>Before displaying the link list (after paging):</p>
553<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$plugin_start_zone&quot;}
554 {$value}
555{/loop}</code></pre></div>
556<p>For every links (icons):</p>
557<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$value.link_plugin&quot;}
558 <span class="kw">&lt;span&gt;</span>{$value}<span class="kw">&lt;/span&gt;</span>
559{/loop}</code></pre></div>
560<p>Before end paging:</p>
561<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$plugin_end_zone&quot;}
562 {$value}
563{/loop}</code></pre></div>
564<p><strong>linklist.paging.html</strong></p>
565<p>After the &quot;private only&quot; icon:</p>
566<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$action_plugin&quot;}
567 {$value}
568{/loop}</code></pre></div>
569<p><strong>editlink.html</strong></p>
570<p>After tags field:</p>
571<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$edit_link_plugin&quot;}
572 {$value}
573{/loop}</code></pre></div>
574<p><strong>tools.html</strong></p>
575<p>After the last tool:</p>
576<div class="sourceCode"><pre class="sourceCode html"><code class="sourceCode html">{loop=&quot;$tools_plugin&quot;}
577 {$value}
578{/loop}</code></pre></div>
579<p><strong>picwall.html</strong></p>
580<p>Top:</p>
581<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>
582 {loop=&quot;$plugin_start_zone&quot;}
583 {$value}
584 {/loop}
585<span class="kw">&lt;/div&gt;</span></code></pre></div>
586<p>Bottom:</p>
587<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>
588 {loop=&quot;$plugin_end_zone&quot;}
589 {$value}
590 {/loop}
591<span class="kw">&lt;/div&gt;</span></code></pre></div>
592<p><strong>tagcloud.html</strong></p>
593<p>Top:</p>
594<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>
595 {loop=&quot;$plugin_start_zone&quot;}
596 {$value}
597 {/loop}
598 <span class="kw">&lt;/div&gt;</span></code></pre></div>
599<p>Bottom:</p>
600<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>
601 {loop=&quot;$plugin_end_zone&quot;}
602 {$value}
603 {/loop}
604 <span class="kw">&lt;/div&gt;</span></code></pre></div>
605<p><strong>daily.html</strong></p>
606<p>Top:</p>
607<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>
608 {loop=&quot;$plugin_start_zone&quot;}
609 {$value}
610 {/loop}
611<span class="kw">&lt;/div&gt;</span></code></pre></div>
612<p>After every link:</p>
613<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>
614 {loop=&quot;$link.link_plugin&quot;}
615 {$value}
616 {/loop}
617<span class="kw">&lt;/div&gt;</span></code></pre></div>
618<p>Bottom:</p>
619<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>
620 {loop=&quot;$plugin_end_zone&quot;}
621 {$value}
622 {/loop}
623<span class="kw">&lt;/div&gt;</span></code></pre></div>
624<p><strong>feed.atom.xml</strong> and <strong>feed.rss.xml</strong>:</p>
625<p>In headers tags section:</p>
626<div class="sourceCode"><pre class="sourceCode xml"><code class="sourceCode xml">{loop=&quot;$feed_plugins_header&quot;}
627 {$value}
628{/loop}</code></pre></div>
629<p>After each entry:</p>
630<div class="sourceCode"><pre class="sourceCode xml"><code class="sourceCode xml">{loop=&quot;$value.feed_plugins&quot;}
631 {$value}
632{/loop}</code></pre></div>
633</body>
634</html>
diff --git a/doc/Plugins.html b/doc/Plugins.html
deleted file mode 100644
index 08ce8a86..00000000
--- a/doc/Plugins.html
+++ /dev/null
@@ -1,155 +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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="plugins">Plugins</h1>
105<h2 id="plugin-installation">Plugin installation</h2>
106<p>There is a bunch of plugins shipped with Shaarli, where there is nothing to do to install them.</p>
107<p>If you want to install a third party plugin:</p>
108<ul>
109<li>Download it.</li>
110<li>Put it in the <code>plugins</code> directory in Shaarli's installation folder.</li>
111<li>Make sure you put it correctly:</li>
112</ul>
113<pre><code>| index.php
114| plugins/
115|---| custom_plugin/
116| |---| custom_plugin.php
117| |---| ...
118</code></pre>
119<ul>
120<li>Make sure your webserver can read and write the files in your plugin folder.</li>
121</ul>
122<h2 id="plugin-configuration">Plugin configuration</h2>
123<p>In Shaarli's administration page (<code>Tools</code> link), go to <code>Plugin administration</code>.</p>
124<p>Here you can enable and disable all plugins available, and configure them.</p>
125<p><img src="https://camo.githubusercontent.com/5da68e191969007492ca0fbeb25f3b2357b748cc/687474703a2f2f692e696d6775722e636f6d2f766837544643712e706e67" alt="administration screenshot" /><a href=".html"></a></p>
126<h2 id="plugin-order">Plugin order</h2>
127<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>
128<p>This is important in case plugins are depending on each other. Read plugins README details for more information.</p>
129<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>
130<h2 id="file-mode">File mode</h2>
131<p>Enabled plugin are stored in your <code>config.php</code> parameters file, under the <code>array</code>:</p>
132<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>
133<p>You can edit them manually here.<br />
134Example:</p>
135<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>
136 <span class="st">&#39;qrcode&#39;</span><span class="ot">,</span>
137 <span class="st">&#39;archiveorg&#39;</span><span class="ot">,</span>
138 <span class="st">&#39;wallabag&#39;</span><span class="ot">,</span>
139 <span class="st">&#39;markdown&#39;</span><span class="ot">,</span>
140<span class="ot">);</span></code></pre></div>
141<h3 id="plugin-usage">Plugin usage</h3>
142<h4 id="official-plugins">Official plugins</h4>
143<p>Usage of each plugin is documented in it's README file:</p>
144<ul>
145<li><code>addlink-toolbar</code>: Adds the addlink input on the linklist page</li>
146<li><code>archiveorg</code>: For each link, add an Archive.org icon</li>
147<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>
148<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>
149<li><code>qrcode</code>: For each link, add a QRCode icon.</li>
150<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>
151</ul>
152<h4 id="third-party-plugins">Third party plugins</h4>
153<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>
154</body>
155</html>
diff --git a/doc/REST-API.html b/doc/REST-API.html
deleted file mode 100644
index d14c98c9..00000000
--- a/doc/REST-API.html
+++ /dev/null
@@ -1,169 +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 – REST API</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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="rest-api">REST API</h1>
105<h2 id="usage">Usage</h2>
106<p>See the <a href="http://shaarli.github.io/api-documentation/">REST API documentation</a>.<a href=".html"></a></p>
107<h2 id="authentication">Authentication</h2>
108<p>All requests to Shaarli's API must include a JWT token to verify their authenticity.</p>
109<p>This token has to be included as an HTTP header called <code>Authentication: Bearer &lt;jwt token&gt;</code>.</p>
110<p>JWT resources :</p>
111<ul>
112<li><a href="https://jwt.io">jwt.io</a> (including a list of client per language).<a href=".html"></a></li>
113<li>RFC : <a href="https://tools.ietf.org/html/rfc7519" class="uri">https://tools.ietf.org/html/rfc7519</a></li>
114<li><a href="https://float-middle.com/json-web-tokens-jwt-vs-sessions/" class="uri">https://float-middle.com/json-web-tokens-jwt-vs-sessions/</a></li>
115<li>HackerNews thread: <a href="https://news.ycombinator.com/item?id=11929267" class="uri">https://news.ycombinator.com/item?id=11929267</a></li>
116</ul>
117<h3 id="shaarli-jwt-token">Shaarli JWT Token</h3>
118<p>JWT tokens are composed by three parts, separated by a dot <code>.</code> and encoded in base64:</p>
119<pre><code>[header].[payload].[signature][](.html)</code></pre>
120<h4 id="header">Header</h4>
121<p>Shaarli only allow one hash algorithm, so the header will always be the same:</p>
122<div class="sourceCode"><pre class="sourceCode json"><code class="sourceCode json"><span class="fu">{</span>
123 <span class="dt">&quot;typ&quot;</span><span class="fu">:</span> <span class="st">&quot;JWT&quot;</span><span class="fu">,</span>
124 <span class="dt">&quot;alg&quot;</span><span class="fu">:</span> <span class="st">&quot;HS512&quot;</span>
125<span class="fu">}</span></code></pre></div>
126<p>Encoded in base64, it gives:</p>
127<pre><code>ewogICAgICAgICJ0eXAiOiAiSldUIiwKICAgICAgICAiYWxnIjogIkhTNTEyIgogICAgfQ==</code></pre>
128<h4 id="payload">Payload</h4>
129<p><strong>Validity duration</strong></p>
130<p>To avoid infinite token validity, JWT tokens must include their creation date in UNIX timestamp format (timezone independant - UTC) under the key <code>iat</code> (issued at). This token will be accepted during 9 minutes.</p>
131<div class="sourceCode"><pre class="sourceCode json"><code class="sourceCode json"><span class="fu">{</span>
132 <span class="dt">&quot;iat&quot;</span><span class="fu">:</span> <span class="dv">1468663519</span>
133<span class="fu">}</span></code></pre></div>
134<p>See <a href="https://tools.ietf.org/html/rfc7519#section-4.1.6">RFC reference</a>.<a href=".html"></a></p>
135<h4 id="signature">Signature</h4>
136<p>The signature authenticate the token validity. It contains the base64 of the header and the body, separated by a dot <code>.</code>, hashed in SHA512 with the API secret available in Shaarli administration page.</p>
137<p>Signature example with PHP:</p>
138<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php"><span class="kw">$content</span> = <span class="fu">base64_encode</span><span class="ot">(</span><span class="kw">$header</span><span class="ot">)</span> . <span class="st">&#39;.&#39;</span> . <span class="fu">base64_encode</span><span class="ot">(</span><span class="kw">$payload</span><span class="ot">);</span>
139<span class="kw">$signature</span> = <span class="fu">hash_hmac</span><span class="ot">(</span><span class="st">&#39;sha512&#39;</span><span class="ot">,</span> <span class="kw">$content</span><span class="ot">,</span> <span class="kw">$secret</span><span class="ot">);</span></code></pre></div>
140<h3 id="complete-example">Complete example</h3>
141<h4 id="php">PHP</h4>
142<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php"><span class="kw">function</span> generateToken<span class="ot">(</span><span class="kw">$secret</span><span class="ot">)</span> {
143 <span class="kw">$header</span> = <span class="fu">base64_encode</span><span class="ot">(</span><span class="st">&#39;{</span>
144<span class="st"> &quot;typ&quot;: &quot;JWT&quot;,</span>
145<span class="st"> &quot;alg&quot;: &quot;HS512&quot;</span>
146<span class="st"> }&#39;</span><span class="ot">);</span>
147 <span class="kw">$payload</span> = <span class="fu">base64_encode</span><span class="ot">(</span><span class="st">&#39;{</span>
148<span class="st"> &quot;iat&quot;: &#39;</span>. <span class="fu">time</span><span class="ot">()</span> .<span class="st">&#39;</span>
149<span class="st"> }&#39;</span><span class="ot">);</span>
150 <span class="kw">$signature</span> = <span class="fu">hash_hmac</span><span class="ot">(</span><span class="st">&#39;sha512&#39;</span><span class="ot">,</span> <span class="kw">$header</span> .<span class="st">&#39;.&#39;</span>. <span class="kw">$payload</span> <span class="ot">,</span> <span class="kw">$secret</span><span class="ot">);</span>
151 <span class="kw">return</span> <span class="kw">$header</span> .<span class="st">&#39;.&#39;</span>. <span class="kw">$payload</span> .<span class="st">&#39;.&#39;</span>. <span class="kw">$signature</span><span class="ot">;</span>
152}
153
154<span class="kw">$secret</span> = <span class="st">&#39;mysecret&#39;</span><span class="ot">;</span>
155<span class="kw">$token</span> = generateToken<span class="ot">(</span><span class="kw">$secret</span><span class="ot">);</span>
156<span class="fu">echo</span> <span class="kw">$token</span><span class="ot">;</span></code></pre></div>
157<blockquote>
158<p><code>ewogICAgICAgICJ0eXAiOiAiSldUIiwKICAgICAgICAiYWxnIjogIkhTNTEyIgogICAgfQ==.ewogICAgICAgICJpYXQiOiAxNDY4NjY3MDQ3CiAgICB9.1d2c54fa947daf594fdbf7591796195652c8bc63bffad7f6a6db2a41c313f495a542cbfb595acade79e83f3810d709b4251d7b940bbc10b531a6e6134af63a68</code></p>
159</blockquote>
160<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php"><span class="kw">$options</span> = <span class="ot">[[](</span>.html<span class="ot">)</span>
161 <span class="st">&#39;http&#39;</span> =&gt; <span class="ot">[[](</span>.html<span class="ot">)</span>
162 <span class="st">&#39;method&#39;</span> =&gt; <span class="st">&#39;GET&#39;</span><span class="ot">,</span>
163 <span class="st">&#39;jwt&#39;</span> =&gt; <span class="kw">$token</span><span class="ot">,</span>
164 <span class="ot">],</span>
165<span class="ot">];</span>
166<span class="kw">$context</span> = <span class="fu">stream_context_create</span><span class="ot">(</span><span class="kw">$options</span><span class="ot">);</span>
167<span class="fu">file_get_contents</span><span class="ot">(</span><span class="kw">$apiEndpoint</span><span class="ot">,</span> <span class="kw">false</span><span class="ot">,</span> <span class="kw">$context</span><span class="ot">);</span></code></pre></div>
168</body>
169</html>
diff --git a/doc/REST-API.md b/doc/REST-API.md
deleted file mode 100644
index d7909978..00000000
--- a/doc/REST-API.md
+++ /dev/null
@@ -1,105 +0,0 @@
1#REST API
2## Usage
3
4See the [REST API documentation](http://shaarli.github.io/api-documentation/).[](.html)
5
6## Authentication
7
8All requests to Shaarli's API must include a JWT token to verify their authenticity.
9
10This token has to be included as an HTTP header called `Authentication: Bearer <jwt token>`.
11
12JWT resources :
13
14 * [jwt.io](https://jwt.io) (including a list of client per language).[](.html)
15 * RFC : https://tools.ietf.org/html/rfc7519
16 * https://float-middle.com/json-web-tokens-jwt-vs-sessions/
17 * HackerNews thread: https://news.ycombinator.com/item?id=11929267
18
19
20### Shaarli JWT Token
21
22JWT tokens are composed by three parts, separated by a dot `.` and encoded in base64:
23
24```
25[header].[payload].[signature][](.html)
26```
27
28#### Header
29
30Shaarli only allow one hash algorithm, so the header will always be the same:
31
32```json
33{
34 "typ": "JWT",
35 "alg": "HS512"
36}
37```
38
39Encoded in base64, it gives:
40
41```
42ewogICAgICAgICJ0eXAiOiAiSldUIiwKICAgICAgICAiYWxnIjogIkhTNTEyIgogICAgfQ==
43```
44
45#### Payload
46
47**Validity duration**
48
49To avoid infinite token validity, JWT tokens must include their creation date in UNIX timestamp format (timezone independant - UTC) under the key `iat` (issued at). This token will be accepted during 9 minutes.
50
51```json
52{
53 "iat": 1468663519
54}
55```
56
57See [RFC reference](https://tools.ietf.org/html/rfc7519#section-4.1.6).[](.html)
58
59
60#### Signature
61
62The 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.
63
64Signature example with PHP:
65
66```php
67$content = base64_encode($header) . '.' . base64_encode($payload);
68$signature = hash_hmac('sha512', $content, $secret);
69```
70
71
72### Complete example
73
74#### PHP
75
76```php
77function generateToken($secret) {
78 $header = base64_encode('{
79 "typ": "JWT",
80 "alg": "HS512"
81 }');
82 $payload = base64_encode('{
83 "iat": '. time() .'
84 }');
85 $signature = hash_hmac('sha512', $header .'.'. $payload , $secret);
86 return $header .'.'. $payload .'.'. $signature;
87}
88
89$secret = 'mysecret';
90$token = generateToken($secret);
91echo $token;
92```
93
94> `ewogICAgICAgICJ0eXAiOiAiSldUIiwKICAgICAgICAiYWxnIjogIkhTNTEyIgogICAgfQ==.ewogICAgICAgICJpYXQiOiAxNDY4NjY3MDQ3CiAgICB9.1d2c54fa947daf594fdbf7591796195652c8bc63bffad7f6a6db2a41c313f495a542cbfb595acade79e83f3810d709b4251d7b940bbc10b531a6e6134af63a68`
95
96```php
97$options = [[](.html)
98 'http' => [[](.html)
99 'method' => 'GET',
100 'jwt' => $token,
101 ],
102];
103$context = stream_context_create($options);
104file_get_contents($apiEndpoint, false, $context);
105```
diff --git a/doc/RSS-feeds.html b/doc/RSS-feeds.html
deleted file mode 100644
index 0ebfecc6..00000000
--- a/doc/RSS-feeds.html
+++ /dev/null
@@ -1,99 +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<li><a href="REST-API.html">REST API</a></li>
36</ul></li>
37<li>How To
38<ul>
39<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
40<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>
41<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
42<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
43<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
44</ul></li>
45<li><a href="Troubleshooting.html">Troubleshooting</a></li>
46<li><a href="Development.html">Development</a>
47<ul>
48<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
49<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
50<li><a href="Directory-structure.html">Directory structure</a></li>
51<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
52<li><a href="Plugin-System.html">Plugin System</a></li>
53<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
54<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
55<li><a href="Security.html">Security</a></li>
56<li><a href="Static-analysis.html">Static analysis</a></li>
57<li><a href="Theming.html">Theming</a></li>
58<li><a href="Unit-tests.html">Unit tests</a></li>
59</ul></li>
60<li>About
61<ul>
62<li><a href="FAQ.html">FAQ</a></li>
63<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
64</ul></li>
65</ul>
66</div>
67<h1 id="rss-feeds">RSS feeds</h1>
68<h3 id="feeds-options">Feeds options</h3>
69<p>Feeds are available in ATOM with <code>?do=atom</code> and RSS with <code>do=RSS</code>.</p>
70<p>Options:</p>
71<ul>
72<li>You can use <code>permalinks</code> in the feed URL to get permalink to Shaares instead of direct link to shaared URL.
73<ul>
74<li>E.G. <code>https://my.shaarli.domain/?do=atom&amp;permalinks</code>.</li>
75</ul></li>
76<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.
77<ul>
78<li><code>https://my.shaarli.domain/?do=atom&amp;permalinks&amp;nb=42</code></li>
79<li><code>https://my.shaarli.domain/?do=atom&amp;permalinks&amp;nb=all</code></li>
80</ul></li>
81</ul>
82<h3 id="rss-feeds-or-picture-wall-for-a-specific-searchtag">RSS Feeds or Picture Wall for a specific search/tag</h3>
83<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>
84<p>For example, if you want to subscribe only to links tagged <code>photography</code>:</p>
85<ul>
86<li>Go to the desired Shaarli instance.</li>
87<li>Search for the <code>photography</code> tag in the <em>Filter by tag</em> box. Links tagged <code>photography</code> are displayed.</li>
88<li>Click on the <code>RSS Feed</code> button.</li>
89<li>You are presented with an RSS feed showing only these links. Subscribe to it to receive only updates with this tag.</li>
90<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>
91<li>You can also build the URLs manually:
92<ul>
93<li><code>https://my.shaarli.domain/?do=rss&amp;searchtags=nature</code></li>
94<li><code>https://my.shaarli.domain/links/?do=picwall&amp;searchterm=poney</code></li>
95</ul></li>
96</ul>
97<p><embed src="(images/rss-filter-1.png)-!.html" />(images/rss-filter-2.png)</p>
98</body>
99</html>
diff --git a/doc/Release-Shaarli.html b/doc/Release-Shaarli.html
deleted file mode 100644
index fa690c7c..00000000
--- a/doc/Release-Shaarli.html
+++ /dev/null
@@ -1,224 +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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="release-shaarli">Release Shaarli</h1>
105<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 />
106releases</a>.</p>
107<h2 id="prerequisites">Prerequisites</h2>
108<p>This guide assumes that you have:</p>
109<ul>
110<li>a GPG key matching your GitHub authentication credentials
111<ul>
112<li>i.e., the email address identified by the GPG key is the same as the one in your <code>~/.gitconfig</code></li>
113</ul></li>
114<li>a GitHub fork of Shaarli</li>
115<li>a local clone of your Shaarli fork, with the following remotes:
116<ul>
117<li><code>origin</code> pointing to your GitHub fork</li>
118<li><code>upstream</code> pointing to the main Shaarli repository</li>
119</ul></li>
120<li>maintainer permissions on the main Shaarli repository, to:
121<ul>
122<li>push the signed tag</li>
123<li>create a new release</li>
124</ul></li>
125<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>
126</ul>
127<h2 id="github-release-draft-and-changelog.md">GitHub release draft and <code>CHANGELOG.md</code></h2>
128<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>
129<h3 id="github-release-draft">GitHub release draft</h3>
130<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>
131<h3 id="changelog.md"><code>CHANGELOG.md</code></h3>
132<p>This file should contain the same information as the release note draft for the upcoming version.</p>
133<p>Update it to:</p>
134<ul>
135<li>add new entries (additions, fixes, etc.)</li>
136<li>mark the current version as released by setting its date and link</li>
137<li>add a new section for the future unreleased version</li>
138</ul>
139<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> /path/to/shaarli
140
141$ <span class="fu">nano</span> CHANGELOG.md
142
143[<span class="ex">...</span>][](.html)
144<span class="co">## vA.B.C - UNRELEASED</span>
145<span class="ex">TBA</span>
146
147<span class="co">## [vX.Y.Z](https://github.com/shaarli/Shaarli/releases/tag/vX.Y.Z) - YYYY-MM-DD[](.html)</span>
148[<span class="ex">...</span>][](.html)</code></pre></div>
149<h2 id="increment-the-version-code-create-and-push-a-signed-tag">Increment the version code, create and push a signed tag</h2>
150<h3 id="bump-shaarlis-version">Bump Shaarli's version</h3>
151<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> /path/to/shaarli
152
153<span class="co"># create a new branch</span>
154$ <span class="fu">git</span> fetch upstream
155$ <span class="fu">git</span> checkout upstream/master -b v0.5.0
156
157<span class="co"># bump the version number</span>
158$ <span class="ex">vim</span> index.php shaarli_version.php
159
160<span class="co"># rebuild the documentation from the wiki</span>
161$ <span class="fu">make</span> htmldoc
162
163<span class="co"># commit the changes</span>
164$ <span class="fu">git</span> add index.php shaarli_version.php doc
165$ <span class="fu">git</span> commit -s -m <span class="st">&quot;Bump version to v0.5.0&quot;</span>
166
167<span class="co"># push the commit on your GitHub fork</span>
168$ <span class="fu">git</span> push origin v0.5.0</code></pre></div>
169<h3 id="create-and-merge-a-pull-request">Create and merge a Pull Request</h3>
170<p>This one is pretty straightforward ;-)</p>
171<h3 id="create-and-push-a-signed-tag">Create and push a signed tag</h3>
172<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co"># update your local copy</span>
173$ <span class="fu">git</span> checkout master
174$ <span class="fu">git</span> fetch upstream
175$ <span class="fu">git</span> pull upstream master
176
177<span class="co"># create a signed tag</span>
178$ <span class="fu">git</span> tag -s -m <span class="st">&quot;Release v0.5.0&quot;</span> v0.5.0
179
180<span class="co"># push it to &quot;upstream&quot;</span>
181$ <span class="fu">git</span> push --tags upstream</code></pre></div>
182<h3 id="verify-a-signed-tag">Verify a signed tag</h3>
183<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>
184<p>Let's have a look at its signature!</p>
185<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> /path/to/shaarli
186$ <span class="fu">git</span> fetch upstream
187
188<span class="co"># get the SHA1 reference of the tag</span>
189$ <span class="fu">git</span> show-ref tags/v0.5.0
190<span class="ex">f7762cf803f03f5caf4b8078359a63783d0090c1</span> refs/tags/v0.5.0
191
192<span class="co"># verify the tag signature information</span>
193$ <span class="fu">git</span> verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1
194<span class="ex">gpg</span>: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F
195<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>
196<h2 id="publish-the-github-release">Publish the GitHub release</h2>
197<h3 id="update-release-badges">Update release badges</h3>
198<p>Update <code>README.md</code> so version badges display and point to the newly released Shaarli version(s).</p>
199<h3 id="create-a-github-release-from-a-git-tag">Create a GitHub release from a Git tag</h3>
200<p>From the previously drafted release:</p>
201<ul>
202<li>edit the release notes (if needed)</li>
203<li>specify the appropriate Git tag</li>
204<li>publish the release</li>
205<li>profit!</li>
206</ul>
207<h3 id="generate-and-upload-all-in-one-release-archives">Generate and upload all-in-one release archives</h3>
208<p>Users with a shared hosting may have:</p>
209<ul>
210<li>no SSH access</li>
211<li>no possibility to install PHP packages or server extensions</li>
212<li>no possibility to run scripts</li>
213</ul>
214<p>To ease Shaarli installations, it is possible to generate and upload additional release archives,<br />
215that will contain Shaarli code plus all required third-party libraries:</p>
216<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">make</span> release_archive</code></pre></div>
217<p>This will create the following archives:</p>
218<ul>
219<li><code>shaarli-vX.Y.Z-full.tar</code></li>
220<li><code>shaarli-vX.Y.Z-full.zip</code></li>
221</ul>
222<p>The archives need to be manually uploaded on the previously created GitHub release.</p>
223</body>
224</html>
diff --git a/doc/Security.html b/doc/Security.html
deleted file mode 100644
index 12b46fa9..00000000
--- a/doc/Security.html
+++ /dev/null
@@ -1,135 +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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="security">Security</h1>
105<h2 id="client-browser">Client browser</h2>
106<ul>
107<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>
108</ul>
109<h2 id="php">PHP</h2>
110<ul>
111<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>
112</ul>
113<h2 id="server-and-sessions">Server and sessions</h2>
114<ul>
115<li>Directories are protected using <code>.htaccess</code> files</li>
116<li>Forms are protected against XSRF (Cross-site requests forgery):</li>
117<li>Forms which act on data (save,delete…) contain a token generated by the server.</li>
118<li>Any posted form which does not contain a valid token is rejected.</li>
119<li>Any token can only be used once.</li>
120<li>Tokens are attached to the session and cannot be reused in another session.</li>
121<li>Sessions automatically expire after 60 minutes.</li>
122<li>Sessions are protected against hijacking: the session ID cannot be used from a different IP address.</li>
123</ul>
124<h2 id="shaarli-datastore-and-configuration">Shaarli datastore and configuration</h2>
125<ul>
126<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>
127<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>
128<li>Even if the server does not support <code>.htaccess</code> files, the data file will still not be readable by URL.</li>
129<li><p>The database looks like this:</p>
130<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php"><span class="kw">&lt;?php</span> <span class="co">/* zP1ZjxxJtiYIvvevEPJ2lDOaLrZv7o...</span>
131<span class="co">...ka7gaco/Z+TFXM2i7BlfMf8qxpaSSYfKlvqv/x8= */</span> <span class="kw">?&gt;</span></code></pre></div></li>
132<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>
133</ul>
134</body>
135</html>
diff --git a/doc/Server-configuration.html b/doc/Server-configuration.html
deleted file mode 100644
index 0e6b220a..00000000
--- a/doc/Server-configuration.html
+++ /dev/null
@@ -1,459 +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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="server-configuration">Server configuration</h1>
105<p><em>Example virtual host configurations for popular web servers</em></p>
106<ul>
107<li><a href="#apache">Apache</a><a href=".html"></a></li>
108<li><a href="#nginx">Nginx</a><a href=".html"></a></li>
109</ul>
110<h2 id="prerequisites">Prerequisites</h2>
111<h3 id="shaarli">Shaarli</h3>
112<ul>
113<li>Shaarli is installed in a directory readable/writeable by the user</li>
114<li>the correct read/write permissions have been granted to the web server <em>user and/or group</em></li>
115<li>for HTTPS / SSL:</li>
116<li>a key pair (public, private) and a certificate have been generated</li>
117<li>the appropriate server SSL extension is installed and active</li>
118</ul>
119<h3 id="https-tls-and-self-signed-certificates">HTTPS, TLS and self-signed certificates</h3>
120<p>Related guides:</p>
121<ul>
122<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>
123<li><a href="https://workaround.org/certificate-authority">How do I create my own Certificate Authority?</a><a href=".html"></a></li>
124<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>
125</ul>
126<h3 id="proxies">Proxies</h3>
127<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>
128<ul>
129<li><code>X-Forwarded-Proto</code>;</li>
130<li><code>X-Forwarded-Host</code>;</li>
131<li><code>X-Forwarded-For</code>.</li>
132</ul>
133<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>
134<h2 id="apache">Apache</h2>
135<h3 id="minimal">Minimal</h3>
136<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>
137 ServerName<span class="st"> shaarli.my-domain.org</span>
138 DocumentRoot<span class="st"> /absolute/path/to/shaarli/</span>
139<span class="fu">&lt;/VirtualHost&gt;</span></code></pre></div>
140<h3 id="debug---log-all-the-things">Debug - Log all the things!</h3>
141<p>This configuration will log both Apache and PHP errors, which may prove useful to identify server configuration errors.</p>
142<p>See:</p>
143<ul>
144<li><a href="http://stackoverflow.com/q/176">Apache/PHP - error log per VirtualHost</a> (StackOverflow)<a href=".html"></a></li>
145<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>
146</ul>
147<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>
148 ServerName<span class="st"> shaarli.my-domain.org</span>
149 DocumentRoot<span class="st"> /absolute/path/to/shaarli/</span>
150
151 <span class="ex">LogLevel</span><span class="ch"> </span><span class="kw">warn</span>
152 ErrorLog<span class="st"> /var/log/apache2/shaarli-error.log</span>
153 CustomLog<span class="st"> /var/log/apache2/shaarli-access.log combined</span>
154
155 php_flag log_errors on
156 php_flag display_errors on
157 php_value error_reporting 2147483647
158 php_value error_log /var/log/apache2/shaarli-php-error.log
159<span class="fu">&lt;/VirtualHost&gt;</span></code></pre></div>
160<h3 id="standard---keep-access-and-error-logs">Standard - Keep access and error logs</h3>
161<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>
162 ServerName<span class="st"> shaarli.my-domain.org</span>
163 DocumentRoot<span class="st"> /absolute/path/to/shaarli/</span>
164
165 <span class="ex">LogLevel</span><span class="ch"> </span><span class="kw">warn</span>
166 ErrorLog<span class="st"> /var/log/apache2/shaarli-error.log</span>
167 CustomLog<span class="st"> /var/log/apache2/shaarli-access.log combined</span>
168<span class="fu">&lt;/VirtualHost&gt;</span></code></pre></div>
169<h3 id="paranoid---redirect-http-80-to-https-443">Paranoid - Redirect HTTP (:80) to HTTPS (:443)</h3>
170<p>See <a href="https://wiki.mozilla.org/Security/Server_Side_TLS#Apache">Server-side TLS</a> (Mozilla).<a href=".html"></a></p>
171<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>
172 ServerName<span class="st"> shaarli.my-domain.org</span>
173 DocumentRoot<span class="st"> /absolute/path/to/shaarli/</span>
174
175 <span class="ex">SSLEngine</span><span class="ch"> </span><span class="kw">on</span>
176 SSLCertificateFile<span class="st"> /absolute/path/to/the/website/certificate.pem</span>
177 SSLCertificateKeyFile<span class="st"> /absolute/path/to/the/website/key.key</span>
178
179 <span class="fu">&lt;Directory</span><span class="at"> /absolute/path/to/shaarli/</span><span class="fu">&gt;</span>
180 <span class="ex">AllowOverride</span><span class="ch"> </span><span class="kw">All</span>
181 <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>
182 <span class="ex">Order</span><span class="ch"> </span><span class="kw">allow,deny</span>
183 allow<span class="st"> from all</span>
184 <span class="fu">&lt;/Directory&gt;</span>
185
186 <span class="ex">LogLevel</span><span class="ch"> </span><span class="kw">warn</span>
187 ErrorLog<span class="st"> /var/log/apache2/shaarli-error.log</span>
188 CustomLog<span class="st"> /var/log/apache2/shaarli-access.log combined</span>
189<span class="fu">&lt;/VirtualHost&gt;</span>
190<span class="fu">&lt;VirtualHost</span><span class="at"> *:80</span><span class="fu">&gt;</span>
191 ServerName<span class="st"> shaarli.my-domain.org</span>
192 Redirect<span class="st"> 301 / https://shaarli.my-domain.org</span>
193
194 <span class="ex">LogLevel</span><span class="ch"> </span><span class="kw">warn</span>
195 ErrorLog<span class="st"> /var/log/apache2/shaarli-error.log</span>
196 CustomLog<span class="st"> /var/log/apache2/shaarli-access.log combined</span>
197<span class="fu">&lt;/VirtualHost&gt;</span></code></pre></div>
198<h3 id="htaccess">.htaccess</h3>
199<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>
200<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>
201<p>Apache module <code>mod_rewrite</code> <strong>must</strong> be enabled to use the REST API. URL rewriting rules for the Slim microframework are stated in the root <code>.htaccess</code> file.</p>
202<h2 id="lighthttpd">LightHttpd</h2>
203<h2 id="nginx">Nginx</h2>
204<h3 id="foreword">Foreword</h3>
205<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>
206<p>Required packages:</p>
207<ul>
208<li><a href="http://nginx.org">nginx</a><a href=".html"></a></li>
209<li><a href="http://php-fpm.org">php-fpm</a> - PHP FastCGI Process Manager<a href=".html"></a></li>
210</ul>
211<p>Official documentation:</p>
212<ul>
213<li><a href="http://nginx.org/en/docs/beginners_guide.html">Beginner's guide</a><a href=".html"></a></li>
214<li><a href="http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html">ngx_http_fastcgi_module</a><a href=".html"></a></li>
215<li><a href="http://wiki.nginx.org/Pitfalls">Pitfalls</a><a href=".html"></a></li>
216</ul>
217<p>Community resources:</p>
218<ul>
219<li><a href="https://wiki.mozilla.org/Security/Server_Side_TLS#Nginx">Server-side TLS (Nginx)</a> (Mozilla)<a href=".html"></a></li>
220<li><a href="http://kbeezie.com/nginx-configuration-examples/">PHP configuration examples</a> (Karl Blessing)<a href=".html"></a></li>
221</ul>
222<h3 id="common-setup">Common setup</h3>
223<p>Once Nginx and PHP-FPM are installed, we need to ensure:</p>
224<ul>
225<li>Nginx and PHP-FPM are running using the <em>same user and group</em></li>
226<li>both these user and group have
227<ul>
228<li><code>read</code> permissions for Shaarli resources</li>
229<li><code>execute</code> permissions for Shaarli directories <em>AND</em> their parent directories</li>
230</ul></li>
231</ul>
232<p>On a production server:</p>
233<ul>
234<li><code>user:group</code> will likely be <code>http:http</code>, <code>www:www</code> or <code>www-data:www-data</code></li>
235<li>files will be located under <code>/var/www</code>, <code>/var/http</code> or <code>/usr/share/nginx</code></li>
236</ul>
237<p>On a development server:</p>
238<ul>
239<li>files may be located in a user's home directory</li>
240<li>in this case, make sure both Nginx and PHP-FPM are running as the local user/group!</li>
241</ul>
242<p>For all following configuration examples, this user/group pair will be used:</p>
243<ul>
244<li><code>user:group = john:users</code>,</li>
245</ul>
246<p>which corresponds to the following service configuration:</p>
247<div class="sourceCode"><pre class="sourceCode ini"><code class="sourceCode ini"><span class="co">; /etc/php/php-fpm.conf</span>
248<span class="dt">user </span><span class="ot">=</span><span class="st"> john</span>
249<span class="dt">group </span><span class="ot">=</span><span class="st"> users</span>
250
251<span class="kw">[...][]</span><span class="dt">(.html)</span>
252<span class="dt">listen.owner </span><span class="ot">=</span><span class="st"> john</span>
253<span class="dt">listen.group </span><span class="ot">=</span><span class="st"> users</span></code></pre></div>
254<pre class="nginx"><code># /etc/nginx/nginx.conf
255user john users;
256
257http {
258 [...][](.html)
259}</code></pre>
260<h3 id="optional-increase-the-maximum-file-upload-size">(Optional) Increase the maximum file upload size</h3>
261<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>
262<p>To increase upload size, you will need to modify both nginx and PHP configuration:</p>
263<pre class="nginx"><code># /etc/nginx/nginx.conf
264
265http {
266 [...][](.html)
267
268 client_max_body_size 10m;
269
270 [...][](.html)
271}</code></pre>
272<div class="sourceCode"><pre class="sourceCode ini"><code class="sourceCode ini"><span class="co"># /etc/php5/fpm/php.ini</span>
273
274<span class="kw">[...][]</span><span class="dt">(.html)</span>
275<span class="dt">post_max_size </span><span class="ot">=</span><span class="st"> 10M</span>
276<span class="kw">[...][]</span><span class="dt">(.html)</span>
277<span class="dt">upload_max_filesize </span><span class="ot">=</span><span class="st"> 10M</span></code></pre></div>
278<h3 id="minimal-1">Minimal</h3>
279<p><em>WARNING: Use for development only!</em></p>
280<pre class="nginx"><code>user john users;
281worker_processes 1;
282events {
283 worker_connections 1024;
284}
285
286http {
287 include mime.types;
288 default_type application/octet-stream;
289 keepalive_timeout 20;
290
291 index index.html index.php;
292
293 server {
294 listen 80;
295 server_name localhost;
296 root /home/john/web;
297
298 access_log /var/log/nginx/access.log;
299 error_log /var/log/nginx/error.log;
300
301 location /shaarli/ {
302 try_files $uri /shaarli/index.php$is_args$args;
303 access_log /var/log/nginx/shaarli.access.log;
304 error_log /var/log/nginx/shaarli.error.log;
305 }
306
307 location ~ (index)\.php$ {
308 try_files $uri =404;
309 fastcgi_split_path_info ^(.+\.php)(/.+)$;
310 fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
311 fastcgi_index index.php;
312 include fastcgi.conf;
313 }
314 }
315}</code></pre>
316<h3 id="modular">Modular</h3>
317<p>The previous setup is sufficient for development purposes, but has several major caveats:</p>
318<ul>
319<li>every content that does not match the PHP rule will be sent to client browsers:
320<ul>
321<li>dotfiles - in our case, <code>.htaccess</code></li>
322<li>temporary files, e.g. Vim or Emacs files: <code>index.php~</code></li>
323</ul></li>
324<li>asset / static resource caching is not optimized</li>
325<li>if serving several PHP sites, there will be a lot of duplication: <code>location /shaarli/</code>, <code>location /mysite/</code>, etc.</li>
326</ul>
327<p>To solve this, we will split Nginx configuration in several parts, that will be included when needed:</p>
328<pre class="nginx"><code># /etc/nginx/deny.conf
329location ~ /\. {
330 # deny access to dotfiles
331 access_log off;
332 log_not_found off;
333 deny all;
334}
335
336location ~ ~$ {
337 # deny access to temp editor files, e.g. &quot;script.php~&quot;
338 access_log off;
339 log_not_found off;
340 deny all;
341}</code></pre>
342<pre class="nginx"><code># /etc/nginx/php.conf
343location ~ (index)\.php$ {
344 # Slim - split URL path into (script_filename, path_info)
345 try_files $uri =404;
346 fastcgi_split_path_info ^(.+\.php)(/.+)$;
347
348 # filter and proxy PHP requests to PHP-FPM
349 fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
350 fastcgi_index index.php;
351 include fastcgi.conf;
352}
353
354location ~ \.php$ {
355 # deny access to all other PHP scripts
356 deny all;
357}</code></pre>
358<pre class="nginx"><code># /etc/nginx/static_assets.conf
359location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
360 expires max;
361 add_header Pragma public;
362 add_header Cache-Control &quot;public, must-revalidate, proxy-revalidate&quot;;
363}</code></pre>
364<pre class="nginx"><code># /etc/nginx/nginx.conf
365[...][](.html)
366
367http {
368 [...][](.html)
369
370 root /home/john/web;
371 access_log /var/log/nginx/access.log;
372 error_log /var/log/nginx/error.log;
373
374 server {
375 # virtual host for a first domain
376 listen 80;
377 server_name my.first.domain.org;
378
379 location /shaarli/ {
380 # Slim - rewrite URLs
381 try_files $uri /shaarli/index.php$is_args$args;
382
383 access_log /var/log/nginx/shaarli.access.log;
384 error_log /var/log/nginx/shaarli.error.log;
385 }
386
387 location = /shaarli/favicon.ico {
388 # serve the Shaarli favicon from its custom location
389 alias /var/www/shaarli/images/favicon.ico;
390 }
391
392 include deny.conf;
393 include static_assets.conf;
394 include php.conf;
395 }
396
397 server {
398 # virtual host for a second domain
399 listen 80;
400 server_name second.domain.com;
401
402 location /minigal/ {
403 access_log /var/log/nginx/minigal.access.log;
404 error_log /var/log/nginx/minigal.error.log;
405 }
406
407 include deny.conf;
408 include static_assets.conf;
409 include php.conf;
410 }
411}</code></pre>
412<h3 id="redirect-http-to-https">Redirect HTTP to HTTPS</h3>
413<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>
414<pre class="nginx"><code># /etc/nginx/nginx.conf
415[...][](.html)
416
417http {
418 [...][](.html)
419
420 index index.html index.php;
421
422 root /home/john/web;
423 access_log /var/log/nginx/access.log;
424 error_log /var/log/nginx/error.log;
425
426 server {
427 listen 80;
428 server_name localhost;
429
430 return 301 https://localhost$request_uri;
431 }
432
433 server {
434 listen 443 ssl;
435 server_name localhost;
436
437 ssl_certificate /home/john/ssl/localhost.crt;
438 ssl_certificate_key /home/john/ssl/localhost.key;
439
440 location /shaarli/ {
441 # Slim - rewrite URLs
442 try_files $uri /index.php$is_args$args;
443
444 access_log /var/log/nginx/shaarli.access.log;
445 error_log /var/log/nginx/shaarli.error.log;
446 }
447
448 location = /shaarli/favicon.ico {
449 # serve the Shaarli favicon from its custom location
450 alias /var/www/shaarli/images/favicon.ico;
451 }
452
453 include deny.conf;
454 include static_assets.conf;
455 include php.conf;
456 }
457}</code></pre>
458</body>
459</html>
diff --git a/doc/Server-requirements.html b/doc/Server-requirements.html
deleted file mode 100644
index 79d74118..00000000
--- a/doc/Server-requirements.html
+++ /dev/null
@@ -1,195 +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<li><a href="REST-API.html">REST API</a></li>
36</ul></li>
37<li>How To
38<ul>
39<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
40<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>
41<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
42<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
43<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
44</ul></li>
45<li><a href="Troubleshooting.html">Troubleshooting</a></li>
46<li><a href="Development.html">Development</a>
47<ul>
48<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
49<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
50<li><a href="Directory-structure.html">Directory structure</a></li>
51<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
52<li><a href="Plugin-System.html">Plugin System</a></li>
53<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
54<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
55<li><a href="Security.html">Security</a></li>
56<li><a href="Static-analysis.html">Static analysis</a></li>
57<li><a href="Theming.html">Theming</a></li>
58<li><a href="Unit-tests.html">Unit tests</a></li>
59</ul></li>
60<li>About
61<ul>
62<li><a href="FAQ.html">FAQ</a></li>
63<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
64</ul></li>
65</ul>
66</div>
67<h1 id="server-requirements">Server requirements</h1>
68<h2 id="php">PHP</h2>
69<h3 id="release-information">Release information</h3>
70<ul>
71<li><a href="http://php.net/supported-versions.php">PHP: Supported versions</a><a href=".html"></a></li>
72<li><a href="http://php.net/eol.php">PHP: Unsupported versions</a> <em>(EOL - End Of Life)</em><a href=".html"></a></li>
73<li><a href="http://php.net/ChangeLog-7.php">PHP 7 Changelog</a><a href=".html"></a></li>
74<li><a href="http://php.net/ChangeLog-5.php">PHP 5 Changelog</a><a href=".html"></a></li>
75<li><a href="https://bugs.php.net/">PHP: Bugs</a><a href=".html"></a></li>
76</ul>
77<h3 id="supported-versions">Supported versions</h3>
78<table>
79<thead>
80<tr class="header">
81<th style="text-align: center;">Version</th>
82<th style="text-align: center;">Status</th>
83<th style="text-align: center;">Shaarli compatibility</th>
84</tr>
85</thead>
86<tbody>
87<tr class="odd">
88<td style="text-align: center;">7.1</td>
89<td style="text-align: center;">Supported (v0.9.x)</td>
90<td style="text-align: center;">✅</td>
91</tr>
92<tr class="even">
93<td style="text-align: center;">7.0</td>
94<td style="text-align: center;">Supported</td>
95<td style="text-align: center;">✅</td>
96</tr>
97<tr class="odd">
98<td style="text-align: center;">5.6</td>
99<td style="text-align: center;">Supported</td>
100<td style="text-align: center;">✅</td>
101</tr>
102<tr class="even">
103<td style="text-align: center;">5.5</td>
104<td style="text-align: center;">EOL: 2016-07-10</td>
105<td style="text-align: center;">✅</td>
106</tr>
107<tr class="odd">
108<td style="text-align: center;">5.4</td>
109<td style="text-align: center;">EOL: 2015-09-14</td>
110<td style="text-align: center;">✅ (up to Shaarli 0.8.x)</td>
111</tr>
112<tr class="even">
113<td style="text-align: center;">5.3</td>
114<td style="text-align: center;">EOL: 2014-08-14</td>
115<td style="text-align: center;">✅ (up to Shaarli 0.8.x)</td>
116</tr>
117</tbody>
118</table>
119<p>See also:</p>
120<ul>
121<li><a href="https://github.com/shaarli/Shaarli/blob/master/.travis.yml">Travis configuration</a><a href=".html"></a></li>
122</ul>
123<h3 id="dependency-management">Dependency management</h3>
124<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 />
125download and install third-party PHP dependencies.</p>
126<table>
127<thead>
128<tr class="header">
129<th>Library</th>
130<th style="text-align: center;">Required?</th>
131<th>Usage</th>
132</tr>
133</thead>
134<tbody>
135<tr class="odd">
136<td><a href="https://packagist.org/packages/shaarli/netscape-bookmark-parser"><code>shaarli/netscape-bookmark-parser</code></a></td>
137<td style="text-align: center;">All</td>
138<td>Import bookmarks from Netscape files<a href=".html"></a></td>
139</tr>
140<tr class="even">
141<td><a href="https://packagist.org/packages/erusev/parsedown"><code>erusev/parsedown</code></a></td>
142<td style="text-align: center;">All</td>
143<td>Parse MarkDown syntax for the MarkDown plugin<a href=".html"></a></td>
144</tr>
145<tr class="odd">
146<td><a href="https://packagist.org/packages/slim/slim"><code>slim/slim</code></a></td>
147<td style="text-align: center;">All</td>
148<td>Handle routes and middleware for the REST API<a href=".html"></a></td>
149</tr>
150</tbody>
151</table>
152<h3 id="extensions">Extensions</h3>
153<table style="width:19%;">
154<colgroup>
155<col style="width: 5%" />
156<col style="width: 8%" />
157<col style="width: 5%" />
158</colgroup>
159<thead>
160<tr class="header">
161<th>Extension</th>
162<th style="text-align: center;">Required?</th>
163<th>Usage</th>
164</tr>
165</thead>
166<tbody>
167<tr class="odd">
168<td><a href="http://php.net/manual/en/book.openssl.php"><code>openssl</code></a></td>
169<td style="text-align: center;">All</td>
170<td>OpenSSL, HTTPS<a href=".html"></a></td>
171</tr>
172<tr class="even">
173<td><a href="http://php.net/manual/en/book.mbstring.php"><code>php-mbstring</code></a></td>
174<td style="text-align: center;">CentOS, Fedora, RHEL, Windows</td>
175<td>multibyte (Unicode) string support<a href=".html"></a></td>
176</tr>
177<tr class="odd">
178<td><a href="http://php.net/manual/en/book.image.php"><code>php-gd</code></a></td>
179<td style="text-align: center;">optional</td>
180<td>thumbnail resizing<a href=".html"></a></td>
181</tr>
182<tr class="even">
183<td><a href="http://php.net/manual/en/book.intl.php"><code>php-intl</code></a></td>
184<td style="text-align: center;">optional</td>
185<td>localized text sorting (e.g. <code>e-&gt;è-&gt;f</code>)<a href=".html"></a></td>
186</tr>
187<tr class="odd">
188<td><a href="http://php.net/manual/en/book.curl.php"><code>php-curl</code></a></td>
189<td style="text-align: center;">optional</td>
190<td>using cURL for fetching webpages and thumbnails in a more robust way<a href=".html"></a></td>
191</tr>
192</tbody>
193</table>
194</body>
195</html>
diff --git a/doc/Server-security.html b/doc/Server-security.html
deleted file mode 100644
index 4f7ff468..00000000
--- a/doc/Server-security.html
+++ /dev/null
@@ -1,175 +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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="server-security">Server security</h1>
105<h2 id="php.ini">php.ini</h2>
106<p>PHP settings are defined in:</p>
107<ul>
108<li>a main configuration file, usually found under <code>/etc/php5/php.ini</code>; some distributions provide different configuration environments, e.g.
109<ul>
110<li><code>/etc/php5/php.ini</code> - used when running console scripts</li>
111<li><code>/etc/php5/apache2/php.ini</code> - used when a client requests PHP resources from Apache</li>
112<li><code>/etc/php5/php-fpm.conf</code> - used when PHP requests are proxied to PHP-FPM</li>
113</ul></li>
114<li>additional configuration files/entries, depending on the installed/enabled extensions:
115<ul>
116<li><code>/etc/php/conf.d/xdebug.ini</code></li>
117</ul></li>
118</ul>
119<h3 id="locate-.ini-files">Locate .ini files</h3>
120<h4 id="console-environment">Console environment</h4>
121<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">php</span> --ini
122<span class="ex">Configuration</span> File (php.ini) <span class="ex">Path</span>: /etc/php
123<span class="ex">Loaded</span> Configuration File: /etc/php/php.ini
124<span class="ex">Scan</span> for additional .ini files in: /etc/php/conf.d
125<span class="ex">Additional</span> .ini files parsed: /etc/php/conf.d/xdebug.ini</code></pre></div>
126<h4 id="server-environment">Server environment</h4>
127<ul>
128<li>create a <code>phpinfo.php</code> script located in a path supported by the web server, e.g.
129<ul>
130<li>Apache (with user dirs enabled): <code>/home/myself/public_html/phpinfo.php</code></li>
131<li><code>/var/www/test/phpinfo.php</code></li>
132</ul></li>
133<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>
134<li>access the script from a web browser</li>
135<li><p>look at the <em>Loaded Configuration File</em> and <em>Scan this dir for additional .ini files</em> entries</p>
136<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>
137</ul>
138<h2 id="fail2ban">fail2ban</h2>
139<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>
140<ul>
141<li><a href="http://www.fail2ban.org/wiki/index.php/Main_Page">Official website</a><a href=".html"></a></li>
142<li><a href="https://github.com/fail2ban/fail2ban">Source code</a><a href=".html"></a></li>
143</ul>
144<h3 id="read-shaarli-logs-to-ban-ips">Read Shaarli logs to ban IPs</h3>
145<p>Example configuration:</p>
146<ul>
147<li>allow 3 login attempts per IP address</li>
148<li>after 3 failures, permanently ban the corresponding IP adddress</li>
149</ul>
150<p><code>/etc/fail2ban/jail.local</code></p>
151<div class="sourceCode"><pre class="sourceCode ini"><code class="sourceCode ini"><span class="kw">[shaarli-auth][]</span><span class="dt">(.html)</span>
152<span class="dt">enabled </span><span class="ot">=</span><span class="st"> </span><span class="kw">true</span>
153<span class="dt">port </span><span class="ot">=</span><span class="st"> https,http</span>
154<span class="dt">filter </span><span class="ot">=</span><span class="st"> shaarli-auth</span>
155<span class="dt">logpath </span><span class="ot">=</span><span class="st"> /var/www/path/to/shaarli/data/log.txt</span>
156<span class="dt">maxretry </span><span class="ot">=</span><span class="st"> </span><span class="dv">3</span>
157<span class="dt">bantime </span><span class="ot">=</span><span class="st"> -</span><span class="dv">1</span></code></pre></div>
158<p><code>/etc/fail2ban/filter.d/shaarli-auth.conf</code></p>
159<div class="sourceCode"><pre class="sourceCode ini"><code class="sourceCode ini"><span class="kw">[INCLUDES][]</span><span class="dt">(.html)</span>
160<span class="dt">before </span><span class="ot">=</span><span class="st"> common.conf</span>
161<span class="kw">[Definition][]</span><span class="dt">(.html)</span>
162<span class="dt">failregex </span><span class="ot">=</span><span class="st"> \s-\s&lt;HOST&gt;\s-\sLogin failed for user.*$</span>
163<span class="dt">ignoreregex </span><span class="ot">=</span><span class="st"> </span></code></pre></div>
164<h2 id="robots---restricting-search-engines-and-web-crawler-traffic">Robots - Restricting search engines and web crawler traffic</h2>
165<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>
166<pre><code>User-agent: *
167Disallow: /</code></pre>
168<p>See:</p>
169<ul>
170<li><a href="http://www.robotstxt.org/" class="uri">http://www.robotstxt.org/</a></li>
171<li><a href="http://www.robotstxt.org/robotstxt.html" class="uri">http://www.robotstxt.org/robotstxt.html</a></li>
172<li><a href="http://www.robotstxt.org/meta.html" class="uri">http://www.robotstxt.org/meta.html</a></li>
173</ul>
174</body>
175</html>
diff --git a/doc/Shaarli-configuration.html b/doc/Shaarli-configuration.html
deleted file mode 100644
index c696c97c..00000000
--- a/doc/Shaarli-configuration.html
+++ /dev/null
@@ -1,298 +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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="shaarli-configuration">Shaarli configuration</h1>
105<h1 id="shaarli-configuration-1">Shaarli configuration</h1>
106<h2 id="foreword">Foreword</h2>
107<p><strong>Do not edit configuration options in index.php! Your changes would be lost.</strong></p>
108<p>Once your Shaarli instance is installed, the file <code>data/config.json.php</code> is generated:</p>
109<ul>
110<li>it contains all settings in JSON format, and can be edited to customize values</li>
111<li>it defines which <a href="Plugin-System">plugins</a> are enabled<a href="(.html).html">(.html)</a></li>
112<li>its values override those defined in <code>index.php</code></li>
113<li>it is wrap in a PHP comment to prevent anyone accessing it, regardless of server configuration</li>
114</ul>
115<h2 id="file-and-directory-permissions">File and directory permissions</h2>
116<p>The server process running Shaarli must have:</p>
117<ul>
118<li><code>read</code> access to the following resources:
119<ul>
120<li>PHP scripts: <code>index.php</code>, <code>application/*.php</code>, <code>plugins/*.php</code></li>
121<li>3rd party PHP and Javascript libraries: <code>inc/*.php</code>, <code>inc/*.js</code></li>
122<li>static assets:
123<ul>
124<li>CSS stylesheets: <code>inc/*.css</code></li>
125<li><code>images/*</code></li>
126</ul></li>
127<li>RainTPL templates: <code>tpl/*.html</code></li>
128</ul></li>
129<li><code>read</code>, <code>write</code> and <code>execution</code> access to the following directories:
130<ul>
131<li><code>cache</code> - thumbnail cache</li>
132<li><code>data</code> - link data store, configuration options</li>
133<li><code>pagecache</code> - Atom/RSS feed cache</li>
134<li><code>tmp</code> - RainTPL page cache</li>
135</ul></li>
136</ul>
137<p>On a Linux distribution:</p>
138<ul>
139<li>the web server user will likely be <code>www</code> or <code>http</code> (for Apache2)</li>
140<li>it will be a member of a group of the same name: <code>www:www</code>, <code>http:http</code></li>
141<li>to give it access to Shaarli, either:
142<ul>
143<li>unzip Shaarli in the default web server location (usually <code>/var/www/</code>) and set the web server user as the owner</li>
144<li>put users in the same group as the web server, and set the appropriate access rights</li>
145</ul></li>
146<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>
147</ul>
148<h2 id="configuration">Configuration</h2>
149<p>In <code>data/config.json.php</code>.</p>
150<p>See also <a href="Plugin-System.html">Plugin System</a>.<a href=".html"></a></p>
151<h3 id="credentials">Credentials</h3>
152<blockquote>
153<p>You shouldn't edit those.</p>
154</blockquote>
155<p><strong>login</strong>: Login username.<br />
156<strong>hash</strong>: Generated password hash.<br />
157<strong>salt</strong>: Password salt.</p>
158<h3 id="general">General</h3>
159<p><strong>title</strong>: Shaarli's instance title.<br />
160<strong>header_link</strong>: Link to the homepage.<br />
161<strong>links_per_page</strong>: Number of shaares displayed per page.<br />
162<strong>timezone</strong>: See <a href="http://php.net/manual/en/timezones.php">the list of supported timezones</a>. <a href=".html"></a><br />
163<strong>enabled_plugins</strong>: List of enabled plugins.</p>
164<h3 id="security">Security</h3>
165<p><strong>session_protection_disabled</strong>: Disable session cookie hijacking protection (not recommended).<br />
166It might be useful if your IP adress often changes.<br />
167<strong>ban_after</strong>: Failed login attempts before being IP banned.<br />
168<strong>ban_duration</strong>: IP ban duration in seconds.<br />
169<strong>open_shaarli</strong>: Anyone can add a new link while logged out if enabled.<br />
170<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>
171<h3 id="resources">Resources</h3>
172<p><strong>data_dir</strong>: Data directory.<br />
173<strong>datastore</strong>: Shaarli's links database file path.<br />
174<strong>history</strong>: Shaarli's operation history file path.<br />
175<strong>updates</strong>: File path for the ran updates file.<br />
176<strong>log</strong>: Log file path.<br />
177<strong>update_check</strong>: Last update check file path.<br />
178<strong>raintpl_tpl</strong>: Templates directory.<br />
179<strong>raintpl_tmp</strong>: Template engine cache directory.<br />
180<strong>thumbnails_cache</strong>: Thumbnails cache directory.<br />
181<strong>page_cache</strong>: Shaarli's internal cache directory.<br />
182<strong>ban_file</strong>: Banned IP file path.</p>
183<h3 id="updates">Updates</h3>
184<p><strong>check_updates</strong>: Enable or disable update check to the git repository.<br />
185<strong>check_updates_branch</strong>: Git branch used to check updates (e.g. <code>stable</code> or <code>master</code>).<br />
186<strong>check_updates_interval</strong>: Look for new version every N seconds (default: every day).</p>
187<h3 id="privacy">Privacy</h3>
188<p><strong>default_private_links</strong>: Check the private checkbox by default for every new link.<br />
189<strong>hide_public_links</strong>: All links are hidden while logged out.<br />
190<strong>hide_timestamps</strong>: Timestamps are hidden.</p>
191<h3 id="feed">Feed</h3>
192<p><strong>rss_permalinks</strong>: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL.<br />
193<strong>show_atom</strong>: Display ATOM feed button.</p>
194<h3 id="thumbnail">Thumbnail</h3>
195<p><strong>enable_thumbnails</strong>: Enable or disable thumbnail display.<br />
196<strong>enable_localcache</strong>: Enable or disable local cache.</p>
197<h3 id="redirector">Redirector</h3>
198<p><strong>url</strong>: Redirector URL, such as <code>anonym.to</code>.<br />
199<strong>encode_url</strong>: Enable this if the redirector needs encoded URL to work properly.</p>
200<h2 id="configuration-file-example">Configuration file example</h2>
201<div class="sourceCode"><pre class="sourceCode json"><code class="sourceCode json"><span class="er">&lt;?php</span> <span class="er">/*</span>
202<span class="fu">{</span>
203 <span class="dt">&quot;credentials&quot;</span><span class="fu">:</span> <span class="fu">{</span>
204 <span class="dt">&quot;login&quot;</span><span class="fu">:</span> <span class="st">&quot;&lt;login&gt;&quot;</span><span class="fu">,</span>
205 <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>
206 <span class="dt">&quot;salt&quot;</span><span class="fu">:</span> <span class="st">&quot;&lt;password salt&gt;&quot;</span>
207 <span class="fu">},</span>
208 <span class="dt">&quot;security&quot;</span><span class="fu">:</span> <span class="fu">{</span>
209 <span class="dt">&quot;ban_after&quot;</span><span class="fu">:</span> <span class="dv">4</span><span class="fu">,</span>
210 <span class="dt">&quot;session_protection_disabled&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span>
211 <span class="dt">&quot;ban_duration&quot;</span><span class="fu">:</span> <span class="dv">1800</span><span class="fu">,</span>
212 <span class="dt">&quot;trusted_proxies&quot;</span><span class="fu">:</span> <span class="ot">[[]</span><span class="er">(.html)</span>
213 <span class="st">&quot;1.2.3.4&quot;</span><span class="ot">,</span>
214 <span class="st">&quot;5.6.7.8&quot;</span>
215 <span class="ot">]</span>
216 <span class="fu">},</span>
217 <span class="dt">&quot;resources&quot;</span><span class="fu">:</span> <span class="fu">{</span>
218 <span class="dt">&quot;data_dir&quot;</span><span class="fu">:</span> <span class="st">&quot;data&quot;</span><span class="fu">,</span>
219 <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>
220 <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>
221 <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>
222 <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>
223 <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>
224 <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>
225 <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>
226 <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>
227 <span class="dt">&quot;thumbnails_cache&quot;</span><span class="fu">:</span> <span class="st">&quot;cache&quot;</span><span class="fu">,</span>
228 <span class="dt">&quot;page_cache&quot;</span><span class="fu">:</span> <span class="st">&quot;pagecache&quot;</span>
229 <span class="fu">},</span>
230 <span class="dt">&quot;general&quot;</span><span class="fu">:</span> <span class="fu">{</span>
231 <span class="dt">&quot;check_updates&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
232 <span class="dt">&quot;rss_permalinks&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
233 <span class="dt">&quot;links_per_page&quot;</span><span class="fu">:</span> <span class="dv">20</span><span class="fu">,</span>
234 <span class="dt">&quot;default_private_links&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
235 <span class="dt">&quot;enable_thumbnails&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
236 <span class="dt">&quot;enable_localcache&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
237 <span class="dt">&quot;check_updates_branch&quot;</span><span class="fu">:</span> <span class="st">&quot;stable&quot;</span><span class="fu">,</span>
238 <span class="dt">&quot;check_updates_interval&quot;</span><span class="fu">:</span> <span class="dv">86400</span><span class="fu">,</span>
239 <span class="dt">&quot;enabled_plugins&quot;</span><span class="fu">:</span> <span class="ot">[[]</span><span class="er">(.html)</span>
240 <span class="st">&quot;markdown&quot;</span><span class="ot">,</span>
241 <span class="st">&quot;wallabag&quot;</span><span class="ot">,</span>
242 <span class="st">&quot;archiveorg&quot;</span>
243 <span class="ot">]</span><span class="fu">,</span>
244 <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>
245 <span class="dt">&quot;title&quot;</span><span class="fu">:</span> <span class="st">&quot;My Shaarli&quot;</span><span class="fu">,</span>
246 <span class="dt">&quot;header_link&quot;</span><span class="fu">:</span> <span class="st">&quot;?&quot;</span>
247 <span class="fu">},</span>
248 <span class="dt">&quot;extras&quot;</span><span class="fu">:</span> <span class="fu">{</span>
249 <span class="dt">&quot;show_atom&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span>
250 <span class="dt">&quot;hide_public_links&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span>
251 <span class="dt">&quot;hide_timestamps&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span>
252 <span class="dt">&quot;open_shaarli&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span>
253 <span class="dt">&quot;redirector&quot;</span><span class="fu">:</span> <span class="st">&quot;http://anonym.to/?&quot;</span><span class="fu">,</span>
254 <span class="dt">&quot;redirector_encode_url&quot;</span><span class="fu">:</span> <span class="kw">false</span>
255 <span class="fu">},</span>
256 <span class="dt">&quot;general&quot;</span><span class="fu">:</span> <span class="fu">{</span>
257 <span class="dt">&quot;header_link&quot;</span><span class="fu">:</span> <span class="st">&quot;?&quot;</span><span class="fu">,</span>
258 <span class="dt">&quot;links_per_page&quot;</span><span class="fu">:</span> <span class="dv">20</span><span class="fu">,</span>
259 <span class="dt">&quot;enabled_plugins&quot;</span><span class="fu">:</span> <span class="ot">[[]</span><span class="er">(.html)</span>
260 <span class="st">&quot;markdown&quot;</span><span class="ot">,</span>
261 <span class="st">&quot;wallabag&quot;</span>
262 <span class="ot">]</span><span class="fu">,</span>
263 <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>
264 <span class="dt">&quot;title&quot;</span><span class="fu">:</span> <span class="st">&quot;My Shaarli&quot;</span>
265 <span class="fu">},</span>
266 <span class="dt">&quot;updates&quot;</span><span class="fu">:</span> <span class="fu">{</span>
267 <span class="dt">&quot;check_updates&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
268 <span class="dt">&quot;check_updates_branch&quot;</span><span class="fu">:</span> <span class="st">&quot;stable&quot;</span><span class="fu">,</span>
269 <span class="dt">&quot;check_updates_interval&quot;</span><span class="fu">:</span> <span class="dv">86400</span>
270 <span class="fu">},</span>
271 <span class="dt">&quot;feed&quot;</span><span class="fu">:</span> <span class="fu">{</span>
272 <span class="dt">&quot;rss_permalinks&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
273 <span class="dt">&quot;show_atom&quot;</span><span class="fu">:</span> <span class="kw">false</span>
274 <span class="fu">},</span>
275 <span class="dt">&quot;privacy&quot;</span><span class="fu">:</span> <span class="fu">{</span>
276 <span class="dt">&quot;default_private_links&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
277 <span class="dt">&quot;hide_public_links&quot;</span><span class="fu">:</span> <span class="kw">false</span><span class="fu">,</span>
278 <span class="dt">&quot;hide_timestamps&quot;</span><span class="fu">:</span> <span class="kw">false</span>
279 <span class="fu">},</span>
280 <span class="dt">&quot;thumbnail&quot;</span><span class="fu">:</span> <span class="fu">{</span>
281 <span class="dt">&quot;enable_thumbnails&quot;</span><span class="fu">:</span> <span class="kw">true</span><span class="fu">,</span>
282 <span class="dt">&quot;enable_localcache&quot;</span><span class="fu">:</span> <span class="kw">true</span>
283 <span class="fu">},</span>
284 <span class="dt">&quot;redirector&quot;</span><span class="fu">:</span> <span class="fu">{</span>
285 <span class="dt">&quot;url&quot;</span><span class="fu">:</span> <span class="st">&quot;http://anonym.to/?&quot;</span><span class="fu">,</span>
286 <span class="dt">&quot;encode_url&quot;</span><span class="fu">:</span> <span class="kw">false</span>
287 <span class="fu">},</span>
288 <span class="dt">&quot;plugins&quot;</span><span class="fu">:</span> <span class="fu">{</span>
289 <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>
290 <span class="dt">&quot;WALLABAG_VERSION&quot;</span><span class="fu">:</span> <span class="st">&quot;1&quot;</span>
291 <span class="fu">}</span>
292<span class="fu">}</span> <span class="er">?&gt;</span></code></pre></div>
293<h2 id="additional-configuration">Additional configuration</h2>
294<p>The playvideos plugin may require that you adapt your server's<br />
295<a href="https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md#troubleshooting">Content Security Policy</a> <a href=".html"></a><br />
296configuration to work properly.<a href="(.html).html">(.html)</a></p>
297</body>
298</html>
diff --git a/doc/Sharing-button.html b/doc/Sharing-button.html
deleted file mode 100644
index f3682f8c..00000000
--- a/doc/Sharing-button.html
+++ /dev/null
@@ -1,94 +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<li><a href="REST-API.html">REST API</a></li>
36</ul></li>
37<li>How To
38<ul>
39<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
40<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>
41<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
42<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
43<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
44</ul></li>
45<li><a href="Troubleshooting.html">Troubleshooting</a></li>
46<li><a href="Development.html">Development</a>
47<ul>
48<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
49<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
50<li><a href="Directory-structure.html">Directory structure</a></li>
51<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
52<li><a href="Plugin-System.html">Plugin System</a></li>
53<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
54<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
55<li><a href="Security.html">Security</a></li>
56<li><a href="Static-analysis.html">Static analysis</a></li>
57<li><a href="Theming.html">Theming</a></li>
58<li><a href="Unit-tests.html">Unit tests</a></li>
59</ul></li>
60<li>About
61<ul>
62<li><a href="FAQ.html">FAQ</a></li>
63<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
64</ul></li>
65</ul>
66</div>
67<h1 id="sharing-button">Sharing button</h1>
68<h3 id="add-the-sharing-button-bookmarklet-to-your-browser">Add the sharing button (<em>bookmarklet</em>) to your browser</h3>
69<ul>
70<li>Open your Shaarli and <code>Login</code></li>
71<li>Click the <code>Tools</code> button in the top bar</li>
72<li>Drag the <strong><code>✚Shaare link</code> button</strong>, and drop it to your browser's bookmarks bar.</li>
73</ul>
74<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>
75<p><embed src="(images/bookmarklet.png).html" /></p>
76<h3 id="share-links-using-the-bookmarklet">Share links using the <em>bookmarklet</em></h3>
77<ul>
78<li>When you are visiting a webpage you would like to share with Shaarli, click the <em>bookmarklet</em> you just added.</li>
79<li>A window opens.</li>
80<li>You can freely edit title, description, tags... to find it later using the text search or tag filtering.</li>
81<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>
82<li>You can also check the “Private” box so that the link is saved but only visible to you.</li>
83<li>Click <code>Save</code>.<strong>Voilà! Your link is now shared.</strong></li>
84</ul>
85<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>
86<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>
87<p>See <a href="https://github.com/shaarli/Shaarli#196">#196</a>.<a href=".html"></a></p>
88<p>There is an open bug for both Firefox and Chromium:</p>
89<ul>
90<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>
91<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>
92</ul>
93</body>
94</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 a95d195e..00000000
--- a/doc/Static-analysis.html
+++ /dev/null
@@ -1,82 +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<li><a href="REST-API.html">REST API</a></li>
36</ul></li>
37<li>How To
38<ul>
39<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
40<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>
41<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
42<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
43<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
44</ul></li>
45<li><a href="Troubleshooting.html">Troubleshooting</a></li>
46<li><a href="Development.html">Development</a>
47<ul>
48<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
49<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
50<li><a href="Directory-structure.html">Directory structure</a></li>
51<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
52<li><a href="Plugin-System.html">Plugin System</a></li>
53<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
54<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
55<li><a href="Security.html">Security</a></li>
56<li><a href="Static-analysis.html">Static analysis</a></li>
57<li><a href="Theming.html">Theming</a></li>
58<li><a href="Unit-tests.html">Unit tests</a></li>
59</ul></li>
60<li>About
61<ul>
62<li><a href="FAQ.html">FAQ</a></li>
63<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
64</ul></li>
65</ul>
66</div>
67<h1 id="static-analysis">Static analysis</h1>
68<h2 id="wip">WIP</h2>
69<p>This topic is currently being discussed here:</p>
70<ul>
71<li><a href="https://github.com/shaarli/Shaarli/issues/95">Fix coding style (static analysis)</a> (#95)<a href=".html"></a></li>
72<li><a href="https://github.com/shaarli/Shaarli/issues/130">Continuous Integration tools &amp; features</a> (#130)<a href=".html"></a></li>
73</ul>
74<h3 id="usage">Usage</h3>
75<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>
76<p>For an overview of the available features, see:</p>
77<ul>
78<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>
79<li><a href="https://github.com/shaarli/Shaarli/pull/276">Run PHPCS against different coding standards</a> (#276)<a href=".html"></a></li>
80</ul>
81</body>
82</html>
diff --git a/doc/Theming.html b/doc/Theming.html
deleted file mode 100644
index 6b5dac35..00000000
--- a/doc/Theming.html
+++ /dev/null
@@ -1,182 +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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="theming">Theming</h1>
105<h2 id="foreword">Foreword</h2>
106<p>There are two ways of customizing how Shaarli looks:</p>
107<ol>
108<li>by using a custom CSS to override Shaarli's CSS</li>
109<li>by using a full theme that provides its own RainTPL templates, CSS and Javascript resources</li>
110</ol>
111<h2 id="custom-css">Custom CSS</h2>
112<p>Shaarli's appearance can be modified by adding CSS rules to:</p>
113<ul>
114<li>Shaarli &lt; <code>v0.9.0</code>: <code>inc/user.css</code></li>
115<li>Shaarli &gt;= <code>v0.9.0</code>: <code>data/user.css</code></li>
116</ul>
117<p>This file allows overriding rules defined in the template CSS files (only add changed rules), or define a whole new theme.</p>
118<p><strong>Note</strong>: Do not edit <code>tpl/default/css/shaarli.css</code>! Your changes would be overridden when updating Shaarli.</p>
119<p>See also <a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></p>
120<h2 id="themes">Themes</h2>
121<p><em>WARNING - This feature is currently being worked on and will be improved in the next releases. Experimental.</em></p>
122<p>Installation:</p>
123<ul>
124<li>find a theme you'd like to install</li>
125<li>copy or clone the theme folder under <code>tpl/&lt;a_sweet_theme&gt;</code></li>
126<li>enable the theme:
127<ul>
128<li>Shaarli &lt; <code>v0.9.0</code>: edit <code>data/config.json.php</code> and set the value of <code>raintpl_tpl</code> to the new theme name:<br />
129<code>&quot;raintpl_tpl&quot;: &quot;tpl\/my-template\/&quot;</code></li>
130<li>Shaarli &gt;= <code>v0.9.0</code>: select the theme through the <em>Tools</em> page</li>
131</ul></li>
132</ul>
133<h2 id="community-css-themes">Community CSS &amp; themes</h2>
134<h3 id="custom-css-1">Custom CSS</h3>
135<ul>
136<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>
137<li><a href="https://github.com/shaarli/shaarli-themes">shaarli/shaarli-themes</a><a href=".html"></a></li>
138</ul>
139<h3 id="themes-1">Themes</h3>
140<ul>
141<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>
142<li><a href="https://github.com/alexisju/albinomouse-template">alexisju/albinomouse-template</a> - A full template for Shaarli<a href=".html"></a></li>
143<li><a href="https://github.com/ArthurHoaro/shaarli-launch">ArthurHoaro/shaarli-launch</a> - Customizable Shaarli theme<a href=".html"></a></li>
144<li><a href="https://github.com/dhoko/ShaarliTemplate">dhoko/ShaarliTemplate</a> - A template/theme for Shaarli<a href=".html"></a></li>
145<li><a href="https://github.com/kalvn/shaarli-blocks">kalvn/shaarli-blocks</a> - A template/theme for Shaarli<a href=".html"></a></li>
146<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>
147<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>
148</ul>
149<h3 id="shaarli-forks">Shaarli forks</h3>
150<ul>
151<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>
152<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>
153</ul>
154<h2 id="example-installation-albinomouse-theme">Example installation: AlbinoMouse theme</h2>
155<p>With the following configuration:</p>
156<ul>
157<li>Apache 2 / PHP 5.6</li>
158<li>user sites are enabled, e.g. <code>/home/user/public_html/somedir</code> is served as <code>http://localhost/~user/somedir</code></li>
159<li><code>http</code> is the name of the Apache user</li>
160</ul>
161<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> ~/public_html
162
163<span class="co"># clone repositories</span>
164$ <span class="fu">git</span> clone https://github.com/shaarli/Shaarli.git shaarli
165$ <span class="bu">pushd</span> shaarli/tpl
166$ <span class="fu">git</span> clone https://github.com/alexisju/albinomouse-template.git
167$ <span class="bu">popd</span>
168
169<span class="co"># set access rights for Apache</span>
170$ <span class="fu">chgrp</span> -R http shaarli
171$ <span class="fu">chmod</span> g+rwx shaarli shaarli/cache shaarli/data shaarli/pagecache shaarli/tmp</code></pre></div>
172<p>Get config written:</p>
173<ul>
174<li>go to the freshly installed site</li>
175<li>fill the install form</li>
176<li>log in to Shaarli</li>
177</ul>
178<p>Edit Shaarli's <a href="configuration%7CShaarli-configuration.html">configuration|Shaarli configuration</a>:</p>
179<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>
180$ <span class="fu">sudo</span> sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php</code></pre></div>
181</body>
182</html>
diff --git a/doc/Troubleshooting.html b/doc/Troubleshooting.html
deleted file mode 100644
index f43e6ed3..00000000
--- a/doc/Troubleshooting.html
+++ /dev/null
@@ -1,202 +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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="troubleshooting">Troubleshooting</h1>
105<h2 id="browser">Browser</h2>
106<h3 id="redirection-issues-http-referer">Redirection issues (HTTP Referer)</h3>
107<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>
108<p>See:</p>
109<ul>
110<li><a href="https://en.wikipedia.org/wiki/HTTP_referer">HTTP referer</a> (Wikipedia)<a href=".html"></a></li>
111<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>
112<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>
113</ul>
114<h3 id="firefox-http-referer-options">Firefox HTTP Referer options</h3>
115<p>HTTP settings are available by browsing <code>about:config</code>, here are the available settings and their values.</p>
116<p><code>network.http.sendRefererHeader</code> - determines when to send the Referer HTTP header</p>
117<ul>
118<li>0: Never send the referring URL
119<ul>
120<li>not recommended, may break some sites</li>
121</ul></li>
122<li>1: Send only on clicked links</li>
123<li>2 (default): Send for links and images</li>
124</ul>
125<p><code>network.http.referer.XOriginPolicy</code> - Cross-domain origin policy</p>
126<ul>
127<li>0 (default): Always send</li>
128<li>1: Send if base domains match</li>
129<li>2: Send if hosts match</li>
130</ul>
131<p><code>network.http.referer.spoofSource</code> - Referer spoofing (~faking)</p>
132<ul>
133<li>false (default): real referer</li>
134<li>true: spoof referer (use target URI as referer)</li>
135<li>known to break some functionality in Shaarli</li>
136</ul>
137<p><code>network.http.referer.trimmingPolicy</code> - trim the URI not to send a full Referer</p>
138<ul>
139<li>0 (default): send full URI</li>
140<li>1: scheme+host+port+path</li>
141<li>2: scheme+host+port</li>
142</ul>
143<h3 id="firefox-localhost-and-redirections">Firefox, localhost and redirections</h3>
144<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>
145<p>To solve this, assign a local domain to your host, e.g.</p>
146<pre><code>127.0.0.1 localhost desktop localhost.lan
147::1 localhost desktop localhost.lan</code></pre>
148<p>and browse Shaarli at <a href="http://localhost.lan/" class="uri">http://localhost.lan/</a>.</p>
149<p>Related threads:</p>
150<ul>
151<li><a href="https://bbs.archlinux.org/viewtopic.php?id=156064">What is localhost.localdomain for?</a><a href=".html"></a></li>
152<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>
153</ul>
154<h2 id="login">Login</h2>
155<h3 id="i-forgot-my-password">I forgot my password!</h3>
156<p>Delete the file <code>data/config.php</code> and display the page again. You will be asked for a new login/password.</p>
157<h3 id="im-locked-out---login-bruteforce-protection">I'm locked out - Login bruteforce protection</h3>
158<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>
159<p>To remove the current IP bans, delete the file <code>data/ipbans.php</code></p>
160<h3 id="list-of-all-login-attempts">List of all login attempts</h3>
161<p>The file <code>data/log.txt</code> shows all logins (successful or failed) and bans/lifted bans.<br />
162Search for <code>failed</code> in this file to look for unauthorized login attempts.</p>
163<h2 id="hosting-problems">Hosting problems</h2>
164<h3 id="old-php-versions">Old PHP versions</h3>
165<ul>
166<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>
167</ul>
168<div class="sourceCode"><pre class="sourceCode ini"><code class="sourceCode ini"><span class="dt">&lt;IfDefine Free&gt;</span>
169<span class="dt">php56 1</span>
170<span class="dt">&lt;/IfDefine&gt;</span></code></pre></div>
171<ul>
172<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>
173<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>
174<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>
175</ul>
176<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>
177<span class="co">// </span><span class="al">FIXME</span><span class="co">: Decode charset according to charset specified in either 1) HTTP response headers or 2) &lt;head&gt; in html </span>
178<span class="co">//if (strpos($status,&#39;200 OK&#39;)) $title=html_extract_title($data);</span></code></pre></div>
179<ul>
180<li>On hosts which forbid outgoing HTTP requests (such as free.fr), some thumbnails will not work.</li>
181<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>
182</ul>
183<h3 id="dates-are-not-properly-formatted">Dates are not properly formatted</h3>
184<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>
185<h3 id="problems-on-centos-servers">Problems on CentOS servers</h3>
186<p>On <strong>CentOS</strong>/RedHat derivatives, you may need to install the <code>php-mbstring</code> package.</p>
187<h3 id="my-session-expires-i-cant-stay-logged-in">My session expires! I can't stay logged in</h3>
188<p>This can be caused by several things:</p>
189<ul>
190<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>
191<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>
192<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>
193<li>Some browser addons may interfer with HTTP headers (ipfuck/ipflood/GreaseMonkey…). Try disabling those.</li>
194<li>You may be using OperaTurbo or OperaMini, which use their own proxies which may change from time to time.</li>
195<li>If you have another application on the same webserver where Shaarli is installed, these application may forcefully expire php sessions.</li>
196</ul>
197<h2 id="sessions-do-not-seem-to-work-correctly-on-your-server">Sessions do not seem to work correctly on your server</h2>
198<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>
199<h3 id="pubsubhubbub-support">pubsubhubbub support</h3>
200<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>
201</body>
202</html>
diff --git a/doc/Unit-tests.html b/doc/Unit-tests.html
deleted file mode 100644
index 09611463..00000000
--- a/doc/Unit-tests.html
+++ /dev/null
@@ -1,226 +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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="unit-tests">Unit tests</h1>
105<h3 id="setup-your-environment-for-tests">Setup your environment for tests</h3>
106<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>
107<p>Regarding Composer, you can either use:</p>
108<ul>
109<li>a system-wide version, e.g. installed through your distro's package manager</li>
110<li>a local version, downloadable <a href="https://getcomposer.org/download/">here</a><a href=".html"></a></li>
111</ul>
112<h4 id="sample-usage">Sample usage</h4>
113<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co"># system-wide version</span>
114$ <span class="ex">composer</span> install
115$ <span class="ex">composer</span> update
116
117<span class="co"># local version</span>
118$ <span class="ex">php</span> composer.phar self-update
119$ <span class="ex">php</span> composer.phar install
120$ <span class="ex">php</span> composer.phar update</code></pre></div>
121<h4 id="install-shaarli-dev-dependencies">Install Shaarli dev dependencies</h4>
122<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> /path/to/shaarli
123$ <span class="ex">composer</span> update</code></pre></div>
124<h4 id="install-and-enable-xdebug-to-generate-phpunit-coverage-reports">Install and enable Xdebug to generate PHPUnit coverage reports</h4>
125<p>For Debian-based distros:</p>
126<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">aptitude</span> install php5-xdebug</code></pre></div>
127<p>For ArchLinux:</p>
128<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">pacman</span> -S xdebug</code></pre></div>
129<p>Then add the following line to <code>/etc/php/php.ini</code>:</p>
130<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>
131<h4 id="run-unit-tests">Run unit tests</h4>
132<p>Successful test suite:</p>
133<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">make</span> test
134
135<span class="ex">-------</span>
136<span class="ex">PHPUNIT</span>
137<span class="ex">-------</span>
138<span class="ex">PHPUnit</span> 4.6.9 by Sebastian Bergmann and contributors.
139
140<span class="ex">Configuration</span> read from /home/virtualtam/public_html/shaarli/phpunit.xml
141
142<span class="ex">....................................</span>
143
144<span class="ex">Time</span>: 759 ms, Memory: 8.25Mb
145
146<span class="ex">OK</span> (36 tests, 65 assertions)</code></pre></div>
147<p>Test suite with failures and errors:</p>
148<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">make</span> test
149<span class="ex">-------</span>
150<span class="ex">PHPUNIT</span>
151<span class="ex">-------</span>
152<span class="ex">PHPUnit</span> 4.6.9 by Sebastian Bergmann and contributors.
153
154<span class="ex">Configuration</span> read from /home/virtualtam/public_html/shaarli/phpunit.xml
155
156<span class="ex">E..FF...............................</span>
157
158<span class="ex">Time</span>: 802 ms, Memory: 8.25Mb
159
160<span class="ex">There</span> was 1 error:
161
162<span class="ex">1</span>) <span class="ex">LinkDBTest</span>::testConstructLoggedIn
163<span class="ex">Missing</span> argument 2 for LinkDB::__construct(), <span class="ex">called</span> in /home/virtualtam/public_html/shaarli/tests/Link\
164DBTest.php on line 79 and defined
165
166<span class="ex">/home/virtualtam/public_html/shaarli/application</span>/LinkDB.php:<span class="ex">58</span>
167<span class="ex">/home/virtualtam/public_html/shaarli/tests</span>/LinkDBTest.php:<span class="ex">79</span>
168
169<span class="ex">--</span>
170
171<span class="ex">There</span> were 2 failures:
172
173<span class="ex">1</span>) <span class="ex">LinkDBTest</span>::testCheckDBNew
174<span class="ex">Failed</span> asserting that two strings are equal.
175<span class="ex">---</span> Expected
176<span class="ex">+++</span> Actual
177<span class="ex">@@</span> @@
178<span class="ex">-</span><span class="st">&#39;e3edea8ea7bb50be4bcb404df53fbb4546a7156e&#39;</span>
179<span class="ex">+</span><span class="st">&#39;85eab0c610d4f68025f6ed6e6b6b5fabd4b55834&#39;</span>
180
181<span class="ex">/home/virtualtam/public_html/shaarli/tests</span>/LinkDBTest.php:<span class="ex">121</span>
182
183<span class="ex">2</span>) <span class="ex">LinkDBTest</span>::testCheckDBLoad
184<span class="ex">Failed</span> asserting that two strings are equal.
185<span class="ex">---</span> Expected
186<span class="ex">+++</span> Actual
187<span class="ex">@@</span> @@
188<span class="ex">-</span><span class="st">&#39;e3edea8ea7bb50be4bcb404df53fbb4546a7156e&#39;</span>
189<span class="ex">+</span><span class="st">&#39;85eab0c610d4f68025f6ed6e6b6b5fabd4b55834&#39;</span>
190
191<span class="ex">/home/virtualtam/public_html/shaarli/tests</span>/LinkDBTest.php:<span class="ex">133</span>
192
193<span class="ex">FAILURES</span>!
194<span class="ex">Tests</span>: 36, Assertions: 63, Errors: 1, Failures: 2.</code></pre></div>
195<h4 id="test-results-and-coverage">Test results and coverage</h4>
196<p>By default, PHPUnit will run all suitable tests found under the <code>tests</code> directory.</p>
197<p>Each test has 3 possible outcomes:</p>
198<ul>
199<li><code>.</code> - success</li>
200<li><code>F</code> - failure: the test was run but its results are invalid</li>
201<li>the code does not behave as expected</li>
202<li>dependencies to external elements: globals, session, cache...</li>
203<li><code>E</code> - error: something went wrong and the tested code has crashed</li>
204<li>typos in the code, or in the test code</li>
205<li>dependencies to missing external elements</li>
206</ul>
207<p>If Xdebug has been installed and activated, two coverage reports will be generated:</p>
208<ul>
209<li>a summary in the console</li>
210<li>a detailed HTML report with metrics for tested code</li>
211<li>to open it in a web browser: <code>firefox coverage/index.html &amp;</code></li>
212</ul>
213<h3 id="executing-specific-tests">Executing specific tests</h3>
214<p>Add a <a href="https://phpunit.de/manual/current/en/appendixes.annotations.html#appendixes.annotations.group"><code>@group</code></a> annotation in a test class or method comment:<a href=".html"></a></p>
215<div class="sourceCode"><pre class="sourceCode php"><code class="sourceCode php"><span class="co">/**</span>
216<span class="co"> * Netscape bookmark import</span>
217<span class="co"> * </span><span class="an">@group</span><span class="co"> WIP</span>
218<span class="co"> */</span>
219<span class="kw">class</span> BookmarkImportTest <span class="kw">extends</span> PHPUnit_Framework_TestCase
220{
221 <span class="ot">[</span><span class="st">...</span><span class="ot">][](</span>.html<span class="ot">)</span>
222}</code></pre></div>
223<p>To run all tests annotated with <code>@group WIP</code>:</p>
224<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">vendor/bin/phpunit</span> --group WIP tests/</code></pre></div>
225</body>
226</html>
diff --git a/doc/Upgrade-and-migration.html b/doc/Upgrade-and-migration.html
deleted file mode 100644
index 667215ab..00000000
--- a/doc/Upgrade-and-migration.html
+++ /dev/null
@@ -1,259 +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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="upgrade-and-migration">Upgrade and migration</h1>
105<h2 id="preparation">Preparation</h2>
106<h3 id="note-your-current-version">Note your current version</h3>
107<p>If anything goes wrong, it's important for us to know which version you're upgrading from.<br />
108The current version is present in the <code>version.php</code> file.</p>
109<h3 id="backup-your-data">Backup your data</h3>
110<p>Shaarli stores all user data under the <code>data</code> directory:</p>
111<ul>
112<li><code>data/config.php</code> - main configuration file</li>
113<li><code>data/datastore.php</code> - bookmarked links</li>
114<li><code>data/ipbans.php</code> - banned IP addresses</li>
115<li><code>data/updates.txt</code> - contains all automatic update to the configuration and datastore files already run</li>
116</ul>
117<p>See <a href="Shaarli-configuration.html">Shaarli configuration</a> for more information about Shaarli resources.</p>
118<p>It is recommended to backup this repository <em>before</em> starting updating/upgrading Shaarli:</p>
119<ul>
120<li>users with SSH access: copy or archive the directory to a temporary location</li>
121<li>users with FTP access: download a local copy of your Shaarli installation using your favourite client</li>
122</ul>
123<h3 id="migrating-data-from-a-previous-installation">Migrating data from a previous installation</h3>
124<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>
125<ul>
126<li>backup the <code>data</code> directory</li>
127<li>install or update Shaarli:
128<ul>
129<li>fresh installation - see <a href="Download-and-installation.html">Download and installation</a></li>
130<li>update - see the following sections</li>
131</ul></li>
132<li>check or restore the <code>data</code> directory</li>
133</ul>
134<h2 id="recommended-upgrading-from-release-archives">Recommended : Upgrading from release archives</h2>
135<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>
136<p>We recommend that you use the latest release tarball with the <code>-full</code> suffix. It contains the dependencies, please read <a href="Download-and-installation.html">Download and installation</a> for <code>git</code> complete instructions.</p>
137<p>Once downloaded, extract the archive locally and update your remote installation (e.g. via FTP) -be sure you keep the content of the <code>data</code> directory!</p>
138<p>After 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 <code>data/config.json.php</code> (see <a href="Shaarli-configuration.html">Shaarli configuration</a> for more details).</p>
139<h2 id="upgrading-with-git">Upgrading with Git</h2>
140<h3 id="updating-a-community-shaarli">Updating a community Shaarli</h3>
141<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>
142<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> /path/to/shaarli
143$ <span class="fu">git</span> pull
144
145<span class="ex">From</span> github.com:shaarli/Shaarli
146 <span class="ex">*</span> branch master -<span class="op">&gt;</span> FETCH_HEAD
147<span class="ex">Updating</span> ebd67c6..521f0e6
148<span class="ex">Fast-forward</span>
149 <span class="ex">application/Url.php</span> <span class="kw">|</span> <span class="ex">1</span> +
150 <span class="ex">shaarli_version.php</span> <span class="kw">|</span> <span class="ex">2</span> +-
151 <span class="ex">tests/Url/UrlTest.php</span> <span class="kw">|</span> <span class="ex">1</span> +
152 <span class="ex">3</span> files changed, 3 insertions(+), <span class="ex">1</span> deletion(-)</code></pre></div>
153<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>
154<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">composer</span> install --no-dev
155
156<span class="ex">Loading</span> composer repositories with package information
157<span class="ex">Updating</span> dependencies
158 <span class="ex">-</span> Installing shaarli/netscape-bookmark-parser (v1.0.1)
159 <span class="ex">Downloading</span>: 100%</code></pre></div>
160<h3 id="migrating-and-upgrading-from-sebsauvages-repository">Migrating and upgrading from Sebsauvage's repository</h3>
161<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>
162<p>The following guide assumes that:</p>
163<ul>
164<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>
165<li>the default remote is named <code>origin</code> and points to Sebsauvage's repository</li>
166<li>the current branch is <code>master</code>
167<ul>
168<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>
169</ul></li>
170<li>the working copy is clean:
171<ul>
172<li>no versioned file has been locally modified</li>
173<li>no untracked files are present</li>
174</ul></li>
175</ul>
176<h4 id="step-0-show-repository-information">Step 0: show repository information</h4>
177<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="bu">cd</span> /path/to/shaarli
178
179$ <span class="fu">git</span> remote -v
180<span class="ex">origin</span> https://github.com/sebsauvage/Shaarli (fetch)
181<span class="ex">origin</span> https://github.com/sebsauvage/Shaarli (push)
182
183$ <span class="fu">git</span> branch -vv
184<span class="ex">*</span> master 029f75f [origin/master] Update README.md[](.html)
185
186$ <span class="fu">git</span> status
187<span class="ex">On</span> branch master
188<span class="ex">Your</span> branch is up-to-date with <span class="st">&#39;origin/master&#39;</span>.
189<span class="ex">nothing</span> to commit, working directory clean</code></pre></div>
190<h4 id="step-1-update-git-remotes">Step 1: update Git remotes</h4>
191<pre><code>$ git remote rename origin sebsauvage
192$ git remote -v
193sebsauvage https://github.com/sebsauvage/Shaarli (fetch)
194sebsauvage https://github.com/sebsauvage/Shaarli (push)
195
196$ git remote add origin https://github.com/shaarli/Shaarli
197$ git fetch origin
198
199remote: Counting objects: 3015, done.
200remote: Compressing objects: 100% (19/19), done.
201remote: Total 3015 (delta 446), reused 457 (delta 446), pack-reused 2550
202Receiving objects: 100% (3015/3015), 2.59 MiB | 918.00 KiB/s, done.
203Resolving deltas: 100% (1899/1899), completed with 48 local objects.
204From https://github.com/shaarli/Shaarli
205 * [new branch] master -&gt; origin/master[](.html)
206 * [new branch] stable -&gt; origin/stable[](.html)
207[...][](.html)
208 * [new tag] v0.6.4 -&gt; v0.6.4[](.html)
209 * [new tag] v0.7.0 -&gt; v0.7.0[](.html)</code></pre>
210<h4 id="step-2-use-the-stable-community-branch">Step 2: use the stable community branch</h4>
211<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">git</span> checkout origin/stable -b stable
212<span class="ex">Branch</span> stable set up to track remote branch stable from origin.
213<span class="ex">Switched</span> to a new branch <span class="st">&#39;stable&#39;</span>
214
215$ <span class="fu">git</span> branch -vv
216 <span class="ex">master</span> 029f75f [sebsauvage/master] Update README.md[](.html)
217<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>
218<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>
219<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="ex">composer</span> install --no-dev
220
221<span class="ex">Loading</span> composer repositories with package information
222<span class="ex">Updating</span> dependencies
223 <span class="ex">-</span> Installing shaarli/netscape-bookmark-parser (v1.0.1)
224 <span class="ex">Downloading</span>: 100%</code></pre></div>
225<p>Optionally, you can delete information related to the legacy version:</p>
226<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash">$ <span class="fu">git</span> branch -D master
227<span class="ex">Deleted</span> branch master (was 029f75f)<span class="ex">.</span>
228
229$ <span class="fu">git</span> remote remove sebsauvage
230
231$ <span class="fu">git</span> remote -v
232<span class="ex">origin</span> https://github.com/shaarli/Shaarli (fetch)
233<span class="ex">origin</span> https://github.com/shaarli/Shaarli (push)
234
235$ <span class="fu">git</span> gc
236<span class="ex">Counting</span> objects: 3317, done.
237<span class="ex">Delta</span> compression using up to 8 threads.
238<span class="ex">Compressing</span> objects: 100% (1237/1237), <span class="kw">done</span><span class="ex">.</span>
239<span class="ex">Writing</span> objects: 100% (3317/3317), <span class="kw">done</span><span class="ex">.</span>
240<span class="ex">Total</span> 3317 (delta 2050), <span class="ex">reused</span> 3301 (delta 2034)<span class="ex">to</span></code></pre></div>
241<h4 id="step-3-configuration">Step 3: configuration</h4>
242<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>
243<h2 id="troubleshooting">Troubleshooting</h2>
244<p>If the solutions provided here doesn't work, please open an issue specifying which version you're upgrading from and to.</p>
245<h3 id="you-must-specify-an-integer-as-a-key">You must specify an integer as a key</h3>
246<p>In <code>v0.8.1</code> we changed how link keys are handled (from timestamps to incremental integers).<br />
247Take a look at <code>data/updates.txt</code> content.</p>
248<h4 id="updates.txt-contains-updatemethoddatastoreids"><code>updates.txt</code> contains <code>updateMethodDatastoreIds</code></h4>
249<p>Try to delete it and refresh your page while being logged in.</p>
250<h4 id="updates.txt-doesnt-exists-or-doesnt-contain-updatemethoddatastoreids"><code>updates.txt</code> doesn't exists or doesn't contain <code>updateMethodDatastoreIds</code></h4>
251<ol>
252<li>Create <code>data/updates.txt</code> if it doesn't exist.</li>
253<li>Paste this string in the update file <code>;updateMethodRenameDashTags;</code></li>
254<li>Login to Shaarli.</li>
255<li>Delete the update file.</li>
256<li>Refresh.</li>
257</ol>
258</body>
259</html>
diff --git a/doc/Usage.html b/doc/Usage.html
deleted file mode 100644
index b5855881..00000000
--- a/doc/Usage.html
+++ /dev/null
@@ -1,95 +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<li><a href="REST-API.html">REST API</a></li>
36</ul></li>
37<li>How To
38<ul>
39<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
40<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>
41<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
42<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
43<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
44</ul></li>
45<li><a href="Troubleshooting.html">Troubleshooting</a></li>
46<li><a href="Development.html">Development</a>
47<ul>
48<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
49<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
50<li><a href="Directory-structure.html">Directory structure</a></li>
51<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
52<li><a href="Plugin-System.html">Plugin System</a></li>
53<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
54<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
55<li><a href="Security.html">Security</a></li>
56<li><a href="Static-analysis.html">Static analysis</a></li>
57<li><a href="Theming.html">Theming</a></li>
58<li><a href="Unit-tests.html">Unit tests</a></li>
59</ul></li>
60<li>About
61<ul>
62<li><a href="FAQ.html">FAQ</a></li>
63<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
64</ul></li>
65</ul>
66</div>
67<h1 id="usage">Usage</h1>
68<h3 id="main-features">Main features</h3>
69<p>Shaarli is intended:</p>
70<ul>
71<li>to share, comment and save interesting links and news</li>
72<li>to bookmark useful/frequent personal links (as private links) and share them between computers</li>
73<li>as a minimal blog/microblog/writing platform (no character limit)</li>
74<li>as a read-it-later list (for example items tagged <code>readlater</code>)</li>
75<li>to draft and save articles/ideas</li>
76<li>to keep code snippets</li>
77<li>to keep notes and documentation</li>
78<li>as a shared clipboard between machines</li>
79<li>as a todo list</li>
80<li>to store playlists (e.g. with the <code>music</code> or <code>video</code> tags)</li>
81<li>to keep extracts/comments from webpages that may disappear</li>
82<li>to keep track of ongoing discussions (for example items tagged <code>discussion</code>)</li>
83<li><a href="http://shaarli.chassegnouf.net/?9Efeiw">to feed RSS aggregators</a> (planets) with specific tags<a href=".html"></a></li>
84<li>to feed other social networks, blogs... using RSS feeds and external services (dlvr.it, ifttt.com ...)</li>
85</ul>
86<h3 id="using-shaarli-as-a-blog-notepad-pastebin...">Using Shaarli as a blog, notepad, pastebin...</h3>
87<ul>
88<li>Go to your Shaarli setup and log in</li>
89<li>Click the <code>Add Link</code> button</li>
90<li>To share text only, do not enter any URL in the corresponding input field and click <code>Add Link</code></li>
91<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>
92<li>Voilà! Your article is now published (privately if you selected that option) and accessible using its permalink.</li>
93</ul>
94</body>
95</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/Versioning-and-Branches.html b/doc/Versioning-and-Branches.html
deleted file mode 100644
index 4dfe4a91..00000000
--- a/doc/Versioning-and-Branches.html
+++ /dev/null
@@ -1,156 +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 – Versioning and Branches</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<li><a href="REST-API.html">REST API</a></li>
73</ul></li>
74<li>How To
75<ul>
76<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
77<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>
78<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
79<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
80<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
81</ul></li>
82<li><a href="Troubleshooting.html">Troubleshooting</a></li>
83<li><a href="Development.html">Development</a>
84<ul>
85<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
86<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
87<li><a href="Directory-structure.html">Directory structure</a></li>
88<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
89<li><a href="Plugin-System.html">Plugin System</a></li>
90<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
91<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
92<li><a href="Security.html">Security</a></li>
93<li><a href="Static-analysis.html">Static analysis</a></li>
94<li><a href="Theming.html">Theming</a></li>
95<li><a href="Unit-tests.html">Unit tests</a></li>
96</ul></li>
97<li>About
98<ul>
99<li><a href="FAQ.html">FAQ</a></li>
100<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
101</ul></li>
102</ul>
103</div>
104<h1 id="versioning-and-branches">Versioning and Branches</h1>
105<p>[<strong>WORK IN PROGRESS</strong>][](.html)</p>
106<p>It'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.</p>
107<h2 id="master-branch"><code>master</code> branch</h2>
108<p>The <code>master</code> branch is the development branch. Any new change MUST go through this branch using Pull Requests.</p>
109<p>Remarks:</p>
110<ul>
111<li>This branch shouldn't be used for production as it isn't necessary stable.</li>
112<li>3rd party aren't required to be compatible with the latest changes.</li>
113<li>Official plugins, themes and libraries (contained within Shaarli organization repos) must be compatible with the master branch.</li>
114<li>The version in this branch is always <code>dev</code>.</li>
115</ul>
116<h2 id="v0.x-branch"><code>v0.x</code> branch</h2>
117<p>This <code>v0.x</code> branch, points to the latest <code>v0.x.y</code> release.</p>
118<p>Explanation:</p>
119<p>When 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.</p>
120<p>In this case, the issue is fixed in the <code>master</code> branch, and the fix is backported the to the <code>v0.x</code> branch. Then a new release is made from the <code>v0.x</code> branch.</p>
121<p>This workflow allow us to fix any major bug detected, without having to release bleeding edge feature too soon.</p>
122<h2 id="latest-branch"><code>latest</code> branch</h2>
123<p>This branch point the latest release. It recommended to use it to get the latest tested changes.</p>
124<h2 id="stable-branch"><code>stable</code> branch</h2>
125<p>The <code>stable</code> branch doesn't contain any major bug, and is one major digit version behind the latest release.</p>
126<p>For example, the current latest release is <code>v0.8.3</code>, the stable branch is an alias to the latest <code>v0.7.x</code> release. When the <code>v0.9.0</code> version will be released, the stable will move to the latest <code>v0.8.x</code> release.</p>
127<p>Remarks:</p>
128<ul>
129<li>Shaarli release pace isn't fast, and the stable branch might be a few months behind the latest release.</li>
130</ul>
131<h2 id="releases">Releases</h2>
132<p>Releases are always made from the latest <code>v0.x</code> branch.</p>
133<p>Note that for every release, we manually generate a tarball which contains all Shaarli dependencies, making Shaarli's installation only one step.</p>
134<h2 id="advices-on-3rd-party-git-repos-workflow">Advices on 3rd party git repos workflow</h2>
135<h3 id="versioning">Versioning</h3>
136<p>Any 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 <a href="https://github.com/shaarli/Shaarli/releases">changelog</a> (<em>Draft</em> means not released yet) and the commit log (like <a href="https://github.com/shaarli/Shaarli/commits/master/tpl/default"><code>tpl</code> folder</a> for themes)). You can either:<a href=".html"></a></p>
137<ul>
138<li>use the Shaarli version number, with your repo version. For example, if Shaarli <code>v0.8.3</code> is released, publish a <code>v0.8.3-1</code> release, where <code>v0.8.3</code> states Shaarli compatibility and <code>-1</code> is your own version digit for the current Shaarli version.</li>
139<li>use your own versioning scheme, and state Shaarli compatibility in the release description.</li>
140</ul>
141<p>Using this, any user will be able to pick the release matching his own Shaarli version.</p>
142<h3 id="major-bugfix-backport-releases">Major bugfix backport releases</h3>
143<p>To be able to support backported fixes, it recommended to use our workflow:</p>
144<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co"># In master, fix the major bug</span>
145<span class="fu">git</span> commit -m <span class="st">&quot;Katastrophe&quot;</span>
146<span class="fu">git</span> push origin master
147<span class="co"># Get your commit hash</span>
148<span class="fu">git</span> log --format=<span class="st">&quot;%H&quot;</span> -n 1
149<span class="co"># Create a new branch from your latest release, let&#39;s say v0.8.2-1 (the tag name)</span>
150<span class="fu">git</span> checkout -b katastrophe v0.8.2-1
151<span class="co"># Backport the fix commit to your brand new branch</span>
152<span class="fu">git</span> cherry-pick <span class="op">&lt;</span>fix commit hash<span class="op">&gt;</span>
153<span class="fu">git</span> push origin katastrophe
154<span class="co"># Then you just have to make a new release from the `katastrophe` branch tagged `v0.8.3-1`</span></code></pre></div>
155</body>
156</html>
diff --git a/doc/_Footer.html b/doc/_Footer.html
deleted file mode 100644
index 09473a38..00000000
--- a/doc/_Footer.html
+++ /dev/null
@@ -1,70 +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<li><a href="REST-API.html">REST API</a></li>
36</ul></li>
37<li>How To
38<ul>
39<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
40<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>
41<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
42<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
43<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
44</ul></li>
45<li><a href="Troubleshooting.html">Troubleshooting</a></li>
46<li><a href="Development.html">Development</a>
47<ul>
48<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
49<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
50<li><a href="Directory-structure.html">Directory structure</a></li>
51<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
52<li><a href="Plugin-System.html">Plugin System</a></li>
53<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
54<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
55<li><a href="Security.html">Security</a></li>
56<li><a href="Static-analysis.html">Static analysis</a></li>
57<li><a href="Theming.html">Theming</a></li>
58<li><a href="Unit-tests.html">Unit tests</a></li>
59</ul></li>
60<li>About
61<ul>
62<li><a href="FAQ.html">FAQ</a></li>
63<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
64</ul></li>
65</ul>
66</div>
67<h1 id="footer-shaarli-the-personal-minimalist-super-fast-database-free-bookmarking-service">_Footer<br />
68<em>Shaarli, the personal, minimalist, super-fast, database-free bookmarking service</em></h1>
69</body>
70</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 d3f94560..00000000
--- a/doc/_Sidebar.html
+++ /dev/null
@@ -1,119 +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<li><a href="REST-API.html">REST API</a></li>
36</ul></li>
37<li>How To
38<ul>
39<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
40<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>
41<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
42<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
43<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
44</ul></li>
45<li><a href="Troubleshooting.html">Troubleshooting</a></li>
46<li><a href="Development.html">Development</a>
47<ul>
48<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
49<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
50<li><a href="Directory-structure.html">Directory structure</a></li>
51<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
52<li><a href="Plugin-System.html">Plugin System</a></li>
53<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
54<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
55<li><a href="Security.html">Security</a></li>
56<li><a href="Static-analysis.html">Static analysis</a></li>
57<li><a href="Theming.html">Theming</a></li>
58<li><a href="Unit-tests.html">Unit tests</a></li>
59</ul></li>
60<li>About
61<ul>
62<li><a href="FAQ.html">FAQ</a></li>
63<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
64</ul></li>
65</ul>
66</div>
67<h1 id="sidebar">_Sidebar</h1>
68<ul>
69<li><a href="Home.html">Home</a></li>
70<li>Setup
71<ul>
72<li><a href="Download-and-Installation.html">Download and Installation</a></li>
73<li><a href="Upgrade-and-migration.html">Upgrade and migration</a></li>
74<li><a href="Server-requirements.html">Server requirements</a></li>
75<li><a href="Server-configuration.html">Server configuration</a></li>
76<li><a href="Server-security.html">Server security</a></li>
77<li><a href="Shaarli-configuration.html">Shaarli configuration</a></li>
78<li><a href="Plugins.html">Plugins</a></li>
79</ul></li>
80<li><a href="Docker.html">Docker</a></li>
81<li><a href="Usage.html">Usage</a>
82<ul>
83<li><a href="Sharing-button.html">Sharing button</a> (bookmarklet)</li>
84<li><a href="Browsing-and-Searching.html">Browsing and Searching</a></li>
85<li><a href="Firefox-share.html">Firefox share</a></li>
86<li><a href="RSS-feeds.html">RSS feeds</a></li>
87<li><a href="REST-API.html">REST API</a></li>
88</ul></li>
89<li>How To
90<ul>
91<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
92<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>
93<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
94<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
95<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
96</ul></li>
97<li><a href="Troubleshooting.html">Troubleshooting</a></li>
98<li><a href="Development.html">Development</a>
99<ul>
100<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
101<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
102<li><a href="Directory-structure.html">Directory structure</a></li>
103<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
104<li><a href="Plugin-System.html">Plugin System</a></li>
105<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
106<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
107<li><a href="Security.html">Security</a></li>
108<li><a href="Static-analysis.html">Static analysis</a></li>
109<li><a href="Theming.html">Theming</a></li>
110<li><a href="Unit-tests.html">Unit tests</a></li>
111</ul></li>
112<li>About
113<ul>
114<li><a href="FAQ.html">FAQ</a></li>
115<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
116</ul></li>
117</ul>
118</body>
119</html>
diff --git a/doc/_Sidebar.md b/doc/_Sidebar.md
deleted file mode 100644
index 8df2e565..00000000
--- a/doc/_Sidebar.md
+++ /dev/null
@@ -1,39 +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 - [REST API](REST-API.html)
18- How To
19 - [Backup, restore, import and export](Backup,-restore,-import-and-export.html)
20 - [Copy an existing installation over SSH and serve it locally](Copy-an-existing-installation-over-SSH-and-serve-it-locally.html)
21 - [Create and serve multiple Shaarlis (farm)](Create-and-serve-multiple-Shaarlis-(farm).html)
22 - [Download CSS styles from an OPML list](Download-CSS-styles-from-an-OPML-list.html)
23 - [Datastore hacks](Datastore-hacks.html)
24- [Troubleshooting](Troubleshooting.html)
25- [Development](Development.html)
26 - [GnuPG signature](GnuPG-signature.html)
27 - [Coding guidelines](Coding-guidelines.html)
28 - [Directory structure](Directory-structure.html)
29 - [3rd party libraries](3rd-party-libraries.html)
30 - [Plugin System](Plugin-System.html)
31 - [Release Shaarli](Release-Shaarli.html)
32 - [Versioning and Branches](Versioning-and-Branches.html)
33 - [Security](Security.html)
34 - [Static analysis](Static-analysis.html)
35 - [Theming](Theming.html)
36 - [Unit tests](Unit-tests.html)
37- About
38 - [FAQ](FAQ.html)
39 - [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..89724857 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,35 @@ 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.
53 47
54## Import Shaarli links to Firefox 48## Import Shaarli links to Firefox
55 49
56 * Export your Shaarli links as described above. 50- 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)` 51 - 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`) 52- 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` 53- Select `Import and Backup > Import bookmarks in HTML format`
60 54
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. 55Your 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 56
63You may be interested in these Firefox addons to manage links imported from Shaarli 57You may be interested in these Firefox addons to manage links imported from Shaarli
64 58
65 * [Bookmark Deduplicator](https://addons.mozilla.org/en-US/firefox/addon/bookmark-deduplicator/) - provides an easy way to deduplicate your bookmarks[](.html) 59- [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) 60- [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..e53e3261
--- /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#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/Browsing-and-searching.md b/doc/md/Browsing-and-searching.md
index 854b6b60..35707482 100644
--- a/doc/Browsing-and-searching.md
+++ b/doc/md/Browsing-and-searching.md
@@ -1,8 +1,3 @@
1#Browsing and searching
2# Browsing and Searching
3
4![(http://pix.toile-libre.org/upload/original/1455571378.png)]((http://pix.toile-libre.org/upload/original/1455571378.png).html)
5
6## Plain text search 1## Plain text search
7 2
8Use the `Search text` field to search in _any_ of the fields of all links (Title, URL, Description...) 3Use the `Search text` field to search in _any_ of the fields of all links (Title, URL, Description...)
@@ -25,4 +20,4 @@ To search for links that are not tagged, enter `""` in the tag search field.
25 20
26## Filtering RSS feeds/Picture wall 21## Filtering RSS feeds/Picture wall
27 22
28RSS feeds can also be restricted to only return items matching a text/tag search: see [RSS feeds](RSS-feeds.html). 23RSS feeds can also be restricted to only return items matching a text/tag search: see [RSS feeds](RSS feeds).
diff --git a/doc/md/Community-&-Related-software.md b/doc/md/Community-&-Related-software.md
new file mode 100644
index 00000000..8edbeefa
--- /dev/null
+++ b/doc/md/Community-&-Related-software.md
@@ -0,0 +1,67 @@
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## Community
5- [Liens en vrac de sebsauvage](http://sebsauvage.net/links/) - the original Shaarli
6- [A large list of Shaarlis](http://porneia.free.fr/pub/links/ou-est-shaarli.html)
7- [A list of working Shaarli aggregators](https://raw.githubusercontent.com/Oros42/find_shaarlis/master/annuaires.json)
8- [A list of some known Shaarlis](https://github.com/Oros42/shaarlis_list)
9- [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_
10- [Original ideas/fixme/TODO page](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:ideas)
11- [Original discussion page](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:discussion) (fr)
12- [Original revisions history](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:history)
13- [Shaarli.fr/my](https://www.shaarli.fr/my.php) - Unofficial, unsupported (old fork) hosted Shaarlis provider, courtesy of [DMeloni](https://github.com/DMeloni)
14
15
16### Articles and social media discussions
17- 2016-09-22 - Hacker News - https://news.ycombinator.com/item?id=12552176
18- 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/)
19- 2015-06-22 - Hacker News - https://news.ycombinator.com/item?id=9755366
20- 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/)
21
22
23### REST API clients
24See [REST API](REST-API) for a list of official and community clients.
25
26
27### Third party plugins
28- [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.
29- [Code Coloration](https://github.com/ArthurHoaro/code-coloration) by [@ArthurHoaro](https://github.com/ArthurHoaro): client side code syntax highlighter.
30- [Disqus](https://github.com/kalvn/shaarli-plugin-disqus) by [@kalvn](https://github.com/kalvn): Adds Disqus comment system to your Shaarli.
31- [emojione](https://github.com/NerosTie/emojione) by [@NerosTie](https://github.com/NerosTie): Add colorful emojis to your Shaarli.
32- [google analytics](https://github.com/ericjuden/Shaarli-Google-Analytics-Plugin) by [@ericjuden](http://github.com/ericjuden): Adds Google Analytics tracking support
33- [launch](https://github.com/ArthurHoaro/launch-plugin) - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli.
34- [related](https://github.com/ilesinge/shaarli-related) by [@ilesinge](https://github.com/ilesinge) - Show related links based on the number of identical tags.
35- [social](https://github.com/alexisju/social) by [@alexisju](https://github.com/alexisju): share links to social networks.
36- [shaarli2twitter](https://github.com/ArthurHoaro/shaarli2twitter) by [@ArthurHoaro](https://github.com/ArthurHoaro) - Automatically tweet your shared links from Shaarli
37
38
39### Third-party themes
40See [Theming](Theming) for a list of community-contributed themes, and an installation guide.
41
42
43## Integration with other platforms
44- [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
45- [octopress-shaarli](https://github.com/ahmet2mir/octopress-shaarli) - Octopress plugin to retrieve Shaarli links on the sidebar
46- [Scuttle to Shaarli](https://github.com/q2apro/scuttle-to-shaarli) - Import bookmarks from Scuttle
47
48
49### Mobile Apps
50- [ShaarliOS](https://github.com/mro/ShaarliOS) iOS share extension - see [#308](https://github.com/shaarli/Shaarli/issues/308#issuecomment-184592070) for some promo codes,
51- [Shaarli for Android](http://sebsauvage.net/links/?ZAyDzg) - Android application that adds Shaarli as a sharing provider
52- [Shaarlier for Android](https://github.com/dimtion/Shaarlier) - Android application to simply add links directly into your Shaarli
53
54
55### Server apps
56- [shaarchiver](https://github.com/nodiscc/shaarchiver) - Archive your Shaarli bookmarks and their content
57- [shaarli-river](https://github.com/mknexen/shaarli-river) - An aggregator for shaarlis with many features
58- [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/))
59- [Shaarlimages](https://github.com/BoboTiG/shaarlimages) - An image-oriented aggregator for Shaarlis
60- [mknexen/shaarli-api](https://github.com/mknexen/shaarli-api) - A REST API for Shaarli
61- [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).
62- [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.
63
64
65## Alternatives to Shaarli
66See the [bookmarks & link sharing](https://github.com/Kickball/awesome-selfhosted/#bookmarks--link-sharing)
67section on [awesome-selfhosted](https://github.com/Kickball/awesome-selfhosted/).
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/Download-and-Installation.md b/doc/md/Download-and-Installation.md
index 970144a5..135f0633 100644
--- a/doc/Download-and-Installation.md
+++ b/doc/md/Download-and-Installation.md
@@ -1,41 +1,43 @@
1#Download and Installation 1To install Shaarli, simply place the files in a directory under your webserver's
2# Get Shaarli! 2Document Root (or directly at the document root).
3 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) 4Also, please make sure your server meets the [requirements](Server-requirements)
5and is properly [configured](Server-configuration).
5 6
6Several releases are available: 7Several releases are available:
7 8
8-------------------------------------------------------- 9- by downloading full release archives including all dependencies
10- by downloading Github archives
11- by cloning the Git repository
12
13---
9 14
10## Latest release (recommended) 15## Latest release (recommended)
11### Download as an archive 16### Download as an archive
12Get the latest released version from the [releases](https://github.com/shaarli/Shaarli/releases) page.[](.html) 17Get the latest released version from the [releases](https://github.com/shaarli/Shaarli/releases) page.
13 18
14**Download our *shaarli-full* archive** to include dependencies. 19**Download our *shaarli-full* archive** to include dependencies.
15 20
16The current latest released version is `v0.8.4` 21The current latest released version is `v0.9.0`
17 22
18Or in command lines: 23Or in command lines:
19 24
20```bash 25```bash
21$ wget https://github.com/shaarli/Shaarli/releases/download/v0.8.4/shaarli-v0.8.4-full.zip 26$ wget https://github.com/shaarli/Shaarli/releases/download/v0.9.0/shaarli-v0.9.0-full.zip
22$ unzip shaarli-v0.8.4-full.zip 27$ unzip shaarli-v0.9.0-full.zip
23$ mv Shaarli /path/to/shaarli/ 28$ mv Shaarli /path/to/shaarli/
24``` 29```
25 30
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) 31In 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).|
27|-----|--------------------------|
28 32
29### Using git 33### Using git
30 34
31``` 35```
32mkdir -p /path/to/shaarli && cd /path/to/shaarli/ 36$ mkdir -p /path/to/shaarli && cd /path/to/shaarli/
33git clone -b v0.8 https://github.com/shaarli/Shaarli.git . 37$ git clone -b v0.9 https://github.com/shaarli/Shaarli.git .
34composer install --no-dev 38$ composer install --no-dev --prefer-dist
35``` 39```
36 40
37--------------------------------------------------------
38
39## Stable version 41## Stable version
40 42
41The stable version has been experienced by Shaarli users, and will receive security updates. 43The stable version has been experienced by Shaarli users, and will receive security updates.
@@ -60,17 +62,15 @@ $ mv Shaarli-stable /path/to/shaarli/
60 62
61### Clone with Git 63### Clone with Git
62 64
63[Composer](https://getcomposer.org/) is required to build a functional Shaarli installation when pulling from git.[](.html) 65[Composer](https://getcomposer.org/) is required to build a functional Shaarli installation when pulling from git.
64 66
65```bash 67```bash
66$ git clone https://github.com/shaarli/Shaarli.git -b stable /path/to/shaarli/ 68$ git clone https://github.com/shaarli/Shaarli.git -b stable /path/to/shaarli/
67# install/update third-party dependencies 69# install/update third-party dependencies
68$ cd /path/to/shaarli/ 70$ cd /path/to/shaarli/
69$ composer install --no-dev 71$ composer install --no-dev --prefer-dist
70``` 72```
71 73
72--------------------------------------------------------
73
74## Development version (mainline) 74## Development version (mainline)
75 75
76_Use at your own risk!_ 76_Use at your own risk!_
@@ -82,21 +82,17 @@ To get the latest changes from the `master` branch:
82$ git clone https://github.com/shaarli/Shaarli.git -b master /path/to/shaarli/ 82$ git clone https://github.com/shaarli/Shaarli.git -b master /path/to/shaarli/
83# install/update third-party dependencies 83# install/update third-party dependencies
84$ cd /path/to/shaarli 84$ cd /path/to/shaarli
85$ composer install --no-dev 85$ composer install --no-dev --prefer-dist
86``` 86```
87 87
88--------------------------------------------------------
89
90## Finish Installation 88## Finish Installation
91 89
92Once Shaarli is downloaded and files have been placed at the correct location, open it this location your favorite browser. 90Once Shaarli is downloaded and files have been placed at the correct location, open it this location your favorite browser.
93 91
94![install screenshot](http://i.imgur.com/wuMpDSN.png)[](.html) 92![install screenshot](http://i.imgur.com/wuMpDSN.png)
95 93
96Setup your Shaarli installation, and it's ready to use! 94Setup your Shaarli installation, and it's ready to use!
97 95
98--------------------------------------------------------
99
100## Updating Shaarli 96## Updating Shaarli
101 97
102See [Upgrade and Migration](Upgrade-and-migration)[](.html) 98See [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/Features.md b/doc/md/Features.md
new file mode 100644
index 00000000..eef88d03
--- /dev/null
+++ b/doc/md/Features.md
@@ -0,0 +1,25 @@
1### Main features
2Shaarli is intended:
3
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
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/md/Firefox-share.md b/doc/md/Firefox-share.md
new file mode 100644
index 00000000..878884a4
--- /dev/null
+++ b/doc/md/Firefox-share.md
@@ -0,0 +1,17 @@
1### Add Shaarli as a sharing service to Firefox
2
3- Open your Shaarli and `Login`
4- Click the `Tools` button in the top bar
5- Click the `✚Add to Firefox social` button and accept the activation.
6
7
8### Sharing links using Firefox share
9
10- Add the sharing service as described above
11- When you are visiting a webpage you would like to share with Shaarli,
12 click the Firefox _Share_ button [images/firefoxshare.png](images/firefoxshare.png)
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)
16enabled server for Firefox Share to work. Firefox Share will not work over
17plain 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 addd792d..30f0ae74 100644
--- a/doc/Plugin-System.md
+++ b/doc/md/Plugin-System.md
@@ -1,7 +1,8 @@
1#Plugin System 1[**I am a developer: ** Developer API](#developer-api)
2[**I am a developer.** Developer API.](#developer-api)[](.html)
3 2
4[**I am a template designer.** Guide for template designer.](#guide-for-template-designer)[](.html) 3[**I am a template designer: ** Guide for template designers](#guide-for-template-designer)
4
5---
5 6
6## Developer API 7## Developer API
7 8
@@ -9,9 +10,9 @@
9 10
10The plugin system let you: 11The plugin system let you:
11 12
12 * insert content into specific places across templates. 13- insert content into specific places across templates.
13 * alter data before templates rendering. 14- alter data before templates rendering.
14 * alter data before saving new links. 15- alter data before saving new links.
15 16
16### How can I create a plugin for Shaarli? 17### How can I create a plugin for Shaarli?
17 18
@@ -48,8 +49,8 @@ hook_<plugin_name>_<hook_name>($data, $conf)
48 49
49Parameters: 50Parameters:
50 51
51 - data: see [$data section](https://github.com/shaarli/Shaarli/wiki/Plugin-System#plugins-data)[](.html) 52- data: see [$data section](https://github.com/shaarli/Shaarli/wiki/Plugin-System#plugins-data)
52 - conf: the `ConfigManager` instance. 53- conf: the `ConfigManager` instance.
53 54
54For exemple, if my plugin want to add data to the header, this function is needed: 55For exemple, if my plugin want to add data to the header, this function is needed:
55 56
@@ -76,9 +77,9 @@ RainTPL displays every element contained in the placeholder's array. These eleme
76For 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:
77 78
78```php 79```php
79$data['top_placeholder'[] = 'My content';](]-=-'My-content';.html) 80$data['top_placeholder'][] = 'My content';
80# OR 81# OR
81array_push($data['top_placeholder'], 'My', 'content');[](.html) 82array_push($data['top_placeholder'], 'My', 'content');
82 83
83return $data; 84return $data;
84``` 85```
@@ -93,9 +94,9 @@ For exemple, in linklist, it is possible to alter every title:
93 94
94```php 95```php
95// mind the reference if you want $data to be altered 96// mind the reference if you want $data to be altered
96foreach ($data['links'] as &$value) {[](.html) 97foreach ($data['links'] as &$value) {
97 // String reverse every title. 98 // String reverse every title.
98 $value['title'] = strrev($value['title']);[](.html) 99 $value['title'] = strrev($value['title']);
99} 100}
100 101
101return $data; 102return $data;
@@ -107,9 +108,9 @@ Every plugin needs a `<plugin_name>.meta` file, which is in fact an `.ini` file
107 108
108Each file contain two keys: 109Each file contain two keys:
109 110
110 * `description`: plugin description 111- `description`: plugin description
111 * `parameters`: user parameter names, separated by a `;`. 112- `parameters`: user parameter names, separated by a `;`.
112 * `parameter.<PARAMETER_NAME>`: add a text description the specified parameter. 113- `parameter.<PARAMETER_NAME>`: add a text description the specified parameter.
113 114
114> 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.
115 116
@@ -117,25 +118,25 @@ Each file contain two keys:
117 118
118Use `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.
119 120
120If 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).
121 122
122### Hooks 123### Hooks
123 124
124| Hooks | Description | 125| Hooks | Description |
125| ------------- |:-------------:| 126| ------------- |:-------------:|
126| [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. |
127| [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. |
128| [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. |
129| [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. |
130| [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. |
131| [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. |
132| [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. |
133| [render_tagcloud](#render_tagcloud) | Allow to add content at the top and bottom of the page, and after all tags. |[](.html) 134| [render_tagcloud](#render_tagcloud) | Allow to add content at the top and bottom of the page, and after all tags. |
134| [render_taglist](#render_taglist) | Allow to add content at the top and bottom of the page, and after all tags. |[](.html) 135| [render_taglist](#render_taglist) | Allow to add content at the top and bottom of the page, and after all tags. |
135| [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) 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. |
136| [render_feed](#render_feed) | Allow to do add tags in RSS and ATOM feeds. |[](.html) 137| [render_feed](#render_feed) | Allow to do add tags in RSS and ATOM feeds. |
137| [save_link](#save_link) | Allow to alter the link being saved in the datastore. |[](.html) 138| [save_link](#save_link) | Allow to alter the link being saved in the datastore. |
138| [delete_link](#delete_link) | Allow to do an action before a link is deleted from the datastore. |[](.html) 139| [delete_link](#delete_link) | Allow to do an action before a link is deleted from the datastore. |
139 140
140 141
141 142
@@ -149,24 +150,24 @@ Allow plugin to add content in page headers.
149 150
150`$data` is an array containing: 151`$data` is an array containing:
151 152
152 * `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.). 153- `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.).
153 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 154- `_LOGGEDIN_`: true if user is logged in, false otherwise.
154 155
155##### Template placeholders 156##### Template placeholders
156 157
157Items 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.
158 159
159List of placeholders: 160List of placeholders:
160 161
161 * `buttons_toolbar`: after the list of buttons in the header. 162- `buttons_toolbar`: after the list of buttons in the header.
162 163
163![buttons_toolbar_example](http://i.imgur.com/ssJUOrt.png)[](.html) 164![buttons_toolbar_example](http://i.imgur.com/ssJUOrt.png)
164 165
165 * `fields_toolbar`: after search fields in the header. 166- `fields_toolbar`: after search fields in the header.
166 167
167> Note: This will only be called in linklist. 168> Note: This will only be called in linklist.
168 169
169![fields_toolbar_example](http://i.imgur.com/3GMifI2.png)[](.html) 170![fields_toolbar_example](http://i.imgur.com/3GMifI2.png)
170 171
171#### render_includes 172#### render_includes
172 173
@@ -178,16 +179,16 @@ Allow plugin to include their own CSS files.
178 179
179`$data` is an array containing: 180`$data` is an array containing:
180 181
181 * `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.). 182- `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.).
182 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 183- `_LOGGEDIN_`: true if user is logged in, false otherwise.
183 184
184##### Template placeholders 185##### Template placeholders
185 186
186Items 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.
187 188
188List of placeholders: 189List of placeholders:
189 190
190 * `css_files`: called after loading default CSS. 191- `css_files`: called after loading default CSS.
191 192
192> 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`.
193 194
@@ -201,21 +202,21 @@ Allow plugin to add content in page footer and include their own JS files.
201 202
202`$data` is an array containing: 203`$data` is an array containing:
203 204
204 * `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.). 205- `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.).
205 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 206- `_LOGGEDIN_`: true if user is logged in, false otherwise.
206 207
207##### Template placeholders 208##### Template placeholders
208 209
209Items 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.
210 211
211List of placeholders: 212List of placeholders:
212 213
213 * `text`: called after the end of the footer text. 214- `text`: called after the end of the footer text.
214 * `endofpage`: called at the end of the page. 215- `endofpage`: called at the end of the page.
215 216
216![text_example](http://i.imgur.com/L5S2YEH.png)[](.html) 217![text_example](http://i.imgur.com/L5S2YEH.png)
217 218
218 * `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.
219 220
220> 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`.
221 222
@@ -229,30 +230,30 @@ It allows to add content at the begining and end of the page, after every link d
229 230
230`$data` is an array containing: 231`$data` is an array containing:
231 232
232 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 233- `_LOGGEDIN_`: true if user is logged in, false otherwise.
233 * All templates data, including links. 234- All templates data, including links.
234 235
235##### Template placeholders 236##### Template placeholders
236 237
237Items 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.
238 239
239List of placeholders: 240List of placeholders:
240 241
241 * `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.
242 243
243![action_plugin_example](http://i.imgur.com/Q12PWg0.png)[](.html) 244![action_plugin_example](http://i.imgur.com/Q12PWg0.png)
244 245
245 * `link_plugin`: for every link, between permalink and link URL. 246- `link_plugin`: for every link, between permalink and link URL.
246 247
247![link_plugin_example](http://i.imgur.com/3oDPhWx.png)[](.html) 248![link_plugin_example](http://i.imgur.com/3oDPhWx.png)
248 249
249 * `plugin_start_zone`: before displaying the template content. 250- `plugin_start_zone`: before displaying the template content.
250 251
251![plugin_start_zone_example](http://i.imgur.com/OVBkGy3.png)[](.html) 252![plugin_start_zone_example](http://i.imgur.com/OVBkGy3.png)
252 253
253 * `plugin_end_zone`: after displaying the template content. 254- `plugin_end_zone`: after displaying the template content.
254 255
255![plugin_end_zone_example](http://i.imgur.com/6IoRuop.png)[](.html) 256![plugin_end_zone_example](http://i.imgur.com/6IoRuop.png)
256 257
257#### render_editlink 258#### render_editlink
258 259
@@ -264,17 +265,17 @@ Allow to add fields in the form, or display elements.
264 265
265`$data` is an array containing: 266`$data` is an array containing:
266 267
267 * All templates data. 268- All templates data.
268 269
269##### Template placeholders 270##### Template placeholders
270 271
271Items 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.
272 273
273List of placeholders: 274List of placeholders:
274 275
275 * `edit_link_plugin`: after tags field. 276- `edit_link_plugin`: after tags field.
276 277
277![edit_link_plugin_example](http://i.imgur.com/5u17Ens.png)[](.html) 278![edit_link_plugin_example](http://i.imgur.com/5u17Ens.png)
278 279
279#### render_tools 280#### render_tools
280 281
@@ -286,17 +287,17 @@ Allow to add content at the end of the page.
286 287
287`$data` is an array containing: 288`$data` is an array containing:
288 289
289 * All templates data. 290- All templates data.
290 291
291##### Template placeholders 292##### Template placeholders
292 293
293Items 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.
294 295
295List of placeholders: 296List of placeholders:
296 297
297 * `tools_plugin`: at the end of the page. 298- `tools_plugin`: at the end of the page.
298 299
299![tools_plugin_example](http://i.imgur.com/Bqhu9oQ.png)[](.html) 300![tools_plugin_example](http://i.imgur.com/Bqhu9oQ.png)
300 301
301#### render_picwall 302#### render_picwall
302 303
@@ -308,20 +309,19 @@ Allow to add content at the top and bottom of the page.
308 309
309`$data` is an array containing: 310`$data` is an array containing:
310 311
311 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 312- `_LOGGEDIN_`: true if user is logged in, false otherwise.
312 * All templates data. 313- All templates data.
313 314
314##### Template placeholders 315##### Template placeholders
315 316
316Items 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.
317 318
318List of placeholders: 319List of placeholders:
319 320
320 * `plugin_start_zone`: before displaying the template content. 321- `plugin_start_zone`: before displaying the template content.
321 322- `plugin_end_zone`: after displaying the template content.
322 * `plugin_end_zone`: after displaying the template content.
323 323
324![plugin_start_end_zone_example](http://i.imgur.com/tVTQFER.png)[](.html) 324![plugin_start_end_zone_example](http://i.imgur.com/tVTQFER.png)
325 325
326#### render_tagcloud 326#### render_tagcloud
327 327
@@ -333,24 +333,23 @@ Allow to add content at the top and bottom of the page.
333 333
334`$data` is an array containing: 334`$data` is an array containing:
335 335
336 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 336- `_LOGGEDIN_`: true if user is logged in, false otherwise.
337 * All templates data. 337- All templates data.
338 338
339##### Template placeholders 339##### Template placeholders
340 340
341Items 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.
342 342
343List of placeholders: 343List of placeholders:
344 344
345 * `plugin_start_zone`: before displaying the template content. 345- `plugin_start_zone`: before displaying the template content.
346 346- `plugin_end_zone`: after displaying the template content.
347 * `plugin_end_zone`: after displaying the template content.
348 347
349For each tag, the following placeholder can be used: 348For each tag, the following placeholder can be used:
350 349
351 * `tag_plugin`: after each tag 350- `tag_plugin`: after each tag
352 351
353![plugin_start_end_zone_example](http://i.imgur.com/vHmyT3a.png)[](.html) 352![plugin_start_end_zone_example](http://i.imgur.com/vHmyT3a.png)
354 353
355 354
356#### render_taglist 355#### render_taglist
@@ -363,22 +362,21 @@ Allow to add content at the top and bottom of the page.
363 362
364`$data` is an array containing: 363`$data` is an array containing:
365 364
366 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 365- `_LOGGEDIN_`: true if user is logged in, false otherwise.
367 * All templates data. 366- All templates data.
368 367
369##### Template placeholders 368##### Template placeholders
370 369
371Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.[](.html) 370Items can be displayed in templates by adding an entry in `$data['<placeholder>']` array.
372 371
373List of placeholders: 372List of placeholders:
374 373
375 * `plugin_start_zone`: before displaying the template content. 374- `plugin_start_zone`: before displaying the template content.
376 375- `plugin_end_zone`: after displaying the template content.
377 * `plugin_end_zone`: after displaying the template content.
378 376
379For each tag, the following placeholder can be used: 377For each tag, the following placeholder can be used:
380 378
381 * `tag_plugin`: after each tag 379- `tag_plugin`: after each tag
382 380
383#### render_daily 381#### render_daily
384 382
@@ -390,22 +388,21 @@ Allow to add content at the top and bottom of the page, the bottom of each link
390 388
391`$data` is an array containing: 389`$data` is an array containing:
392 390
393 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 391- `_LOGGEDIN_`: true if user is logged in, false otherwise.
394 * All templates data, including links. 392- All templates data, including links.
395 393
396##### Template placeholders 394##### Template placeholders
397 395
398Items 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.
399 397
400List of placeholders: 398List of placeholders:
401 399
402 * `link_plugin`: used at bottom of each link. 400- `link_plugin`: used at bottom of each link.
403
404![link_plugin_example](http://i.imgur.com/hzhMfSZ.png)[](.html)
405 401
406 * `plugin_start_zone`: before displaying the template content. 402![link_plugin_example](http://i.imgur.com/hzhMfSZ.png)
407 403
408 * `plugin_end_zone`: after displaying the template content. 404- `plugin_start_zone`: before displaying the template content.
405- `plugin_end_zone`: after displaying the template content.
409 406
410#### render_feed 407#### render_feed
411 408
@@ -417,21 +414,21 @@ Allow to add tags in the feed, either in the header or for each items. Items (li
417 414
418`$data` is an array containing: 415`$data` is an array containing:
419 416
420 * `_LOGGEDIN_`: true if user is logged in, false otherwise. 417- `_LOGGEDIN_`: true if user is logged in, false otherwise.
421 * `_PAGE_`: containing either `rss` or `atom`. 418- `_PAGE_`: containing either `rss` or `atom`.
422 * All templates data, including links. 419- All templates data, including links.
423 420
424##### Template placeholders 421##### Template placeholders
425 422
426Tags can be added in feeds by adding an entry in `$data['<placeholder>']` array.[](.html) 423Tags can be added in feeds by adding an entry in `$data['<placeholder>']` array.
427 424
428List of placeholders: 425List of placeholders:
429 426
430 * `feed_plugins_header`: used as a header tag in the feed. 427- `feed_plugins_header`: used as a header tag in the feed.
431 428
432For each links: 429For each links:
433 430
434 * `feed_plugins`: additional tag for every link entry. 431- `feed_plugins`: additional tag for every link entry.
435 432
436#### save_link 433#### save_link
437 434
@@ -443,15 +440,15 @@ Allow to alter the link being saved in the datastore.
443 440
444`$data` is an array containing the link being saved: 441`$data` is an array containing the link being saved:
445 442
446 * id 443- id
447 * title 444- title
448 * url 445- url
449 * shorturl 446- shorturl
450 * description 447- description
451 * private 448- private
452 * tags 449- tags
453 * created 450- created
454 * updated 451- updated
455 452
456 453
457#### delete_link 454#### delete_link
@@ -464,15 +461,15 @@ Allow to execute any action before the link is actually removed from the datasto
464 461
465`$data` is an array containing the link being saved: 462`$data` is an array containing the link being saved:
466 463
467 * id 464- id
468 * title 465- title
469 * url 466- url
470 * shorturl 467- shorturl
471 * description 468- description
472 * private 469- private
473 * tags 470- tags
474 * created 471- created
475 * updated 472- updated
476 473
477## Guide for template designer 474## Guide for template designer
478 475
@@ -486,9 +483,9 @@ Use the default one as an example.
486 483
487Aside 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:
488 485
489 * you're using a table. 486- you're using a table.
490 * you call orderUp() and orderUp() onclick on arrows. 487- you call orderUp() and orderUp() onclick on arrows.
491 * you add data-line and data-order to your rows. 488- you add data-line and data-order to your rows.
492 489
493Otherwise, 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:
494 491
diff --git a/doc/Plugins.md b/doc/md/Plugins.md
index e3192a60..7d40637f 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,13 +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 * [`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) 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 70
72 71
73 72
74#### Third party plugins 73#### Third party plugins
75 74
76See [Community & related software](https://github.com/shaarli/Shaarli/wiki/Community-%26-Related-software#third-party-plugins)[](.html) 75See [Community & related software](https://github.com/shaarli/Shaarli/wiki/Community-%26-Related-software#third-party-plugins)
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 ced58853..974a7438 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,45 @@ $ 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### Create and merge a Pull Request
48```bash 50This one is pretty straightforward ;-)
49$ cd /path/to/shaarli
50
51# create a new branch
52$ git fetch upstream
53$ git checkout upstream/master -b v0.5.0
54
55# bump the version number
56$ vim index.php shaarli_version.php
57 51
58# rebuild the documentation from the wiki 52### Bump Shaarli version to v0.x branch
59$ make htmldoc
60 53
61# commit the changes 54```bash
62$ git add index.php shaarli_version.php doc 55$ git checkout master
63$ git commit -s -m "Bump version to v0.5.0" 56$ git fetch upstream
57$ git pull upstream master
64 58
65# push the commit on your GitHub fork 59# IF the branch doesn't exists
66$ git push origin v0.5.0 60$ git checkout -b v0.5
61# OR if the branch already exists
62$ git checkout v0.5
63$ git rebase upstream/master
64
65# Bump shaarli version from dev to 0.5.0, **without the `v`**
66$ vim shaarli_version.php
67$ git add shaarli_version
68$ git commit -s -m "Bump Shaarli version to v0.5.0"
69$ git push upstream v0.5
67``` 70```
68 71
69### Create and merge a Pull Request
70This one is pretty straightforward ;-)
71
72### Create and push a signed tag 72### Create and push a signed tag
73```bash 73```bash
74# update your local copy 74# update your local copy
75$ git checkout master 75$ git checkout v0.5
76$ git fetch upstream 76$ git fetch upstream
77$ git pull upstream master 77$ git pull upstream v0.5
78 78
79# create a signed tag 79# create a signed tag
80$ git tag -s -m "Release v0.5.0" v0.5.0 80$ git tag -s -m "Release v0.5.0" v0.5.0
@@ -84,7 +84,7 @@ $ git push --tags upstream
84``` 84```
85 85
86### Verify a signed tag 86### 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) 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.
88 88
89Let's have a look at its signature! 89Let's have a look at its signature!
90 90
@@ -99,15 +99,16 @@ f7762cf803f03f5caf4b8078359a63783d0090c1 refs/tags/v0.5.0
99# verify the tag signature information 99# verify the tag signature information
100$ git verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1 100$ git verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1
101gpg: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F 101gpg: 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) 102gpg: Good signature from "VirtualTam <virtualtam@flibidi.net>" [ultimate]
103``` 103```
104 104
105## Publish the GitHub release 105## Publish the GitHub release
106### Update release badges 106### Update release badges
107Update `README.md` so version badges display and point to the newly released Shaarli version(s). 107Update `README.md` so version badges display and point to the newly released Shaarli version(s), in the `master` branch.
108 108
109### Create a GitHub release from a Git tag 109### Create a GitHub release from a Git tag
110From the previously drafted release: 110From the previously drafted release:
111
111- edit the release notes (if needed) 112- edit the release notes (if needed)
112- specify the appropriate Git tag 113- specify the appropriate Git tag
113- publish the release 114- publish the release
@@ -115,19 +116,40 @@ From the previously drafted release:
115 116
116### Generate and upload all-in-one release archives 117### Generate and upload all-in-one release archives
117Users with a shared hosting may have: 118Users with a shared hosting may have:
119
118- no SSH access 120- no SSH access
119- no possibility to install PHP packages or server extensions 121- no possibility to install PHP packages or server extensions
120- no possibility to run scripts 122- no possibility to run scripts
121 123
122To ease Shaarli installations, it is possible to generate and upload additional release archives, 124To ease Shaarli installations, it is possible to generate and upload additional release archives,
123that will contain Shaarli code plus all required third-party libraries: 125that will contain Shaarli code plus all required third-party libraries.
126
127**From the `v0.5` branch:**
124 128
125```bash 129```bash
126$ make release_archive 130$ make release_archive
127``` 131```
128 132
129This will create the following archives: 133This will create the following archives:
134
130- `shaarli-vX.Y.Z-full.tar` 135- `shaarli-vX.Y.Z-full.tar`
131- `shaarli-vX.Y.Z-full.zip` 136- `shaarli-vX.Y.Z-full.zip`
132 137
133The archives need to be manually uploaded on the previously created GitHub release. 138The archives need to be manually uploaded on the previously created GitHub release.
139
140### Update `stable` and `latest` branches
141
142```
143$ git checkout latest
144# latest release
145$ git merge v0.5.0
146# fix eventual conflicts
147$ make test
148$ git push upstream latest
149$ git checkout stable
150# latest previous major
151$ git merge v0.4.5
152# fix eventual conflicts
153$ make test
154$ git push upstream stable
155```
diff --git a/doc/Security.md b/doc/md/Security.md
index 7947460c..36f629af 100644
--- a/doc/Security.md
+++ b/doc/md/Security.md
@@ -1,28 +1,28 @@
1#Security
2## Client browser 1## 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 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
4 3
5## PHP 4## 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. 5- `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 6
8## Server and sessions 7## Server and sessions
9* Directories are protected using `.htaccess` files 8- Directories are protected using `.htaccess` files
10* Forms are protected against XSRF (Cross-site requests forgery): 9- Forms are protected against XSRF (Cross-site requests forgery):
11 * Forms which act on data (save,delete…) contain a token generated by the server. 10 - 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. 11 - Any posted form which does not contain a valid token is rejected.
13 * Any token can only be used once. 12 - Any token can only be used once.
14 * Tokens are attached to the session and cannot be reused in another session. 13 - Tokens are attached to the session and cannot be reused in another session.
15* Sessions automatically expire after 60 minutes. 14- Sessions automatically expire after 60 minutes.
16* Sessions are protected against hijacking: the session ID cannot be used from a different IP address. 15- Sessions are protected against hijacking: the session ID cannot be used from a different IP address.
17 16
18## Shaarli datastore and configuration 17## 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. 18- 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. 19- 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. 20- 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: 21- The database looks like this:
22
23```php 23```php
24<?php /* zP1ZjxxJtiYIvvevEPJ2lDOaLrZv7o... 24<?php /* zP1ZjxxJtiYIvvevEPJ2lDOaLrZv7o...
25...ka7gaco/Z+TFXM2i7BlfMf8qxpaSSYfKlvqv/x8= */ ?> 25...ka7gaco/Z+TFXM2i7BlfMf8qxpaSSYfKlvqv/x8= */ ?>
26``` 26```
27 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 `@`. 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.md b/doc/md/Server-configuration.md
index 81cc1a72..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,7 +109,7 @@ 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.
110 113
111Apache 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. 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.
112 115
@@ -114,37 +117,44 @@ Apache module `mod_rewrite` **must** be enabled to use the REST API. URL rewriti
114 117
115## Nginx 118## Nginx
116### Foreword 119### Foreword
117Nginx 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.
118 121
119Required packages: 122Required packages:
120- [nginx](http://nginx.org)[](.html) 123
121- [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
122 126
123Official documentation: 127Official documentation:
124- [Beginner's guide](http://nginx.org/en/docs/beginners_guide.html)[](.html) 128
125- [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)
126- [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)
127 132
128Community resources: 133Community resources:
129- [Server-side TLS (Nginx)](https://wiki.mozilla.org/Security/Server_Side_TLS#Nginx) (Mozilla)[](.html) 134
130- [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)
131 137
132### Common setup 138### Common setup
133Once Nginx and PHP-FPM are installed, we need to ensure: 139Once Nginx and PHP-FPM are installed, we need to ensure:
140
134- 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_
135- both these user and group have 142- both these user and group have
136 - `read` permissions for Shaarli resources 143 - `read` permissions for Shaarli resources
137 - `execute` permissions for Shaarli directories _AND_ their parent directories 144 - `execute` permissions for Shaarli directories _AND_ their parent directories
138 145
139On a production server: 146On a production server:
147
140- `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`
141- 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`
142 150
143On a development server: 151On a development server:
152
144- files may be located in a user's home directory 153- files may be located in a user's home directory
145- 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!
146 155
147For all following configuration examples, this user/group pair will be used: 156For all following configuration examples, this user/group pair will be used:
157
148- `user:group = john:users`, 158- `user:group = john:users`,
149 159
150which corresponds to the following service configuration: 160which corresponds to the following service configuration:
@@ -154,7 +164,7 @@ which corresponds to the following service configuration:
154user = john 164user = john
155group = users 165group = users
156 166
157[...][](.html) 167[...]
158listen.owner = john 168listen.owner = john
159listen.group = users 169listen.group = users
160``` 170```
@@ -164,7 +174,7 @@ listen.group = users
164user john users; 174user john users;
165 175
166http { 176http {
167 [...][](.html) 177 [...]
168} 178}
169``` 179```
170 180
@@ -177,20 +187,20 @@ To increase upload size, you will need to modify both nginx and PHP configuratio
177# /etc/nginx/nginx.conf 187# /etc/nginx/nginx.conf
178 188
179http { 189http {
180 [...][](.html) 190 [...]
181 191
182 client_max_body_size 10m; 192 client_max_body_size 10m;
183 193
184 [...][](.html) 194 [...]
185} 195}
186``` 196```
187 197
188```ini 198```ini
189# /etc/php5/fpm/php.ini 199# /etc/php5/fpm/php.ini
190 200
191[...][](.html) 201[...]
192post_max_size = 10M 202post_max_size = 10M
193[...][](.html) 203[...]
194upload_max_filesize = 10M 204upload_max_filesize = 10M
195``` 205```
196 206
@@ -238,6 +248,7 @@ http {
238 248
239### Modular 249### Modular
240The 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
241- 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:
242 - dotfiles - in our case, `.htaccess` 253 - dotfiles - in our case, `.htaccess`
243 - temporary files, e.g. Vim or Emacs files: `index.php~` 254 - temporary files, e.g. Vim or Emacs files: `index.php~`
@@ -293,10 +304,10 @@ location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
293 304
294```nginx 305```nginx
295# /etc/nginx/nginx.conf 306# /etc/nginx/nginx.conf
296[...][](.html) 307[...]
297 308
298http { 309http {
299 [...][](.html) 310 [...]
300 311
301 root /home/john/web; 312 root /home/john/web;
302 access_log /var/log/nginx/access.log; 313 access_log /var/log/nginx/access.log;
@@ -343,14 +354,16 @@ http {
343``` 354```
344 355
345### Redirect HTTP to HTTPS 356### Redirect HTTP to HTTPS
346Assuming 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.
347 360
348```nginx 361```nginx
349# /etc/nginx/nginx.conf 362# /etc/nginx/nginx.conf
350[...][](.html) 363[...]
351 364
352http { 365http {
353 [...][](.html) 366 [...]
354 367
355 index index.html index.php; 368 index index.html index.php;
356 369
diff --git a/doc/Server-requirements.md b/doc/md/Server-requirements.md
index 07e70ab3..707af762 100644
--- a/doc/Server-requirements.md
+++ b/doc/md/Server-requirements.md
@@ -1,40 +1,41 @@
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.1 | Supported (v0.9.x) | :white_check_mark: 137.1 | Supported (v0.9.x) | Yes
147.0 | Supported | :white_check_mark: 147.0 | Supported | Yes
155.6 | Supported | :white_check_mark: 155.6 | Supported | Yes
165.5 | EOL: 2016-07-10 | :white_check_mark: 165.5 | EOL: 2016-07-10 | Yes
175.4 | EOL: 2015-09-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 | :white_check_mark: (up to Shaarli 0.8.x) 185.3 | EOL: 2014-08-14 | Yes (up to Shaarli 0.8.x)
19 19
20See also: 20See also:
21- [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)
22 23
23### Dependency management 24### Dependency management
24Starting 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,
25download and install third-party PHP dependencies. 26download and install third-party PHP dependencies.
26 27
27Library | Required? | Usage 28Library | Required? | Usage
28---|:---:|--- 29---|:---:|---
29[`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
30[`erusev/parsedown`](https://packagist.org/packages/erusev/parsedown) | All | Parse MarkDown syntax for the MarkDown plugin[](.html) 31[`erusev/parsedown`](https://packagist.org/packages/erusev/parsedown) | All | Parse MarkDown syntax for the MarkDown plugin
31[`slim/slim`](https://packagist.org/packages/slim/slim) | All | Handle routes and middleware for the REST API[](.html) 32[`slim/slim`](https://packagist.org/packages/slim/slim) | All | Handle routes and middleware for the REST API
32 33
33### Extensions 34### Extensions
34Extension | Required? | Usage 35Extension | Required? | Usage
35---|:---:|--- 36---|:---:|---
36[`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
37[`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 | multibyte (Unicode) string support
38[`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
39[`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`)
40[`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
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/Shaarli-configuration.md b/doc/md/Shaarli-configuration.md
index 25647cb7..188a3c09 100644
--- a/doc/Shaarli-configuration.md
+++ b/doc/md/Shaarli-configuration.md
@@ -1,19 +1,17 @@
1#Shaarli configuration
2# Shaarli configuration
3
4## Foreword 1## Foreword
5 2
6**Do not edit configuration options in index.php! Your changes would be lost.** 3**Do not edit configuration options in index.php! Your changes would be lost.**
7 4
8Once your Shaarli instance is installed, the file `data/config.json.php` is generated: 5Once 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 6* 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) 7* it defines which [plugins](Plugin-System) are enabled[](.html)
11* its values override those defined in `index.php` 8* 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 9* it is wrap in a PHP comment to prevent anyone accessing it, regardless of server configuration
13 10
14## File and directory permissions 11## File and directory permissions
15 12
16The server process running Shaarli must have: 13The server process running Shaarli must have:
14
17- `read` access to the following resources: 15- `read` access to the following resources:
18 - PHP scripts: `index.php`, `application/*.php`, `plugins/*.php` 16 - PHP scripts: `index.php`, `application/*.php`, `plugins/*.php`
19 - 3rd party PHP and Javascript libraries: `inc/*.php`, `inc/*.js` 17 - 3rd party PHP and Javascript libraries: `inc/*.php`, `inc/*.js`
@@ -28,84 +26,86 @@ The server process running Shaarli must have:
28 - `tmp` - RainTPL page cache 26 - `tmp` - RainTPL page cache
29 27
30On a Linux distribution: 28On a Linux distribution:
29
31- the web server user will likely be `www` or `http` (for Apache2) 30- 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` 31- it will be a member of a group of the same name: `www:www`, `http:http`
33- to give it access to Shaarli, either: 32- 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 33 - 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 34 - 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) 35- if you have a domain / subdomain to serve Shaarli, [configure the server](Server-configuration) accordingly[](.html)
37 36
38## Configuration 37## Configuration
39 38
40In `data/config.json.php`. 39In `data/config.json.php`.
41 40
42See also [Plugin System](Plugin-System.html).[](.html) 41See also [Plugin System](Plugin-System.html).
43 42
44### Credentials 43### Credentials
45 44
46> You shouldn't edit those. 45_These settings should not be edited_
47 46
48**login**: Login username. 47- **login**: Login username.
49**hash**: Generated password hash. 48- **hash**: Generated password hash.
50**salt**: Password salt. 49- **salt**: Password salt.
51 50
52### General 51### General
53 52
54**title**: Shaarli's instance title. 53- **title**: Shaarli's instance title.
55**header_link**: Link to the homepage. 54- **header_link**: Link to the homepage.
56**links_per_page**: Number of shaares displayed per page. 55- **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) 56- **timezone**: See [the list of supported timezones](http://php.net/manual/en/timezones.php).
58**enabled_plugins**: List of enabled plugins. 57- **enabled_plugins**: List of enabled plugins.
59 58
60### Security 59### Security
61 60
62**session_protection_disabled**: Disable session cookie hijacking protection (not recommended). 61- **session_protection_disabled**: Disable session cookie hijacking protection (not recommended).
63It might be useful if your IP adress often changes. 62 It might be useful if your IP adress often changes.
64**ban_after**: Failed login attempts before being IP banned. 63- **ban_after**: Failed login attempts before being IP banned.
65**ban_duration**: IP ban duration in seconds. 64- **ban_duration**: IP ban duration in seconds.
66**open_shaarli**: Anyone can add a new link while logged out if enabled. 65- **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. 66- **trusted_proxies**: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy.
67- **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"]`).
68 68
69### Resources 69### Resources
70 70
71**data_dir**: Data directory. 71- **data_dir**: Data directory.
72**datastore**: Shaarli's links database file path. 72- **datastore**: Shaarli's links database file path.
73**history**: Shaarli's operation history file path. 73- **history**: Shaarli's operation history file path.
74**updates**: File path for the ran updates file. 74- **updates**: File path for the ran updates file.
75**log**: Log file path. 75- **log**: Log file path.
76**update_check**: Last update check file path. 76- **update_check**: Last update check file path.
77**raintpl_tpl**: Templates directory. 77- **raintpl_tpl**: Templates directory.
78**raintpl_tmp**: Template engine cache directory. 78- **raintpl_tmp**: Template engine cache directory.
79**thumbnails_cache**: Thumbnails cache directory. 79- **thumbnails_cache**: Thumbnails cache directory.
80**page_cache**: Shaarli's internal cache directory. 80- **page_cache**: Shaarli's internal cache directory.
81**ban_file**: Banned IP file path. 81- **ban_file**: Banned IP file path.
82 82
83### Updates 83### Updates
84 84
85**check_updates**: Enable or disable update check to the git repository. 85- **check_updates**: Enable or disable update check to the git repository.
86**check_updates_branch**: Git branch used to check updates (e.g. `stable` or `master`). 86- **check_updates_branch**: Git branch used to check updates (e.g. `stable` or `master`).
87**check_updates_interval**: Look for new version every N seconds (default: every day). 87- **check_updates_interval**: Look for new version every N seconds (default: every day).
88 88
89### Privacy 89### Privacy
90 90
91**default_private_links**: Check the private checkbox by default for every new link. 91- **default_private_links**: Check the private checkbox by default for every new link.
92**hide_public_links**: All links are hidden while logged out. 92- **hide_public_links**: All links are hidden while logged out.
93**hide_timestamps**: Timestamps are hidden. 93- **hide_timestamps**: Timestamps are hidden.
94 94
95### Feed 95### Feed
96 96
97**rss_permalinks**: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL. 97- **rss_permalinks**: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL.
98**show_atom**: Display ATOM feed button. 98- **show_atom**: Display ATOM feed button.
99 99
100### Thumbnail 100### Thumbnail
101 101
102**enable_thumbnails**: Enable or disable thumbnail display. 102- **enable_thumbnails**: Enable or disable thumbnail display.
103**enable_localcache**: Enable or disable local cache. 103- **enable_localcache**: Enable or disable local cache.
104 104
105### Redirector 105### Redirector
106 106
107**url**: Redirector URL, such as `anonym.to`. 107- **url**: Redirector URL, such as `anonym.to`.
108**encode_url**: Enable this if the redirector needs encoded URL to work properly. 108- **encode_url**: Enable this if the redirector needs encoded URL to work properly.
109 109
110## Configuration file example 110## Configuration file example
111 111
@@ -121,9 +121,14 @@ It might be useful if your IP adress often changes.
121 "ban_after": 4, 121 "ban_after": 4,
122 "session_protection_disabled": false, 122 "session_protection_disabled": false,
123 "ban_duration": 1800, 123 "ban_duration": 1800,
124 "trusted_proxies": [[](.html) 124 "trusted_proxies": [
125 "1.2.3.4", 125 "1.2.3.4",
126 "5.6.7.8" 126 "5.6.7.8"
127 ],
128 "allowed_protocols": [
129 "ftp",
130 "ftps",
131 "magnet"
127 ] 132 ]
128 }, 133 },
129 "resources": { 134 "resources": {
@@ -148,7 +153,7 @@ It might be useful if your IP adress often changes.
148 "enable_localcache": true, 153 "enable_localcache": true,
149 "check_updates_branch": "stable", 154 "check_updates_branch": "stable",
150 "check_updates_interval": 86400, 155 "check_updates_interval": 86400,
151 "enabled_plugins": [[](.html) 156 "enabled_plugins": [
152 "markdown", 157 "markdown",
153 "wallabag", 158 "wallabag",
154 "archiveorg" 159 "archiveorg"
@@ -168,7 +173,7 @@ It might be useful if your IP adress often changes.
168 "general": { 173 "general": {
169 "header_link": "?", 174 "header_link": "?",
170 "links_per_page": 20, 175 "links_per_page": 20,
171 "enabled_plugins": [[](.html) 176 "enabled_plugins": [
172 "markdown", 177 "markdown",
173 "wallabag" 178 "wallabag"
174 ], 179 ],
@@ -206,7 +211,7 @@ It might be useful if your IP adress often changes.
206 211
207## Additional configuration 212## Additional configuration
208 213
209The playvideos plugin may require that you adapt your server's 214The `playvideos` plugin may require that you adapt your server's
210[Content Security Policy](https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md#troubleshooting) [](.html) 215[Content Security Policy](https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md#troubleshooting)
211configuration to work properly.[(.html)]((.html).html) 216configuration to work properly.
212 217
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/Theming.md b/doc/md/Theming.md
index 23877e5d..bd400776 100644
--- a/doc/Theming.md
+++ b/doc/md/Theming.md
@@ -1,12 +1,14 @@
1#Theming
2## Foreword 1## Foreword
2
3There are two ways of customizing how Shaarli looks: 3There are two ways of customizing how Shaarli looks:
4 4
51. by using a custom CSS to override Shaarli's CSS 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 62. by using a full theme that provides its own RainTPL templates, CSS and Javascript resources
7 7
8## Custom CSS 8## Custom CSS
9
9Shaarli's appearance can be modified by adding CSS rules to: 10Shaarli's appearance can be modified by adding CSS rules to:
11
10- Shaarli < `v0.9.0`: `inc/user.css` 12- Shaarli < `v0.9.0`: `inc/user.css`
11- Shaarli >= `v0.9.0`: `data/user.css` 13- Shaarli >= `v0.9.0`: `data/user.css`
12 14
@@ -14,12 +16,12 @@ This file allows overriding rules defined in the template CSS files (only add ch
14 16
15**Note**: Do not edit `tpl/default/css/shaarli.css`! Your changes would be overridden when updating Shaarli. 17**Note**: Do not edit `tpl/default/css/shaarli.css`! Your changes would be overridden when updating Shaarli.
16 18
17See also [Download CSS styles from an OPML list](Download-CSS-styles-from-an-OPML-list.html) 19See also [Download CSS styles from an OPML list](Download CSS styles from an OPML list)
18 20
19## Themes 21## Themes
20_WARNING - This feature is currently being worked on and will be improved in the next releases. Experimental._
21 22
22Installation: 23Installation:
24
23- find a theme you'd like to install 25- find a theme you'd like to install
24- copy or clone the theme folder under `tpl/<a_sweet_theme>` 26- copy or clone the theme folder under `tpl/<a_sweet_theme>`
25- enable the theme: 27- enable the theme:
@@ -28,25 +30,31 @@ Installation:
28 - Shaarli >= `v0.9.0`: select the theme through the _Tools_ page 30 - Shaarli >= `v0.9.0`: select the theme through the _Tools_ page
29 31
30## Community CSS & themes 32## Community CSS & themes
33
31### Custom CSS 34### Custom CSS
32- [mrjovanovic/serious-theme-shaarli](https://github.com/mrjovanovic/serious-theme-shaarli) - A serious theme for Shaarli[](.html) 35
33- [shaarli/shaarli-themes](https://github.com/shaarli/shaarli-themes)[](.html) 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)
34 38
35### Themes 39### Themes
36- [AkibaTech/Shaarli Superhero Theme](https://github.com/AkibaTech/Shaarli---SuperHero-Theme) - A template/theme for Shaarli[](.html) 40
37- [alexisju/albinomouse-template](https://github.com/alexisju/albinomouse-template) - A full template for Shaarli[](.html) 41- [AkibaTech/Shaarli Superhero Theme](https://github.com/AkibaTech/Shaarli---SuperHero-Theme) - A template/theme for Shaarli
38- [ArthurHoaro/shaarli-launch](https://github.com/ArthurHoaro/shaarli-launch) - Customizable Shaarli theme[](.html) 42- [alexisju/albinomouse-template](https://github.com/alexisju/albinomouse-template) - A full template for Shaarli
39- [dhoko/ShaarliTemplate](https://github.com/dhoko/ShaarliTemplate) - A template/theme for Shaarli[](.html) 43- [ArthurHoaro/shaarli-launch](https://github.com/ArthurHoaro/shaarli-launch) - Customizable Shaarli theme
40- [kalvn/shaarli-blocks](https://github.com/kalvn/shaarli-blocks) - A template/theme for Shaarli[](.html) 44- [dhoko/ShaarliTemplate](https://github.com/dhoko/ShaarliTemplate) - A template/theme for Shaarli
41- [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) 45- [kalvn/shaarli-blocks](https://github.com/kalvn/shaarli-blocks) - A template/theme for Shaarli
42- [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) 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
43 48
44### Shaarli forks 49### Shaarli forks
45- [misterair/Limonade](https://github.com/misterair/limonade) - A fork of (legacy) Shaarli with a new template[](.html) 50
46- [vivienhaese/shaarlitheme](https://github.com/vivienhaese/shaarlitheme) - A Shaarli fork meant to be run in an openshift instance[](.html) 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
47 53
48## Example installation: AlbinoMouse theme 54## Example installation: AlbinoMouse theme
55
49With the following configuration: 56With the following configuration:
57
50- Apache 2 / PHP 5.6 58- Apache 2 / PHP 5.6
51- user sites are enabled, e.g. `/home/user/public_html/somedir` is served as `http://localhost/~user/somedir` 59- user sites are enabled, e.g. `/home/user/public_html/somedir` is served as `http://localhost/~user/somedir`
52- `http` is the name of the Apache user 60- `http` is the name of the Apache user
@@ -70,7 +78,7 @@ Get config written:
70- fill the install form 78- fill the install form
71- log in to Shaarli 79- log in to Shaarli
72 80
73Edit Shaarli's [configuration|Shaarli configuration](configuration|Shaarli-configuration.html): 81Edit Shaarli's [configuration](Shaarli-configuration):
74```bash 82```bash
75# the file should be owned by Apache, thus not writeable => sudo 83# the file should be owned by Apache, thus not writeable => sudo
76$ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php 84$ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php
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/Unit-tests.md b/doc/md/Unit-tests.md
index 0942ad38..d200634f 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) 2
3The framework used is [PHPUnit](https://phpunit.de/); it can be installed with [Composer](https://getcomposer.org/), which is a dependency management tool.
5 4
6Regarding Composer, you can either use: 5Regarding Composer, you can either use:
7* a system-wide version, e.g. installed through your distro's package manager 6
8* a local version, downloadable [here](https://getcomposer.org/download/)[](.html) 7- a system-wide version, e.g. installed through your distro's package manager
8- a local version, downloadable [here](https://getcomposer.org/download/)
9 9
10#### Sample usage 10#### Sample usage
11
11```bash 12```bash
12# system-wide version 13# system-wide version
13$ composer install 14$ composer install
@@ -20,12 +21,14 @@ $ 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
29For Debian-based distros: 32For Debian-based distros:
30```bash 33```bash
31$ aptitude install php5-xdebug 34$ aptitude install php5-xdebug
@@ -41,6 +44,7 @@ zend_extension=xdebug.so
41``` 44```
42 45
43#### Run unit tests 46#### Run unit tests
47
44Successful test suite: 48Successful test suite:
45```bash 49```bash
46$ make test 50$ make test
@@ -111,24 +115,28 @@ Tests: 36, Assertions: 63, Errors: 1, Failures: 2.
111``` 115```
112 116
113#### Test results and coverage 117#### Test results and coverage
118
114By default, PHPUnit will run all suitable tests found under the `tests` directory. 119By default, PHPUnit will run all suitable tests found under the `tests` directory.
115 120
116Each test has 3 possible outcomes: 121Each test has 3 possible outcomes:
117* `.` - success 122
118* `F` - failure: the test was run but its results are invalid 123- `.` - success
119 * the code does not behave as expected 124- `F` - failure: the test was run but its results are invalid
120 * dependencies to external elements: globals, session, cache... 125 - the code does not behave as expected
121* `E` - error: something went wrong and the tested code has crashed 126 - dependencies to external elements: globals, session, cache...
122 * typos in the code, or in the test code 127- `E` - error: something went wrong and the tested code has crashed
123 * dependencies to missing external elements 128 - typos in the code, or in the test code
129 - dependencies to missing external elements
124 130
125If Xdebug has been installed and activated, two coverage reports will be generated: 131If Xdebug has been installed and activated, two coverage reports will be generated:
126* a summary in the console 132
127* a detailed HTML report with metrics for tested code 133- a summary in the console
128 * to open it in a web browser: `firefox coverage/index.html &` 134- a detailed HTML report with metrics for tested code
135 - to open it in a web browser: `firefox coverage/index.html &`
129 136
130### Executing specific tests 137### Executing specific tests
131Add a [`@group`](https://phpunit.de/manual/current/en/appendixes.annotations.html#appendixes.annotations.group) annotation in a test class or method comment:[](.html) 138
139Add a [`@group`](https://phpunit.de/manual/current/en/appendixes.annotations.html#appendixes.annotations.group) annotation in a test class or method comment:
132 140
133```php 141```php
134/** 142/**
@@ -137,7 +145,7 @@ Add a [`@group`](https://phpunit.de/manual/current/en/appendixes.annotations.htm
137 */ 145 */
138class BookmarkImportTest extends PHPUnit_Framework_TestCase 146class BookmarkImportTest extends PHPUnit_Framework_TestCase
139{ 147{
140 [...][](.html) 148 [...]
141} 149}
142``` 150```
143 151
diff --git a/doc/Upgrade-and-migration.md b/doc/md/Upgrade-and-migration.md
index d36eb862..b3a08764 100644
--- a/doc/Upgrade-and-migration.md
+++ b/doc/md/Upgrade-and-migration.md
@@ -1,5 +1,5 @@
1#Upgrade and migration
2## Preparation 1## Preparation
2
3### Note your current version 3### Note your current version
4 4
5If anything goes wrong, it's important for us to know which version you're upgrading from. 5If anything goes wrong, it's important for us to know which version you're upgrading from.
@@ -8,38 +8,44 @@ The current version is present in the `version.php` file.
8### Backup your data 8### Backup your data
9 9
10Shaarli stores all user data under the `data` directory: 10Shaarli stores all user data under the `data` directory:
11
11- `data/config.php` - main configuration file 12- `data/config.php` - main configuration file
12- `data/datastore.php` - bookmarked links 13- `data/datastore.php` - bookmarked links
13- `data/ipbans.php` - banned IP addresses 14- `data/ipbans.php` - banned IP addresses
14- `data/updates.txt` - contains all automatic update to the configuration and datastore files already run 15- `data/updates.txt` - contains all automatic update to the configuration and datastore files already run
15 16
16See [Shaarli configuration](Shaarli-configuration.html) for more information about Shaarli resources. 17See [Shaarli configuration](Shaarli configuration) for more information about Shaarli resources.
17 18
18It is recommended to backup this repository _before_ starting updating/upgrading Shaarli: 19It is recommended to backup this repository _before_ starting updating/upgrading Shaarli:
20
19- 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
20- 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
21 23
22### Migrating data from a previous installation 24### Migrating data from a previous installation
25
23As 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:
24 27
25- backup the `data` directory 28- backup the `data` directory
26- install or update Shaarli: 29- install or update Shaarli:
27 - fresh installation - see [Download and installation](Download-and-installation.html) 30 - fresh installation - see [Download and installation](Download and installation)
28 - update - see the following sections 31 - update - see the following sections
29- check or restore the `data` directory 32- check or restore the `data` directory
30 33
31## Recommended : Upgrading from release archives 34## Recommended : Upgrading from release archives
32All tagged revisions can be downloaded as tarballs or ZIP archives from the [releases](https://github.com/shaarli/Shaarli/releases) page.[](.html)
33 35
34We recommend that you use the latest release tarball with the `-full` suffix. It contains the dependencies, please read [Download and installation](Download-and-installation.html) for `git` complete instructions. 36All tagged revisions can be downloaded as tarballs or ZIP archives from the [releases](https://github.com/shaarli/Shaarli/releases) page.
37
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.
35 39
36Once downloaded, extract the archive locally and update your remote installation (e.g. via FTP) -be sure you keep the content 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!
37 41
38After 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.html) for more details). 42After 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).
39 43
40## Upgrading with Git 44## Upgrading with Git
45
41### Updating a community Shaarli 46### Updating a community Shaarli
42If 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) 47
48If 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:
43 49
44```bash 50```bash
45$ cd /path/to/shaarli 51$ cd /path/to/shaarli
@@ -55,7 +61,7 @@ Fast-forward
55 3 files changed, 3 insertions(+), 1 deletion(-) 61 3 files changed, 3 insertions(+), 1 deletion(-)
56``` 62```
57 63
58Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/):[](.html) 64Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/):
59 65
60```bash 66```bash
61$ composer install --no-dev 67$ composer install --no-dev
@@ -67,18 +73,21 @@ Updating dependencies
67``` 73```
68 74
69### Migrating and upgrading from Sebsauvage's repository 75### Migrating and upgrading from Sebsauvage's repository
70If 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) 76
77If 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.
71 78
72The following guide assumes that: 79The following guide assumes that:
73- 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) 80
81- 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)
74- the default remote is named `origin` and points to Sebsauvage's repository 82- the default remote is named `origin` and points to Sebsauvage's repository
75- the current branch is `master` 83- the current branch is `master`
76 - 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) 84 - 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!
77- the working copy is clean: 85- the working copy is clean:
78 - no versioned file has been locally modified 86 - no versioned file has been locally modified
79 - no untracked files are present 87 - no untracked files are present
80 88
81#### Step 0: show repository information 89#### Step 0: show repository information
90
82```bash 91```bash
83$ cd /path/to/shaarli 92$ cd /path/to/shaarli
84 93
@@ -87,7 +96,7 @@ origin https://github.com/sebsauvage/Shaarli (fetch)
87origin https://github.com/sebsauvage/Shaarli (push) 96origin https://github.com/sebsauvage/Shaarli (push)
88 97
89$ git branch -vv 98$ git branch -vv
90* master 029f75f [origin/master] Update README.md[](.html) 99* master 029f75f [origin/master] Update README.md
91 100
92$ git status 101$ git status
93On branch master 102On branch master
@@ -96,6 +105,7 @@ nothing to commit, working directory clean
96``` 105```
97 106
98#### Step 1: update Git remotes 107#### Step 1: update Git remotes
108
99``` 109```
100$ git remote rename origin sebsauvage 110$ git remote rename origin sebsauvage
101$ git remote -v 111$ git remote -v
@@ -111,11 +121,11 @@ remote: Total 3015 (delta 446), reused 457 (delta 446), pack-reused 2550
111Receiving objects: 100% (3015/3015), 2.59 MiB | 918.00 KiB/s, done. 121Receiving objects: 100% (3015/3015), 2.59 MiB | 918.00 KiB/s, done.
112Resolving deltas: 100% (1899/1899), completed with 48 local objects. 122Resolving deltas: 100% (1899/1899), completed with 48 local objects.
113From https://github.com/shaarli/Shaarli 123From https://github.com/shaarli/Shaarli
114 * [new branch] master -> origin/master[](.html) 124 * [new branch] master -> origin/master
115 * [new branch] stable -> origin/stable[](.html) 125 * [new branch] stable -> origin/stable
116[...][](.html) 126[...]
117 * [new tag] v0.6.4 -> v0.6.4[](.html) 127 * [new tag] v0.6.4 -> v0.6.4
118 * [new tag] v0.7.0 -> v0.7.0[](.html) 128 * [new tag] v0.7.0 -> v0.7.0
119``` 129```
120 130
121#### Step 2: use the stable community branch 131#### Step 2: use the stable community branch
@@ -126,11 +136,11 @@ Branch stable set up to track remote branch stable from origin.
126Switched to a new branch 'stable' 136Switched to a new branch 'stable'
127 137
128$ git branch -vv 138$ git branch -vv
129 master 029f75f [sebsauvage/master] Update README.md[](.html) 139 master 029f75f [sebsauvage/master] Update README.md
130* stable 890afc3 [origin/stable] Merge pull request #509 from ArthurHoaro/v0.6.5[](.html) 140* stable 890afc3 [origin/stable] Merge pull request #509 from ArthurHoaro/v0.6.5
131``` 141```
132 142
133Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/):[](.html) 143Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/):
134 144
135```bash 145```bash
136$ composer install --no-dev 146$ composer install --no-dev
@@ -162,11 +172,12 @@ Total 3317 (delta 2050), reused 3301 (delta 2034)to
162``` 172```
163 173
164#### Step 3: configuration 174#### Step 3: configuration
165After 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). 175
176After 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).
166 177
167## Troubleshooting 178## Troubleshooting
168 179
169If the solutions provided here doesn't work, please open an issue specifying which version you're upgrading from and to. 180If the solutions provided here don't work, please open an issue specifying which version you're upgrading from and to.
170 181
171### You must specify an integer as a key 182### You must specify an integer as a key
172 183
@@ -177,10 +188,10 @@ Take a look at `data/updates.txt` content.
177 188
178Try to delete it and refresh your page while being logged in. 189Try to delete it and refresh your page while being logged in.
179 190
180#### `updates.txt` doesn't exists or doesn't contain `updateMethodDatastoreIds` 191#### `updates.txt` doesn't exist or doesn't contain `updateMethodDatastoreIds`
181 192
182 1. Create `data/updates.txt` if it doesn't exist. 1931. Create `data/updates.txt` if it doesn't exist
183 2. Paste this string in the update file `;updateMethodRenameDashTags;` 1942. Paste this string in the update file `;updateMethodRenameDashTags;`
184 3. Login to Shaarli. 1953. Login to Shaarli
185 4. Delete the update file. 1964. Delete the update file
186 5. Refresh. 1975. 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/Versioning-and-Branches.md b/doc/md/Versioning-and-Branches.md
index bbc7719e..7097ca0a 100644
--- a/doc/Versioning-and-Branches.md
+++ b/doc/md/Versioning-and-Branches.md
@@ -1,5 +1,4 @@
1#Versioning and Branches 1**WORK IN PROGRESS**
2[**WORK IN PROGRESS**][](.html)
3 2
4It'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. 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.
5 4
@@ -9,10 +8,10 @@ The `master` branch is the development branch. Any new change MUST go through th
9 8
10Remarks: 9Remarks:
11 10
12 * This branch shouldn't be used for production as it isn't necessary stable. 11- This branch shouldn't be used for production as it isn't necessary stable.
13 * 3rd party aren't required to be compatible with the latest changes. 12- 3rd party aren't required to be compatible with the latest changes.
14 * Official plugins, themes and libraries (contained within Shaarli organization repos) must be compatible with the master branch. 13- Official plugins, themes and libraries (contained within Shaarli organization repos) must be compatible with the master branch.
15 * The version in this branch is always `dev`. 14- The version in this branch is always `dev`.
16 15
17## `v0.x` branch 16## `v0.x` branch
18 17
@@ -38,7 +37,7 @@ For example, the current latest release is `v0.8.3`, the stable branch is an ali
38 37
39Remarks: 38Remarks:
40 39
41 * Shaarli release pace isn't fast, and the stable branch might be a few months behind the latest release. 40- Shaarli release pace isn't fast, and the stable branch might be a few months behind the latest release.
42 41
43## Releases 42## Releases
44 43
@@ -50,7 +49,7 @@ Note that for every release, we manually generate a tarball which contains all S
50 49
51### Versioning 50### Versioning
52 51
53Any 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:[](.html) 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:
54 53
55 - 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. 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.
56 - use your own versioning scheme, and state Shaarli compatibility in the release description. 55 - use your own versioning scheme, and state Shaarli compatibility in the release description.
diff --git a/doc/md/docker/docker-101.md b/doc/md/docker/docker-101.md
new file mode 100644
index 00000000..b02dd149
--- /dev/null
+++ b/doc/md/docker/docker-101.md
@@ -0,0 +1,62 @@
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```
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..91ffecff
--- /dev/null
+++ b/doc/md/docker/reverse-proxy-configuration.md
@@ -0,0 +1,6 @@
1
2TODO, see https://github.com/shaarli/Shaarli/issues/888
3
4## HAProxy
5
6## Nginx
diff --git a/doc/md/docker/shaarli-images.md b/doc/md/docker/shaarli-images.md
new file mode 100644
index 00000000..6d108d21
--- /dev/null
+++ b/doc/md/docker/shaarli-images.md
@@ -0,0 +1,71 @@
1## Get and run a Shaarli image
2
3### DockerHub repository
4The images can be found in the [`shaarli/shaarli`](https://hub.docker.com/r/shaarli/shaarli/)
5repository.
6
7### Available image tags
8- `latest`: master branch (tarball release)
9- `stable`: stable branch (tarball release)
10
11All images rely on:
12- [Debian 8 Jessie](https://hub.docker.com/_/debian/)
13- [PHP5-FPM](http://php-fpm.org/)
14- [Nginx](http://nginx.org/)
15
16### Download from DockerHub
17```bash
18$ docker pull shaarli/shaarli
19latest: Pulling from shaarli/shaarli
2032716d9fcddb: Pull complete
2184899d045435: Pull complete
224b6ad7444763: Pull complete
23e0345ef7a3e0: Pull complete
245c1dd344094f: Pull complete
256422305a200b: Pull complete
267d63f861dbef: Pull complete
273eb97210645c: Pull complete
28869319d746ff: Already exists
29869319d746ff: Pulling fs layer
30902b87aaaec9: Already exists
31Digest: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98
32Status: Downloaded newer image for shaarli/shaarli:latest
33```
34
35### Create and start a new container from the image
36```bash
37# map the host's :8000 port to the container's :80 port
38$ docker create -p 8000:80 shaarli/shaarli
39d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
40
41# launch the container in the background
42$ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
43d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
44
45# list active containers
46$ docker ps
47CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
48d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo
49```
50
51### Stop and destroy a container
52```bash
53$ docker stop backstabbing_galileo # those docker guys are really rude to physicists!
54backstabbing_galileo
55
56# check the container is stopped
57$ docker ps
58CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
59
60# list ALL containers
61$ docker ps -a
62CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
63d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo
64
65# destroy the container
66$ docker rm backstabbing_galileo # let's put an end to these barbarian practices
67backstabbing_galileo
68
69$ docker ps -a
70CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
71```
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/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..b10e3cf4
--- /dev/null
+++ b/doc/md/index.md
@@ -0,0 +1,115 @@
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
26## Features
27
28### Interface
29- minimalist design (simple is beautiful)
30- FAST
31- ATOM and RSS feeds
32- views:
33 - paginated link list
34 - tag cloud
35 - picture wall: image and video thumbnails
36 - daily: newspaper-like daily digest
37 - daily RSS feed
38- permalinks for easy reference
39- links can be public or private
40- extensible through [plugins](https://github.com/shaarli/Shaarli/wiki/Plugins#plugin-usage)
41
42### Tag, view and search your links!
43- add a custom title and description to archived links
44- add tags to classify and search links
45 - features tag autocompletion, renaming, merging and deletion
46- full-text and tag search
47
48### Easy setup
49- dead-simple installation: drop the files, open the page
50- links are stored in a file
51 - compact storage
52 - no database required
53 - easy backup: simply copy the datastore file
54- import and export links as Netscape bookmarks
55
56### Accessibility
57- Firefox bookmarlet to share links in one click
58- support for mobile browsers
59- works with Javascript disabled
60- easy page customization through HTML/CSS/RainTPL
61
62### Security
63- bruteforce-proof login form
64- protected against [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)
65and session cookie hijacking
66
67### Goodies
68- thumbnail generation for images and video services:
69dailymotion, flickr, imageshack, imgur, vimeo, xkcd, youtube...
70 - lazy-loading with [bLazy](http://dinbror.dk/blazy/)
71- [PubSubHubbub](https://code.google.com/p/pubsubhubbub/) protocol support
72- URL cleanup: automatic removal of `?utm_source=...`, `fb=...`
73- discreet pop-up notification when a new release is available
74
75### REST API
76
77Easily extensible by any client using the REST API exposed by Shaarli.
78
79See the [API documentation](http://shaarli.github.io/api-documentation/).
80
81### Other usages
82Though Shaarli is primarily a bookmarking application, it can serve other purposes
83(see [Features](Features)):
84
85- micro-blogging
86- pastebin
87- online notepad
88- snippet archive
89
90## About
91### Shaarli community fork
92This friendly fork is maintained by the Shaarli community at https://github.com/shaarli/Shaarli
93
94This is a community fork of the original [Shaarli](https://github.com/sebsauvage/Shaarli/) project by [Sébastien Sauvage](http://sebsauvage.net/).
95
96The original project is currently unmaintained, and the developer [has informed us](https://github.com/sebsauvage/Shaarli/issues/191)
97that he would have no time to work on Shaarli in the near future.
98The Shaarli community has carried on the work to provide
99[many patches](https://github.com/shaarli/Shaarli/compare/sebsauvage:master...master)
100for [bug fixes and enhancements](https://github.com/shaarli/Shaarli/issues?q=is%3Aclosed+)
101in this repository, and will keep maintaining the project for the foreseeable future, while keeping Shaarli simple and efficient.
102
103### Contributing
104If you'd like to help, please:
105- have a look at the open [issues](https://github.com/shaarli/Shaarli/issues)
106and [pull requests](https://github.com/shaarli/Shaarli/pulls)
107- feel free to report bugs (feedback is much appreciated)
108- suggest new features and improvements to both code and [documentation](https://github.com/shaarli/Shaarli/wiki)
109- propose solutions to existing problems
110- submit pull requests :-)
111
112
113### License
114Shaarli 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.
115
diff --git a/doc/sidebar.html b/doc/sidebar.html
deleted file mode 100644
index 478840d1..00000000
--- a/doc/sidebar.html
+++ /dev/null
@@ -1,52 +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<li><a href="REST-API.html">REST API</a></li>
22</ul></li>
23<li>How To
24<ul>
25<li><a href="Backup,-restore,-import-and-export.html">Backup, restore, import and export</a></li>
26<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>
27<li><a href="Create-and-serve-multiple-Shaarlis-(farm).html">Create and serve multiple Shaarlis (farm)</a></li>
28<li><a href="Download-CSS-styles-from-an-OPML-list.html">Download CSS styles from an OPML list</a></li>
29<li><a href="Datastore-hacks.html">Datastore hacks</a></li>
30</ul></li>
31<li><a href="Troubleshooting.html">Troubleshooting</a></li>
32<li><a href="Development.html">Development</a>
33<ul>
34<li><a href="GnuPG-signature.html">GnuPG signature</a></li>
35<li><a href="Coding-guidelines.html">Coding guidelines</a></li>
36<li><a href="Directory-structure.html">Directory structure</a></li>
37<li><a href="3rd-party-libraries.html">3rd party libraries</a></li>
38<li><a href="Plugin-System.html">Plugin System</a></li>
39<li><a href="Release-Shaarli.html">Release Shaarli</a></li>
40<li><a href="Versioning-and-Branches.html">Versioning and Branches</a></li>
41<li><a href="Security.html">Security</a></li>
42<li><a href="Static-analysis.html">Static analysis</a></li>
43<li><a href="Theming.html">Theming</a></li>
44<li><a href="Unit-tests.html">Unit tests</a></li>
45</ul></li>
46<li>About
47<ul>
48<li><a href="FAQ.html">FAQ</a></li>
49<li><a href="Community-&amp;-Related-software.html">Community &amp; Related software</a></li>
50</ul></li>
51</ul>
52</div>