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.)
To correctly import the tags from a SemanticScuttle HTML export, edit the HTML file before importing and replace all occurences of tags= (lowercase) to TAGS= (uppercase).
-
Scuttle
-
Shaarli cannot import data directly from 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.
-
Import Shaarli links to Firefox
-
-
Export your Shaarli links as described above.
-
For compatibility reasons, check Prepend note permalinks with this Shaarli instance's URL (useful to import bookmarks in a web browser)
-
In Firefox, open the bookmark manager (not the sidebar! Bookmarks menu > Show all bookmarks or Ctrl+Shift+B)
-
Select Import and Backup > Import bookmarks in HTML format
-
-
Your 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.
-
You may be interested in these Firefox addons to manage links imported from Shaarli
-
-
diff --git a/doc/Backup,-restore,-import-and-export.md b/doc/Backup,-restore,-import-and-export.md
deleted file mode 100644
index 9f5598ef..00000000
--- a/doc/Backup,-restore,-import-and-export.md
+++ /dev/null
@@ -1,66 +0,0 @@
-#Backup, restore, import and export
- * [Backup and restore the datastore file](#backup-and-restore-the-datastore-file)[](.html)
- * [Export links as...](#export-links-as)[](.html)
- * [Import links from...](#import-links-from)[](.html)
- * [Import Shaarli links to Firefox](#import-shaarli-links-to-firefox)[](.html)
-
-
-----------------------
-
-## Backup and restore the datastore file
-
-Backup the file `data/datastore.php` (by FTP or SSH). Restore by putting the file back in place.
-
-Example command:
-```bash
-rsync -avzP my.server.com:/var/www/shaarli/data/datastore.php datastore-$(date +%Y-%m-%d_%H%M).php
-```
-
-## Export links as...
-
-To export links as an HTML file, under _Tools > Export_, choose:
-- _Export all_ to export both public and private links
-- _Export public_ to export public links only
-- _Export private_ to export private links only
-
-Restore by using the `Import` feature.
-* This can be done using the [shaarchiver](https://github.com/nodiscc/shaarchiver) tool.[](.html)
-
-Example command:
-```bash
-./export-bookmarks.py --url=https://my.server.com/shaarli --username=myusername --password=mysupersecretpassword --download-dir=./ --type=all
-```
-
-## Import links from...
-
-
-### Diigo
-
-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.)
-
-
-### Mister Wong
-
-See [this issue](https://github.com/sebsauvage/Shaarli/issues/146) for import tweaks.[](.html)
-
-### SemanticScuttle
-
-To 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)
-
-### Scuttle
-
-Shaarli 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)
-
-## Import Shaarli links to Firefox
-
- * Export your Shaarli links as described above.
- * For compatibility reasons, check `Prepend note permalinks with this Shaarli instance's URL (useful to import bookmarks in a web browser)`
- * In Firefox, open the bookmark manager (not the sidebar! `Bookmarks menu > Show all bookmarks` or `Ctrl+Shift+B`)
- * Select `Import and Backup > Import bookmarks in HTML format`
-
-Your 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.
-
-You may be interested in these Firefox addons to manage links imported from Shaarli
-
- * [Bookmark Deduplicator](https://addons.mozilla.org/en-US/firefox/addon/bookmark-deduplicator/) - provides an easy way to deduplicate your bookmarks[](.html)
- * [TagSieve](https://addons.mozilla.org/en-US/firefox/addon/tagsieve/) - browse your bookmarks by their tags[](.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 @@
-
-
-
-
-
-
- Shaarli – Browsing and searching
-
-
-
-
-
-
Use the Search text field to search in any of the fields of all links (Title, URL, Description...)
-
Exclude text/tags: Use the - operator before a word or tag (example -uninteresting) to prevent entries containing (or tagged) uninteresting from showing up in the search results.
-
Exact text search: Use double-quotes (example "exact search") to search for the exact expression.
-
Both exclude patterns and exact searches can be combined with normal searches (example "exact search" term otherterm -notthis "very exact" stuff -notagain)
-
Tags search
-
Use the Filter by tags field to restrict displayed links to entries tagged with one or multiple tags (use space to separate tags).
-
Hidden tags: Tags starting with a dot . (example .secret) are private. They can only be seen and searched when logged in.
-
Alternatively you can use the Tag cloud to discover all tags and click on any of them to display related links.
-
To search for links that are not tagged, enter "" in the tag search field.
-
Filtering RSS feeds/Picture wall
-
RSS feeds can also be restricted to only return items matching a text/tag search: see RSS feeds.
-
-
diff --git a/doc/Browsing-and-searching.md b/doc/Browsing-and-searching.md
deleted file mode 100644
index 854b6b60..00000000
--- a/doc/Browsing-and-searching.md
+++ /dev/null
@@ -1,28 +0,0 @@
-#Browsing and searching
-# Browsing and Searching
-
-.html)
-
-## Plain text search
-
-Use the `Search text` field to search in _any_ of the fields of all links (Title, URL, Description...)
-
-**Exclude text/tags:** Use the `-` operator before a word or tag (example `-uninteresting`) to prevent entries containing (or tagged) `uninteresting` from showing up in the search results.
-
-**Exact text search:** Use double-quotes (example `"exact search"`) to search for the exact expression.
-
-Both exclude patterns and exact searches can be combined with normal searches (example `"exact search" term otherterm -notthis "very exact" stuff -notagain`)
-
-## Tags search
-
-Use the `Filter by tags` field to restrict displayed links to entries tagged with one or multiple tags (use space to separate tags).
-
-**Hidden tags:** Tags starting with a dot `.` (example `.secret`) are private. They can only be seen and searched when logged in.
-
-Alternatively you can use the `Tag cloud` to discover all tags and click on any of them to display related links.
-
-To search for links that are not tagged, enter `""` in the tag search field.
-
-## Filtering RSS feeds/Picture wall
-
-RSS feeds can also be restricted to only return items matching a text/tag search: see [RSS feeds](RSS-feeds.html).
diff --git a/doc/Coding-guidelines.html b/doc/Coding-guidelines.html
deleted file mode 100644
index 8df12182..00000000
--- a/doc/Coding-guidelines.html
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-
-
-
-
- Shaarli – Coding guidelines
-
-
-
-
-
-
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.
-
TODO: contact repos owners to see if they'd like to standardize their work with the community fork.
Self dead link - Detect dead links on shaarli. This version use the database of shaarli. Another version, can be used for other shaarli instances (but is more resource consuming).
-
-
Mobile Apps
-
-
Shaarli💫 iOS share extension - see #308 for some promo codes,
-
Shaarli for Android - Android application that adds Shaarli as a sharing provider
-
Shaarlier for Android - Android application to simply add links directly into your Shaarli
-
-
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 @@
-#Community & Related software
-_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._
-
-_TODO: contact repos owners to see if they'd like to standardize their work with the community fork._
-
-## Community
-- [Liens en vrac de sebsauvage](http://sebsauvage.net/links/) - the original Shaarli[](.html)
-- [A large list of Shaarlis](http://porneia.free.fr/pub/links/ou-est-shaarli.html)[](.html)
-- [A list of working Shaarli aggregators](https://raw.githubusercontent.com/Oros42/find_shaarlis/master/annuaires.json)[](.html)
-- [A list of some known Shaarlis](https://github.com/Oros42/shaarlis_list)[](.html)
-- [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)
-- [Original ideas/fixme/TODO page](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:ideas)[](.html)
-- [Original discussion page](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:discussion) (fr)[](.html)
-- [Original revisions history](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:history)[](.html)
-- [Shaarli.fr/my](https://www.shaarli.fr/my.php) - Unofficial, unsupported (old fork) hosted Shaarlis provider, courtesy of [DMeloni](https://github.com/DMeloni)[](.html)
-
-### Articles and social media discussions
-- 2016-09-22 - Hacker News - https://news.ycombinator.com/item?id=12552176
-- 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)
-- 2015-06-22 - Hacker News - https://news.ycombinator.com/item?id=9755366
-- 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)
-
-### Third party plugins
-
-
- * [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)
- * [Code Coloration](https://github.com/ArthurHoaro/code-coloration) by [@ArthurHoaro](https://github.com/ArthurHoaro): client side code syntax highlighter.[](.html)
- * [Disqus](https://github.com/kalvn/shaarli-plugin-disqus) by [@kalvn](https://github.com/kalvn): Adds Disqus comment system to your Shaarli.[](.html)
- * [emojione](https://github.com/NerosTie/emojione) by [@NerosTie](https://github.com/NerosTie): Add colorful emojis to your Shaarli.[](.html)
- * [google analytics](https://github.com/ericjuden/Shaarli-Google-Analytics-Plugin) by [@ericjuden](http://github.com/ericjuden): Adds Google Analytics tracking support[](.html)
- * [launch](https://github.com/ArthurHoaro/launch-plugin) - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli.[](.html)
- * [social](https://github.com/alexisju/social) by [@alexisju](https://github.com/alexisju): share links to social networks.[](.html)
- * [shaarli2twitter](https://github.com/ArthurHoaro/shaarli2twitter) by [@ArthurHoaro](https://github.com/ArthurHoaro) - Automatically tweet your shared links from Shaarli[](.html)
-
-
-### Themes
-See [Theming](Theming.html) for the list of community-contributed themes, and an installation guide.
-
-### Server apps
-- [shaarchiver](https://github.com/nodiscc/shaarchiver) - Archive your Shaarli bookmarks and their content[](.html)
-- [shaarli-river](https://github.com/mknexen/shaarli-river) - An aggregator for shaarlis with many features [](.html)
-- [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)
-- [Shaarlimages](https://github.com/BoboTiG/shaarlimages) - An image-oriented aggregator for Shaarlis[](.html)
-- [mknexen/shaarli-api](https://github.com/mknexen/shaarli-api) - A REST API for Shaarli[](.html)
-- [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)
-
-### Mobile Apps
-- [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)
-- [Shaarli for Android](http://sebsauvage.net/links/?ZAyDzg) - Android application that adds Shaarli as a sharing provider[](.html)
-- [Shaarlier for Android](https://github.com/dimtion/Shaarlier) - Android application to simply add links directly into your Shaarli[](.html)
-
-## Integration with other platforms
-- [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)
-- [octopress-shaarli](https://github.com/ahmet2mir/octopress-shaarli) - Octopress plugin to retrieve Shaarli links on the sidebar[](.html)
-- [Scuttle to Shaarli](https://github.com/q2apro/scuttle-to-shaarli) - Import bookmarks from Scuttle[](.html)
-
-## Alternatives to Shaarli
-- [Shaarli alternatives](http://alternativeto.net/software/shaarli/) (alternativeto.net)[](.html)
-- [Bookie](https://github.com/bookieio/bookie) - Another self-hostable, free bookmark sharing software, written in Python[](.html)
-- [Unmark](https://github.com/plainmade/unmark) - An open source todo app for bookmarks ([Homepage](https://unmark.it/))[](.html)
-- [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 @@
-
-
-
-
-
-
- Shaarli – Copy an existing installation over SSH and serve it locally
-
-
-
-
-
-
-
Copy an existing installation over SSH and serve it locally
-
Example bash script:
-
#!/bin/bash
-#Description: Copy a Shaarli installation over SSH/SCP, serve it locally with php-cli
-#Will create a local-shaarli/ directory when you run it, backup your Shaarli there, and serve it locally.
-#Will NOT download linked pages. It's just a directly usable backup/copy/mirror of your Shaarli
-#Requires: ssh, scp and a working SSH access to the server where your Shaarli is installed
-#Usage: ./local-shaarli.sh
-#Author: nodiscc (nodiscc@gmail.com)
-#License: MIT (http://opensource.org/licenses/MIT)
-set-o errexit
-set-o nounset
-
-##### CONFIG #################
-#The port used by php's local server
-php_local_port=7431
-
-#Name of the SSH server and path where Shaarli is installed
-#TODO: pass these as command-line arguments
-remotehost="my.ssh.server"
-remote_shaarli_dir="/var/www/shaarli"
-
-
-###### FUNCTIONS #############
-_main(){
- _CBSyncShaarli
- _CBServeShaarli
-}
-
-_CBSyncShaarli(){
- remote_temp_dir=$(ssh$remotehost mktemp -d)
- remote_ssh_user=$(ssh$remotehost whoami)
- ssh -t "$remotehost" sudo cp -r "$remote_shaarli_dir""$remote_temp_dir"
- ssh -t "$remotehost" sudo chown -R "$remote_ssh_user":"$remote_ssh_user""$remote_temp_dir"
- scp -rq "$remotehost":"$remote_temp_dir" local-shaarli
- ssh"$remotehost" rm -r "$remote_temp_dir"
-}
-
-_CBServeShaarli(){
- #TODO: allow serving a previously downloaded Shaarli
- #TODO: ask before overwriting local copy, if it exists
- cd local-shaarli/
- php -S localhost:${php_local_port}
- echo"Please go to http://localhost:${php_local_port}"
-}
-
-
-##### MAIN #################
-
-_main
-
This outputs:
-
$ ./local-shaarli.sh
-PHP 5.6.0RC4 Development Server started at Mon Sep 1 21:56:19 2014
-Listening on http://localhost:7431
-Document root is /home/user/local-shaarli/shaarli
-Press Ctrl-C to quit.
-
-[Mon Sep 1 21:56:27 2014] ::1:57868 [200]: /[](.html)
-[Mon Sep 1 21:56:27 2014] ::1:57869 [200]: /index.html[](.html)
-[Mon Sep 1 21:56:37 2014] ::1:57881 [200]: /...[](.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 @@
-#Copy an existing installation over SSH and serve it locally
-Example bash script:
-
-```bash
-#!/bin/bash
-#Description: Copy a Shaarli installation over SSH/SCP, serve it locally with php-cli
-#Will create a local-shaarli/ directory when you run it, backup your Shaarli there, and serve it locally.
-#Will NOT download linked pages. It's just a directly usable backup/copy/mirror of your Shaarli
-#Requires: ssh, scp and a working SSH access to the server where your Shaarli is installed
-#Usage: ./local-shaarli.sh
-#Author: nodiscc (nodiscc@gmail.com)
-#License: MIT (http://opensource.org/licenses/MIT)
-set -o errexit
-set -o nounset
-
-##### CONFIG #################
-#The port used by php's local server
-php_local_port=7431
-
-#Name of the SSH server and path where Shaarli is installed
-#TODO: pass these as command-line arguments
-remotehost="my.ssh.server"
-remote_shaarli_dir="/var/www/shaarli"
-
-
-###### FUNCTIONS #############
-_main() {
- _CBSyncShaarli
- _CBServeShaarli
-}
-
-_CBSyncShaarli() {
- remote_temp_dir=$(ssh $remotehost mktemp -d)
- remote_ssh_user=$(ssh $remotehost whoami)
- ssh -t "$remotehost" sudo cp -r "$remote_shaarli_dir" "$remote_temp_dir"
- ssh -t "$remotehost" sudo chown -R "$remote_ssh_user":"$remote_ssh_user" "$remote_temp_dir"
- scp -rq "$remotehost":"$remote_temp_dir" local-shaarli
- ssh "$remotehost" rm -r "$remote_temp_dir"
-}
-
-_CBServeShaarli() {
- #TODO: allow serving a previously downloaded Shaarli
- #TODO: ask before overwriting local copy, if it exists
- cd local-shaarli/
- php -S localhost:${php_local_port}
- echo "Please go to http://localhost:${php_local_port}"
-}
-
-
-##### MAIN #################
-
-_main
-```
-
-This outputs:
-
-```bash
-$ ./local-shaarli.sh
-PHP 5.6.0RC4 Development Server started at Mon Sep 1 21:56:19 2014
-Listening on http://localhost:7431
-Document root is /home/user/local-shaarli/shaarli
-Press Ctrl-C to quit.
-
-[Mon Sep 1 21:56:27 2014] ::1:57868 [200]: /[](.html)
-[Mon Sep 1 21:56:27 2014] ::1:57869 [200]: /index.html[](.html)
-[Mon Sep 1 21:56:37 2014] ::1:57881 [200]: /...[](.html)
-```
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 @@
-
-
-
-
-
-
- Shaarli – Create and serve multiple Shaarlis (farm)
-
-
-
-
-
-
-
Example bash script (creates multiple shaarli instances and generates an HTML index of them)
-
#!/bin/bash
-set-o errexit
-set-o nounset
-
-#config
-shaarli_base_dir='/var/www/shaarli'
-accounts='bob john whatever username'
-shaarli_repo_url='https://github.com/shaarli/Shaarli'
-ref="master"
-
-#clone multiple shaarli instances
-if [!-d"$shaarli_base_dir" ]; thenmkdir"$shaarli_base_dir";fi[](.html)
-
-foraccount in $accounts;do
- if [-d"$shaarli_base_dir/$account" ];[](.html)
- thenecho"[info] account $account already exists, skipping";[](.html)
- elseecho"[info] creating new account $account ...";git clone --quiet "$shaarli_repo_url" -b "$ref""$shaarli_base_dir/$account";fi[](.html)
-done
-
-#generate html index of shaarlis
-htmlhead='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<!-- Minimal html template thanks to http://www.sitepoint.com/a-minimal-html-document/ -->
-<html lang="en">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8">
- <title>My Shaarli farm</title>
- <style>body {font-family: "Open Sans"}</style>
- </head>
- <body>
- <div>
- <h1>My Shaarli farm</h1>
- <ul style="list-style-type: none;">'
-
-accountlinks=''
-
-htmlfooter='
- </ul>
- </div>
- </body>
-</html>'
-
-
-
-foraccount in $accounts;doaccountlinks="$accountlinks\n<li><a href=\"$account\">$account</a></li>"; done
-if [-d"$shaarli_base_dir/index.html" ]; thenecho"[removing old index.html]";rm"$shaarli_base_dir/index.html" ];fi[](.html)
-echo"[info] generating new index of shaarlis"[](.html)
-echo -e "$htmlhead$accountlinks$htmlfooter">"$shaarli_base_dir/index.html"
-echo'[info] done.'[](.html)
-echo"[info] list of accounts: $accounts"[](.html)
-echo"[info] contents of $shaarli_base_dir:"[](.html)
-tree -a -L 1 "$shaarli_base_dir"
-
This script just serves as an example. More precise or complex (applying custom configuration, etc) automation is possible using configuration management software like Ansible
-
-
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 @@
-#Create and serve multiple Shaarlis (farm)
-Example bash script (creates multiple shaarli instances and generates an HTML index of them)
-
-```bash
-#!/bin/bash
-set -o errexit
-set -o nounset
-
-#config
-shaarli_base_dir='/var/www/shaarli'
-accounts='bob john whatever username'
-shaarli_repo_url='https://github.com/shaarli/Shaarli'
-ref="master"
-
-#clone multiple shaarli instances
-if [ ! -d "$shaarli_base_dir" ]; then mkdir "$shaarli_base_dir"; fi[](.html)
-
-for account in $accounts; do
- if [ -d "$shaarli_base_dir/$account" ];[](.html)
- then echo "[info] account $account already exists, skipping";[](.html)
- else echo "[info] creating new account $account ..."; git clone --quiet "$shaarli_repo_url" -b "$ref" "$shaarli_base_dir/$account"; fi[](.html)
-done
-
-#generate html index of shaarlis
-htmlhead='
-
-
-
-
- My Shaarli farm
-
-
-
-
-
My Shaarli farm
-
'
-
-accountlinks=''
-
-htmlfooter='
-
-
-
-'
-
-
-
-for account in $accounts; do accountlinks="$accountlinks\n
Look for <input type="hidden" name="lf_linkdate" value="{$link.linkdate}"> in tpl/editlink.tpl (line 14)
-
Replace type="hidden" with type="text" from this line
-
A new date/time field becomes available in the edit/new link dialog.
-
You can set the timestamp manually by entering it in the format YYYMMDD_HHMMS.
-
-
-
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 @@
-#Datastore hacks
-### Decode datastore content
-To display the array representing the data saved in `data/datastore.php`, use the following snippet:
-
-```php
-$data = "tZNdb9MwFIb... ";
-$out = unserialize(gzinflate(base64_decode($data)));
-echo "
"; // Pretty printing is love, pretty printing is life
-print_r($out);
-echo "
";
-exit;
-```
-This will output the internal representation of the datastore, "unobfuscated" (if this can really be considered obfuscation).
-
-Alternatively, you can transform to JSON format (and pretty-print if you have `jq` installed):
-```
-php -r 'print(json_encode(unserialize(gzinflate(base64_decode(preg_replace("!.*/\* (.+) \*/.*!", "$1", file_get_contents("data/datastore.php")))))));' | jq .
-```
-
-### Changing the timestamp for a link
-* Look for `` in `tpl/editlink.tpl` (line 14)
-* Replace `type="hidden"` with `type="text"` from this line
-* A new date/time field becomes available in the edit/new link dialog.
-* 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 @@
-
-
-
-
-
-
- Shaarli – Development
-
-
-
-
-
-
After all jobs have finished, Travis returns the results to GitHub:
-
-
a status icon represents the result for the master branch:
-
Pull Requests are updated with the Travis result
-
-
Green: all tests have passed
-
Red: some tests failed
-
Orange: tests are pending
-
-
-
-
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 @@
-#Development
-## Guidelines
-Please have a look at the following pages:
-- [Contributing to Shaarli](https://github.com/shaarli/Shaarli/tree/master/CONTRIBUTING.md)[](.html)
-- [Static analysis](Static-analysis.html) - patches should try to stick to the [PHP Standard Recommendations](http://www.php-fig.org/psr/) (PSR), especially:
- - [PSR-1](http://www.php-fig.org/psr/psr-1/) - Basic Coding Standard[](.html)
- - [PSR-2](http://www.php-fig.org/psr/psr-2/) - Coding Style Guide[](.html)
-- [Unit tests](Unit-tests.html)
-- [GnuPG signature](GnuPG-signature.html) for tags/releases
-
-## Continuous integration tools
-### Local development
-A [`Makefile`](https://github.com/shaarli/Shaarli/blob/master/Makefile) is available to perform project-related operations:[](.html)
-- Documentation - generate a local HTML copy of the GitHub wiki
-- [Static analysis](Static-analysis.html) - check that the code is compliant to PHP conventions
-- [Unit tests](Unit-tests.html) - ensure there are no regressions introduced by new commits
-
-### Automatic builds
-[Travis CI](http://docs.travis-ci.com/) is a Continuous Integration build server, that runs a build:[](.html)
-- each time a commit is merged to the mainline (`master` branch)
-- each time a Pull Request is submitted or updated
-
-A build is composed of several jobs: one for each supported PHP version (see [Server requirements](Server-requirements.html)).
-
-Each build job:
-- updates Composer
-- installs 3rd-party test dependencies with Composer
-- runs [Unit tests](Unit-tests.html)
-
-After all jobs have finished, Travis returns the results to GitHub:
-- a status icon represents the result for the `master` branch: []((https://api.travis-ci.org/shaarli/Shaarli.svg)](https://travis-ci.org/shaarli/Shaarli).html)
-- Pull Requests are updated with the Travis result
- - Green: all tests have passed
- - Red: some tests failed
- - 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 @@
-
-
-
-
-
-
- Shaarli – Directory structure
-
-
-
-
-
-
-
$ docker search debian
-
-NAME DESCRIPTION STARS OFFICIAL AUTOMATED
-ubuntu Ubuntu is a Debian-based Linux operating s... 2065 [OK][](.html)
-debian Debian is a Linux distribution that's comp... 603 [OK][](.html)
-google/debian 47 [OK][](.html)
-
Show available tags for a repository
-
$ curl https://index.docker.io/v1/repositories/debian/tags |python -m json.tool
-
-% Total % Received % Xferd Average Speed Time Time Time Current
-Dload Upload Total Spent Left Speed
-100 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433
# map the host's :8000 port to the container's :80 port
-$ docker create -p 8000:80 shaarli/shaarli
-d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
-
-# launch the container in the background
-$ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
-d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
-
-# list active containers
-$ docker ps
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo
-
Stop and destroy a container
-
$ docker stop backstabbing_galileo # those docker guys are really rude to physicists!
-backstabbing_galileo
-
-# check the container is stopped
-$ docker ps
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-
-# list ALL containers
-$ docker ps -a
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo
-
-# destroy the container
-$ docker rm backstabbing_galileo # let's put an end to these barbarian practices
-backstabbing_galileo
-
-$ docker ps -a
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
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 server is properly configured.
-
Several releases are available:
-
-
Latest release (recommended)
-
Download as an archive
-
Get the latest released version from the releases page.
-
Download our shaarli-full archive to include dependencies.
In most cases, download Shaarli from the releases page. Cloning using git or downloading Github branches as zip files requires additional steps (see below).
-
-
diff --git a/doc/Download-and-Installation.md b/doc/Download-and-Installation.md
deleted file mode 100644
index 970144a5..00000000
--- a/doc/Download-and-Installation.md
+++ /dev/null
@@ -1,102 +0,0 @@
-#Download and Installation
-# Get Shaarli!
-
-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 [server](Server-requirements) is properly [configured](Server-configuration).[](.html)
-
-Several releases are available:
-
---------------------------------------------------------
-
-## Latest release (recommended)
-### Download as an archive
-Get the latest released version from the [releases](https://github.com/shaarli/Shaarli/releases) page.[](.html)
-
-**Download our *shaarli-full* archive** to include dependencies.
-
-The current latest released version is `v0.8.4`
-
-Or in command lines:
-
-```bash
-$ wget https://github.com/shaarli/Shaarli/releases/download/v0.8.4/shaarli-v0.8.4-full.zip
-$ unzip shaarli-v0.8.4-full.zip
-$ mv Shaarli /path/to/shaarli/
-```
-
-| ! |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)
-|-----|--------------------------|
-
-### Using git
-
-```
-mkdir -p /path/to/shaarli && cd /path/to/shaarli/
-git clone -b v0.8 https://github.com/shaarli/Shaarli.git .
-composer install --no-dev
-```
-
---------------------------------------------------------
-
-## Stable version
-
-The stable version has been experienced by Shaarli users, and will receive security updates.
-
-### Download as an archive
-
-As a .zip archive:
-
-```bash
-$ wget https://github.com/shaarli/Shaarli/archive/stable.zip
-$ unzip stable.zip
-$ mv Shaarli-stable /path/to/shaarli/
-```
-
-As a .tar.gz archive :
-
-```bash
-$ wget https://github.com/shaarli/Shaarli/archive/stable.tar.gz
-$ tar xvf stable.tar.gz
-$ mv Shaarli-stable /path/to/shaarli/
-```
-
-### Clone with Git
-
-[Composer](https://getcomposer.org/) is required to build a functional Shaarli installation when pulling from git.[](.html)
-
-```bash
-$ git clone https://github.com/shaarli/Shaarli.git -b stable /path/to/shaarli/
-# install/update third-party dependencies
-$ cd /path/to/shaarli/
-$ composer install --no-dev
-```
-
---------------------------------------------------------
-
-## Development version (mainline)
-
-_Use at your own risk!_
-
-To get the latest changes from the `master` branch:
-
-```bash
-# clone the repository
-$ git clone https://github.com/shaarli/Shaarli.git -b master /path/to/shaarli/
-# install/update third-party dependencies
-$ cd /path/to/shaarli
-$ composer install --no-dev
-```
-
---------------------------------------------------------
-
-## Finish Installation
-
-Once Shaarli is downloaded and files have been placed at the correct location, open it this location your favorite browser.
-
-[](.html)
-
-Setup your Shaarli installation, and it's ready to use!
-
---------------------------------------------------------
-
-## Updating Shaarli
-
-See [Upgrade and Migration](Upgrade-and-migration)[](.html)
diff --git a/doc/Example-patch---add-new-via-field-for-links.html b/doc/Example-patch---add-new-via-field-for-links.html
deleted file mode 100644
index 49036a74..00000000
--- a/doc/Example-patch---add-new-via-field-for-links.html
+++ /dev/null
@@ -1,254 +0,0 @@
-
-
-
-
-
-
- Shaarli – Example patch add new via field for links
-
-
-
-
-
-
Example 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
From e0f363c18e8fe67990ed2bb1a08652e24e70bbcb Mon Sep 17 00:00:00 2001
-From: Knah Tsaeb <knah-tsaeb@knah-tsaeb.org>
-Date: Fri, 11 Oct 2013 15:18:37 +0200
-Subject: [PATCH] Add a "via"/origin property for links, add new input in "edit link" dialog[](.html)
-Thanks to:
-* https://github.com/Knah-Tsaeb/Shaarli/commit/040eb18ec8cdabd5ea855e108f81f97fbf0478c4
-* https://github.com/Knah-Tsaeb/Shaarli/commit/4123658eae44d7564d1128ce52ddd5689efee813
-* https://github.com/Knah-Tsaeb/Shaarli/commit/f1a8ca9cc8fe49b119d51b2d8382cc1a34542f96
-
----
- index.php | 43 ++++++++++++++++++++++++++++++++-----------
- tpl/editlink.html | 1 +
- tpl/linklist.html | 1 +
- 3 files changed, 34 insertions(+), 11 deletions(-)
-
-diff --git a/index.php b/index.php
-index 6fae2f8..53f798e 100644
---- a/index.php
-+++ b/index.php
-@@ -436,6 +436,12 @@ if (isset($_POST['login']))[](.html)
- // ------------------------------------------------------------------------------------------
- // Misc utility functions:
-
-+// Try to get just domain for @via
-+function getJustDomain($url){
-+ $parts = parse_url($url);
-+ return trim($parts['host']);[](.html)
-+ }
-+
- // Returns the server URL (including port and http/https), without path.
- // e.g. "http://myserver.com:8080"
- // You can append $_SERVER['SCRIPT_NAME'] to get the current script URL.[](.html)
-@@ -799,7 +805,8 @@ class linkdb implements Iterator, Countable, ArrayAccess
- $found= (strpos(strtolower($l['title']),$s)!==false)[](.html)
- || (strpos(strtolower($l['description']),$s)!==false)[](.html)
- || (strpos(strtolower($l['url']),$s)!==false)[](.html)
-- || (strpos(strtolower($l['tags']),$s)!==false);[](.html)
-+ || (strpos(strtolower($l['tags']),$s)!==false)[](.html)
-+ || (!empty($l['via']) && (strpos(strtolower($l['via']),$s)!==false));[](.html)
- if ($found) $filtered[$l['linkdate'[ = $l;](-=-$l;.html)
- }
- krsort($filtered);
-@@ -814,7 +821,7 @@ class linkdb implements Iterator, Countable, ArrayAccess
- $t = str_replace(',',' ',($casesensitive?$tags:strtolower($tags)));
- $searchtags=explode(' ',$t);
- $filtered=array();
-- foreach($this->links as $l)
-+ foreach($this-> links as $l)
- {
- $linktags = explode(' ',($casesensitive?$l['tags']:strtolower($l['tags'])));[](.html)
- if (count(array_intersect($linktags,$searchtags)) == count($searchtags))
-@@ -905,7 +912,7 @@ function showRSS()
- else $linksToDisplay = $LINKSDB;
- $nblinksToDisplay = 50; // Number of links to display.
- if (!empty($_GET['nb'])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links.[](.html)
-- {
-+ {
- $nblinksToDisplay = $_GET['nb']=='all' ? count($linksToDisplay) : max($_GET['nb']+0,1) ;[](.html)
- }
-
-@@ -944,7 +951,12 @@ function showRSS()
- // If user wants permalinks first, put the final link in description
- if ($usepermalinks===true) $descriptionlink = '(<a href="'.$absurl.'">Link</a>)';
- if (strlen($link['description'])>0) $descriptionlink = '<br>'.$descriptionlink;[](.html)
-- echo '<description><![CDATA['.nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description'])))).$descriptionlink.'[></description>'."\n</item>\n";](></description>'."\n</item>\n";.html)
-+ if(!empty($link['via'])){[](.html)
-+ $via = '<br>Origine => <a href="'.htmlspecialchars($link['via']).'">'.htmlspecialchars(getJustDomain($link['via'])).'</a>';[](.html)
-+ } else {
-+ $via = '';
-+ }
-+ echo '<description><![CDATA['.nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description'])))).$via.$descriptionlink.'[></description>'."\n</item>\n";](></description>'."\n</item>\n";.html)
- $i++;
- }
- echo '</channel></rss><!-- Cached version of '.htmlspecialchars(pageUrl()).' -->';
-@@ -980,7 +992,7 @@ function showATOM()
- else $linksToDisplay = $LINKSDB;
- $nblinksToDisplay = 50; // Number of links to display.
- if (!empty($_GET['nb'])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links.[](.html)
-- {
-+ {
- $nblinksToDisplay = $_GET['nb']=='all' ? count($linksToDisplay) : max($_GET['nb']+0,1) ;[](.html)
- }
-
-@@ -1006,11 +1018,16 @@ function showATOM()
-
- // Add permalink in description
- $descriptionlink = htmlspecialchars('(<a href="'.$guid.'">Permalink</a>)');
-+ if(isset($link['via']) && !empty($link['via'])){[](.html)
-+ $via = htmlspecialchars('</br> Origine => <a href="'.$link['via'].'">'.getJustDomain($link['via']).'</a>');[](.html)
-+ } else {
-+ $via = '';
-+ }
- // If user wants permalinks first, put the final link in description
- if ($usepermalinks===true) $descriptionlink = htmlspecialchars('(<a href="'.$absurl.'">Link</a>)');
- if (strlen($link['description'])>0) $descriptionlink = '<br>'.$descriptionlink;[](.html)
-
-- $entries.='<content type="html">'.htmlspecialchars(nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description']))))).$descriptionlink."</content>\n";[](.html)
-+ $entries.='<content type="html">'.htmlspecialchars(nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description']))))).$descriptionlink.$via."</content>\n";[](.html)
- if ($link['tags']!='') // Adding tags to each ATOM entry (as mentioned in ATOM specification)[](.html)
- {
- foreach(explode(' ',$link['tags']) as $tag)[](.html)
-@@ -1478,7 +1495,7 @@ function renderPage()
- if (!startsWith($url,'http:') && !startsWith($url,'https:') && !startsWith($url,'ftp:') && !startsWith($url,'magnet:') && !startsWith($url,'?'))
- $url = 'http://'.$url;
- $link = array('title'=>trim($_POST['lf_title']),'url'=>$url,'description'=>trim($_POST['lf_description']),'private'=>(isset($_POST['lf_private']) ? 1 : 0),[](.html)
-- 'linkdate'=>$linkdate,'tags'=>str_replace(',',' ',$tags));
-+ 'linkdate'=>$linkdate,'tags'=>str_replace(',',' ',$tags), 'via'=>trim($_POST['lf_via']));[](.html)
- if ($link['title']=='') $link['title']=$link['url']; // If title is empty, use the URL as title.[](.html)
- $LINKSDB[$linkdate] = $link;[](.html)
- $LINKSDB->savedb(); // Save to disk.
-@@ -1556,7 +1573,8 @@ function renderPage()
- $title = (empty($_GET['title']) ? '' : $_GET['title'] ); // Get title if it was provided in URL (by the bookmarklet).[](.html)
- $description = (empty($_GET['description']) ? '' : $_GET['description']); // Get description if it was provided in URL (by the bookmarklet). [Bronco added that][](.html)
- $tags = (empty($_GET['tags']) ? '' : $_GET['tags'] ); // Get tags if it was provided in URL[](.html)
-- $private = (!empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0); // Get private if it was provided in URL [](.html)
-+ $via = (empty($_GET['via']) ? '' : $_GET['via'] );[](.html)
-+ $private = (!empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0); // Get private if it was provided in URL[](.html)
- if (($url!='') && parse_url($url,PHP_URL_SCHEME)=='') $url = 'http://'.$url;
- // 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.)
- if (empty($title) && parse_url($url,PHP_URL_SCHEME)=='http')
-@@ -1567,7 +1585,7 @@ function renderPage()
- {
- // Look for charset in html header.
- preg_match('#<meta .*charset=.*>#Usi', $data, $meta);
--
-+
- // If found, extract encoding.
- if (!empty($meta[0]))[](.html)
- {
-@@ -1577,7 +1595,7 @@ function renderPage()
- $html_charset = (!empty($enc[1])) ? strtolower($enc[1]) : 'utf-8';[](.html)
- }
- else { $html_charset = 'utf-8'; }
--
-+
- // Extract title
- $title = html_extract_title($data);
- if (!empty($title))
-@@ -1592,7 +1610,7 @@ function renderPage()
- $url='?'.smallHash($linkdate);
- $title='Note: ';
- }
-- $link = array('linkdate'=>$linkdate,'title'=>$title,'url'=>$url,'description'=>$description,'tags'=>$tags,'private'=>$private);
-+ $link = array('linkdate'=>$linkdate,'title'=>$title,'url'=>$url,'description'=>$description,'tags'=>$tags,'via' => $via,'private'=>$private);
- }
-
- $PAGE = new pageBuilder;
-@@ -1842,6 +1860,9 @@ function buildLinkList($PAGE,$LINKSDB)
- $taglist = explode(' ',$link['tags']);[](.html)
- uasort($taglist, 'strcasecmp');
- $link['taglist']=$taglist;[](.html)
-+ if(!empty($link['via'])){[](.html)
-+ $link['via']=htmlspecialchars($link['via']);[](.html)
-+ }
- $linkDisp[$keys[$i[ = $link;](-=-$link;.html)
- $i++;
- }
-diff --git a/tpl/editlink.html b/tpl/editlink.html
-index 4a2c30c..14d4f9c 100644
---- a/tpl/editlink.html
-+++ b/tpl/editlink.html
-@@ -16,6 +16,7 @@
- <i>Title</i><br><input type="text" name="lf_title" value="{$link.title|htmlspecialchars}" style="width:100%"><br>
- <i>Description</i><br><textarea name="lf_description" rows="4" cols="25" style="width:100%">{$link.description|htmlspecialchars}</textarea><br>
- <i>Tags</i><br><input type="text" id="lf_tags" name="lf_tags" value="{$link.tags|htmlspecialchars}" style="width:100%"><br>
-+ <i>Origine</i><br><input type="text" name="lf_via" value="{$link.via|htmlspecialchars}" style="width:100%"><br>
- {if condition="($link_is_new && $GLOBALS['privateLinkByDefault']==true) || $link.private == true"}[](.html)
- <input type="checkbox" checked="checked" name="lf_private" id="lf_private">
- <label for="lf_private"><i>Private</i></label><br>
-diff --git a/tpl/linklist.html b/tpl/linklist.html
-index ddc38cb..0a8475f 100644
---- a/tpl/linklist.html
-+++ b/tpl/linklist.html
-@@ -43,6 +43,7 @@
- <span class="linktitle"><a href="{$redirector}{$value.url|htmlspecialchars}">{$value.title|htmlspecialchars}</a></span>
- <br>
- {if="$value.description"}<div class="linkdescription"{if condition="$search_type=='permalink'"} style="max-height:none !important;"{/if}>{$value.description}</div>{/if}
-+ {if condition="isset($value.via) && !empty($value.via)"}<div><a href="{$value.via}">Origine => {$value.via|getJustDomain}</a></div>{/if}
- {if="!$GLOBALS['config'['HIDE_TIMESTAMPS'] || isLoggedIn()"}]('HIDE_TIMESTAMPS']-||-isLoggedIn()"}.html)
- <span class="linkdate" title="Permalink"><a href="?{$value.linkdate|smallHash}">{$value.localdate|htmlspecialchars} - permalink</a> - </span>
- {else}
---
-2.1.1
-
-
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 @@
-#Example patch add new via field for links
-Example 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**
-
-Thanks to @Knah-Tsaeb in https://github.com/sebsauvage/Shaarli/pull/158
-
-```
-From e0f363c18e8fe67990ed2bb1a08652e24e70bbcb Mon Sep 17 00:00:00 2001
-From: Knah Tsaeb
-Date: Fri, 11 Oct 2013 15:18:37 +0200
-Subject: [PATCH] Add a "via"/origin property for links, add new input in "edit link" dialog[](.html)
-Thanks to:
-* https://github.com/Knah-Tsaeb/Shaarli/commit/040eb18ec8cdabd5ea855e108f81f97fbf0478c4
-* https://github.com/Knah-Tsaeb/Shaarli/commit/4123658eae44d7564d1128ce52ddd5689efee813
-* https://github.com/Knah-Tsaeb/Shaarli/commit/f1a8ca9cc8fe49b119d51b2d8382cc1a34542f96
-
----
- index.php | 43 ++++++++++++++++++++++++++++++++-----------
- tpl/editlink.html | 1 +
- tpl/linklist.html | 1 +
- 3 files changed, 34 insertions(+), 11 deletions(-)
-
-diff --git a/index.php b/index.php
-index 6fae2f8..53f798e 100644
---- a/index.php
-+++ b/index.php
-@@ -436,6 +436,12 @@ if (isset($_POST['login']))[](.html)
- // ------------------------------------------------------------------------------------------
- // Misc utility functions:
-
-+// Try to get just domain for @via
-+function getJustDomain($url){
-+ $parts = parse_url($url);
-+ return trim($parts['host']);[](.html)
-+ }
-+
- // Returns the server URL (including port and http/https), without path.
- // e.g. "http://myserver.com:8080"
- // You can append $_SERVER['SCRIPT_NAME'] to get the current script URL.[](.html)
-@@ -799,7 +805,8 @@ class linkdb implements Iterator, Countable, ArrayAccess
- $found= (strpos(strtolower($l['title']),$s)!==false)[](.html)
- || (strpos(strtolower($l['description']),$s)!==false)[](.html)
- || (strpos(strtolower($l['url']),$s)!==false)[](.html)
-- || (strpos(strtolower($l['tags']),$s)!==false);[](.html)
-+ || (strpos(strtolower($l['tags']),$s)!==false)[](.html)
-+ || (!empty($l['via']) && (strpos(strtolower($l['via']),$s)!==false));[](.html)
- if ($found) $filtered[$l['linkdate'[ = $l;](-=-$l;.html)
- }
- krsort($filtered);
-@@ -814,7 +821,7 @@ class linkdb implements Iterator, Countable, ArrayAccess
- $t = str_replace(',',' ',($casesensitive?$tags:strtolower($tags)));
- $searchtags=explode(' ',$t);
- $filtered=array();
-- foreach($this->links as $l)
-+ foreach($this-> links as $l)
- {
- $linktags = explode(' ',($casesensitive?$l['tags']:strtolower($l['tags'])));[](.html)
- if (count(array_intersect($linktags,$searchtags)) == count($searchtags))
-@@ -905,7 +912,7 @@ function showRSS()
- else $linksToDisplay = $LINKSDB;
- $nblinksToDisplay = 50; // Number of links to display.
- if (!empty($_GET['nb'])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links.[](.html)
-- {
-+ {
- $nblinksToDisplay = $_GET['nb']=='all' ? count($linksToDisplay) : max($_GET['nb']+0,1) ;[](.html)
- }
-
-@@ -944,7 +951,12 @@ function showRSS()
- // If user wants permalinks first, put the final link in description
- if ($usepermalinks===true) $descriptionlink = '(Link)';
- if (strlen($link['description'])>0) $descriptionlink = ' '.$descriptionlink;[](.html)
-- echo ''."\n\n";](>'."\n\n";.html)
-+ if(!empty($link['via'])){[](.html)
-+ $via = ' Origine => '.htmlspecialchars(getJustDomain($link['via'])).'';[](.html)
-+ } else {
-+ $via = '';
-+ }
-+ echo ''."\n\n";](>'."\n\n";.html)
- $i++;
- }
- echo '';
-@@ -980,7 +992,7 @@ function showATOM()
- else $linksToDisplay = $LINKSDB;
- $nblinksToDisplay = 50; // Number of links to display.
- if (!empty($_GET['nb'])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links.[](.html)
-- {
-+ {
- $nblinksToDisplay = $_GET['nb']=='all' ? count($linksToDisplay) : max($_GET['nb']+0,1) ;[](.html)
- }
-
-@@ -1006,11 +1018,16 @@ function showATOM()
-
- // Add permalink in description
- $descriptionlink = htmlspecialchars('(Permalink)');
-+ if(isset($link['via']) && !empty($link['via'])){[](.html)
-+ $via = htmlspecialchars(' Origine => '.getJustDomain($link['via']).'');[](.html)
-+ } else {
-+ $via = '';
-+ }
- // If user wants permalinks first, put the final link in description
- if ($usepermalinks===true) $descriptionlink = htmlspecialchars('(Link)');
- if (strlen($link['description'])>0) $descriptionlink = '<br>'.$descriptionlink;[](.html)
-
-- $entries.=''.htmlspecialchars(nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description']))))).$descriptionlink."\n";[](.html)
-+ $entries.=''.htmlspecialchars(nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description']))))).$descriptionlink.$via."\n";[](.html)
- if ($link['tags']!='') // Adding tags to each ATOM entry (as mentioned in ATOM specification)[](.html)
- {
- foreach(explode(' ',$link['tags']) as $tag)[](.html)
-@@ -1478,7 +1495,7 @@ function renderPage()
- if (!startsWith($url,'http:') && !startsWith($url,'https:') && !startsWith($url,'ftp:') && !startsWith($url,'magnet:') && !startsWith($url,'?'))
- $url = 'http://'.$url;
- $link = array('title'=>trim($_POST['lf_title']),'url'=>$url,'description'=>trim($_POST['lf_description']),'private'=>(isset($_POST['lf_private']) ? 1 : 0),[](.html)
-- 'linkdate'=>$linkdate,'tags'=>str_replace(',',' ',$tags));
-+ 'linkdate'=>$linkdate,'tags'=>str_replace(',',' ',$tags), 'via'=>trim($_POST['lf_via']));[](.html)
- if ($link['title']=='') $link['title']=$link['url']; // If title is empty, use the URL as title.[](.html)
- $LINKSDB[$linkdate] = $link;[](.html)
- $LINKSDB->savedb(); // Save to disk.
-@@ -1556,7 +1573,8 @@ function renderPage()
- $title = (empty($_GET['title']) ? '' : $_GET['title'] ); // Get title if it was provided in URL (by the bookmarklet).[](.html)
- $description = (empty($_GET['description']) ? '' : $_GET['description']); // Get description if it was provided in URL (by the bookmarklet). [Bronco added that][](.html)
- $tags = (empty($_GET['tags']) ? '' : $_GET['tags'] ); // Get tags if it was provided in URL[](.html)
-- $private = (!empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0); // Get private if it was provided in URL [](.html)
-+ $via = (empty($_GET['via']) ? '' : $_GET['via'] );[](.html)
-+ $private = (!empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0); // Get private if it was provided in URL[](.html)
- if (($url!='') && parse_url($url,PHP_URL_SCHEME)=='') $url = 'http://'.$url;
- // 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.)
- if (empty($title) && parse_url($url,PHP_URL_SCHEME)=='http')
-@@ -1567,7 +1585,7 @@ function renderPage()
- {
- // Look for charset in html header.
- preg_match('##Usi', $data, $meta);
--
-+
- // If found, extract encoding.
- if (!empty($meta[0]))[](.html)
- {
-@@ -1577,7 +1595,7 @@ function renderPage()
- $html_charset = (!empty($enc[1])) ? strtolower($enc[1]) : 'utf-8';[](.html)
- }
- else { $html_charset = 'utf-8'; }
--
-+
- // Extract title
- $title = html_extract_title($data);
- if (!empty($title))
-@@ -1592,7 +1610,7 @@ function renderPage()
- $url='?'.smallHash($linkdate);
- $title='Note: ';
- }
-- $link = array('linkdate'=>$linkdate,'title'=>$title,'url'=>$url,'description'=>$description,'tags'=>$tags,'private'=>$private);
-+ $link = array('linkdate'=>$linkdate,'title'=>$title,'url'=>$url,'description'=>$description,'tags'=>$tags,'via' => $via,'private'=>$private);
- }
-
- $PAGE = new pageBuilder;
-@@ -1842,6 +1860,9 @@ function buildLinkList($PAGE,$LINKSDB)
- $taglist = explode(' ',$link['tags']);[](.html)
- uasort($taglist, 'strcasecmp');
- $link['taglist']=$taglist;[](.html)
-+ if(!empty($link['via'])){[](.html)
-+ $link['via']=htmlspecialchars($link['via']);[](.html)
-+ }
- $linkDisp[$keys[$i[ = $link;](-=-$link;.html)
- $i++;
- }
-diff --git a/tpl/editlink.html b/tpl/editlink.html
-index 4a2c30c..14d4f9c 100644
---- a/tpl/editlink.html
-+++ b/tpl/editlink.html
-@@ -16,6 +16,7 @@
- Title
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… their Firefox addon sends to Diigo every single URL you visit (Don't believe me ? Use Tamper Data and open any page).
-
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.
-
Why use Shaarli and not Delicious/Diigo ?
-
With Shaarli:
-
-
The data is yours: It's hosted on your server.
-
Never fear of having your data locked-in.
-
Never fear to have your data sold to third party.
-
Your private links are not hosted on a third party server.
-
You are not tracked by browser addons (like Diigo does)
-
You can change the look and feel of the pages if you want.
-
You can change the behaviour of the program.
-
It's magnitude faster than most bookmarking services.
-
-
What does Shaarli mean?
-
Shaarli is for shaaring your links.
-
My Shaarli is broken!
-
First of all, ensure that both the web server and Shaarli are correctly configured, and that your installation is supported.
-
If everything looks right but the issue(s) remain(s), please:
if you find one that is related to the issue, feel free to comment and provide additional details (host/Shaarli setup)
-
else, open a new issue, and provide information about the problem:
-
-
what happens? - display glitches, invalid data, security flaws...
-
what is your configuration? - OS, server version, activated extensions, web browser...
-
is it reproducible?
-
-
-
-
Why not use a real database? Files are slow!
-
Does browsing this page feel slow? Try browsing older pages, too.
-
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?
-
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.
-
-
diff --git a/doc/FAQ.md b/doc/FAQ.md
deleted file mode 100644
index 4c69763f..00000000
--- a/doc/FAQ.md
+++ /dev/null
@@ -1,44 +0,0 @@
-#FAQ
-### Why did you create Shaarli ?
-
-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… **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)
-
-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.
-
-### Why use Shaarli and not Delicious/Diigo ?
-
-With Shaarli:
-
-* The data is yours: It's hosted on your server.
-* Never fear of having your data locked-in.
-* Never fear to have your data sold to third party.
-* Your private links are not hosted on a third party server.
-* You are not tracked by browser addons (like Diigo does)
-* You can change the look and feel of the pages if you want.
-* You can change the behaviour of the program.
-* It's magnitude faster than most bookmarking services.
-
-### What does Shaarli mean?
-
-Shaarli is for shaaring your links.
-
-### My Shaarli is broken!
-First 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)
-
-If everything looks right but the issue(s) remain(s), please:
-- take a look at the [troubleshooting](Troubleshooting) section[](.html)
-- come [chat with us](https://gitter.im/shaarli/Shaarli) on Gitter, we'll be happy to help ;-)[](.html)
-- browse active [issues](https://github.com/shaarli/Shaarli/issues) and [Pull Requests](https://github.com/shaarli/Shaarli/pulls)[](.html)
- - if you find one that is related to the issue, feel free to comment and provide additional details (host/Shaarli setup)
- - else, [open a new issue](https://github.com/shaarli/Shaarli/issues/new), and provide information about the problem:[](.html)
- - _what happens?_ - display glitches, invalid data, security flaws...
- - _what is your configuration?_ - OS, server version, activated extensions, web browser...
- - _is it reproducible?_
-
-### Why not use a real database? Files are slow!
-
-Does browsing [this page](http://sebsauvage.net/links/) feel slow? Try browsing older pages, too.[](.html)
-
-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?
-
-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.
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 @@
-
-
-
-
-
-
- Shaarli – Firefox share
-
-
-
-
-
-
Click the ✚Add to Firefox social button and accept the activation.
-
-
Sharing links using Firefox share
-
-
Add the sharing service as described above
-
When you are visiting a webpage you would like to share with Shaarli, click the Firefox Share button images/firefoxshare.png
-
You can edit your link before and after saving, just like the bookmarklet above.
-
-
-
-
-
-
-
-
-
-
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.
-
-
-
-
-
-
-
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 @@
-#Firefox share
-### Add Shaarli as a sharing service to Firefox
-
- * Open your Shaarli and `Login`
- * Click the `Tools` button in the top bar
- * Click the `✚Add to Firefox social` button and accept the activation.
-
-
-### Sharing links using Firefox share
-
- * Add the sharing service as described above
- * 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)
- * You can edit your link before and after saving, just like the bookmarklet above.
-
-| | 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. |
-|------|-------------------------------------------------------------------------------|
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 @@
-
-
-
-
-
-
- Shaarli – GnuPG signature
-
-
-
-
-
-
-
Gnu Privacy Guard (GnuPG) is an Open Source implementation of the Pretty Good [](.html)
-Privacy (OpenPGP) specification. Its main purposes are digital authentication,
-signature and encryption.
-
It is often used by the FLOSS community to verify:
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.
-
-
Trust can be gained by having your key signed by other people (and signing their key back, too :) ), for instance during key signing parties, see:
$ gpg --gen-key
-
-gpg (GnuPG) 2.1.6;Copyright (C) 2015 Free Software Foundation, Inc.
-This is free software: you are free to change and redistribute it.
-There is NO WARRANTY, to the extent permitted by law.
-
-Note: Use "gpg2 --full-gen-key" for a full featured key generation dialog.
-
-GnuPG needs to construct a user ID to identify your key.
-
-Real name: Marvin the Paranoid Android
-Email address: marvin@h2g2.net
-You selected this USER-ID:
- "Marvin the Paranoid Android <marvin@h2g2.net>"
-
-Change (N)ame, (E)mail, or (O)kay/(Q)uit? o
-We need to generate a lot of random bytes. It is a good idea to perform
-some other action (type on the keyboard, move the mouse, utilize the
-disks) during the prime generation;this gives the random number
-generator a better chance to gain enough entropy.
-
gpg - entropy interlude
-
At this point, you will:
-
-
be prompted for a secure password to protect your key (the input method will depend on your Desktop Environment and configuration)
-
be asked to use your machine's input devices (mouse, keyboard, etc.) to generate random entropy; this step may take some time
-
-
gpg - key creation confirmation
-
gpg: key A9D53A3E marked as ultimately trusted
-public and secret key created and signed.
-
-gpg: checking the trustdb
-gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
-gpg: depth: 0 valid: 2 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 2u
-pub rsa2048/A9D53A3E 2015-07-31
- Key fingerprint = AF2A 5381 E54B 2FD2 14C4 A9A3 0E35 ACA4 A9D5 3A3E
-uid [ultimate] Marvin the Paranoid Android <marvin@h2g2.net>[](.html)
-sub rsa2048/8C0EACF1 2015-07-31
-
gpg - submit your public key to a PGP server (Optional)
-
$ gpg --keyserver pgp.mit.edu --send-keys A9D53A3E
-gpg: sending key A9D53A3E to hkp server pgp.mit.edu
-
-
diff --git a/doc/GnuPG-signature.md b/doc/GnuPG-signature.md
deleted file mode 100644
index b0028d55..00000000
--- a/doc/GnuPG-signature.md
+++ /dev/null
@@ -1,77 +0,0 @@
-#GnuPG signature
-## Introduction
-### PGP and GPG
-[Gnu Privacy Guard](https://gnupg.org/) (GnuPG) is an Open Source implementation of the [Pretty Good [](.html)
-Privacy](https://en.wikipedia.org/wiki/Pretty_Good_Privacy#OpenPGP) (OpenPGP) specification. Its main purposes are digital authentication,
-signature and encryption.
-
-It is often used by the [FLOSS](https://en.wikipedia.org/wiki/Free_and_open-source_software) community to verify:[](.html)
-- Linux package signatures: Debian [SecureApt](https://wiki.debian.org/SecureApt), ArchLinux [Master [](.html)
-Keys](https://www.archlinux.org/master-keys/)
-- [SCM](https://en.wikipedia.org/wiki/Revision_control) releases & maintainer identity[](.html)
-
-### Trust
-To quote Phil Pennock (the author of the [SKS](https://bitbucket.org/skskeyserver/sks-keyserver/wiki/Home) key server - http://sks.spodhuis.org/):[](.html)
-
-> 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.
-
-Trust 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)
-- [The Keysigning party HOWTO](http://www.cryptnet.net/fdp/crypto/keysigning_party/en/keysigning_party.html)[](.html)
-- [Web of trust](https://en.wikipedia.org/wiki/Web_of_trust)[](.html)
-
-## Generate a GPG key
-- [Generating a GPG key for Git tagging](http://stackoverflow.com/a/16725717) (StackOverflow)[](.html)
-- [Generating a GPG key](https://help.github.com/articles/generating-a-gpg-key/) (GitHub)[](.html)
-
-### gpg - provide identity information
-```bash
-$ gpg --gen-key
-
-gpg (GnuPG) 2.1.6; Copyright (C) 2015 Free Software Foundation, Inc.
-This is free software: you are free to change and redistribute it.
-There is NO WARRANTY, to the extent permitted by law.
-
-Note: Use "gpg2 --full-gen-key" for a full featured key generation dialog.
-
-GnuPG needs to construct a user ID to identify your key.
-
-Real name: Marvin the Paranoid Android
-Email address: marvin@h2g2.net
-You selected this USER-ID:
- "Marvin the Paranoid Android "
-
-Change (N)ame, (E)mail, or (O)kay/(Q)uit? o
-We need to generate a lot of random bytes. It is a good idea to perform
-some other action (type on the keyboard, move the mouse, utilize the
-disks) during the prime generation; this gives the random number
-generator a better chance to gain enough entropy.
-```
-
-### gpg - entropy interlude
-At this point, you will:
-- be prompted for a secure password to protect your key (the input method will depend on your Desktop Environment and configuration)
-- be asked to use your machine's input devices (mouse, keyboard, etc.) to generate random entropy; this step _may take some time_
-
-### gpg - key creation confirmation
-```bash
-gpg: key A9D53A3E marked as ultimately trusted
-public and secret key created and signed.
-
-gpg: checking the trustdb
-gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
-gpg: depth: 0 valid: 2 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 2u
-pub rsa2048/A9D53A3E 2015-07-31
- Key fingerprint = AF2A 5381 E54B 2FD2 14C4 A9A3 0E35 ACA4 A9D5 3A3E
-uid [ultimate] Marvin the Paranoid Android [](.html)
-sub rsa2048/8C0EACF1 2015-07-31
-```
-
-### gpg - submit your public key to a PGP server (Optional)
-``` bash
-$ gpg --keyserver pgp.mit.edu --send-keys A9D53A3E
-gpg: sending key A9D53A3E to hkp server pgp.mit.edu
-```
-
-## Create and push a GPG-signed tag
-
-See [Release Shaarli](Release-Shaarli.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 @@
-
-
-
-
-
-
- Shaarli – Home
-
-
-
-
-
-
If you have any questions or ideas, please join the chat (also reachable via IRC), post them in our general discussion (archive) or read the current issues. If you've found a bug, please create a new issue.
-
If you would like a feature added to Shaarli, check the issues labeled feature, enhancement, and plugin.
-
-
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 @@
-#Home
-# Shaarli wiki
-
-Welcome to the [Shaarli](https://github.com/shaarli/Shaarli/) wiki
-
-Here you can find some info on how to use, configure, tweak and solve problems with your Shaarli.
-
-For general info, read the [README](https://github.com/shaarli/Shaarli/blob/master/README.md).[](.html)
-
-If 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)
-
-If 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)
-
-_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 @@
-
-
-
-
-
-
- Shaarli – Plugin System
-
-
-
-
-
-
-
At the beginning of Shaarli execution, all enabled plugins are loaded. At this point, the plugin system looks for an init() function to execute and run it if it exists. This function must be named this way, and takes the ConfigManager as parameter.
-
<plugin_name>_init($conf)
-
This function can be used to create initial data, load default settings, etc. But also to set plugin errors. If the initialization function returns an array of strings, they will be understand as errors, and displayed in the header to logged in users.
-
Understanding hooks
-
A plugin is a set of functions. Each function will be triggered by the plugin system at certain point in Shaarli execution.
-
These functions need to be named with this pattern:
For exemple, if my plugin want to add data to the header, this function is needed:
-
hook_demo_plugin_render_header
-
If this function is declared, and the plugin enabled, it will be called every time Shaarli is rendering the header.
-
Plugin's data
-
Parameters
-
Every hook function has a $data parameter. Its content differs for each hooks.
-
This parameter needs to be returned every time, otherwise data is lost.
-
return $data;
-
Filling templates placeholder
-
Template placeholders are displayed in template in specific places.
-
RainTPL displays every element contained in the placeholder's array. These element can be added by plugins.
-
For example, let's add a value in the placeholder top_placeholder which is displayed at the top of my page:
-
$data['top_placeholder'[] = 'My content';](]-=-'My-content';.html)
-# OR
-array_push($data['top_placeholder'],'My','content');[](.html)
-
-return$data;
-
Data manipulation
-
When a page is displayed, every variable send to the template engine is passed to plugins before that in $data.
-
The data contained by this array can be altered before template rendering.
-
For exemple, in linklist, it is possible to alter every title:
-
// mind the reference if you want $data to be altered
-foreach($data['links']as &$value) {[](.html)
- // String reverse every title.
- $value['title'] = strrev($value['title']);[](.html)
-}
-
-return$data;
-
Metadata
-
Every plugin needs a <plugin_name>.meta file, which is in fact an .ini file (KEY="VALUE"), to be listed in plugin administration.
-
Each file contain two keys:
-
-
description: plugin description
-
parameters: user parameter names, separated by a ;.
-
parameter.<PARAMETER_NAME>: add a text description the specified parameter.
-
-
-
Note: In PHP, parse_ini_file() seems to want strings to be between by quotes " in the ini file.
-
-
It's not working!
-
Use demo_plugin as a functional example. It covers most of the plugin system features.
-
-
diff --git a/doc/Plugin-System.md b/doc/Plugin-System.md
deleted file mode 100644
index addd792d..00000000
--- a/doc/Plugin-System.md
+++ /dev/null
@@ -1,711 +0,0 @@
-#Plugin System
-[**I am a developer.** Developer API.](#developer-api)[](.html)
-
-[**I am a template designer.** Guide for template designer.](#guide-for-template-designer)[](.html)
-
-## Developer API
-
-### What can I do with plugins?
-
-The plugin system let you:
-
- * insert content into specific places across templates.
- * alter data before templates rendering.
- * alter data before saving new links.
-
-### How can I create a plugin for Shaarli?
-
-First, chose a plugin name, such as `demo_plugin`.
-
-Under `plugin` folder, create a folder named with your plugin name. Then create a .php file in that folder.
-
-You should have the following tree view:
-
-```
-| index.php
-| plugins/
-|---| demo_plugin/
-| |---| demo_plugin.php
-```
-
-### Plugin initialization
-
-At the beginning of Shaarli execution, all enabled plugins are loaded. At this point, the plugin system looks for an `init()` function to execute and run it if it exists. This function must be named this way, and takes the `ConfigManager` as parameter.
-
- _init($conf)
-
-This function can be used to create initial data, load default settings, etc. But also to set *plugin errors*. If the initialization function returns an array of strings, they will be understand as errors, and displayed in the header to logged in users.
-
-### Understanding hooks
-
-A plugin is a set of functions. Each function will be triggered by the plugin system at certain point in Shaarli execution.
-
-These functions need to be named with this pattern:
-
-```
-hook__($data, $conf)
-```
-
-Parameters:
-
- - data: see [$data section](https://github.com/shaarli/Shaarli/wiki/Plugin-System#plugins-data)[](.html)
- - conf: the `ConfigManager` instance.
-
-For exemple, if my plugin want to add data to the header, this function is needed:
-
- hook_demo_plugin_render_header
-
-If this function is declared, and the plugin enabled, it will be called every time Shaarli is rendering the header.
-
-### Plugin's data
-
-#### Parameters
-
-Every hook function has a `$data` parameter. Its content differs for each hooks.
-
-**This parameter needs to be returned every time**, otherwise data is lost.
-
- return $data;
-
-#### Filling templates placeholder
-
-Template placeholders are displayed in template in specific places.
-
-RainTPL displays every element contained in the placeholder's array. These element can be added by plugins.
-
-For example, let's add a value in the placeholder `top_placeholder` which is displayed at the top of my page:
-
-```php
-$data['top_placeholder'[] = 'My content';](]-=-'My-content';.html)
-# OR
-array_push($data['top_placeholder'], 'My', 'content');[](.html)
-
-return $data;
-```
-
-#### Data manipulation
-
-When a page is displayed, every variable send to the template engine is passed to plugins before that in `$data`.
-
-The data contained by this array can be altered before template rendering.
-
-For exemple, in linklist, it is possible to alter every title:
-
-```php
-// mind the reference if you want $data to be altered
-foreach ($data['links'] as &$value) {[](.html)
- // String reverse every title.
- $value['title'] = strrev($value['title']);[](.html)
-}
-
-return $data;
-```
-
-### Metadata
-
-Every plugin needs a `.meta` file, which is in fact an `.ini` file (`KEY="VALUE"`), to be listed in plugin administration.
-
-Each file contain two keys:
-
- * `description`: plugin description
- * `parameters`: user parameter names, separated by a `;`.
- * `parameter.`: add a text description the specified parameter.
-
-> Note: In PHP, `parse_ini_file()` seems to want strings to be between by quotes `"` in the ini file.
-
-### It's not working!
-
-Use `demo_plugin` as a functional example. It covers most of the plugin system features.
-
-If it's still not working, please [open an issue](https://github.com/shaarli/Shaarli/issues/new).[](.html)
-
-### Hooks
-
-| Hooks | Description |
-| ------------- |:-------------:|
-| [render_header](#render_header) | Allow plugin to add content in page headers. |[](.html)
-| [render_includes](#render_includes) | Allow plugin to include their own CSS files. |[](.html)
-| [render_footer](#render_footer) | Allow plugin to add content in page footer and include their own JS files. | [](.html)
-| [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)
-| [render_editlink](#render_editlink) | Allow to add fields in the form, or display elements. |[](.html)
-| [render_tools](#render_tools) | Allow to add content at the end of the page. |[](.html)
-| [render_picwall](#render_picwall) | Allow to add content at the top and bottom of the page. |[](.html)
-| [render_tagcloud](#render_tagcloud) | Allow to add content at the top and bottom of the page, and after all tags. |[](.html)
-| [render_taglist](#render_taglist) | Allow to add content at the top and bottom of the page, and after all tags. |[](.html)
-| [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)
-| [render_feed](#render_feed) | Allow to do add tags in RSS and ATOM feeds. |[](.html)
-| [save_link](#save_link) | Allow to alter the link being saved in the datastore. |[](.html)
-| [delete_link](#delete_link) | Allow to do an action before a link is deleted from the datastore. |[](.html)
-
-
-
-#### render_header
-
-Triggered on every page.
-
-Allow plugin to add content in page headers.
-
-##### Data
-
-`$data` is an array containing:
-
- * `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.).
- * `_LOGGEDIN_`: true if user is logged in, false otherwise.
-
-##### Template placeholders
-
-Items can be displayed in templates by adding an entry in `$data['']` array.[](.html)
-
-List of placeholders:
-
- * `buttons_toolbar`: after the list of buttons in the header.
-
-[](.html)
-
- * `fields_toolbar`: after search fields in the header.
-
-> Note: This will only be called in linklist.
-
-[](.html)
-
-#### render_includes
-
-Triggered on every page.
-
-Allow plugin to include their own CSS files.
-
-##### Data
-
-`$data` is an array containing:
-
- * `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.).
- * `_LOGGEDIN_`: true if user is logged in, false otherwise.
-
-##### Template placeholders
-
-Items can be displayed in templates by adding an entry in `$data['']` array.[](.html)
-
-List of placeholders:
-
- * `css_files`: called after loading default CSS.
-
-> Note: only add the path of the CSS file. E.g: `plugins/demo_plugin/custom_demo.css`.
-
-#### render_footer
-
-Triggered on every page.
-
-Allow plugin to add content in page footer and include their own JS files.
-
-##### Data
-
-`$data` is an array containing:
-
- * `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.).
- * `_LOGGEDIN_`: true if user is logged in, false otherwise.
-
-##### Template placeholders
-
-Items can be displayed in templates by adding an entry in `$data['']` array.[](.html)
-
-List of placeholders:
-
- * `text`: called after the end of the footer text.
- * `endofpage`: called at the end of the page.
-
-[](.html)
-
- * `js_files`: called at the end of the page, to include custom JS scripts.
-
-> Note: only add the path of the JS file. E.g: `plugins/demo_plugin/custom_demo.js`.
-
-#### render_linklist
-
-Triggered when `linklist` is displayed (list of links, permalink, search, tag filtered, etc.).
-
-It allows to add content at the begining and end of the page, after every link displayed and to alter link data.
-
-##### Data
-
-`$data` is an array containing:
-
- * `_LOGGEDIN_`: true if user is logged in, false otherwise.
- * All templates data, including links.
-
-##### Template placeholders
-
-Items can be displayed in templates by adding an entry in `$data['']` array.[](.html)
-
-List of placeholders:
-
- * `action_plugin`: next to the button "private only" at the top and bottom of the page.
-
-[](.html)
-
- * `link_plugin`: for every link, between permalink and link URL.
-
-[](.html)
-
- * `plugin_start_zone`: before displaying the template content.
-
-[](.html)
-
- * `plugin_end_zone`: after displaying the template content.
-
-[](.html)
-
-#### render_editlink
-
-Triggered when the link edition form is displayed.
-
-Allow to add fields in the form, or display elements.
-
-##### Data
-
-`$data` is an array containing:
-
- * All templates data.
-
-##### Template placeholders
-
-Items can be displayed in templates by adding an entry in `$data['']` array.[](.html)
-
-List of placeholders:
-
- * `edit_link_plugin`: after tags field.
-
-[](.html)
-
-#### render_tools
-
-Triggered when the "tools" page is displayed.
-
-Allow to add content at the end of the page.
-
-##### Data
-
-`$data` is an array containing:
-
- * All templates data.
-
-##### Template placeholders
-
-Items can be displayed in templates by adding an entry in `$data['']` array.[](.html)
-
-List of placeholders:
-
- * `tools_plugin`: at the end of the page.
-
-[](.html)
-
-#### render_picwall
-
-Triggered when picwall is displayed.
-
-Allow to add content at the top and bottom of the page.
-
-##### Data
-
-`$data` is an array containing:
-
- * `_LOGGEDIN_`: true if user is logged in, false otherwise.
- * All templates data.
-
-##### Template placeholders
-
-Items can be displayed in templates by adding an entry in `$data['']` array.[](.html)
-
-List of placeholders:
-
- * `plugin_start_zone`: before displaying the template content.
-
- * `plugin_end_zone`: after displaying the template content.
-
-[](.html)
-
-#### render_tagcloud
-
-Triggered when tagcloud is displayed.
-
-Allow to add content at the top and bottom of the page.
-
-##### Data
-
-`$data` is an array containing:
-
- * `_LOGGEDIN_`: true if user is logged in, false otherwise.
- * All templates data.
-
-##### Template placeholders
-
-Items can be displayed in templates by adding an entry in `$data['']` array.[](.html)
-
-List of placeholders:
-
- * `plugin_start_zone`: before displaying the template content.
-
- * `plugin_end_zone`: after displaying the template content.
-
-For each tag, the following placeholder can be used:
-
- * `tag_plugin`: after each tag
-
-[](.html)
-
-
-#### render_taglist
-
-Triggered when taglist is displayed.
-
-Allow to add content at the top and bottom of the page.
-
-##### Data
-
-`$data` is an array containing:
-
- * `_LOGGEDIN_`: true if user is logged in, false otherwise.
- * All templates data.
-
-##### Template placeholders
-
-Items can be displayed in templates by adding an entry in `$data['']` array.[](.html)
-
-List of placeholders:
-
- * `plugin_start_zone`: before displaying the template content.
-
- * `plugin_end_zone`: after displaying the template content.
-
-For each tag, the following placeholder can be used:
-
- * `tag_plugin`: after each tag
-
-#### render_daily
-
-Triggered when tagcloud is displayed.
-
-Allow to add content at the top and bottom of the page, the bottom of each link and to alter data.
-
-##### Data
-
-`$data` is an array containing:
-
- * `_LOGGEDIN_`: true if user is logged in, false otherwise.
- * All templates data, including links.
-
-##### Template placeholders
-
-Items can be displayed in templates by adding an entry in `$data['']` array.[](.html)
-
-List of placeholders:
-
- * `link_plugin`: used at bottom of each link.
-
-[](.html)
-
- * `plugin_start_zone`: before displaying the template content.
-
- * `plugin_end_zone`: after displaying the template content.
-
-#### render_feed
-
-Triggered when the ATOM or RSS feed is displayed.
-
-Allow to add tags in the feed, either in the header or for each items. Items (links) can also be altered before being rendered.
-
-##### Data
-
-`$data` is an array containing:
-
- * `_LOGGEDIN_`: true if user is logged in, false otherwise.
- * `_PAGE_`: containing either `rss` or `atom`.
- * All templates data, including links.
-
-##### Template placeholders
-
-Tags can be added in feeds by adding an entry in `$data['']` array.[](.html)
-
-List of placeholders:
-
- * `feed_plugins_header`: used as a header tag in the feed.
-
-For each links:
-
- * `feed_plugins`: additional tag for every link entry.
-
-#### save_link
-
-Triggered when a link is save (new link or edit).
-
-Allow to alter the link being saved in the datastore.
-
-##### Data
-
-`$data` is an array containing the link being saved:
-
- * id
- * title
- * url
- * shorturl
- * description
- * private
- * tags
- * created
- * updated
-
-
-#### delete_link
-
-Triggered when a link is deleted.
-
-Allow to execute any action before the link is actually removed from the datastore
-
-##### Data
-
-`$data` is an array containing the link being saved:
-
- * id
- * title
- * url
- * shorturl
- * description
- * private
- * tags
- * created
- * updated
-
-## Guide for template designer
-
-### Plugin administration
-
-Your theme must include a plugin administration page: `pluginsadmin.html`.
-
-> Note: repo's template link needs to be added when the PR is merged.
-
-Use the default one as an example.
-
-Aside from classic RainTPL loops, plugins order is handle by JavaScript. You can just include `plugin_admin.js`, only if:
-
- * you're using a table.
- * you call orderUp() and orderUp() onclick on arrows.
- * you add data-line and data-order to your rows.
-
-Otherwise, you can use your own JS as long as this field is send by the form:
-
-
-
-### Placeholder system
-
-In order to make plugins work with every custom themes, you need to add variable placeholder in your templates.
-
-It's a RainTPL loop like this:
-
- {loop="$plugin_variable"}
- {$value}
- {/loop}
-
-You should enable `demo_plugin` for testing purpose, since it uses every placeholder available.
-
-### List of placeholders
-
-**page.header.html**
-
-At the end of the menu:
-
- {loop="$plugins_header.buttons_toolbar"}
- {$value}
- {/loop}
-
-At the end of file, before clearing floating blocks:
-
- {if="!empty($plugin_errors) && isLoggedIn()"}
-
- {loop="plugin_errors"}
-
{$value}
- {/loop}
-
- {/if}
-
-**includes.html**
-
-At the end of the file:
-
-```html
-{loop="$plugins_includes.css_files"}
-
-{/loop}
-```
-
-**page.footer.html**
-
-At the end of your footer notes:
-
-```html
-{loop="$plugins_footer.text"}
- {$value}
-{/loop}
-```
-
-At the end of file:
-
-```html
-{loop="$plugins_footer.js_files"}
-
-{/loop}
-```
-
-**linklist.html**
-
-After search fields:
-
-```html
-{loop="$plugins_header.fields_toolbar"}
- {$value}
-{/loop}
-```
-
-Before displaying the link list (after paging):
-
-```html
-{loop="$plugin_start_zone"}
- {$value}
-{/loop}
-```
-
-For every links (icons):
-
-```html
-{loop="$value.link_plugin"}
- {$value}
-{/loop}
-```
-
-Before end paging:
-
-```html
-{loop="$plugin_end_zone"}
- {$value}
-{/loop}
-```
-
-**linklist.paging.html**
-
-After the "private only" icon:
-
-```html
-{loop="$action_plugin"}
- {$value}
-{/loop}
-```
-
-**editlink.html**
-
-After tags field:
-
-```html
-{loop="$edit_link_plugin"}
- {$value}
-{/loop}
-```
-
-**tools.html**
-
-After the last tool:
-
-```html
-{loop="$tools_plugin"}
- {$value}
-{/loop}
-```
-
-**picwall.html**
-
-Top:
-
-```html
-
Make sure your webserver can read and write the files in your plugin folder.
-
-
Plugin configuration
-
In Shaarli's administration page (Tools link), go to Plugin administration.
-
Here you can enable and disable all plugins available, and configure them.
-
-
Plugin order
-
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.
-
This is important in case plugins are depending on each other. Read plugins README details for more information.
-
Use case: The (non existent) plugin shaares_footer adds a footer to every shaare in Markdown syntax. It needs to be processed before (higher in the list) the Markdown plugin. Otherwise its syntax won't be translated in HTML.
-
File mode
-
Enabled plugin are stored in your config.php parameters file, under the array:
-
-
diff --git a/doc/Plugins.md b/doc/Plugins.md
deleted file mode 100644
index e3192a60..00000000
--- a/doc/Plugins.md
+++ /dev/null
@@ -1,76 +0,0 @@
-#Plugins
-## Plugin installation
-
-There is a bunch of plugins shipped with Shaarli, where there is nothing to do to install them.
-
-If you want to install a third party plugin:
-
- * Download it.
- * Put it in the `plugins` directory in Shaarli's installation folder.
- * Make sure you put it correctly:
-
-```
-| index.php
-| plugins/
-|---| custom_plugin/
-| |---| custom_plugin.php
-| |---| ...
-
-```
-
- * Make sure your webserver can read and write the files in your plugin folder.
-
-## Plugin configuration
-
-In Shaarli's administration page (`Tools` link), go to `Plugin administration`.
-
-Here you can enable and disable all plugins available, and configure them.
-
-[](.html)
-
-## Plugin order
-
-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.
-
-This is important in case plugins are depending on each other. Read plugins README details for more information.
-
-**Use case**: The (non existent) plugin `shaares_footer` adds a footer to every shaare in Markdown syntax. It needs to be processed *before* (higher in the list) the Markdown plugin. Otherwise its syntax won't be translated in HTML.
-
-## File mode
-
-Enabled plugin are stored in your `config.php` parameters file, under the `array`:
-
-```php
-$GLOBALS['config'['ENABLED_PLUGINS']]('ENABLED_PLUGINS'].html)
-```
-
-You can edit them manually here.
-Example:
-
-```php
-$GLOBALS['config'['ENABLED_PLUGINS'] = array(]('ENABLED_PLUGINS']-=-array(.html)
- 'qrcode',
- 'archiveorg',
- 'wallabag',
- 'markdown',
-);
-```
-
-### Plugin usage
-
-#### Official plugins
-
-Usage of each plugin is documented in it's README file:
-
- * `addlink-toolbar`: Adds the addlink input on the linklist page
- * `archiveorg`: For each link, add an Archive.org icon
- * [`markdown`](https://github.com/shaarli/Shaarli/blob/master/plugins/markdown/README.md): Render shaare description with Markdown syntax.[](.html)
- * [`playvideos`](https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md): Add a button in the toolbar allowing to watch all videos.[](.html)
- * `qrcode`: For each link, add a QRCode icon.
- * [`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)
-
-
-
-#### Third party plugins
-
-See [Community & related software](https://github.com/shaarli/Shaarli/wiki/Community-%26-Related-software#third-party-plugins)[](.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 @@
-
-
-
-
-
-
- Shaarli – REST API
-
-
-
-
-
-
-
To 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.
The 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.
Feeds are available in ATOM with ?do=atom and RSS with do=RSS.
-
Options:
-
-
You can use permalinks in the feed URL to get permalink to Shaares instead of direct link to shaared URL.
-
-
E.G. https://my.shaarli.domain/?do=atom&permalinks.
-
-
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.
-
-
-
diff --git a/doc/RSS-feeds.md b/doc/RSS-feeds.md
deleted file mode 100644
index 757bed9a..00000000
--- a/doc/RSS-feeds.md
+++ /dev/null
@@ -1,27 +0,0 @@
-#RSS feeds
-### Feeds options
-
-Feeds are available in ATOM with `?do=atom` and RSS with `do=RSS`.
-
-Options:
-- You can use `permalinks` in the feed URL to get permalink to Shaares instead of direct link to shaared URL.
- - E.G. `https://my.shaarli.domain/?do=atom&permalinks`.
-- 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.
- - `https://my.shaarli.domain/?do=atom&permalinks&nb=42`
- - `https://my.shaarli.domain/?do=atom&permalinks&nb=all`
-
-### RSS Feeds or Picture Wall for a specific search/tag
-
-It 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**.
-
-For example, if you want to subscribe only to links tagged `photography`:
-- Go to the desired Shaarli instance.
-- Search for the `photography` tag in the _Filter by tag_ box. Links tagged `photography` are displayed.
-- Click on the `RSS Feed` button.
-- You are presented with an RSS feed showing only these links. Subscribe to it to receive only updates with this tag.
-- The same method **also works for a full-text search** (_Search_ box) **and for the Picture Wall** (want to only see pictures about `nature`?)
-- You can also build the URLs manually:
- - `https://my.shaarli.domain/?do=rss&searchtags=nature`
- - `https://my.shaarli.domain/links/?do=picwall&searchterm=poney`
-
--!.html)(images/rss-filter-2.png)
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 @@
-
-
-
-
-
-
- Shaarli – Release Shaarli
-
-
-
-
-
-
-
GitHub allows drafting the release note for the upcoming release, from the Releases page. This way, the release note can be drafted while contributions are merged to master.
-
CHANGELOG.md
-
This file should contain the same information as the release note draft for the upcoming version.
-
Update it to:
-
-
add new entries (additions, fixes, etc.)
-
mark the current version as released by setting its date and link
-
add a new section for the future unreleased version
Increment the version code, create and push a signed tag
-
Bump Shaarli's version
-
$ cd /path/to/shaarli
-
-# create a new branch
-$ git fetch upstream
-$ git checkout upstream/master -b v0.5.0
-
-# bump the version number
-$ vim index.php shaarli_version.php
-
-# rebuild the documentation from the wiki
-$ make htmldoc
-
-# commit the changes
-$ git add index.php shaarli_version.php doc
-$ git commit -s -m "Bump version to v0.5.0"
-
-# push the commit on your GitHub fork
-$ git push origin v0.5.0
-
Create and merge a Pull Request
-
This one is pretty straightforward ;-)
-
Create and push a signed tag
-
# update your local copy
-$ git checkout master
-$ git fetch upstream
-$ git pull upstream master
-
-# create a signed tag
-$ git tag -s -m "Release v0.5.0" v0.5.0
-
-# push it to "upstream"
-$ git push --tags upstream
-
Verify a signed tag
-
v0.5.0 is the first GPG-signed tag pushed on the Community Shaarli.
-
Let's have a look at its signature!
-
$ cd /path/to/shaarli
-$ git fetch upstream
-
-# get the SHA1 reference of the tag
-$ git show-ref tags/v0.5.0
-f7762cf803f03f5caf4b8078359a63783d0090c1 refs/tags/v0.5.0
-
-# verify the tag signature information
-$ git verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1
-gpg: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F
-gpg: Good signature from "VirtualTam <virtualtam@flibidi.net>" [ultimate][](.html)
-
Publish the GitHub release
-
Update release badges
-
Update README.md so version badges display and point to the newly released Shaarli version(s).
-
Create a GitHub release from a Git tag
-
From the previously drafted release:
-
-
edit the release notes (if needed)
-
specify the appropriate Git tag
-
publish the release
-
profit!
-
-
Generate and upload all-in-one release archives
-
Users with a shared hosting may have:
-
-
no SSH access
-
no possibility to install PHP packages or server extensions
-
no possibility to run scripts
-
-
To ease Shaarli installations, it is possible to generate and upload additional release archives,
-that will contain Shaarli code plus all required third-party libraries:
-
$ make release_archive
-
This will create the following archives:
-
-
shaarli-vX.Y.Z-full.tar
-
shaarli-vX.Y.Z-full.zip
-
-
The archives need to be manually uploaded on the previously created GitHub release.
-
-
diff --git a/doc/Release-Shaarli.md b/doc/Release-Shaarli.md
deleted file mode 100644
index ced58853..00000000
--- a/doc/Release-Shaarli.md
+++ /dev/null
@@ -1,133 +0,0 @@
-#Release Shaarli
-See [Git - Maintaining a project - Tagging your [](.html)
-releases](http://git-scm.com/book/en/v2/Distributed-Git-Maintaining-a-Project#Tagging-Your-Releases).
-
-## Prerequisites
-This guide assumes that you have:
-- a GPG key matching your GitHub authentication credentials
- - i.e., the email address identified by the GPG key is the same as the one in your `~/.gitconfig`
-- a GitHub fork of Shaarli
-- a local clone of your Shaarli fork, with the following remotes:
- - `origin` pointing to your GitHub fork
- - `upstream` pointing to the main Shaarli repository
-- maintainer permissions on the main Shaarli repository, to:
- - push the signed tag
- - create a new release
-- [Composer](https://getcomposer.org/) and [Pandoc](http://pandoc.org/) need to be installed[](.html)
-
-## GitHub release draft and `CHANGELOG.md`
-See http://keepachangelog.com/en/0.3.0/ for changelog formatting.
-
-### GitHub release draft
-GitHub 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)
-
-### `CHANGELOG.md`
-This file should contain the same information as the release note draft for the upcoming version.
-
-Update it to:
-- add new entries (additions, fixes, etc.)
-- mark the current version as released by setting its date and link
-- add a new section for the future unreleased version
-
-```bash
-$ cd /path/to/shaarli
-
-$ nano CHANGELOG.md
-
-[...][](.html)
-## vA.B.C - UNRELEASED
-TBA
-
-## [vX.Y.Z](https://github.com/shaarli/Shaarli/releases/tag/vX.Y.Z) - YYYY-MM-DD[](.html)
-[...][](.html)
-```
-
-
-## Increment the version code, create and push a signed tag
-### Bump Shaarli's version
-```bash
-$ cd /path/to/shaarli
-
-# create a new branch
-$ git fetch upstream
-$ git checkout upstream/master -b v0.5.0
-
-# bump the version number
-$ vim index.php shaarli_version.php
-
-# rebuild the documentation from the wiki
-$ make htmldoc
-
-# commit the changes
-$ git add index.php shaarli_version.php doc
-$ git commit -s -m "Bump version to v0.5.0"
-
-# push the commit on your GitHub fork
-$ git push origin v0.5.0
-```
-
-### Create and merge a Pull Request
-This one is pretty straightforward ;-)
-
-### Create and push a signed tag
-```bash
-# update your local copy
-$ git checkout master
-$ git fetch upstream
-$ git pull upstream master
-
-# create a signed tag
-$ git tag -s -m "Release v0.5.0" v0.5.0
-
-# push it to "upstream"
-$ git push --tags upstream
-```
-
-### Verify a signed tag
-[`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)
-
-Let's have a look at its signature!
-
-```bash
-$ cd /path/to/shaarli
-$ git fetch upstream
-
-# get the SHA1 reference of the tag
-$ git show-ref tags/v0.5.0
-f7762cf803f03f5caf4b8078359a63783d0090c1 refs/tags/v0.5.0
-
-# verify the tag signature information
-$ git verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1
-gpg: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F
-gpg: Good signature from "VirtualTam " [ultimate][](.html)
-```
-
-## Publish the GitHub release
-### Update release badges
-Update `README.md` so version badges display and point to the newly released Shaarli version(s).
-
-### Create a GitHub release from a Git tag
-From the previously drafted release:
-- edit the release notes (if needed)
-- specify the appropriate Git tag
-- publish the release
-- profit!
-
-### Generate and upload all-in-one release archives
-Users with a shared hosting may have:
-- no SSH access
-- no possibility to install PHP packages or server extensions
-- no possibility to run scripts
-
-To ease Shaarli installations, it is possible to generate and upload additional release archives,
-that will contain Shaarli code plus all required third-party libraries:
-
-```bash
-$ make release_archive
-```
-
-This will create the following archives:
-- `shaarli-vX.Y.Z-full.tar`
-- `shaarli-vX.Y.Z-full.zip`
-
-The archives need to be manually uploaded on the previously created GitHub release.
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 @@
-
-
-
-
-
-
- Shaarli – Security
-
-
-
-
-
-
-
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
-
-
PHP
-
-
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.
-
-
Server and sessions
-
-
Directories are protected using .htaccess files
-
Forms are protected against XSRF (Cross-site requests forgery):
-
Forms which act on data (save,delete…) contain a token generated by the server.
-
Any posted form which does not contain a valid token is rejected.
-
Any token can only be used once.
-
Tokens are attached to the session and cannot be reused in another session.
-
Sessions automatically expire after 60 minutes.
-
Sessions are protected against hijacking: the session ID cannot be used from a different IP address.
-
-
Shaarli datastore and configuration
-
-
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.
-
Links are stored as an associative array which is serialized, compressed (with deflate), base64-encoded and saved as a comment in a .php file.
-
Even if the server does not support .htaccess files, the data file will still not be readable by URL.
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/Security.md b/doc/Security.md
deleted file mode 100644
index 7947460c..00000000
--- a/doc/Security.md
+++ /dev/null
@@ -1,28 +0,0 @@
-#Security
-## Client browser
-* 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
-
-## PHP
-* `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.
-
-## Server and sessions
-* Directories are protected using `.htaccess` files
-* Forms are protected against XSRF (Cross-site requests forgery):
- * Forms which act on data (save,delete…) contain a token generated by the server.
- * Any posted form which does not contain a valid token is rejected.
- * Any token can only be used once.
- * Tokens are attached to the session and cannot be reused in another session.
-* Sessions automatically expire after 60 minutes.
-* Sessions are protected against hijacking: the session ID cannot be used from a different IP address.
-
-## Shaarli datastore and configuration
-* 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.
-* Links are stored as an associative array which is serialized, compressed (with deflate), base64-encoded and saved as a comment in a `.php` file.
-* Even if the server does not support `.htaccess` files, the data file will still not be readable by URL.
-* The database looks like this:
-```php
-
-```
-
-* Small hashes are used to make a link to an entry in Shaarli. They are unique. In fact, the date of the items (eg. `20110923_150523`) is hashed with CRC32, then converted to base64 and some characters are replaced. They are always 6 characters longs and use only `A-Z a-z 0-9 - _` and `@`.
diff --git a/doc/Server-configuration.html b/doc/Server-configuration.html
deleted file mode 100644
index 0e6b220a..00000000
--- a/doc/Server-configuration.html
+++ /dev/null
@@ -1,459 +0,0 @@
-
-
-
-
-
-
- Shaarli – Server configuration
-
-
-
-
-
-
-
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
-
-
Proxies
-
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:
Shaarli 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.
-
Warning: If you use Apache 2.2 or lower, you need mod_version to be installed and enabled.
-
Apache module mod_rewritemust be enabled to use the REST API. URL rewriting rules for the Slim microframework are stated in the root .htaccess file.
-
LightHttpd
-
Nginx
-
Foreword
-
Nginx does not natively interpret PHP scripts; to this effect, we will run a FastCGI service, to which Nginx's FastCGI module will proxy all requests to PHP resources.
Some bookmark dumps generated by web browsers can be huge due to the presence of Base64-encoded images and favicons, as well as extra verbosity when nesting links in (sub-)folders.
-
To increase upload size, you will need to modify both nginx and PHP configuration:
# /etc/nginx/nginx.conf
-[...][](.html)
-
-http {
- [...][](.html)
-
- root /home/john/web;
- access_log /var/log/nginx/access.log;
- error_log /var/log/nginx/error.log;
-
- server {
- # virtual host for a first domain
- listen 80;
- server_name my.first.domain.org;
-
- location /shaarli/ {
- # Slim - rewrite URLs
- try_files $uri /shaarli/index.php$is_args$args;
-
- access_log /var/log/nginx/shaarli.access.log;
- error_log /var/log/nginx/shaarli.error.log;
- }
-
- location = /shaarli/favicon.ico {
- # serve the Shaarli favicon from its custom location
- alias /var/www/shaarli/images/favicon.ico;
- }
-
- include deny.conf;
- include static_assets.conf;
- include php.conf;
- }
-
- server {
- # virtual host for a second domain
- listen 80;
- server_name second.domain.com;
-
- location /minigal/ {
- access_log /var/log/nginx/minigal.access.log;
- error_log /var/log/nginx/minigal.error.log;
- }
-
- include deny.conf;
- include static_assets.conf;
- include php.conf;
- }
-}
-
Redirect HTTP to HTTPS
-
Assuming 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.
-
-
diff --git a/doc/Server-configuration.md b/doc/Server-configuration.md
deleted file mode 100644
index 81cc1a72..00000000
--- a/doc/Server-configuration.md
+++ /dev/null
@@ -1,393 +0,0 @@
-#Server configuration
-*Example virtual host configurations for popular web servers*
-
-- [Apache](#apache)[](.html)
-- [Nginx](#nginx)[](.html)
-
-## Prerequisites
-### Shaarli
-* Shaarli is installed in a directory readable/writeable by the user
-* the correct read/write permissions have been granted to the web server _user and/or group_
-* for HTTPS / SSL:
- * a key pair (public, private) and a certificate have been generated
- * the appropriate server SSL extension is installed and active
-
-### HTTPS, TLS and self-signed certificates
-Related guides:
-* [How to Create Self-Signed SSL Certificates with OpenSSL](http://www.xenocafe.com/tutorials/linux/centos/openssl/self_signed_certificates/index.php)[](.html)
-* [How do I create my own Certificate Authority?](https://workaround.org/certificate-authority)[](.html)
-* 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`
-
-### Proxies
-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:
-- `X-Forwarded-Proto`;
-- `X-Forwarded-Host`;
-- `X-Forwarded-For`.
-
-See also [proxy-related](https://github.com/shaarli/Shaarli/issues?utf8=%E2%9C%93&q=label%3Aproxy+) issues.[](.html)
-
-## Apache
-### Minimal
-```apache
-
- ServerName shaarli.my-domain.org
- DocumentRoot /absolute/path/to/shaarli/
-
-```
-### Debug - Log all the things!
-This configuration will log both Apache and PHP errors, which may prove useful to identify server configuration errors.
-
-See:
-* [Apache/PHP - error log per VirtualHost](http://stackoverflow.com/q/176) (StackOverflow)[](.html)
-* [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)
-
-```apache
-
- ServerName shaarli.my-domain.org
- DocumentRoot /absolute/path/to/shaarli/
-
- LogLevel warn
- ErrorLog /var/log/apache2/shaarli-error.log
- CustomLog /var/log/apache2/shaarli-access.log combined
-
- php_flag log_errors on
- php_flag display_errors on
- php_value error_reporting 2147483647
- php_value error_log /var/log/apache2/shaarli-php-error.log
-
-```
-
-### Standard - Keep access and error logs
-```apache
-
- ServerName shaarli.my-domain.org
- DocumentRoot /absolute/path/to/shaarli/
-
- LogLevel warn
- ErrorLog /var/log/apache2/shaarli-error.log
- CustomLog /var/log/apache2/shaarli-access.log combined
-
-```
-
-### Paranoid - Redirect HTTP (:80) to HTTPS (:443)
-See [Server-side TLS](https://wiki.mozilla.org/Security/Server_Side_TLS#Apache) (Mozilla).[](.html)
-
-```apache
-
- ServerName shaarli.my-domain.org
- DocumentRoot /absolute/path/to/shaarli/
-
- SSLEngine on
- SSLCertificateFile /absolute/path/to/the/website/certificate.pem
- SSLCertificateKeyFile /absolute/path/to/the/website/key.key
-
-
- AllowOverride All
- Options Indexes FollowSymLinks MultiViews
- Order allow,deny
- allow from all
-
-
- LogLevel warn
- ErrorLog /var/log/apache2/shaarli-error.log
- CustomLog /var/log/apache2/shaarli-access.log combined
-
-
- ServerName shaarli.my-domain.org
- Redirect 301 / https://shaarli.my-domain.org
-
- LogLevel warn
- ErrorLog /var/log/apache2/shaarli-error.log
- CustomLog /var/log/apache2/shaarli-access.log combined
-
-```
-
-### .htaccess
-
-Shaarli 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.
-
-**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)
-
-Apache 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.
-
-## LightHttpd
-
-## Nginx
-### Foreword
-Nginx 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)
-
-Required packages:
-- [nginx](http://nginx.org)[](.html)
-- [php-fpm](http://php-fpm.org) - PHP FastCGI Process Manager[](.html)
-
-Official documentation:
-- [Beginner's guide](http://nginx.org/en/docs/beginners_guide.html)[](.html)
-- [ngx_http_fastcgi_module](http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html)[](.html)
-- [Pitfalls](http://wiki.nginx.org/Pitfalls)[](.html)
-
-Community resources:
-- [Server-side TLS (Nginx)](https://wiki.mozilla.org/Security/Server_Side_TLS#Nginx) (Mozilla)[](.html)
-- [PHP configuration examples](http://kbeezie.com/nginx-configuration-examples/) (Karl Blessing)[](.html)
-
-### Common setup
-Once Nginx and PHP-FPM are installed, we need to ensure:
-- Nginx and PHP-FPM are running using the _same user and group_
-- both these user and group have
- - `read` permissions for Shaarli resources
- - `execute` permissions for Shaarli directories _AND_ their parent directories
-
-On a production server:
-- `user:group` will likely be `http:http`, `www:www` or `www-data:www-data`
-- files will be located under `/var/www`, `/var/http` or `/usr/share/nginx`
-
-On a development server:
-- files may be located in a user's home directory
-- in this case, make sure both Nginx and PHP-FPM are running as the local user/group!
-
-For all following configuration examples, this user/group pair will be used:
-- `user:group = john:users`,
-
-which corresponds to the following service configuration:
-
-```ini
-; /etc/php/php-fpm.conf
-user = john
-group = users
-
-[...][](.html)
-listen.owner = john
-listen.group = users
-```
-
-```nginx
-# /etc/nginx/nginx.conf
-user john users;
-
-http {
- [...][](.html)
-}
-```
-
-### (Optional) Increase the maximum file upload size
-Some bookmark dumps generated by web browsers can be _huge_ due to the presence of Base64-encoded images and favicons, as well as extra verbosity when nesting links in (sub-)folders.
-
-To increase upload size, you will need to modify both nginx and PHP configuration:
-
-```nginx
-# /etc/nginx/nginx.conf
-
-http {
- [...][](.html)
-
- client_max_body_size 10m;
-
- [...][](.html)
-}
-```
-
-```ini
-# /etc/php5/fpm/php.ini
-
-[...][](.html)
-post_max_size = 10M
-[...][](.html)
-upload_max_filesize = 10M
-```
-
-### Minimal
-_WARNING: Use for development only!_
-
-```nginx
-user john users;
-worker_processes 1;
-events {
- worker_connections 1024;
-}
-
-http {
- include mime.types;
- default_type application/octet-stream;
- keepalive_timeout 20;
-
- index index.html index.php;
-
- server {
- listen 80;
- server_name localhost;
- root /home/john/web;
-
- access_log /var/log/nginx/access.log;
- error_log /var/log/nginx/error.log;
-
- location /shaarli/ {
- try_files $uri /shaarli/index.php$is_args$args;
- access_log /var/log/nginx/shaarli.access.log;
- error_log /var/log/nginx/shaarli.error.log;
- }
-
- location ~ (index)\.php$ {
- try_files $uri =404;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
- fastcgi_index index.php;
- include fastcgi.conf;
- }
- }
-}
-```
-
-### Modular
-The previous setup is sufficient for development purposes, but has several major caveats:
-- every content that does not match the PHP rule will be sent to client browsers:
- - dotfiles - in our case, `.htaccess`
- - temporary files, e.g. Vim or Emacs files: `index.php~`
-- asset / static resource caching is not optimized
-- if serving several PHP sites, there will be a lot of duplication: `location /shaarli/`, `location /mysite/`, etc.
-
-To solve this, we will split Nginx configuration in several parts, that will be included when needed:
-
-```nginx
-# /etc/nginx/deny.conf
-location ~ /\. {
- # deny access to dotfiles
- access_log off;
- log_not_found off;
- deny all;
-}
-
-location ~ ~$ {
- # deny access to temp editor files, e.g. "script.php~"
- access_log off;
- log_not_found off;
- deny all;
-}
-```
-
-```nginx
-# /etc/nginx/php.conf
-location ~ (index)\.php$ {
- # Slim - split URL path into (script_filename, path_info)
- try_files $uri =404;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
-
- # filter and proxy PHP requests to PHP-FPM
- fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
- fastcgi_index index.php;
- include fastcgi.conf;
-}
-
-location ~ \.php$ {
- # deny access to all other PHP scripts
- deny all;
-}
-```
-
-```nginx
-# /etc/nginx/static_assets.conf
-location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
- expires max;
- add_header Pragma public;
- add_header Cache-Control "public, must-revalidate, proxy-revalidate";
-}
-```
-
-```nginx
-# /etc/nginx/nginx.conf
-[...][](.html)
-
-http {
- [...][](.html)
-
- root /home/john/web;
- access_log /var/log/nginx/access.log;
- error_log /var/log/nginx/error.log;
-
- server {
- # virtual host for a first domain
- listen 80;
- server_name my.first.domain.org;
-
- location /shaarli/ {
- # Slim - rewrite URLs
- try_files $uri /shaarli/index.php$is_args$args;
-
- access_log /var/log/nginx/shaarli.access.log;
- error_log /var/log/nginx/shaarli.error.log;
- }
-
- location = /shaarli/favicon.ico {
- # serve the Shaarli favicon from its custom location
- alias /var/www/shaarli/images/favicon.ico;
- }
-
- include deny.conf;
- include static_assets.conf;
- include php.conf;
- }
-
- server {
- # virtual host for a second domain
- listen 80;
- server_name second.domain.com;
-
- location /minigal/ {
- access_log /var/log/nginx/minigal.access.log;
- error_log /var/log/nginx/minigal.error.log;
- }
-
- include deny.conf;
- include static_assets.conf;
- include php.conf;
- }
-}
-```
-
-### Redirect HTTP to HTTPS
-Assuming 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.
-
-```nginx
-# /etc/nginx/nginx.conf
-[...][](.html)
-
-http {
- [...][](.html)
-
- index index.html index.php;
-
- root /home/john/web;
- access_log /var/log/nginx/access.log;
- error_log /var/log/nginx/error.log;
-
- server {
- listen 80;
- server_name localhost;
-
- return 301 https://localhost$request_uri;
- }
-
- server {
- listen 443 ssl;
- server_name localhost;
-
- ssl_certificate /home/john/ssl/localhost.crt;
- ssl_certificate_key /home/john/ssl/localhost.key;
-
- location /shaarli/ {
- # Slim - rewrite URLs
- try_files $uri /index.php$is_args$args;
-
- access_log /var/log/nginx/shaarli.access.log;
- error_log /var/log/nginx/shaarli.error.log;
- }
-
- location = /shaarli/favicon.ico {
- # serve the Shaarli favicon from its custom location
- alias /var/www/shaarli/images/favicon.ico;
- }
-
- include deny.conf;
- include static_assets.conf;
- include php.conf;
- }
-}
-```
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 @@
-
-
-
-
-
-
- Shaarli – Server requirements
-
-
-
-
-
-
Robots - Restricting search engines and web crawler traffic
-
Creating a robots.txt with the following contents at the root of your Shaarli installation will prevent honest 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.
-
-
diff --git a/doc/Server-security.md b/doc/Server-security.md
deleted file mode 100644
index 50549a21..00000000
--- a/doc/Server-security.md
+++ /dev/null
@@ -1,74 +0,0 @@
-#Server security
-## php.ini
-PHP settings are defined in:
-- a main configuration file, usually found under `/etc/php5/php.ini`; some distributions provide different configuration environments, e.g.
- - `/etc/php5/php.ini` - used when running console scripts
- - `/etc/php5/apache2/php.ini` - used when a client requests PHP resources from Apache
- - `/etc/php5/php-fpm.conf` - used when PHP requests are proxied to PHP-FPM
-- additional configuration files/entries, depending on the installed/enabled extensions:
- - `/etc/php/conf.d/xdebug.ini`
-
-### Locate .ini files
-#### Console environment
-```bash
-$ php --ini
-Configuration File (php.ini) Path: /etc/php
-Loaded Configuration File: /etc/php/php.ini
-Scan for additional .ini files in: /etc/php/conf.d
-Additional .ini files parsed: /etc/php/conf.d/xdebug.ini
-```
-
-#### Server environment
-- create a `phpinfo.php` script located in a path supported by the web server, e.g.
- - Apache (with user dirs enabled): `/home/myself/public_html/phpinfo.php`
- - `/var/www/test/phpinfo.php`
-- make sure the script is readable by the web server user/group (usually, `www`, `www-data` or `httpd`)
-- access the script from a web browser
-- look at the _Loaded Configuration File_ and _Scan this dir for additional .ini files_ entries
-```php
-
-```
-
-## fail2ban
-`fail2ban` is an intrusion prevention framework that reads server (Apache, SSH, etc.) and uses `iptables` profiles to block brute-force attempts:
-- [Official website](http://www.fail2ban.org/wiki/index.php/Main_Page)[](.html)
-- [Source code](https://github.com/fail2ban/fail2ban)[](.html)
-
-### Read Shaarli logs to ban IPs
-Example configuration:
-- allow 3 login attempts per IP address
-- after 3 failures, permanently ban the corresponding IP adddress
-
-`/etc/fail2ban/jail.local`
-```ini
-[shaarli-auth][](.html)
-enabled = true
-port = https,http
-filter = shaarli-auth
-logpath = /var/www/path/to/shaarli/data/log.txt
-maxretry = 3
-bantime = -1
-```
-
-`/etc/fail2ban/filter.d/shaarli-auth.conf`
-```ini
-[INCLUDES][](.html)
-before = common.conf
-[Definition][](.html)
-failregex = \s-\s\s-\sLogin failed for user.*$
-ignoreregex =
-```
-
-## Robots - Restricting search engines and web crawler traffic
-
-Creating a `robots.txt` with the following contents at the root of your Shaarli installation will prevent _honest_ 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.
-
-```
-User-agent: *
-Disallow: /
-```
-
-See:
-- http://www.robotstxt.org/
-- http://www.robotstxt.org/robotstxt.html
-- http://www.robotstxt.org/meta.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 @@
-
-
-
-
-
-
- Shaarli – Shaarli configuration
-
-
-
-
-
-
-
title: Shaarli's instance title.
-header_link: Link to the homepage.
-links_per_page: Number of shaares displayed per page.
-timezone: See the list of supported timezones.
-enabled_plugins: List of enabled plugins.
-
Security
-
session_protection_disabled: Disable session cookie hijacking protection (not recommended).
-It might be useful if your IP adress often changes.
-ban_after: Failed login attempts before being IP banned.
-ban_duration: IP ban duration in seconds.
-open_shaarli: Anyone can add a new link while logged out if enabled.
-trusted_proxies: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy.
-
Resources
-
data_dir: Data directory.
-datastore: Shaarli's links database file path.
-history: Shaarli's operation history file path.
-updates: File path for the ran updates file.
-log: Log file path.
-update_check: Last update check file path.
-raintpl_tpl: Templates directory.
-raintpl_tmp: Template engine cache directory.
-thumbnails_cache: Thumbnails cache directory.
-page_cache: Shaarli's internal cache directory.
-ban_file: Banned IP file path.
-
Updates
-
check_updates: Enable or disable update check to the git repository.
-check_updates_branch: Git branch used to check updates (e.g. stable or master).
-check_updates_interval: Look for new version every N seconds (default: every day).
-
Privacy
-
default_private_links: Check the private checkbox by default for every new link.
-hide_public_links: All links are hidden while logged out.
-hide_timestamps: Timestamps are hidden.
-
Feed
-
rss_permalinks: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL.
-show_atom: Display ATOM feed button.
-
Thumbnail
-
enable_thumbnails: Enable or disable thumbnail display.
-enable_localcache: Enable or disable local cache.
-
Redirector
-
url: Redirector URL, such as anonym.to.
-encode_url: Enable this if the redirector needs encoded URL to work properly.
The playvideos plugin may require that you adapt your server's
-Content Security Policy
-configuration to work properly.(.html)
-
-
diff --git a/doc/Shaarli-configuration.md b/doc/Shaarli-configuration.md
deleted file mode 100644
index 25647cb7..00000000
--- a/doc/Shaarli-configuration.md
+++ /dev/null
@@ -1,212 +0,0 @@
-#Shaarli configuration
-# Shaarli configuration
-
-## Foreword
-
-**Do not edit configuration options in index.php! Your changes would be lost.**
-
-Once your Shaarli instance is installed, the file `data/config.json.php` is generated:
-* it contains all settings in JSON format, and can be edited to customize values
-* it defines which [plugins](Plugin-System) are enabled[(.html)]((.html).html)
-* its values override those defined in `index.php`
-* it is wrap in a PHP comment to prevent anyone accessing it, regardless of server configuration
-
-## File and directory permissions
-
-The server process running Shaarli must have:
-- `read` access to the following resources:
- - PHP scripts: `index.php`, `application/*.php`, `plugins/*.php`
- - 3rd party PHP and Javascript libraries: `inc/*.php`, `inc/*.js`
- - static assets:
- - CSS stylesheets: `inc/*.css`
- - `images/*`
- - RainTPL templates: `tpl/*.html`
-- `read`, `write` and `execution` access to the following directories:
- - `cache` - thumbnail cache
- - `data` - link data store, configuration options
- - `pagecache` - Atom/RSS feed cache
- - `tmp` - RainTPL page cache
-
-On a Linux distribution:
-- the web server user will likely be `www` or `http` (for Apache2)
-- it will be a member of a group of the same name: `www:www`, `http:http`
-- to give it access to Shaarli, either:
- - unzip Shaarli in the default web server location (usually `/var/www/`) and set the web server user as the owner
- - put users in the same group as the web server, and set the appropriate access rights
-- if you have a domain / subdomain to serve Shaarli, [configure the server](Server-configuration) accordingly[(.html)]((.html).html)
-
-## Configuration
-
-In `data/config.json.php`.
-
-See also [Plugin System](Plugin-System.html).[](.html)
-
-### Credentials
-
-> You shouldn't edit those.
-
-**login**: Login username.
-**hash**: Generated password hash.
-**salt**: Password salt.
-
-### General
-
-**title**: Shaarli's instance title.
-**header_link**: Link to the homepage.
-**links_per_page**: Number of shaares displayed per page.
-**timezone**: See [the list of supported timezones](http://php.net/manual/en/timezones.php). [](.html)
-**enabled_plugins**: List of enabled plugins.
-
-### Security
-
-**session_protection_disabled**: Disable session cookie hijacking protection (not recommended).
-It might be useful if your IP adress often changes.
-**ban_after**: Failed login attempts before being IP banned.
-**ban_duration**: IP ban duration in seconds.
-**open_shaarli**: Anyone can add a new link while logged out if enabled.
-**trusted_proxies**: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy.
-
-### Resources
-
-**data_dir**: Data directory.
-**datastore**: Shaarli's links database file path.
-**history**: Shaarli's operation history file path.
-**updates**: File path for the ran updates file.
-**log**: Log file path.
-**update_check**: Last update check file path.
-**raintpl_tpl**: Templates directory.
-**raintpl_tmp**: Template engine cache directory.
-**thumbnails_cache**: Thumbnails cache directory.
-**page_cache**: Shaarli's internal cache directory.
-**ban_file**: Banned IP file path.
-
-### Updates
-
-**check_updates**: Enable or disable update check to the git repository.
-**check_updates_branch**: Git branch used to check updates (e.g. `stable` or `master`).
-**check_updates_interval**: Look for new version every N seconds (default: every day).
-
-### Privacy
-
-**default_private_links**: Check the private checkbox by default for every new link.
-**hide_public_links**: All links are hidden while logged out.
-**hide_timestamps**: Timestamps are hidden.
-
-### Feed
-
-**rss_permalinks**: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL.
-**show_atom**: Display ATOM feed button.
-
-### Thumbnail
-
-**enable_thumbnails**: Enable or disable thumbnail display.
-**enable_localcache**: Enable or disable local cache.
-
-### Redirector
-
-**url**: Redirector URL, such as `anonym.to`.
-**encode_url**: Enable this if the redirector needs encoded URL to work properly.
-
-## Configuration file example
-
-```json
-",
- "hash": "",
- "salt": ""
- },
- "security": {
- "ban_after": 4,
- "session_protection_disabled": false,
- "ban_duration": 1800,
- "trusted_proxies": [[](.html)
- "1.2.3.4",
- "5.6.7.8"
- ]
- },
- "resources": {
- "data_dir": "data",
- "config": "data\/config.php",
- "datastore": "data\/datastore.php",
- "ban_file": "data\/ipbans.php",
- "updates": "data\/updates.txt",
- "log": "data\/log.txt",
- "update_check": "data\/lastupdatecheck.txt",
- "raintpl_tmp": "tmp\/",
- "raintpl_tpl": "tpl\/",
- "thumbnails_cache": "cache",
- "page_cache": "pagecache"
- },
- "general": {
- "check_updates": true,
- "rss_permalinks": true,
- "links_per_page": 20,
- "default_private_links": true,
- "enable_thumbnails": true,
- "enable_localcache": true,
- "check_updates_branch": "stable",
- "check_updates_interval": 86400,
- "enabled_plugins": [[](.html)
- "markdown",
- "wallabag",
- "archiveorg"
- ],
- "timezone": "Europe\/Paris",
- "title": "My Shaarli",
- "header_link": "?"
- },
- "extras": {
- "show_atom": false,
- "hide_public_links": false,
- "hide_timestamps": false,
- "open_shaarli": false,
- "redirector": "http://anonym.to/?",
- "redirector_encode_url": false
- },
- "general": {
- "header_link": "?",
- "links_per_page": 20,
- "enabled_plugins": [[](.html)
- "markdown",
- "wallabag"
- ],
- "timezone": "Europe\/Paris",
- "title": "My Shaarli"
- },
- "updates": {
- "check_updates": true,
- "check_updates_branch": "stable",
- "check_updates_interval": 86400
- },
- "feed": {
- "rss_permalinks": true,
- "show_atom": false
- },
- "privacy": {
- "default_private_links": true,
- "hide_public_links": false,
- "hide_timestamps": false
- },
- "thumbnail": {
- "enable_thumbnails": true,
- "enable_localcache": true
- },
- "redirector": {
- "url": "http://anonym.to/?",
- "encode_url": false
- },
- "plugins": {
- "WALLABAG_URL": "http://demo.wallabag.org",
- "WALLABAG_VERSION": "1"
- }
-} ?>
-```
-
-## Additional configuration
-
-The playvideos plugin may require that you adapt your server's
-[Content Security Policy](https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md#troubleshooting) [](.html)
-configuration to work properly.[(.html)]((.html).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 @@
-
-
-
-
-
-
- Shaarli – Sharing button
-
-
-
-
-
-
Add the sharing button (bookmarklet) to your browser
-
-
Open your Shaarli and Login
-
Click the Tools button in the top bar
-
Drag the ✚Shaare link button, and drop it to your browser's bookmarks bar.
-
-
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.
-
-
Share links using the bookmarklet
-
-
When you are visiting a webpage you would like to share with Shaarli, click the bookmarklet you just added.
-
A window opens.
-
You can freely edit title, description, tags... to find it later using the text search or tag filtering.
-
You will be able to edit this link later using the
-
You can also check the “Private” box so that the link is saved but only visible to you.
-
Click Save.Voilà! Your link is now shared.
-
-
Troubleshooting: The bookmarklet doesn't work with a few website (e.g. Github.com)
-
Websites which enforce Content Security Policy (CSP), such as github.com, disallow usage of bookmarklets. Unfortunatly, there is nothing Shaarli can do about it.
-
-
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 @@
-#Sharing button
-### Add the sharing button (_bookmarklet_) to your browser
-
- * Open your Shaarli and `Login`
- * Click the `Tools` button in the top bar
- * Drag the **`✚Shaare link` button**, and drop it to your browser's bookmarks bar.
-
-_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._
-
-.html)
-
-### Share links using the _bookmarklet_
-
- * When you are visiting a webpage you would like to share with Shaarli, click the _bookmarklet_ you just added.
- * A window opens.
- * You can freely edit title, description, tags... to find it later using the text search or tag filtering.
- * You will be able to edit this link later using the -edit-button..html)
- * You can also check the “Private” box so that the link is saved but only visible to you.
- * Click `Save`.**Voilà! Your link is now shared.**
-
-### Troubleshooting: The bookmarklet doesn't work with a few website (e.g. Github.com)
-
-Websites which enforce Content Security Policy (CSP), such as github.com, disallow usage of bookmarklets. Unfortunatly, there is nothing Shaarli can do about it.
-
-See [#196](https://github.com/shaarli/Shaarli#196).[](.html)
-
-There is an open bug for both Firefox and Chromium:
-
- * https://bugzilla.mozilla.org/show_bug.cgi?id=866522
- * https://code.google.com/p/chromium/issues/detail?id=233903
-
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 @@
-
-
-
-
-
-
- Shaarli – Static analysis
-
-
-
-
-
-
# the file should be owned by Apache, thus not writeable => sudo
-$ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php
-
-
diff --git a/doc/Theming.md b/doc/Theming.md
deleted file mode 100644
index 23877e5d..00000000
--- a/doc/Theming.md
+++ /dev/null
@@ -1,77 +0,0 @@
-#Theming
-## Foreword
-There are two ways of customizing how Shaarli looks:
-
-1. by using a custom CSS to override Shaarli's CSS
-2. by using a full theme that provides its own RainTPL templates, CSS and Javascript resources
-
-## Custom CSS
-Shaarli's appearance can be modified by adding CSS rules to:
-- Shaarli < `v0.9.0`: `inc/user.css`
-- Shaarli >= `v0.9.0`: `data/user.css`
-
-This file allows overriding rules defined in the template CSS files (only add changed rules), or define a whole new theme.
-
-**Note**: Do not edit `tpl/default/css/shaarli.css`! Your changes would be overridden when updating Shaarli.
-
-See also [Download CSS styles from an OPML list](Download-CSS-styles-from-an-OPML-list.html)
-
-## Themes
-_WARNING - This feature is currently being worked on and will be improved in the next releases. Experimental._
-
-Installation:
-- find a theme you'd like to install
-- copy or clone the theme folder under `tpl/`
-- enable the theme:
- - Shaarli < `v0.9.0`: edit `data/config.json.php` and set the value of `raintpl_tpl` to the new theme name:
- `"raintpl_tpl": "tpl\/my-template\/"`
- - Shaarli >= `v0.9.0`: select the theme through the _Tools_ page
-
-## Community CSS & themes
-### Custom CSS
-- [mrjovanovic/serious-theme-shaarli](https://github.com/mrjovanovic/serious-theme-shaarli) - A serious theme for Shaarli[](.html)
-- [shaarli/shaarli-themes](https://github.com/shaarli/shaarli-themes)[](.html)
-
-### Themes
-- [AkibaTech/Shaarli Superhero Theme](https://github.com/AkibaTech/Shaarli---SuperHero-Theme) - A template/theme for Shaarli[](.html)
-- [alexisju/albinomouse-template](https://github.com/alexisju/albinomouse-template) - A full template for Shaarli[](.html)
-- [ArthurHoaro/shaarli-launch](https://github.com/ArthurHoaro/shaarli-launch) - Customizable Shaarli theme[](.html)
-- [dhoko/ShaarliTemplate](https://github.com/dhoko/ShaarliTemplate) - A template/theme for Shaarli[](.html)
-- [kalvn/shaarli-blocks](https://github.com/kalvn/shaarli-blocks) - A template/theme for Shaarli[](.html)
-- [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)
-- [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)
-
-### Shaarli forks
-- [misterair/Limonade](https://github.com/misterair/limonade) - A fork of (legacy) Shaarli with a new template[](.html)
-- [vivienhaese/shaarlitheme](https://github.com/vivienhaese/shaarlitheme) - A Shaarli fork meant to be run in an openshift instance[](.html)
-
-## Example installation: AlbinoMouse theme
-With the following configuration:
-- Apache 2 / PHP 5.6
-- user sites are enabled, e.g. `/home/user/public_html/somedir` is served as `http://localhost/~user/somedir`
-- `http` is the name of the Apache user
-
-```bash
-$ cd ~/public_html
-
-# clone repositories
-$ git clone https://github.com/shaarli/Shaarli.git shaarli
-$ pushd shaarli/tpl
-$ git clone https://github.com/alexisju/albinomouse-template.git
-$ popd
-
-# set access rights for Apache
-$ chgrp -R http shaarli
-$ chmod g+rwx shaarli shaarli/cache shaarli/data shaarli/pagecache shaarli/tmp
-```
-
-Get config written:
-- go to the freshly installed site
-- fill the install form
-- log in to Shaarli
-
-Edit Shaarli's [configuration|Shaarli configuration](configuration|Shaarli-configuration.html):
-```bash
-# the file should be owned by Apache, thus not writeable => sudo
-$ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php
-```
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 @@
-
-
-
-
-
-
- Shaarli – Troubleshooting
-
-
-
-
-
-
-
Depending on its configuration and installed plugins, the browser may remove or alter (spoof) HTTP referers, thus preventing Shaarli from properly redirecting between pages.
network.http.referer.trimmingPolicy - trim the URI not to send a full Referer
-
-
0 (default): send full URI
-
1: scheme+host+port+path
-
2: scheme+host+port
-
-
Firefox, localhost and redirections
-
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.
-
To solve this, assign a local domain to your host, e.g.
Delete the file data/config.php and display the page again. You will be asked for a new login/password.
-
I'm locked out - Login bruteforce protection
-
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.
-
To remove the current IP bans, delete the file data/ipbans.php
-
List of all login attempts
-
The file data/log.txt shows all logins (successful or failed) and bans/lifted bans.
-Search for failed in this file to look for unauthorized login attempts.
-
Hosting problems
-
Old PHP versions
-
-
On free.fr : free.fr now support php 5.6.x(link)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:
-
-
<IfDefine Free>
-php56 1
-</IfDefine>
-
-
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
-
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).
-
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:
-
-
//list($status,$headers,$data) = getHTTP($url,4); // Short timeout to keep the application responsive.
-// FIXME: Decode charset according to charset specified in either 1) HTTP response headers or 2) <head> in html
-//if (strpos($status,'200 OK')) $title=html_extract_title($data);
-
-
On hosts which forbid outgoing HTTP requests (such as free.fr), some thumbnails will not work.
-
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
-
-
Dates are not properly formatted
-
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 :-( )
-
Problems on CentOS servers
-
On CentOS/RedHat derivatives, you may need to install the php-mbstring package.
-
My session expires! I can't stay logged in
-
This can be caused by several things:
-
-
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.
-
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 !)
-
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).
-
Some browser addons may interfer with HTTP headers (ipfuck/ipflood/GreaseMonkey…). Try disabling those.
-
You may be using OperaTurbo or OperaMini, which use their own proxies which may change from time to time.
-
If you have another application on the same webserver where Shaarli is installed, these application may forcefully expire php sessions.
-
-
Sessions do not seem to work correctly on your server
-
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 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).
-
pubsubhubbub support
-
Download 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)
-
-
diff --git a/doc/Troubleshooting.md b/doc/Troubleshooting.md
deleted file mode 100644
index 8e30fce5..00000000
--- a/doc/Troubleshooting.md
+++ /dev/null
@@ -1,107 +0,0 @@
-#Troubleshooting
-## Browser
-### Redirection issues (HTTP Referer)
-Depending on its configuration and installed plugins, the browser may remove or alter (spoof) HTTP referers, thus preventing Shaarli from properly redirecting between pages.
-
-See:
-- [HTTP referer](https://en.wikipedia.org/wiki/HTTP_referer) (Wikipedia)[](.html)
-- [Improve online privacy by controlling referrer information](http://www.ghacks.net/2015/01/22/improve-online-privacy-by-controlling-referrer-information/)[](.html)
-- [Better security, privacy and anonymity in Firefox](http://b.agilob.net/better-security-privacy-and-anonymity-in-firefox/)[](.html)
-
-### Firefox HTTP Referer options
-HTTP settings are available by browsing `about:config`, here are the available settings and their values.
-
-`network.http.sendRefererHeader` - determines when to send the Referer HTTP header
-- 0: Never send the referring URL
- - not recommended, may break some sites
-- 1: Send only on clicked links
-- 2 (default): Send for links and images
-
-`network.http.referer.XOriginPolicy` - Cross-domain origin policy
-- 0 (default): Always send
-- 1: Send if base domains match
-- 2: Send if hosts match
-
-`network.http.referer.spoofSource` - Referer spoofing (~faking)
-- false (default): real referer
-- true: spoof referer (use target URI as referer)
- - known to break some functionality in Shaarli
-
-`network.http.referer.trimmingPolicy` - trim the URI not to send a full Referer
-- 0 (default): send full URI
-- 1: scheme+host+port+path
-- 2: scheme+host+port
-
-### Firefox, localhost and redirections
-`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.
-
-To solve this, assign a local domain to your host, e.g.
-```
-127.0.0.1 localhost desktop localhost.lan
-::1 localhost desktop localhost.lan
-```
-
-and browse Shaarli at http://localhost.lan/.
-
-Related threads:
-- [What is localhost.localdomain for?](https://bbs.archlinux.org/viewtopic.php?id=156064)[](.html)
-- [Stop returning to the first page after editing a bookmark from another page](https://github.com/shaarli/Shaarli/issues/311)[](.html)
-
-## Login
-### I forgot my password!
-Delete the file `data/config.php` and display the page again. You will be asked for a new login/password.
-
-### I'm locked out - Login bruteforce protection
-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.
-
-To remove the current IP bans, delete the file `data/ipbans.php`
-
-### List of all login attempts
-The file `data/log.txt` shows all logins (successful or failed) and bans/lifted bans.
-Search for `failed` in this file to look for unauthorized login attempts.
-
-## Hosting problems
-### Old PHP versions
- * 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)
-
-```ini
-
-php56 1
-
-```
-
- * 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`
- * 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).
- * 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)
-
-```php
-//list($status,$headers,$data) = getHTTP($url,4); // Short timeout to keep the application responsive.
-// FIXME: Decode charset according to charset specified in either 1) HTTP response headers or 2) in html
-//if (strpos($status,'200 OK')) $title=html_extract_title($data);
-```
-
- * On hosts which forbid outgoing HTTP requests (such as free.fr), some thumbnails will not work.
- * 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`
-
-### Dates are not properly formatted
-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 :-( )
-
-### Problems on CentOS servers
-On **CentOS**/RedHat derivatives, you may need to install the `php-mbstring` package.
-
-
-### My session expires! I can't stay logged in
-This can be caused by several things:
-
-* 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.
-* 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)
-* 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).
-* Some browser addons may interfer with HTTP headers (ipfuck/ipflood/GreaseMonkey…). Try disabling those.
-* You may be using OperaTurbo or OperaMini, which use their own proxies which may change from time to time.
-* If you have another application on the same webserver where Shaarli is installed, these application may forcefully expire php sessions.
-
-## Sessions do not seem to work correctly on your server
-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 **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)
-
-### pubsubhubbub support
-Download [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)
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 @@
-
-
-
-
-
-
- Shaarli – Unit tests
-
-
-
-
-
-
-
# system-wide version
-$ composer install
-$ composer update
-
-# local version
-$ php composer.phar self-update
-$ php composer.phar install
-$ php composer.phar update
-
Install Shaarli dev dependencies
-
$ cd /path/to/shaarli
-$ composer update
-
Install and enable Xdebug to generate PHPUnit coverage reports
-
For Debian-based distros:
-
$ aptitude install php5-xdebug
-
For ArchLinux:
-
$ pacman -S xdebug
-
Then add the following line to /etc/php/php.ini:
-
zend_extension=xdebug.so
-
Run unit tests
-
Successful test suite:
-
$ make test
-
--------
-PHPUNIT
--------
-PHPUnit 4.6.9 by Sebastian Bergmann and contributors.
-
-Configuration read from /home/virtualtam/public_html/shaarli/phpunit.xml
-
-....................................
-
-Time: 759 ms, Memory: 8.25Mb
-
-OK (36 tests, 65 assertions)
-
Test suite with failures and errors:
-
$ make test
--------
-PHPUNIT
--------
-PHPUnit 4.6.9 by Sebastian Bergmann and contributors.
-
-Configuration read from /home/virtualtam/public_html/shaarli/phpunit.xml
-
-E..FF...............................
-
-Time: 802 ms, Memory: 8.25Mb
-
-There was 1 error:
-
-1) LinkDBTest::testConstructLoggedIn
-Missing argument 2 for LinkDB::__construct(), called in /home/virtualtam/public_html/shaarli/tests/Link\
-DBTest.php on line 79 and defined
-
-/home/virtualtam/public_html/shaarli/application/LinkDB.php:58
-/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:79
-
---
-
-There were 2 failures:
-
-1) LinkDBTest::testCheckDBNew
-Failed asserting that two strings are equal.
---- Expected
-+++ Actual
-@@ @@
--'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'
-+'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'
-
-/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:121
-
-2) LinkDBTest::testCheckDBLoad
-Failed asserting that two strings are equal.
---- Expected
-+++ Actual
-@@ @@
--'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'
-+'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'
-
-/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:133
-
-FAILURES!
-Tests: 36, Assertions: 63, Errors: 1, Failures: 2.
-
Test results and coverage
-
By default, PHPUnit will run all suitable tests found under the tests directory.
-
Each test has 3 possible outcomes:
-
-
. - success
-
F - failure: the test was run but its results are invalid
-
the code does not behave as expected
-
dependencies to external elements: globals, session, cache...
-
E - error: something went wrong and the tested code has crashed
-
typos in the code, or in the test code
-
dependencies to missing external elements
-
-
If Xdebug has been installed and activated, two coverage reports will be generated:
-
-
a summary in the console
-
a detailed HTML report with metrics for tested code
-
to open it in a web browser: firefox coverage/index.html &
-
-
Executing specific tests
-
Add a @group annotation in a test class or method comment:
-
-
diff --git a/doc/Unit-tests.md b/doc/Unit-tests.md
deleted file mode 100644
index 0942ad38..00000000
--- a/doc/Unit-tests.md
+++ /dev/null
@@ -1,147 +0,0 @@
-#Unit tests
-
-### Setup your environment for tests
-The framework used is [PHPUnit](https://phpunit.de/); it can be installed with [Composer](https://getcomposer.org/), which is a dependency management tool.[](.html)
-
-Regarding Composer, you can either use:
-* a system-wide version, e.g. installed through your distro's package manager
-* a local version, downloadable [here](https://getcomposer.org/download/)[](.html)
-
-#### Sample usage
-```bash
-# system-wide version
-$ composer install
-$ composer update
-
-# local version
-$ php composer.phar self-update
-$ php composer.phar install
-$ php composer.phar update
-```
-
-#### Install Shaarli dev dependencies
-```bash
-$ cd /path/to/shaarli
-$ composer update
-```
-
-#### Install and enable Xdebug to generate PHPUnit coverage reports
-For Debian-based distros:
-```bash
-$ aptitude install php5-xdebug
-```
-For ArchLinux:
-```bash
-$ pacman -S xdebug
-```
-
-Then add the following line to `/etc/php/php.ini`:
-```ini
-zend_extension=xdebug.so
-```
-
-#### Run unit tests
-Successful test suite:
-```bash
-$ make test
-
--------
-PHPUNIT
--------
-PHPUnit 4.6.9 by Sebastian Bergmann and contributors.
-
-Configuration read from /home/virtualtam/public_html/shaarli/phpunit.xml
-
-....................................
-
-Time: 759 ms, Memory: 8.25Mb
-
-OK (36 tests, 65 assertions)
-```
-
-Test suite with failures and errors:
-```bash
-$ make test
--------
-PHPUNIT
--------
-PHPUnit 4.6.9 by Sebastian Bergmann and contributors.
-
-Configuration read from /home/virtualtam/public_html/shaarli/phpunit.xml
-
-E..FF...............................
-
-Time: 802 ms, Memory: 8.25Mb
-
-There was 1 error:
-
-1) LinkDBTest::testConstructLoggedIn
-Missing argument 2 for LinkDB::__construct(), called in /home/virtualtam/public_html/shaarli/tests/Link\
-DBTest.php on line 79 and defined
-
-/home/virtualtam/public_html/shaarli/application/LinkDB.php:58
-/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:79
-
---
-
-There were 2 failures:
-
-1) LinkDBTest::testCheckDBNew
-Failed asserting that two strings are equal.
---- Expected
-+++ Actual
-@@ @@
--'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'
-+'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'
-
-/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:121
-
-2) LinkDBTest::testCheckDBLoad
-Failed asserting that two strings are equal.
---- Expected
-+++ Actual
-@@ @@
--'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'
-+'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'
-
-/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:133
-
-FAILURES!
-Tests: 36, Assertions: 63, Errors: 1, Failures: 2.
-```
-
-#### Test results and coverage
-By default, PHPUnit will run all suitable tests found under the `tests` directory.
-
-Each test has 3 possible outcomes:
-* `.` - success
-* `F` - failure: the test was run but its results are invalid
- * the code does not behave as expected
- * dependencies to external elements: globals, session, cache...
-* `E` - error: something went wrong and the tested code has crashed
- * typos in the code, or in the test code
- * dependencies to missing external elements
-
-If Xdebug has been installed and activated, two coverage reports will be generated:
-* a summary in the console
-* a detailed HTML report with metrics for tested code
- * to open it in a web browser: `firefox coverage/index.html &`
-
-### Executing specific tests
-Add a [`@group`](https://phpunit.de/manual/current/en/appendixes.annotations.html#appendixes.annotations.group) annotation in a test class or method comment:[](.html)
-
-```php
-/**
- * Netscape bookmark import
- * @group WIP
- */
-class BookmarkImportTest extends PHPUnit_Framework_TestCase
-{
- [...][](.html)
-}
-```
-
-To run all tests annotated with `@group WIP`:
-```bash
-$ vendor/bin/phpunit --group WIP tests/
-```
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 @@
-
-
-
-
-
-
- Shaarli – Upgrade and migration
-
-
-
-
-
-
-
It is recommended to backup this repository before starting updating/upgrading Shaarli:
-
-
users with SSH access: copy or archive the directory to a temporary location
-
users with FTP access: download a local copy of your Shaarli installation using your favourite client
-
-
Migrating data from a previous installation
-
As 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:
All tagged revisions can be downloaded as tarballs or ZIP archives from the releases page.
-
We recommend that you use the latest release tarball with the -full suffix. It contains the dependencies, please read Download and installation for git complete instructions.
-
Once downloaded, extract the archive locally and update your remote installation (e.g. via FTP) -be sure you keep the content of the data directory!
-
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 data/config.json.php (see Shaarli configuration for more details).
the default remote is named origin and points to Sebsauvage's repository
-
the current branch is master
-
-
if you have personal branches containing customizations, you will need to rebase them 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
-
-
the working copy is clean:
-
-
no versioned file has been locally modified
-
no untracked files are present
-
-
-
Step 0: show repository information
-
$ cd /path/to/shaarli
-
-$ git remote -v
-origin https://github.com/sebsauvage/Shaarli (fetch)
-origin https://github.com/sebsauvage/Shaarli (push)
-
-$ git branch -vv
-* master 029f75f [origin/master] Update README.md[](.html)
-
-$ git status
-On branch master
-Your branch is up-to-date with 'origin/master'.
-nothing to commit, working directory clean
After 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 for more details).
-
Troubleshooting
-
If the solutions provided here doesn't work, please open an issue specifying which version you're upgrading from and to.
-
You must specify an integer as a key
-
In v0.8.1 we changed how link keys are handled (from timestamps to incremental integers).
-Take a look at data/updates.txt content.
-
updates.txt contains updateMethodDatastoreIds
-
Try to delete it and refresh your page while being logged in.
-
updates.txt doesn't exists or doesn't contain updateMethodDatastoreIds
-
-
Create data/updates.txt if it doesn't exist.
-
Paste this string in the update file ;updateMethodRenameDashTags;
-
Login to Shaarli.
-
Delete the update file.
-
Refresh.
-
-
-
diff --git a/doc/Upgrade-and-migration.md b/doc/Upgrade-and-migration.md
deleted file mode 100644
index d36eb862..00000000
--- a/doc/Upgrade-and-migration.md
+++ /dev/null
@@ -1,186 +0,0 @@
-#Upgrade and migration
-## Preparation
-### Note your current version
-
-If anything goes wrong, it's important for us to know which version you're upgrading from.
-The current version is present in the `version.php` file.
-
-### Backup your data
-
-Shaarli stores all user data under the `data` directory:
-- `data/config.php` - main configuration file
-- `data/datastore.php` - bookmarked links
-- `data/ipbans.php` - banned IP addresses
-- `data/updates.txt` - contains all automatic update to the configuration and datastore files already run
-
-See [Shaarli configuration](Shaarli-configuration.html) for more information about Shaarli resources.
-
-It is recommended to backup this repository _before_ starting updating/upgrading Shaarli:
-- users with SSH access: copy or archive the directory to a temporary location
-- users with FTP access: download a local copy of your Shaarli installation using your favourite client
-
-### Migrating data from a previous installation
-As 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:
-
-- backup the `data` directory
-- install or update Shaarli:
- - fresh installation - see [Download and installation](Download-and-installation.html)
- - update - see the following sections
-- check or restore the `data` directory
-
-## Recommended : Upgrading from release archives
-All tagged revisions can be downloaded as tarballs or ZIP archives from the [releases](https://github.com/shaarli/Shaarli/releases) page.[](.html)
-
-We 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.
-
-Once downloaded, extract the archive locally and update your remote installation (e.g. via FTP) -be sure you keep the content of the `data` directory!
-
-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 `data/config.json.php` (see [Shaarli configuration](Shaarli-configuration.html) for more details).
-
-## Upgrading with Git
-### Updating a community Shaarli
-If 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)
-
-```bash
-$ cd /path/to/shaarli
-$ git pull
-
-From github.com:shaarli/Shaarli
- * branch master -> FETCH_HEAD
-Updating ebd67c6..521f0e6
-Fast-forward
- application/Url.php | 1 +
- shaarli_version.php | 2 +-
- tests/Url/UrlTest.php | 1 +
- 3 files changed, 3 insertions(+), 1 deletion(-)
-```
-
-Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/):[](.html)
-
-```bash
-$ composer install --no-dev
-
-Loading composer repositories with package information
-Updating dependencies
- - Installing shaarli/netscape-bookmark-parser (v1.0.1)
- Downloading: 100%
-```
-
-### Migrating and upgrading from Sebsauvage's repository
-If 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)
-
-The following guide assumes that:
-- 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)
-- the default remote is named `origin` and points to Sebsauvage's repository
-- the current branch is `master`
- - 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
-- the working copy is clean:
- - no versioned file has been locally modified
- - no untracked files are present
-
-#### Step 0: show repository information
-```bash
-$ cd /path/to/shaarli
-
-$ git remote -v
-origin https://github.com/sebsauvage/Shaarli (fetch)
-origin https://github.com/sebsauvage/Shaarli (push)
-
-$ git branch -vv
-* master 029f75f [origin/master] Update README.md[](.html)
-
-$ git status
-On branch master
-Your branch is up-to-date with 'origin/master'.
-nothing to commit, working directory clean
-```
-
-#### Step 1: update Git remotes
-```
-$ git remote rename origin sebsauvage
-$ git remote -v
-sebsauvage https://github.com/sebsauvage/Shaarli (fetch)
-sebsauvage https://github.com/sebsauvage/Shaarli (push)
-
-$ git remote add origin https://github.com/shaarli/Shaarli
-$ git fetch origin
-
-remote: Counting objects: 3015, done.
-remote: Compressing objects: 100% (19/19), done.
-remote: Total 3015 (delta 446), reused 457 (delta 446), pack-reused 2550
-Receiving objects: 100% (3015/3015), 2.59 MiB | 918.00 KiB/s, done.
-Resolving deltas: 100% (1899/1899), completed with 48 local objects.
-From https://github.com/shaarli/Shaarli
- * [new branch] master -> origin/master[](.html)
- * [new branch] stable -> origin/stable[](.html)
-[...][](.html)
- * [new tag] v0.6.4 -> v0.6.4[](.html)
- * [new tag] v0.7.0 -> v0.7.0[](.html)
-```
-
-#### Step 2: use the stable community branch
-
-```bash
-$ git checkout origin/stable -b stable
-Branch stable set up to track remote branch stable from origin.
-Switched to a new branch 'stable'
-
-$ git branch -vv
- master 029f75f [sebsauvage/master] Update README.md[](.html)
-* stable 890afc3 [origin/stable] Merge pull request #509 from ArthurHoaro/v0.6.5[](.html)
-```
-
-Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/):[](.html)
-
-```bash
-$ composer install --no-dev
-
-Loading composer repositories with package information
-Updating dependencies
- - Installing shaarli/netscape-bookmark-parser (v1.0.1)
- Downloading: 100%
-```
-
-Optionally, you can delete information related to the legacy version:
-
-```bash
-$ git branch -D master
-Deleted branch master (was 029f75f).
-
-$ git remote remove sebsauvage
-
-$ git remote -v
-origin https://github.com/shaarli/Shaarli (fetch)
-origin https://github.com/shaarli/Shaarli (push)
-
-$ git gc
-Counting objects: 3317, done.
-Delta compression using up to 8 threads.
-Compressing objects: 100% (1237/1237), done.
-Writing objects: 100% (3317/3317), done.
-Total 3317 (delta 2050), reused 3301 (delta 2034)to
-```
-
-#### Step 3: configuration
-After 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).
-
-## Troubleshooting
-
-If the solutions provided here doesn't work, please open an issue specifying which version you're upgrading from and to.
-
-### You must specify an integer as a key
-
-In `v0.8.1` we changed how link keys are handled (from timestamps to incremental integers).
-Take a look at `data/updates.txt` content.
-
-#### `updates.txt` contains `updateMethodDatastoreIds`
-
-Try to delete it and refresh your page while being logged in.
-
-#### `updates.txt` doesn't exists or doesn't contain `updateMethodDatastoreIds`
-
- 1. Create `data/updates.txt` if it doesn't exist.
- 2. Paste this string in the update file `;updateMethodRenameDashTags;`
- 3. Login to Shaarli.
- 4. Delete the update file.
- 5. Refresh.
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 @@
-
-
-
-
-
-
- Shaarli – Usage
-
-
-
-
-
-
to feed other social networks, blogs... using RSS feeds and external services (dlvr.it, ifttt.com ...)
-
-
Using Shaarli as a blog, notepad, pastebin...
-
-
Go to your Shaarli setup and log in
-
Click the Add Link button
-
To share text only, do not enter any URL in the corresponding input field and click Add Link
-
Pick a title and enter your article, or note, in the description field; add a few tags; optionally check Private then click Save
-
Voilà! Your article is now published (privately if you selected that option) and accessible using its permalink.
-
-
-
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 @@
-#Usage
-### Main features
-Shaarli is intended:
- * to share, comment and save interesting links and news
- * to bookmark useful/frequent personal links (as private links) and share them between computers
- * as a minimal blog/microblog/writing platform (no character limit)
- * as a read-it-later list (for example items tagged `readlater`)
- * to draft and save articles/ideas
- * to keep code snippets
- * to keep notes and documentation
- * as a shared clipboard between machines
- * as a todo list
- * to store playlists (e.g. with the `music` or `video` tags)
- * to keep extracts/comments from webpages that may disappear
- * to keep track of ongoing discussions (for example items tagged `discussion`)
- * [to feed RSS aggregators](http://shaarli.chassegnouf.net/?9Efeiw) (planets) with specific tags[](.html)
- * to feed other social networks, blogs... using RSS feeds and external services (dlvr.it, ifttt.com ...)
-
-### Using Shaarli as a blog, notepad, pastebin...
-
- * Go to your Shaarli setup and log in
- * Click the `Add Link` button
- * To share text only, do not enter any URL in the corresponding input field and click `Add Link`
- * Pick a title and enter your article, or note, in the description field; add a few tags; optionally check `Private` then click `Save`
- * 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 @@
-
-
-
-
-
-
- Shaarli – Versioning and Branches
-
-
-
-
-
-
-
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.
-
master branch
-
The master branch is the development branch. Any new change MUST go through this branch using Pull Requests.
-
Remarks:
-
-
This branch shouldn't be used for production as it isn't necessary stable.
-
3rd party aren't required to be compatible with the latest changes.
-
Official plugins, themes and libraries (contained within Shaarli organization repos) must be compatible with the master branch.
-
The version in this branch is always dev.
-
-
v0.x branch
-
This v0.x branch, points to the latest v0.x.y release.
-
Explanation:
-
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.
-
In this case, the issue is fixed in the master branch, and the fix is backported the to the v0.x branch. Then a new release is made from the v0.x branch.
-
This workflow allow us to fix any major bug detected, without having to release bleeding edge feature too soon.
-
latest branch
-
This branch point the latest release. It recommended to use it to get the latest tested changes.
-
stable branch
-
The stable branch doesn't contain any major bug, and is one major digit version behind the latest release.
-
For example, the current latest release is v0.8.3, the stable branch is an alias to the latest v0.7.x release. When the v0.9.0 version will be released, the stable will move to the latest v0.8.x release.
-
Remarks:
-
-
Shaarli release pace isn't fast, and the stable branch might be a few months behind the latest release.
-
-
Releases
-
Releases are always made from the latest v0.x branch.
-
Note that for every release, we manually generate a tarball which contains all Shaarli dependencies, making Shaarli's installation only one step.
-
Advices on 3rd party git repos workflow
-
Versioning
-
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 changelog (Draft means not released yet) and the commit log (like tpl folder for themes)). You can either:
-
-
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.
-
use your own versioning scheme, and state Shaarli compatibility in the release description.
-
-
Using this, any user will be able to pick the release matching his own Shaarli version.
-
Major bugfix backport releases
-
To be able to support backported fixes, it recommended to use our workflow:
-
# In master, fix the major bug
-git commit -m "Katastrophe"
-git push origin master
-# Get your commit hash
-git log --format="%H" -n 1
-# Create a new branch from your latest release, let's say v0.8.2-1 (the tag name)
-git checkout -b katastrophe v0.8.2-1
-# Backport the fix commit to your brand new branch
-git cherry-pick <fix commit hash>
-git push origin katastrophe
-# Then you just have to make a new release from the `katastrophe` branch tagged `v0.8.3-1`
To export links as an HTML file, under Tools > Export, choose:
+- Export all to export both public and private links
+- Export public to export public links only
+- Export private to export private links only
+
Restore by using the Import feature.
+* This can be done using the shaarchiver tool.
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.)
To correctly import the tags from a SemanticScuttle HTML export, edit the HTML file before importing and replace all occurences of tags= (lowercase) to TAGS= (uppercase).
+
Scuttle
+
Shaarli cannot import data directly from 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.
+
Import Shaarli links to Firefox
+
+
Export your Shaarli links as described above.
+
For compatibility reasons, check Prepend note permalinks with this Shaarli instance's URL (useful to import bookmarks in a web browser)
+
In Firefox, open the bookmark manager (not the sidebar! Bookmarks menu > Show all bookmarks or Ctrl+Shift+B)
+
Select Import and Backup > Import bookmarks in HTML format
+
+
Your 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.
+
You may be interested in these Firefox addons to manage links imported from Shaarli
Add the sharing button (bookmarklet) to your browser
+
+
Open your Shaarli and Login
+
Click the Tools button in the top bar
+
Drag the ✚Shaare link button, and drop it to your browser's bookmarks bar.
+
+
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.
+
+
Share links using the bookmarklet
+
+
When you are visiting a webpage you would like to share with Shaarli, click the bookmarklet you just added.
+
A window opens.
+
You can freely edit title, description, tags... to find it later using the text search or tag filtering.
+
You will be able to edit this link later using the edit button.
+
You can also check the “Private” box so that the link is saved but only visible to you.
+
Click Save.Voilà! Your link is now shared.
+
+
Troubleshooting: The bookmarklet doesn't work with a few website (e.g. Github.com)
+
Websites which enforce Content Security Policy (CSP), such as github.com, disallow usage of bookmarklets. Unfortunatly, there is nothing Shaarli can do about it.
Use the Search text field to search in any of the fields of all links (Title, URL, Description...)
+
Exclude text/tags: Use the - operator before a word or tag (example -uninteresting) to prevent entries containing (or tagged) uninteresting from showing up in the search results.
+
Exact text search: Use double-quotes (example "exact search") to search for the exact expression.
+
Both exclude patterns and exact searches can be combined with normal searches (example "exact search" term otherterm -notthis "very exact" stuff -notagain)
+
Tags search
+
Use the Filter by tags field to restrict displayed links to entries tagged with one or multiple tags (use space to separate tags).
+
Hidden tags: Tags starting with a dot . (example .secret) are private. They can only be seen and searched when logged in.
+
Alternatively you can use the Tag cloud to discover all tags and click on any of them to display related links.
+
To search for links that are not tagged, enter "" in the tag search field.
+
Filtering RSS feeds/Picture wall
+
RSS feeds can also be restricted to only return items matching a text/tag search: see RSS feeds.
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.
+
TODO: contact repos owners to see if they'd like to standardize their work with the community fork.
Self dead link - Detect dead links on shaarli. This version use the database of shaarli. Another version, can be used for other shaarli instances (but is more resource consuming).
+
Bookmark Archiver - Save an archived copy of all websites starred using browser bookmarks/Shaarli/Delicious/Instapaper/Unmark.it/Pocket/Pinboard. Outputs browseable html.
+
+
Mobile Apps
+
+
ShaarliOS iOS share extension - see #308 for some promo codes,
+
Shaarli for Android - Android application that adds Shaarli as a sharing provider
+
Shaarlier for Android - Android application to simply add links directly into your Shaarli
A Makefile is available to perform project-related operations:
+- Documentation - generate a local HTML copy of the GitHub wiki
+- Static analysis - check that the code is compliant to PHP conventions
+- Unit tests - ensure there are no regressions introduced by new commits
+
Automatic builds
+
Travis CI is a Continuous Integration build server, that runs a build:
+- each time a commit is merged to the mainline (master branch)
+- each time a Pull Request is submitted or updated
+
A build is composed of several jobs: one for each supported PHP version (see Server requirements).
+
Each build job:
+- updates Composer
+- installs 3rd-party test dependencies with Composer
+- runs Unit tests
+
After all jobs have finished, Travis returns the results to GitHub:
+- a status icon represents the result for the master branch:
+- Pull Requests are updated with the Travis result
+ - Green: all tests have passed
+ - Red: some tests failed
+ - Orange: tests are pending
#!/bin/bash
+#Description: Copy a Shaarli installation over SSH/SCP, serve it locally with php-cli
+#Will create a local-shaarli/ directory when you run it, backup your Shaarli there, and serve it locally.
+#Will NOT download linked pages. It's just a directly usable backup/copy/mirror of your Shaarli
+#Requires: ssh, scp and a working SSH access to the server where your Shaarli is installed
+#Usage: ./local-shaarli.sh
+#Author: nodiscc (nodiscc@gmail.com)
+#License: MIT (http://opensource.org/licenses/MIT)
+set -o errexit
+set -o nounset
+
+##### CONFIG #################
+#The port used by php's local server
+php_local_port=7431
+
+#Name of the SSH server and path where Shaarli is installed
+#TODO: pass these as command-line arguments
+remotehost="my.ssh.server"
+remote_shaarli_dir="/var/www/shaarli"
+
+
+###### FUNCTIONS #############
+_main() {
+ _CBSyncShaarli
+ _CBServeShaarli
+}
+
+_CBSyncShaarli() {
+ remote_temp_dir=$(ssh $remotehost mktemp -d)
+ remote_ssh_user=$(ssh $remotehost whoami)
+ ssh -t "$remotehost" sudo cp -r "$remote_shaarli_dir" "$remote_temp_dir"
+ ssh -t "$remotehost" sudo chown -R "$remote_ssh_user":"$remote_ssh_user" "$remote_temp_dir"
+ scp -rq "$remotehost":"$remote_temp_dir" local-shaarli
+ ssh "$remotehost" rm -r "$remote_temp_dir"
+}
+
+_CBServeShaarli() {
+ #TODO: allow serving a previously downloaded Shaarli
+ #TODO: ask before overwriting local copy, if it exists
+ cd local-shaarli/
+ php -S localhost:${php_local_port}
+ echo "Please go to http://localhost:${php_local_port}"
+}
+
+
+##### MAIN #################
+
+_main
+
+
+
This outputs:
+
$ ./local-shaarli.sh
+PHP 5.6.0RC4 Development Server started at Mon Sep 1 21:56:19 2014
+Listening on http://localhost:7431
+Document root is /home/user/local-shaarli/shaarli
+Press Ctrl-C to quit.
+
+[Mon Sep 1 21:56:27 2014] ::1:57868 [200]: /
+[Mon Sep 1 21:56:27 2014] ::1:57869 [200]: /index.html
+[Mon Sep 1 21:56:37 2014] ::1:57881 [200]: /...
+
Example bash script (creates multiple shaarli instances and generates an HTML index of them)
+
#!/bin/bash
+set -o errexit
+set -o nounset
+
+#config
+shaarli_base_dir='/var/www/shaarli'
+accounts='bob john whatever username'
+shaarli_repo_url='https://github.com/shaarli/Shaarli'
+ref="master"
+
+#clone multiple shaarli instances
+if [ ! -d "$shaarli_base_dir" ]; then mkdir "$shaarli_base_dir"; fi
+
+for account in $accounts; do
+ if [ -d "$shaarli_base_dir/$account" ];
+ then echo "[info] account $account already exists, skipping";
+ else echo "[info] creating new account $account ..."; git clone --quiet "$shaarli_repo_url" -b "$ref" "$shaarli_base_dir/$account"; fi
+done
+
+#generate html index of shaarlis
+htmlhead='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<!-- Minimal html template thanks to http://www.sitepoint.com/a-minimal-html-document/ -->
+<html lang="en">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title>My Shaarli farm</title>
+ <style>body {font-family: "Open Sans"}</style>
+ </head>
+ <body>
+ <div>
+ <h1>My Shaarli farm</h1>
+ <ul style="list-style-type: none;">'
+
+accountlinks=''
+
+htmlfooter='
+ </ul>
+ </div>
+ </body>
+</html>'
+
+
+
+for account in $accounts; do accountlinks="$accountlinks\n<li><a href=\"$account\">$account</a></li>"; done
+if [ -d "$shaarli_base_dir/index.html" ]; then echo "[removing old index.html]"; rm "$shaarli_base_dir/index.html" ]; fi
+echo "[info] generating new index of shaarlis"
+echo -e "$htmlhead $accountlinks $htmlfooter" > "$shaarli_base_dir/index.html"
+echo '[info] done.'
+echo "[info] list of accounts: $accounts"
+echo "[info] contents of $shaarli_base_dir:"
+tree -a -L 1 "$shaarli_base_dir"
+
+
+
This script just serves as an example. More precise or complex (applying custom configuration, etc) automation is possible using configuration management software like Ansible
$ docker search debian
+
+NAME DESCRIPTION STARS OFFICIAL AUTOMATED
+ubuntu Ubuntu is a Debian-based Linux operating s... 2065 [OK]
+debian Debian is a Linux distribution that's comp... 603 [OK]
+google/debian 47 [OK]
+
+
+
Show available tags for a repository
+
$ curl https://index.docker.io/v1/repositories/debian/tags | python -m json.tool
+
+% Total % Received % Xferd Average Speed Time Time Time Current
+Dload Upload Total Spent Left Speed
+100 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433
+
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 server is properly configured.
+
Several releases are available:
+
+
Latest release (recommended)
+
Download as an archive
+
Get the latest released version from the releases page.
+
Download our shaarli-full archive to include dependencies.
In most cases, download Shaarli from the releases page. Cloning using git or downloading Github branches as zip files requires additional steps (see below).
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… their Firefox addon sends to Diigo every single URL you visit (Don't believe me ? Use Tamper Data and open any page).
+
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.
+
Why use Shaarli and not Delicious/Diigo ?
+
With Shaarli:
+
+
The data is yours: It's hosted on your server.
+
Never fear of having your data locked-in.
+
Never fear to have your data sold to third party.
+
Your private links are not hosted on a third party server.
+
You are not tracked by browser addons (like Diigo does)
+
You can change the look and feel of the pages if you want.
+
You can change the behaviour of the program.
+
It's magnitude faster than most bookmarking services.
+
+
What does Shaarli mean?
+
Shaarli is for shaaring your links.
+
My Shaarli is broken!
+
First of all, ensure that both the web server and Shaarli are correctly configured, and that your installation is supported.
+
If everything looks right but the issue(s) remain(s), please:
+- take a look at the troubleshooting section
+- come chat with us on Gitter, we'll be happy to help ;-)
+- browse active issues and Pull Requests
+ - if you find one that is related to the issue, feel free to comment and provide additional details (host/Shaarli setup)
+ - else, open a new issue, and provide information about the problem:
+ - what happens? - display glitches, invalid data, security flaws...
+ - what is your configuration? - OS, server version, activated extensions, web browser...
+ - is it reproducible?
+
Why not use a real database? Files are slow!
+
Does browsing this page feel slow? Try browsing older pages, too.
+
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?
+
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.
Shaarli is intended:
+ * to share, comment and save interesting links and news
+ * to bookmark useful/frequent personal links (as private links) and share them between computers
+ * as a minimal blog/microblog/writing platform (no character limit)
+ * as a read-it-later list (for example items tagged readlater)
+ * to draft and save articles/ideas
+ * to keep code snippets
+ * to keep notes and documentation
+ * as a shared clipboard between machines
+ * as a todo list
+ * to store playlists (e.g. with the music or video tags)
+ * to keep extracts/comments from webpages that may disappear
+ * to keep track of ongoing discussions (for example items tagged discussion)
+ * to feed RSS aggregators (planets) with specific tags
+ * to feed other social networks, blogs... using RSS feeds and external services (dlvr.it, ifttt.com ...)
+
Using Shaarli as a blog, notepad, pastebin...
+
+
Go to your Shaarli setup and log in
+
Click the Add Link button
+
To share text only, do not enter any URL in the corresponding input field and click Add Link
+
Pick a title and enter your article, or note, in the description field; add a few tags; optionally check Private then click Save
+
Voilà! Your article is now published (privately if you selected that option) and accessible using its permalink.
Click the ✚Add to Firefox social button and accept the activation.
+
+
Sharing links using Firefox share
+
+
Add the sharing service as described above
+
When you are visiting a webpage you would like to share with Shaarli, click the Firefox Share button images/firefoxshare.png
+
You can edit your link before and after saving, just like the bookmarklet above.
+
+
+
+
+
+
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.
Gnu Privacy Guard (GnuPG) is an Open Source implementation of the Pretty Good
+Privacy (OpenPGP) specification. Its main purposes are digital authentication,
+signature and encryption.
+
It is often used by the FLOSS community to verify:
+- Linux package signatures: Debian SecureApt, ArchLinux Master
+Keys
+- SCM releases & maintainer identity
+
Trust
+
To quote Phil Pennock (the author of the SKS key server - http://sks.spodhuis.org/):
+
+
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.
$ gpg --gen-key
+
+gpg (GnuPG) 2.1.6; Copyright (C) 2015 Free Software Foundation, Inc.
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+Note: Use "gpg2 --full-gen-key" for a full featured key generation dialog.
+
+GnuPG needs to construct a user ID to identify your key.
+
+Real name: Marvin the Paranoid Android
+Email address: marvin@h2g2.net
+You selected this USER-ID:
+ "Marvin the Paranoid Android <marvin@h2g2.net>"
+
+Change (N)ame, (E)mail, or (O)kay/(Q)uit? o
+We need to generate a lot of random bytes. It is a good idea to perform
+some other action (type on the keyboard, move the mouse, utilize the
+disks) during the prime generation; this gives the random number
+generator a better chance to gain enough entropy.
+
+
+
gpg - entropy interlude
+
At this point, you will:
+- be prompted for a secure password to protect your key (the input method will depend on your Desktop Environment and configuration)
+- be asked to use your machine's input devices (mouse, keyboard, etc.) to generate random entropy; this step may take some time
At the beginning of Shaarli execution, all enabled plugins are loaded. At this point, the plugin system looks for an init() function to execute and run it if it exists. This function must be named this way, and takes the ConfigManager as parameter.
+
<plugin_name>_init($conf)
+
+
This function can be used to create initial data, load default settings, etc. But also to set plugin errors. If the initialization function returns an array of strings, they will be understand as errors, and displayed in the header to logged in users.
+
Understanding hooks
+
A plugin is a set of functions. Each function will be triggered by the plugin system at certain point in Shaarli execution.
+
These functions need to be named with this pattern:
When a page is displayed, every variable send to the template engine is passed to plugins before that in $data.
+
The data contained by this array can be altered before template rendering.
+
For exemple, in linklist, it is possible to alter every title:
+
// mind the reference if you want $data to be altered
+foreach ($data['links'] as &$value) {
+ // String reverse every title.
+ $value['title'] = strrev($value['title']);
+}
+
+return $data;
+
+
+
Metadata
+
Every plugin needs a <plugin_name>.meta file, which is in fact an .ini file (KEY="VALUE"), to be listed in plugin administration.
+
Each file contain two keys:
+
+
description: plugin description
+
parameters: user parameter names, separated by a ;.
+
parameter.<PARAMETER_NAME>: add a text description the specified parameter.
+
+
+
Note: In PHP, parse_ini_file() seems to want strings to be between by quotes " in the ini file.
+
+
It's not working!
+
Use demo_plugin as a functional example. It covers most of the plugin system features.
Make sure your webserver can read and write the files in your plugin folder.
+
+
Plugin configuration
+
In Shaarli's administration page (Tools link), go to Plugin administration.
+
Here you can enable and disable all plugins available, and configure them.
+
+
Plugin order
+
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.
+
This is important in case plugins are depending on each other. Read plugins README details for more information.
+
Use case: The (non existent) plugin shaares_footer adds a footer to every shaare in Markdown syntax. It needs to be processed before (higher in the list) the Markdown plugin. Otherwise its syntax won't be translated in HTML.
+
File mode
+
Enabled plugin are stored in your config.php parameters file, under the array:
To 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.
The 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.
Feeds are available in ATOM with ?do=atom and RSS with do=RSS.
+
Options:
+- You can use permalinks in the feed URL to get permalink to Shaares instead of direct link to shaared URL.
+ - E.G. https://my.shaarli.domain/?do=atom&permalinks.
+- 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.
+ - https://my.shaarli.domain/?do=atom&permalinks&nb=42
+ - https://my.shaarli.domain/?do=atom&permalinks&nb=all
+
RSS Feeds or Picture Wall for a specific search/tag
+
It 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.
+
For example, if you want to subscribe only to links tagged photography:
+- Go to the desired Shaarli instance.
+- Search for the photography tag in the Filter by tag box. Links tagged photography are displayed.
+- Click on the RSS Feed button.
+- You are presented with an RSS feed showing only these links. Subscribe to it to receive only updates with this tag.
+- The same method also works for a full-text search (Search box) and for the Picture Wall (want to only see pictures about nature?)
+- You can also build the URLs manually:
+ - https://my.shaarli.domain/?do=rss&searchtags=nature
+ - https://my.shaarli.domain/links/?do=picwall&searchterm=poney
This guide assumes that you have:
+- a GPG key matching your GitHub authentication credentials
+ - i.e., the email address identified by the GPG key is the same as the one in your ~/.gitconfig
+- a GitHub fork of Shaarli
+- a local clone of your Shaarli fork, with the following remotes:
+ - origin pointing to your GitHub fork
+ - upstream pointing to the main Shaarli repository
+- maintainer permissions on the main Shaarli repository, to:
+ - push the signed tag
+ - create a new release
+- Composer and Pandoc need to be installed
+
GitHub release draft and CHANGELOG.md
+
See http://keepachangelog.com/en/0.3.0/ for changelog formatting.
+
GitHub release draft
+
GitHub allows drafting the release note for the upcoming release, from the Releases page. This way, the release note can be drafted while contributions are merged to master.
+
CHANGELOG.md
+
This file should contain the same information as the release note draft for the upcoming version.
+
Update it to:
+- add new entries (additions, fixes, etc.)
+- mark the current version as released by setting its date and link
+- add a new section for the future unreleased version
Increment the version code, updated docs, create and push a signed tag
+
Generate documentation
+
$ cd /path/to/shaarli
+
+# create a new branch
+$ git fetch upstream
+$ git checkout upstream/master -b v0.5.0
+
+# rebuild the documentation from the wiki
+$ make htmldoc
+
+# commit the changes
+$ git add doc
+$ git commit -s -m "Generate documentation for v0.5.0"
+
+# push the commit on your GitHub fork
+$ git push origin v0.5.0
+
+
+
Create and merge a Pull Request
+
This one is pretty straightforward ;-)
+
Bump Shaarli version to v0.x branch
+
$ git checkout master
+$ git fetch upstream
+$ git pull upstream master
+
+# IF the branch doesn't exists
+$ git checkout -b v0.5
+# OR if the branch already exists
+$ git checkout v0.5
+$ git rebase upstream/master
+
+# Bump shaarli version from dev to 0.5.0, **without the `v`**
+$ vim shaarli_version.php
+$ git add shaarli_version
+$ git commit -s -m "Bump Shaarli version to v0.5.0"
+$ git push upstream v0.5
+
+
+
Create and push a signed tag
+
# update your local copy
+$ git checkout v0.5
+$ git fetch upstream
+$ git pull upstream v0.5
+
+# create a signed tag
+$ git tag -s -m "Release v0.5.0" v0.5.0
+
+# push it to "upstream"
+$ git push --tags upstream
+
+
+
Verify a signed tag
+
v0.5.0 is the first GPG-signed tag pushed on the Community Shaarli.
+
Let's have a look at its signature!
+
$ cd /path/to/shaarli
+$ git fetch upstream
+
+# get the SHA1 reference of the tag
+$ git show-ref tags/v0.5.0
+f7762cf803f03f5caf4b8078359a63783d0090c1 refs/tags/v0.5.0
+
+# verify the tag signature information
+$ git verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1
+gpg: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F
+gpg: Good signature from "VirtualTam <virtualtam@flibidi.net>" [ultimate]
+
+
+
Publish the GitHub release
+
Update release badges
+
Update README.md so version badges display and point to the newly released Shaarli version(s), in the master branch.
+
Create a GitHub release from a Git tag
+
From the previously drafted release:
+- edit the release notes (if needed)
+- specify the appropriate Git tag
+- publish the release
+- profit!
+
Generate and upload all-in-one release archives
+
Users with a shared hosting may have:
+- no SSH access
+- no possibility to install PHP packages or server extensions
+- no possibility to run scripts
+
To ease Shaarli installations, it is possible to generate and upload additional release archives,
+that will contain Shaarli code plus all required third-party libraries.
+
From the v0.5 branch:
+
$ make release_archive
+
+
+
This will create the following archives:
+- shaarli-vX.Y.Z-full.tar
+- shaarli-vX.Y.Z-full.zip
+
The archives need to be manually uploaded on the previously created GitHub release.
+
Update stable and latest branches
+
$ git checkout latest
+# latest release
+$ git merge v0.5.0
+# fix eventual conflicts
+$ make test
+$ git push upstream latest
+$ git checkout stable
+# latest previous major
+$ git merge v0.4.5
+# fix eventual conflicts
+$ make test
+$ git push upstream stable
+
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
+
+
PHP
+
+
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.
+
+
Server and sessions
+
+
Directories are protected using .htaccess files
+
Forms are protected against XSRF (Cross-site requests forgery):
+
Forms which act on data (save,delete…) contain a token generated by the server.
+
Any posted form which does not contain a valid token is rejected.
+
Any token can only be used once.
+
Tokens are attached to the session and cannot be reused in another session.
+
Sessions automatically expire after 60 minutes.
+
Sessions are protected against hijacking: the session ID cannot be used from a different IP address.
+
+
Shaarli datastore and configuration
+
+
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.
+
Links are stored as an associative array which is serialized, compressed (with deflate), base64-encoded and saved as a comment in a .php file.
+
Even if the server does not support .htaccess files, the data file will still not be readable by URL.
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 @.
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:
+- X-Forwarded-Proto;
+- X-Forwarded-Host;
+- X-Forwarded-For.
Shaarli 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.
+
Warning: If you use Apache 2.2 or lower, you need mod_version to be installed and enabled.
+
Apache module mod_rewritemust be enabled to use the REST API. URL rewriting rules for the Slim microframework are stated in the root .htaccess file.
+
LightHttpd
+
Nginx
+
Foreword
+
Nginx does not natively interpret PHP scripts; to this effect, we will run a FastCGI service, to which Nginx's FastCGI module will proxy all requests to PHP resources.
Once Nginx and PHP-FPM are installed, we need to ensure:
+- Nginx and PHP-FPM are running using the same user and group
+- both these user and group have
+ - read permissions for Shaarli resources
+ - execute permissions for Shaarli directories AND their parent directories
+
On a production server:
+- user:group will likely be http:http, www:www or www-data:www-data
+- files will be located under /var/www, /var/http or /usr/share/nginx
+
On a development server:
+- files may be located in a user's home directory
+- in this case, make sure both Nginx and PHP-FPM are running as the local user/group!
+
For all following configuration examples, this user/group pair will be used:
+- user:group = john:users,
+
which corresponds to the following service configuration:
+
; /etc/php/php-fpm.conf
+user = john
+group = users
+
+[...]
+listen.owner = john
+listen.group = users
+
Some bookmark dumps generated by web browsers can be huge due to the presence of Base64-encoded images and favicons, as well as extra verbosity when nesting links in (sub-)folders.
+
To increase upload size, you will need to modify both nginx and PHP configuration:
The previous setup is sufficient for development purposes, but has several major caveats:
+- every content that does not match the PHP rule will be sent to client browsers:
+ - dotfiles - in our case, .htaccess
+ - temporary files, e.g. Vim or Emacs files: index.php~
+- asset / static resource caching is not optimized
+- if serving several PHP sites, there will be a lot of duplication: location /shaarli/, location /mysite/, etc.
+
To solve this, we will split Nginx configuration in several parts, that will be included when needed:
# /etc/nginx/nginx.conf
+[...]
+
+http {
+ [...]
+
+ root /home/john/web;
+ access_log /var/log/nginx/access.log;
+ error_log /var/log/nginx/error.log;
+
+ server {
+ # virtual host for a first domain
+ listen 80;
+ server_name my.first.domain.org;
+
+ location /shaarli/ {
+ # Slim - rewrite URLs
+ try_files $uri /shaarli/index.php$is_args$args;
+
+ access_log /var/log/nginx/shaarli.access.log;
+ error_log /var/log/nginx/shaarli.error.log;
+ }
+
+ location = /shaarli/favicon.ico {
+ # serve the Shaarli favicon from its custom location
+ alias /var/www/shaarli/images/favicon.ico;
+ }
+
+ include deny.conf;
+ include static_assets.conf;
+ include php.conf;
+ }
+
+ server {
+ # virtual host for a second domain
+ listen 80;
+ server_name second.domain.com;
+
+ location /minigal/ {
+ access_log /var/log/nginx/minigal.access.log;
+ error_log /var/log/nginx/minigal.error.log;
+ }
+
+ include deny.conf;
+ include static_assets.conf;
+ include php.conf;
+ }
+}
+
+
+
Redirect HTTP to HTTPS
+
Assuming 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.
PHP settings are defined in:
+- a main configuration file, usually found under /etc/php5/php.ini; some distributions provide different configuration environments, e.g.
+ - /etc/php5/php.ini - used when running console scripts
+ - /etc/php5/apache2/php.ini - used when a client requests PHP resources from Apache
+ - /etc/php5/php-fpm.conf - used when PHP requests are proxied to PHP-FPM
+- additional configuration files/entries, depending on the installed/enabled extensions:
+ - /etc/php/conf.d/xdebug.ini
create a phpinfo.php script located in a path supported by the web server, e.g.
+
Apache (with user dirs enabled): /home/myself/public_html/phpinfo.php
+
/var/www/test/phpinfo.php
+
+
+
make sure the script is readable by the web server user/group (usually, www, www-data or httpd)
+
access the script from a web browser
+
look at the Loaded Configuration File and Scan this dir for additional .ini files entries
+
+
<?php phpinfo(); ?>
+
+
+
fail2ban
+
fail2ban is an intrusion prevention framework that reads server (Apache, SSH, etc.) and uses iptables profiles to block brute-force attempts:
+- Official website
+- Source code
+
Read Shaarli logs to ban IPs
+
Example configuration:
+- allow 3 login attempts per IP address
+- after 3 failures, permanently ban the corresponding IP adddress
Robots - Restricting search engines and web crawler traffic
+
Creating a robots.txt with the following contents at the root of your Shaarli installation will prevent honest 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.
Do not edit configuration options in index.php! Your changes would be lost.
+
Once your Shaarli instance is installed, the file data/config.json.php is generated:
+ it contains all settings in JSON format, and can be edited to customize values
+ it defines which plugins are enabled
+ its values override those defined in index.php
+ it is wrap in a PHP comment to prevent anyone accessing it, regardless of server configuration
+
File and directory permissions
+
The server process running Shaarli must have:
+- read access to the following resources:
+ - PHP scripts: index.php, application/*.php, plugins/*.php
+ - 3rd party PHP and Javascript libraries: inc/*.php, inc/*.js
+ - static assets:
+ - CSS stylesheets: inc/*.css
+ - images/*
+ - RainTPL templates: tpl/*.html
+- read, write and execution access to the following directories:
+ - cache - thumbnail cache
+ - data - link data store, configuration options
+ - pagecache - Atom/RSS feed cache
+ - tmp - RainTPL page cache
+
On a Linux distribution:
+- the web server user will likely be www or http (for Apache2)
+- it will be a member of a group of the same name: www:www, http:http
+- to give it access to Shaarli, either:
+ - unzip Shaarli in the default web server location (usually /var/www/) and set the web server user as the owner
+ - put users in the same group as the web server, and set the appropriate access rights
+- if you have a domain / subdomain to serve Shaarli, configure the server accordingly
title: Shaarli's instance title.
+header_link: Link to the homepage.
+links_per_page: Number of shaares displayed per page.
+timezone: See the list of supported timezones.
+enabled_plugins: List of enabled plugins.
+
Security
+
session_protection_disabled: Disable session cookie hijacking protection (not recommended).
+It might be useful if your IP adress often changes.
+ban_after: Failed login attempts before being IP banned.
+ban_duration: IP ban duration in seconds.
+open_shaarli: Anyone can add a new link while logged out if enabled.
+trusted_proxies: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy.
+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"]).
+
Resources
+
data_dir: Data directory.
+datastore: Shaarli's links database file path.
+history: Shaarli's operation history file path.
+updates: File path for the ran updates file.
+log: Log file path.
+update_check: Last update check file path.
+raintpl_tpl: Templates directory.
+raintpl_tmp: Template engine cache directory.
+thumbnails_cache: Thumbnails cache directory.
+page_cache: Shaarli's internal cache directory.
+ban_file: Banned IP file path.
+
Updates
+
check_updates: Enable or disable update check to the git repository.
+check_updates_branch: Git branch used to check updates (e.g. stable or master).
+check_updates_interval: Look for new version every N seconds (default: every day).
+
Privacy
+
default_private_links: Check the private checkbox by default for every new link.
+hide_public_links: All links are hidden while logged out.
+hide_timestamps: Timestamps are hidden.
+
Feed
+
rss_permalinks: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL.
+show_atom: Display ATOM feed button.
+
Thumbnail
+
enable_thumbnails: Enable or disable thumbnail display.
+enable_localcache: Enable or disable local cache.
+
Redirector
+
url: Redirector URL, such as anonym.to.
+encode_url: Enable this if the redirector needs encoded URL to work properly.
# map the host's :8000 port to the container's :80 port
+$ docker create -p 8000:80 shaarli/shaarli
+d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
+
+# launch the container in the background
+$ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
+d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
+
+# list active containers
+$ docker ps
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo
+
+
+
Stop and destroy a container
+
$ docker stop backstabbing_galileo # those docker guys are really rude to physicists!
+backstabbing_galileo
+
+# check the container is stopped
+$ docker ps
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+
+# list ALL containers
+$ docker ps -a
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo
+
+# destroy the container
+$ docker rm backstabbing_galileo # let's put an end to these barbarian practices
+backstabbing_galileo
+
+$ docker ps -a
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+
WARNING - This feature is currently being worked on and will be improved in the next releases. Experimental.
+
Installation:
+- find a theme you'd like to install
+- copy or clone the theme folder under tpl/<a_sweet_theme>
+- enable the theme:
+ - Shaarli < v0.9.0: edit data/config.json.php and set the value of raintpl_tpl to the new theme name:
+ "raintpl_tpl": "tpl\/my-template\/"
+ - Shaarli >= v0.9.0: select the theme through the Tools page
With the following configuration:
+- Apache 2 / PHP 5.6
+- user sites are enabled, e.g. /home/user/public_html/somedir is served as http://localhost/~user/somedir
+- http is the name of the Apache user
Depending on its configuration and installed plugins, the browser may remove or alter (spoof) HTTP referers, thus preventing Shaarli from properly redirecting between pages.
HTTP settings are available by browsing about:config, here are the available settings and their values.
+
network.http.sendRefererHeader - determines when to send the Referer HTTP header
+- 0: Never send the referring URL
+ - not recommended, may break some sites
+- 1: Send only on clicked links
+- 2 (default): Send for links and images
+
network.http.referer.XOriginPolicy - Cross-domain origin policy
+- 0 (default): Always send
+- 1: Send if base domains match
+- 2: Send if hosts match
+
network.http.referer.spoofSource - Referer spoofing (~faking)
+- false (default): real referer
+- true: spoof referer (use target URI as referer)
+ - known to break some functionality in Shaarli
+
network.http.referer.trimmingPolicy - trim the URI not to send a full Referer
+- 0 (default): send full URI
+- 1: scheme+host+port+path
+- 2: scheme+host+port
+
Firefox, localhost and redirections
+
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.
+
To solve this, assign a local domain to your host, e.g.
Delete the file data/config.php and display the page again. You will be asked for a new login/password.
+
I'm locked out - Login bruteforce protection
+
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.
+
To remove the current IP bans, delete the file data/ipbans.php
+
List of all login attempts
+
The file data/log.txt shows all logins (successful or failed) and bans/lifted bans.
+Search for failed in this file to look for unauthorized login attempts.
+
Hosting problems
+
Old PHP versions
+
+
On free.fr : free.fr now support php 5.6.x(link)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:
+
+
<IfDefine Free>
+php56 1
+</IfDefine>
+
+
+
+
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
+
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).
+
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:
+
+
//list($status,$headers,$data) = getHTTP($url,4); // Short timeout to keep the application responsive.
+// FIXME: Decode charset according to charset specified in either 1) HTTP response headers or 2) <head> in html
+//if (strpos($status,'200 OK')) $title=html_extract_title($data);
+
+
+
+
On hosts which forbid outgoing HTTP requests (such as free.fr), some thumbnails will not work.
+
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
+
+
Dates are not properly formatted
+
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 :-( )
+
Problems on CentOS servers
+
On CentOS/RedHat derivatives, you may need to install the php-mbstring package.
+
My session expires! I can't stay logged in
+
This can be caused by several things:
+
+
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.
+
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 !)
+
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).
+
Some browser addons may interfer with HTTP headers (ipfuck/ipflood/GreaseMonkey…). Try disabling those.
+
You may be using OperaTurbo or OperaMini, which use their own proxies which may change from time to time.
+
If you have another application on the same webserver where Shaarli is installed, these application may forcefully expire php sessions.
+
+
Sessions do not seem to work correctly on your server
+
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 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).
+
pubsubhubbub support
+
Download publisher.php at the root of your Shaarli installation and set $GLOBALS['config']['PUBSUBHUB_URL'] in your config.php
The framework used is PHPUnit; it can be installed with Composer, which is a dependency management tool.
+
Regarding Composer, you can either use:
+ a system-wide version, e.g. installed through your distro's package manager
+ a local version, downloadable here
+
Sample usage
+
# system-wide version
+$ composer install
+$ composer update
+
+# local version
+$ php composer.phar self-update
+$ php composer.phar install
+$ php composer.phar update
+
+
+
Install Shaarli dev dependencies
+
$ cd /path/to/shaarli
+$ composer update
+
+
+
Install and enable Xdebug to generate PHPUnit coverage reports
+
For Debian-based distros:
+
$ aptitude install php5-xdebug
+
+
+
For ArchLinux:
+
$ pacman -S xdebug
+
+
+
Then add the following line to /etc/php/php.ini:
+
zend_extension=xdebug.so
+
+
+
Run unit tests
+
Successful test suite:
+
$ make test
+
+-------
+PHPUNIT
+-------
+PHPUnit 4.6.9 by Sebastian Bergmann and contributors.
+
+Configuration read from /home/virtualtam/public_html/shaarli/phpunit.xml
+
+....................................
+
+Time: 759 ms, Memory: 8.25Mb
+
+OK (36 tests, 65 assertions)
+
+
+
Test suite with failures and errors:
+
$ make test
+-------
+PHPUNIT
+-------
+PHPUnit 4.6.9 by Sebastian Bergmann and contributors.
+
+Configuration read from /home/virtualtam/public_html/shaarli/phpunit.xml
+
+E..FF...............................
+
+Time: 802 ms, Memory: 8.25Mb
+
+There was 1 error:
+
+1) LinkDBTest::testConstructLoggedIn
+Missing argument 2 for LinkDB::__construct(), called in /home/virtualtam/public_html/shaarli/tests/Link\
+DBTest.php on line 79 and defined
+
+/home/virtualtam/public_html/shaarli/application/LinkDB.php:58
+/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:79
+
+--
+
+There were 2 failures:
+
+1) LinkDBTest::testCheckDBNew
+Failed asserting that two strings are equal.
+--- Expected
++++ Actual
+@@ @@
+-'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'
++'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'
+
+/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:121
+
+2) LinkDBTest::testCheckDBLoad
+Failed asserting that two strings are equal.
+--- Expected
++++ Actual
+@@ @@
+-'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'
++'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'
+
+/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:133
+
+FAILURES!
+Tests: 36, Assertions: 63, Errors: 1, Failures: 2.
+
+
+
Test results and coverage
+
By default, PHPUnit will run all suitable tests found under the tests directory.
+
Each test has 3 possible outcomes:
+. - success
+F - failure: the test was run but its results are invalid
+ * the code does not behave as expected
+ * dependencies to external elements: globals, session, cache...
+* E - error: something went wrong and the tested code has crashed
+ * typos in the code, or in the test code
+ * dependencies to missing external elements
+
If Xdebug has been installed and activated, two coverage reports will be generated:
+ a summary in the console
+ a detailed HTML report with metrics for tested code
+ * to open it in a web browser: firefox coverage/index.html &
+
Executing specific tests
+
Add a @group annotation in a test class or method comment:
If anything goes wrong, it's important for us to know which version you're upgrading from.
+The current version is present in the version.php file.
+
Backup your data
+
Shaarli stores all user data under the data directory:
+- data/config.php - main configuration file
+- data/datastore.php - bookmarked links
+- data/ipbans.php - banned IP addresses
+- data/updates.txt - contains all automatic update to the configuration and datastore files already run
It is recommended to backup this repository before starting updating/upgrading Shaarli:
+- users with SSH access: copy or archive the directory to a temporary location
+- users with FTP access: download a local copy of your Shaarli installation using your favourite client
+
Migrating data from a previous installation
+
As 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:
All tagged revisions can be downloaded as tarballs or ZIP archives from the releases page.
+
We recommend that you use the latest release tarball with the -full suffix. It contains the dependencies, please read Download and installation for git complete instructions.
+
Once downloaded, extract the archive locally and update your remote installation (e.g. via FTP) -be sure you keep the content of the data directory!
+
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 data/config.json.php (see Shaarli configuration for more details).
The following guide assumes that:
+- you have a basic knowledge of Git branching and remote repositories
+- the default remote is named origin and points to Sebsauvage's repository
+- the current branch is master
+ - if you have personal branches containing customizations, you will need to rebase them 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!
+- the working copy is clean:
+ - no versioned file has been locally modified
+ - no untracked files are present
+
Step 0: show repository information
+
$ cd /path/to/shaarli
+
+$ git remote -v
+origin https://github.com/sebsauvage/Shaarli (fetch)
+origin https://github.com/sebsauvage/Shaarli (push)
+
+$ git branch -vv
+* master 029f75f [origin/master] Update README.md
+
+$ git status
+On branch master
+Your branch is up-to-date with 'origin/master'.
+nothing to commit, working directory clean
+
After 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 for more details).
+
Troubleshooting
+
If the solutions provided here doesn't work, please open an issue specifying which version you're upgrading from and to.
+
You must specify an integer as a key
+
In v0.8.1 we changed how link keys are handled (from timestamps to incremental integers).
+Take a look at data/updates.txt content.
+
updates.txt contains updateMethodDatastoreIds
+
Try to delete it and refresh your page while being logged in.
+
updates.txt doesn't exists or doesn't contain updateMethodDatastoreIds
+
+
Create data/updates.txt if it doesn't exist.
+
Paste this string in the update file ;updateMethodRenameDashTags;
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.
+
master branch
+
The master branch is the development branch. Any new change MUST go through this branch using Pull Requests.
+
Remarks:
+
+
This branch shouldn't be used for production as it isn't necessary stable.
+
3rd party aren't required to be compatible with the latest changes.
+
Official plugins, themes and libraries (contained within Shaarli organization repos) must be compatible with the master branch.
+
The version in this branch is always dev.
+
+
v0.x branch
+
This v0.x branch, points to the latest v0.x.y release.
+
Explanation:
+
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.
+
In this case, the issue is fixed in the master branch, and the fix is backported the to the v0.x branch. Then a new release is made from the v0.x branch.
+
This workflow allow us to fix any major bug detected, without having to release bleeding edge feature too soon.
+
latest branch
+
This branch point the latest release. It recommended to use it to get the latest tested changes.
+
stable branch
+
The stable branch doesn't contain any major bug, and is one major digit version behind the latest release.
+
For example, the current latest release is v0.8.3, the stable branch is an alias to the latest v0.7.x release. When the v0.9.0 version will be released, the stable will move to the latest v0.8.x release.
+
Remarks:
+
+
Shaarli release pace isn't fast, and the stable branch might be a few months behind the latest release.
+
+
Releases
+
Releases are always made from the latest v0.x branch.
+
Note that for every release, we manually generate a tarball which contains all Shaarli dependencies, making Shaarli's installation only one step.
+
Advices on 3rd party git repos workflow
+
Versioning
+
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 changelog (Draft means not released yet) and the commit log (like tpl folder for themes)). You can either:
+
+
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.
+
use your own versioning scheme, and state Shaarli compatibility in the release description.
+
+
Using this, any user will be able to pick the release matching his own Shaarli version.
+
Major bugfix backport releases
+
To be able to support backported fixes, it recommended to use our workflow:
+
# In master, fix the major bug
+git commit -m "Katastrophe"
+git push origin master
+# Get your commit hash
+git log --format="%H" -n 1
+# Create a new branch from your latest release, let's say v0.8.2-1 (the tag name)
+git checkout -b katastrophe v0.8.2-1
+# Backport the fix commit to your brand new branch
+git cherry-pick <fix commit hash>
+git push origin katastrophe
+# Then you just have to make a new release from the `katastrophe` branch tagged `v0.8.3-1`
+
If you have any questions or ideas, please join the chat (also reachable via IRC), post them in our general discussion (archive) or read the current issues. If you've found a bug, please create a new issue.
+
If you would like a feature added to Shaarli, check the issues labeled feature, enhancement, and plugin.
+
Note: This documentation is available online at https://github.com/shaarli/Shaarli/wiki, and locally in the doc/ directory of your Shaarli installation.
\n\n\n\n\nfeed.atom.xml\n and \nfeed.rss.xml\n:\n\n\nIn headers tags section:\n\n\n{loop=\"$feed_plugins_header\"}\n {$value}\n{/loop}\n\n\n\n\nAfter each entry:\n\n\n{loop=\"$value.feed_plugins\"}\n {$value}\n{/loop}",
+ "title": "Plugin System"
+ },
+ {
+ "location": "/Plugin-System/#developer-api",
+ "text": "",
+ "title": "Developer API"
+ },
+ {
+ "location": "/Plugin-System/#what-can-i-do-with-plugins",
+ "text": "The plugin system let you: insert content into specific places across templates. alter data before templates rendering. alter data before saving new links.",
+ "title": "What can I do with plugins?"
+ },
+ {
+ "location": "/Plugin-System/#how-can-i-create-a-plugin-for-shaarli",
+ "text": "First, chose a plugin name, such as demo_plugin . Under plugin folder, create a folder named with your plugin name. Then create a .php file in that folder. You should have the following tree view: | index.php\n| plugins/\n|---| demo_plugin/\n| |---| demo_plugin.php",
+ "title": "How can I create a plugin for Shaarli?"
+ },
+ {
+ "location": "/Plugin-System/#plugin-initialization",
+ "text": "At the beginning of Shaarli execution, all enabled plugins are loaded. At this point, the plugin system looks for an init() function to execute and run it if it exists. This function must be named this way, and takes the ConfigManager as parameter. _init($conf) This function can be used to create initial data, load default settings, etc. But also to set plugin errors . If the initialization function returns an array of strings, they will be understand as errors, and displayed in the header to logged in users.",
+ "title": "Plugin initialization"
+ },
+ {
+ "location": "/Plugin-System/#understanding-hooks",
+ "text": "A plugin is a set of functions. Each function will be triggered by the plugin system at certain point in Shaarli execution. These functions need to be named with this pattern: hook__($data, $conf) Parameters: data: see $data section conf: the ConfigManager instance. For exemple, if my plugin want to add data to the header, this function is needed: hook_demo_plugin_render_header If this function is declared, and the plugin enabled, it will be called every time Shaarli is rendering the header.",
+ "title": "Understanding hooks"
+ },
+ {
+ "location": "/Plugin-System/#plugins-data",
+ "text": "",
+ "title": "Plugin's data"
+ },
+ {
+ "location": "/Plugin-System/#parameters",
+ "text": "Every hook function has a $data parameter. Its content differs for each hooks. This parameter needs to be returned every time , otherwise data is lost. return $data;",
+ "title": "Parameters"
+ },
+ {
+ "location": "/Plugin-System/#filling-templates-placeholder",
+ "text": "Template placeholders are displayed in template in specific places. RainTPL displays every element contained in the placeholder's array. These element can be added by plugins. For example, let's add a value in the placeholder top_placeholder which is displayed at the top of my page: $data['top_placeholder'][] = 'My content';\n# OR\narray_push($data['top_placeholder'], 'My', 'content');\n\nreturn $data;",
+ "title": "Filling templates placeholder"
+ },
+ {
+ "location": "/Plugin-System/#data-manipulation",
+ "text": "When a page is displayed, every variable send to the template engine is passed to plugins before that in $data . The data contained by this array can be altered before template rendering. For exemple, in linklist, it is possible to alter every title: // mind the reference if you want $data to be altered\nforeach ($data['links'] as &$value) {\n // String reverse every title.\n $value['title'] = strrev($value['title']);\n}\n\nreturn $data;",
+ "title": "Data manipulation"
+ },
+ {
+ "location": "/Plugin-System/#metadata",
+ "text": "Every plugin needs a .meta file, which is in fact an .ini file ( KEY=\"VALUE\" ), to be listed in plugin administration. Each file contain two keys: description : plugin description parameters : user parameter names, separated by a ; . parameter. : add a text description the specified parameter. Note: In PHP, parse_ini_file() seems to want strings to be between by quotes \" in the ini file.",
+ "title": "Metadata"
+ },
+ {
+ "location": "/Plugin-System/#its-not-working",
+ "text": "Use demo_plugin as a functional example. It covers most of the plugin system features. If it's still not working, please open an issue .",
+ "title": "It's not working!"
+ },
+ {
+ "location": "/Plugin-System/#hooks",
+ "text": "Hooks Description render_header Allow plugin to add content in page headers. render_includes Allow plugin to include their own CSS files. render_footer Allow plugin to add content in page footer and include their own JS files. render_linklist It allows to add content at the begining and end of the page, after every link displayed and to alter link data. render_editlink Allow to add fields in the form, or display elements. render_tools Allow to add content at the end of the page. render_picwall Allow to add content at the top and bottom of the page. render_tagcloud Allow to add content at the top and bottom of the page, and after all tags. render_taglist Allow to add content at the top and bottom of the page, and after all tags. render_daily Allow to add content at the top and bottom of the page, the bottom of each link and to alter data. render_feed Allow to do add tags in RSS and ATOM feeds. save_link Allow to alter the link being saved in the datastore. delete_link Allow to do an action before a link is deleted from the datastore.",
+ "title": "Hooks"
+ },
+ {
+ "location": "/Plugin-System/#render_header",
+ "text": "Triggered on every page. Allow plugin to add content in page headers.",
+ "title": "render_header"
+ },
+ {
+ "location": "/Plugin-System/#data",
+ "text": "$data is an array containing: _PAGE_ : current target page (eg: linklist , picwall , etc.). _LOGGEDIN_ : true if user is logged in, false otherwise.",
+ "title": "Data"
+ },
+ {
+ "location": "/Plugin-System/#template-placeholders",
+ "text": "Items can be displayed in templates by adding an entry in $data[''] array. List of placeholders: buttons_toolbar : after the list of buttons in the header. fields_toolbar : after search fields in the header. Note: This will only be called in linklist.",
+ "title": "Template placeholders"
+ },
+ {
+ "location": "/Plugin-System/#render_includes",
+ "text": "Triggered on every page. Allow plugin to include their own CSS files.",
+ "title": "render_includes"
+ },
+ {
+ "location": "/Plugin-System/#data_1",
+ "text": "$data is an array containing: _PAGE_ : current target page (eg: linklist , picwall , etc.). _LOGGEDIN_ : true if user is logged in, false otherwise.",
+ "title": "Data"
+ },
+ {
+ "location": "/Plugin-System/#template-placeholders_1",
+ "text": "Items can be displayed in templates by adding an entry in $data[''] array. List of placeholders: css_files : called after loading default CSS. Note: only add the path of the CSS file. E.g: plugins/demo_plugin/custom_demo.css .",
+ "title": "Template placeholders"
+ },
+ {
+ "location": "/Plugin-System/#render_footer",
+ "text": "Triggered on every page. Allow plugin to add content in page footer and include their own JS files.",
+ "title": "render_footer"
+ },
+ {
+ "location": "/Plugin-System/#data_2",
+ "text": "$data is an array containing: _PAGE_ : current target page (eg: linklist , picwall , etc.). _LOGGEDIN_ : true if user is logged in, false otherwise.",
+ "title": "Data"
+ },
+ {
+ "location": "/Plugin-System/#template-placeholders_2",
+ "text": "Items can be displayed in templates by adding an entry in $data[''] array. List of placeholders: text : called after the end of the footer text. endofpage : called at the end of the page. js_files : called at the end of the page, to include custom JS scripts. Note: only add the path of the JS file. E.g: plugins/demo_plugin/custom_demo.js .",
+ "title": "Template placeholders"
+ },
+ {
+ "location": "/Plugin-System/#render_linklist",
+ "text": "Triggered when linklist is displayed (list of links, permalink, search, tag filtered, etc.). It allows to add content at the begining and end of the page, after every link displayed and to alter link data.",
+ "title": "render_linklist"
+ },
+ {
+ "location": "/Plugin-System/#data_3",
+ "text": "$data is an array containing: _LOGGEDIN_ : true if user is logged in, false otherwise. All templates data, including links.",
+ "title": "Data"
+ },
+ {
+ "location": "/Plugin-System/#template-placeholders_3",
+ "text": "Items can be displayed in templates by adding an entry in $data[''] array. List of placeholders: action_plugin : next to the button \"private only\" at the top and bottom of the page. link_plugin : for every link, between permalink and link URL. plugin_start_zone : before displaying the template content. plugin_end_zone : after displaying the template content.",
+ "title": "Template placeholders"
+ },
+ {
+ "location": "/Plugin-System/#render_editlink",
+ "text": "Triggered when the link edition form is displayed. Allow to add fields in the form, or display elements.",
+ "title": "render_editlink"
+ },
+ {
+ "location": "/Plugin-System/#data_4",
+ "text": "$data is an array containing: All templates data.",
+ "title": "Data"
+ },
+ {
+ "location": "/Plugin-System/#template-placeholders_4",
+ "text": "Items can be displayed in templates by adding an entry in $data[''] array. List of placeholders: edit_link_plugin : after tags field.",
+ "title": "Template placeholders"
+ },
+ {
+ "location": "/Plugin-System/#render_tools",
+ "text": "Triggered when the \"tools\" page is displayed. Allow to add content at the end of the page.",
+ "title": "render_tools"
+ },
+ {
+ "location": "/Plugin-System/#data_5",
+ "text": "$data is an array containing: All templates data.",
+ "title": "Data"
+ },
+ {
+ "location": "/Plugin-System/#template-placeholders_5",
+ "text": "Items can be displayed in templates by adding an entry in $data[''] array. List of placeholders: tools_plugin : at the end of the page.",
+ "title": "Template placeholders"
+ },
+ {
+ "location": "/Plugin-System/#render_picwall",
+ "text": "Triggered when picwall is displayed. Allow to add content at the top and bottom of the page.",
+ "title": "render_picwall"
+ },
+ {
+ "location": "/Plugin-System/#data_6",
+ "text": "$data is an array containing: _LOGGEDIN_ : true if user is logged in, false otherwise. All templates data.",
+ "title": "Data"
+ },
+ {
+ "location": "/Plugin-System/#template-placeholders_6",
+ "text": "Items can be displayed in templates by adding an entry in $data[''] array. List of placeholders: plugin_start_zone : before displaying the template content. plugin_end_zone : after displaying the template content.",
+ "title": "Template placeholders"
+ },
+ {
+ "location": "/Plugin-System/#render_tagcloud",
+ "text": "Triggered when tagcloud is displayed. Allow to add content at the top and bottom of the page.",
+ "title": "render_tagcloud"
+ },
+ {
+ "location": "/Plugin-System/#data_7",
+ "text": "$data is an array containing: _LOGGEDIN_ : true if user is logged in, false otherwise. All templates data.",
+ "title": "Data"
+ },
+ {
+ "location": "/Plugin-System/#template-placeholders_7",
+ "text": "Items can be displayed in templates by adding an entry in $data[''] array. List of placeholders: plugin_start_zone : before displaying the template content. plugin_end_zone : after displaying the template content. For each tag, the following placeholder can be used: tag_plugin : after each tag",
+ "title": "Template placeholders"
+ },
+ {
+ "location": "/Plugin-System/#render_taglist",
+ "text": "Triggered when taglist is displayed. Allow to add content at the top and bottom of the page.",
+ "title": "render_taglist"
+ },
+ {
+ "location": "/Plugin-System/#data_8",
+ "text": "$data is an array containing: _LOGGEDIN_ : true if user is logged in, false otherwise. All templates data.",
+ "title": "Data"
+ },
+ {
+ "location": "/Plugin-System/#template-placeholders_8",
+ "text": "Items can be displayed in templates by adding an entry in $data[''] array. List of placeholders: plugin_start_zone : before displaying the template content. plugin_end_zone : after displaying the template content. For each tag, the following placeholder can be used: tag_plugin : after each tag",
+ "title": "Template placeholders"
+ },
+ {
+ "location": "/Plugin-System/#render_daily",
+ "text": "Triggered when tagcloud is displayed. Allow to add content at the top and bottom of the page, the bottom of each link and to alter data.",
+ "title": "render_daily"
+ },
+ {
+ "location": "/Plugin-System/#data_9",
+ "text": "$data is an array containing: _LOGGEDIN_ : true if user is logged in, false otherwise. All templates data, including links.",
+ "title": "Data"
+ },
+ {
+ "location": "/Plugin-System/#template-placeholders_9",
+ "text": "Items can be displayed in templates by adding an entry in $data[''] array. List of placeholders: link_plugin : used at bottom of each link. plugin_start_zone : before displaying the template content. plugin_end_zone : after displaying the template content.",
+ "title": "Template placeholders"
+ },
+ {
+ "location": "/Plugin-System/#render_feed",
+ "text": "Triggered when the ATOM or RSS feed is displayed. Allow to add tags in the feed, either in the header or for each items. Items (links) can also be altered before being rendered.",
+ "title": "render_feed"
+ },
+ {
+ "location": "/Plugin-System/#data_10",
+ "text": "$data is an array containing: _LOGGEDIN_ : true if user is logged in, false otherwise. _PAGE_ : containing either rss or atom . All templates data, including links.",
+ "title": "Data"
+ },
+ {
+ "location": "/Plugin-System/#template-placeholders_10",
+ "text": "Tags can be added in feeds by adding an entry in $data[''] array. List of placeholders: feed_plugins_header : used as a header tag in the feed. For each links: feed_plugins : additional tag for every link entry.",
+ "title": "Template placeholders"
+ },
+ {
+ "location": "/Plugin-System/#save_link",
+ "text": "Triggered when a link is save (new link or edit). Allow to alter the link being saved in the datastore.",
+ "title": "save_link"
+ },
+ {
+ "location": "/Plugin-System/#data_11",
+ "text": "$data is an array containing the link being saved: id title url shorturl description private tags created updated",
+ "title": "Data"
+ },
+ {
+ "location": "/Plugin-System/#delete_link",
+ "text": "Triggered when a link is deleted. Allow to execute any action before the link is actually removed from the datastore",
+ "title": "delete_link"
+ },
+ {
+ "location": "/Plugin-System/#data_12",
+ "text": "$data is an array containing the link being saved: id title url shorturl description private tags created updated",
+ "title": "Data"
+ },
+ {
+ "location": "/Plugin-System/#guide-for-template-designer",
+ "text": "",
+ "title": "Guide for template designer"
+ },
+ {
+ "location": "/Plugin-System/#plugin-administration",
+ "text": "Your theme must include a plugin administration page: pluginsadmin.html . Note: repo's template link needs to be added when the PR is merged. Use the default one as an example. Aside from classic RainTPL loops, plugins order is handle by JavaScript. You can just include plugin_admin.js , only if: you're using a table. you call orderUp() and orderUp() onclick on arrows. you add data-line and data-order to your rows. Otherwise, you can use your own JS as long as this field is send by the form:",
+ "title": "Plugin administration"
+ },
+ {
+ "location": "/Plugin-System/#placeholder-system",
+ "text": "In order to make plugins work with every custom themes, you need to add variable placeholder in your templates. It's a RainTPL loop like this: {loop=\"$plugin_variable\"}\n {$value}\n{/loop} You should enable demo_plugin for testing purpose, since it uses every placeholder available.",
+ "title": "Placeholder system"
+ },
+ {
+ "location": "/Plugin-System/#list-of-placeholders",
+ "text": "page.header.html At the end of the menu: {loop=\"$plugins_header.buttons_toolbar\"}\n {$value}\n{/loop} At the end of file, before clearing floating blocks: {if=\"!empty($plugin_errors) && isLoggedIn()\"}\n
\n {loop=\"plugin_errors\"}\n
{$value}
\n {/loop}\n
\n{/if} includes.html At the end of the file: {loop=\"$plugins_includes.css_files\"}\n\n{/loop} page.footer.html At the end of your footer notes: {loop=\"$plugins_footer.text\"}\n {$value}\n{/loop} At the end of file: {loop=\"$plugins_footer.js_files\"}\n \n{/loop} linklist.html After search fields: {loop=\"$plugins_header.fields_toolbar\"}\n {$value}\n{/loop} Before displaying the link list (after paging): {loop=\"$plugin_start_zone\"}\n {$value}\n{/loop} For every links (icons): {loop=\"$value.link_plugin\"}\n {$value}\n{/loop} Before end paging: {loop=\"$plugin_end_zone\"}\n {$value}\n{/loop} linklist.paging.html After the \"private only\" icon: {loop=\"$action_plugin\"}\n {$value}\n{/loop} editlink.html After tags field: {loop=\"$edit_link_plugin\"}\n {$value}\n{/loop} tools.html After the last tool: {loop=\"$tools_plugin\"}\n {$value}\n{/loop} picwall.html Top:
feed.atom.xml and feed.rss.xml : In headers tags section: {loop=\"$feed_plugins_header\"}\n {$value}\n{/loop} After each entry: {loop=\"$value.feed_plugins\"}\n {$value}\n{/loop}",
+ "title": "List of placeholders"
+ },
+ {
+ "location": "/Release-Shaarli/",
+ "text": "See \nGit - Maintaining a project - Tagging your \nreleases\n.\n\n\nPrerequisites\n\n\nThis guide assumes that you have:\n- a GPG key matching your GitHub authentication credentials\n - i.e., the email address identified by the GPG key is the same as the one in your \n~/.gitconfig\n \n- a GitHub fork of Shaarli\n- a local clone of your Shaarli fork, with the following remotes:\n - \norigin\n pointing to your GitHub fork\n - \nupstream\n pointing to the main Shaarli repository\n- maintainer permissions on the main Shaarli repository, to:\n - push the signed tag\n - create a new release\n- \nComposer\n and \nPandoc\n need to be installed\n\n\nGitHub release draft and \nCHANGELOG.md\n\n\nSee http://keepachangelog.com/en/0.3.0/ for changelog formatting.\n\n\nGitHub release draft\n\n\nGitHub allows drafting the release note for the upcoming release, from the \nReleases\n page. This way, the release note can be drafted while contributions are merged to \nmaster\n.\n\n\nCHANGELOG.md\n\n\nThis file should contain the same information as the release note draft for the upcoming version.\n\n\nUpdate it to:\n- add new entries (additions, fixes, etc.)\n- mark the current version as released by setting its date and link\n- add a new section for the future unreleased version\n\n\n$ cd /path/to/shaarli\n\n$ nano CHANGELOG.md\n\n[...]\n## vA.B.C - UNRELEASED\nTBA\n\n## [vX.Y.Z](https://github.com/shaarli/Shaarli/releases/tag/vX.Y.Z) - YYYY-MM-DD\n[...]\n\n\n\n\nIncrement the version code, updated docs, create and push a signed tag\n\n\nGenerate documentation\n\n\n$ cd /path/to/shaarli\n\n# create a new branch\n$ git fetch upstream\n$ git checkout upstream/master -b v0.5.0\n\n# rebuild the documentation from the wiki\n$ make htmldoc\n\n# commit the changes\n$ git add doc\n$ git commit -s -m \"Generate documentation for v0.5.0\"\n\n# push the commit on your GitHub fork\n$ git push origin v0.5.0\n\n\n\n\nCreate and merge a Pull Request\n\n\nThis one is pretty straightforward ;-)\n\n\nBump Shaarli version to v0.x branch\n\n\n$ git checkout master\n$ git fetch upstream\n$ git pull upstream master\n\n# IF the branch doesn't exists\n$ git checkout -b v0.5\n# OR if the branch already exists\n$ git checkout v0.5\n$ git rebase upstream/master\n\n# Bump shaarli version from dev to 0.5.0, **without the `v`**\n$ vim shaarli_version.php\n$ git add shaarli_version\n$ git commit -s -m \"Bump Shaarli version to v0.5.0\"\n$ git push upstream v0.5\n\n\n\n\nCreate and push a signed tag\n\n\n# update your local copy\n$ git checkout v0.5\n$ git fetch upstream\n$ git pull upstream v0.5\n\n# create a signed tag\n$ git tag -s -m \"Release v0.5.0\" v0.5.0\n\n# push it to \"upstream\"\n$ git push --tags upstream\n\n\n\n\nVerify a signed tag\n\n\nv0.5.0\n is the first GPG-signed tag pushed on the Community Shaarli.\n\n\nLet's have a look at its signature!\n\n\n$ cd /path/to/shaarli\n$ git fetch upstream\n\n# get the SHA1 reference of the tag\n$ git show-ref tags/v0.5.0\nf7762cf803f03f5caf4b8078359a63783d0090c1 refs/tags/v0.5.0\n\n# verify the tag signature information\n$ git verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1\ngpg: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F\ngpg: Good signature from \"VirtualTam \" [ultimate]\n\n\n\n\nPublish the GitHub release\n\n\nUpdate release badges\n\n\nUpdate \nREADME.md\n so version badges display and point to the newly released Shaarli version(s), in the \nmaster\n branch.\n\n\nCreate a GitHub release from a Git tag\n\n\nFrom the previously drafted release:\n- edit the release notes (if needed)\n- specify the appropriate Git tag\n- publish the release\n- profit!\n\n\nGenerate and upload all-in-one release archives\n\n\nUsers with a shared hosting may have:\n- no SSH access\n- no possibility to install PHP packages or server extensions\n- no possibility to run scripts\n\n\nTo ease Shaarli installations, it is possible to generate and upload additional release archives,\nthat will contain Shaarli code plus all required third-party libraries.\n\n\nFrom the \nv0.5\n branch:\n\n\n$ make release_archive\n\n\n\n\nThis will create the following archives:\n- \nshaarli-vX.Y.Z-full.tar\n\n- \nshaarli-vX.Y.Z-full.zip\n\n\nThe archives need to be manually uploaded on the previously created GitHub release.\n\n\nUpdate \nstable\n and \nlatest\n branches\n\n\n$ git checkout latest\n# latest release\n$ git merge v0.5.0\n# fix eventual conflicts\n$ make test\n$ git push upstream latest\n$ git checkout stable\n# latest previous major\n$ git merge v0.4.5 \n# fix eventual conflicts\n$ make test\n$ git push upstream stable",
+ "title": "Release Shaarli"
+ },
+ {
+ "location": "/Release-Shaarli/#prerequisites",
+ "text": "This guide assumes that you have:\n- a GPG key matching your GitHub authentication credentials\n - i.e., the email address identified by the GPG key is the same as the one in your ~/.gitconfig \n- a GitHub fork of Shaarli\n- a local clone of your Shaarli fork, with the following remotes:\n - origin pointing to your GitHub fork\n - upstream pointing to the main Shaarli repository\n- maintainer permissions on the main Shaarli repository, to:\n - push the signed tag\n - create a new release\n- Composer and Pandoc need to be installed",
+ "title": "Prerequisites"
+ },
+ {
+ "location": "/Release-Shaarli/#github-release-draft-and-changelogmd",
+ "text": "See http://keepachangelog.com/en/0.3.0/ for changelog formatting.",
+ "title": "GitHub release draft and CHANGELOG.md"
+ },
+ {
+ "location": "/Release-Shaarli/#github-release-draft",
+ "text": "GitHub allows drafting the release note for the upcoming release, from the Releases page. This way, the release note can be drafted while contributions are merged to master .",
+ "title": "GitHub release draft"
+ },
+ {
+ "location": "/Release-Shaarli/#changelogmd",
+ "text": "This file should contain the same information as the release note draft for the upcoming version. Update it to:\n- add new entries (additions, fixes, etc.)\n- mark the current version as released by setting its date and link\n- add a new section for the future unreleased version $ cd /path/to/shaarli\n\n$ nano CHANGELOG.md\n\n[...]\n## vA.B.C - UNRELEASED\nTBA\n\n## [vX.Y.Z](https://github.com/shaarli/Shaarli/releases/tag/vX.Y.Z) - YYYY-MM-DD\n[...]",
+ "title": "CHANGELOG.md"
+ },
+ {
+ "location": "/Release-Shaarli/#increment-the-version-code-updated-docs-create-and-push-a-signed-tag",
+ "text": "",
+ "title": "Increment the version code, updated docs, create and push a signed tag"
+ },
+ {
+ "location": "/Release-Shaarli/#generate-documentation",
+ "text": "$ cd /path/to/shaarli\n\n# create a new branch\n$ git fetch upstream\n$ git checkout upstream/master -b v0.5.0\n\n# rebuild the documentation from the wiki\n$ make htmldoc\n\n# commit the changes\n$ git add doc\n$ git commit -s -m \"Generate documentation for v0.5.0\"\n\n# push the commit on your GitHub fork\n$ git push origin v0.5.0",
+ "title": "Generate documentation"
+ },
+ {
+ "location": "/Release-Shaarli/#create-and-merge-a-pull-request",
+ "text": "This one is pretty straightforward ;-)",
+ "title": "Create and merge a Pull Request"
+ },
+ {
+ "location": "/Release-Shaarli/#bump-shaarli-version-to-v0x-branch",
+ "text": "$ git checkout master\n$ git fetch upstream\n$ git pull upstream master\n\n# IF the branch doesn't exists\n$ git checkout -b v0.5\n# OR if the branch already exists\n$ git checkout v0.5\n$ git rebase upstream/master\n\n# Bump shaarli version from dev to 0.5.0, **without the `v`**\n$ vim shaarli_version.php\n$ git add shaarli_version\n$ git commit -s -m \"Bump Shaarli version to v0.5.0\"\n$ git push upstream v0.5",
+ "title": "Bump Shaarli version to v0.x branch"
+ },
+ {
+ "location": "/Release-Shaarli/#create-and-push-a-signed-tag",
+ "text": "# update your local copy\n$ git checkout v0.5\n$ git fetch upstream\n$ git pull upstream v0.5\n\n# create a signed tag\n$ git tag -s -m \"Release v0.5.0\" v0.5.0\n\n# push it to \"upstream\"\n$ git push --tags upstream",
+ "title": "Create and push a signed tag"
+ },
+ {
+ "location": "/Release-Shaarli/#verify-a-signed-tag",
+ "text": "v0.5.0 is the first GPG-signed tag pushed on the Community Shaarli. Let's have a look at its signature! $ cd /path/to/shaarli\n$ git fetch upstream\n\n# get the SHA1 reference of the tag\n$ git show-ref tags/v0.5.0\nf7762cf803f03f5caf4b8078359a63783d0090c1 refs/tags/v0.5.0\n\n# verify the tag signature information\n$ git verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1\ngpg: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F\ngpg: Good signature from \"VirtualTam \" [ultimate]",
+ "title": "Verify a signed tag"
+ },
+ {
+ "location": "/Release-Shaarli/#publish-the-github-release",
+ "text": "",
+ "title": "Publish the GitHub release"
+ },
+ {
+ "location": "/Release-Shaarli/#update-release-badges",
+ "text": "Update README.md so version badges display and point to the newly released Shaarli version(s), in the master branch.",
+ "title": "Update release badges"
+ },
+ {
+ "location": "/Release-Shaarli/#create-a-github-release-from-a-git-tag",
+ "text": "From the previously drafted release:\n- edit the release notes (if needed)\n- specify the appropriate Git tag\n- publish the release\n- profit!",
+ "title": "Create a GitHub release from a Git tag"
+ },
+ {
+ "location": "/Release-Shaarli/#generate-and-upload-all-in-one-release-archives",
+ "text": "Users with a shared hosting may have:\n- no SSH access\n- no possibility to install PHP packages or server extensions\n- no possibility to run scripts To ease Shaarli installations, it is possible to generate and upload additional release archives,\nthat will contain Shaarli code plus all required third-party libraries. From the v0.5 branch: $ make release_archive This will create the following archives:\n- shaarli-vX.Y.Z-full.tar \n- shaarli-vX.Y.Z-full.zip The archives need to be manually uploaded on the previously created GitHub release.",
+ "title": "Generate and upload all-in-one release archives"
+ },
+ {
+ "location": "/Release-Shaarli/#update-stable-and-latest-branches",
+ "text": "$ git checkout latest\n# latest release\n$ git merge v0.5.0\n# fix eventual conflicts\n$ make test\n$ git push upstream latest\n$ git checkout stable\n# latest previous major\n$ git merge v0.4.5 \n# fix eventual conflicts\n$ make test\n$ git push upstream stable",
+ "title": "Update stable and latest branches"
+ },
+ {
+ "location": "/Versioning-and-Branches/",
+ "text": "WORK IN PROGRESS\n\n\nIt'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.\n\n\nmaster\n branch\n\n\nThe \nmaster\n branch is the development branch. Any new change MUST go through this branch using Pull Requests.\n\n\nRemarks:\n\n\n\n\nThis branch shouldn't be used for production as it isn't necessary stable.\n\n\n3rd party aren't required to be compatible with the latest changes.\n\n\nOfficial plugins, themes and libraries (contained within Shaarli organization repos) must be compatible with the master branch.\n\n\nThe version in this branch is always \ndev\n.\n\n\n\n\nv0.x\n branch\n\n\nThis \nv0.x\n branch, points to the latest \nv0.x.y\n release.\n\n\nExplanation:\n\n\nWhen 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.\n\n\nIn this case, the issue is fixed in the \nmaster\n branch, and the fix is backported the to the \nv0.x\n branch. Then a new release is made from the \nv0.x\n branch.\n\n\nThis workflow allow us to fix any major bug detected, without having to release bleeding edge feature too soon.\n\n\nlatest\n branch\n\n\nThis branch point the latest release. It recommended to use it to get the latest tested changes.\n\n\nstable\n branch\n\n\nThe \nstable\n branch doesn't contain any major bug, and is one major digit version behind the latest release.\n\n\nFor example, the current latest release is \nv0.8.3\n, the stable branch is an alias to the latest \nv0.7.x\n release. When the \nv0.9.0\n version will be released, the stable will move to the latest \nv0.8.x\n release.\n\n\nRemarks:\n\n\n\n\nShaarli release pace isn't fast, and the stable branch might be a few months behind the latest release.\n\n\n\n\nReleases\n\n\nReleases are always made from the latest \nv0.x\n branch.\n\n\nNote that for every release, we manually generate a tarball which contains all Shaarli dependencies, making Shaarli's installation only one step.\n\n\nAdvices on 3rd party git repos workflow\n\n\nVersioning\n\n\nAny 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 \nchangelog\n (\nDraft\n means not released yet) and the commit log (like \ntpl\n folder\n for themes)). You can either:\n\n\n\n\nuse the Shaarli version number, with your repo version. For example, if Shaarli \nv0.8.3\n is released, publish a \nv0.8.3-1\n release, where \nv0.8.3\n states Shaarli compatibility and \n-1\n is your own version digit for the current Shaarli version.\n\n\nuse your own versioning scheme, and state Shaarli compatibility in the release description.\n\n\n\n\nUsing this, any user will be able to pick the release matching his own Shaarli version.\n\n\nMajor bugfix backport releases\n\n\nTo be able to support backported fixes, it recommended to use our workflow:\n\n\n# In master, fix the major bug\ngit commit -m \"Katastrophe\"\ngit push origin master\n# Get your commit hash\ngit log --format=\"%H\" -n 1\n# Create a new branch from your latest release, let's say v0.8.2-1 (the tag name)\ngit checkout -b katastrophe v0.8.2-1\n# Backport the fix commit to your brand new branch\ngit cherry-pick \ngit push origin katastrophe\n# Then you just have to make a new release from the `katastrophe` branch tagged `v0.8.3-1`",
+ "title": "Versioning and Branches"
+ },
+ {
+ "location": "/Versioning-and-Branches/#master-branch",
+ "text": "The master branch is the development branch. Any new change MUST go through this branch using Pull Requests. Remarks: This branch shouldn't be used for production as it isn't necessary stable. 3rd party aren't required to be compatible with the latest changes. Official plugins, themes and libraries (contained within Shaarli organization repos) must be compatible with the master branch. The version in this branch is always dev .",
+ "title": "master branch"
+ },
+ {
+ "location": "/Versioning-and-Branches/#v0x-branch",
+ "text": "This v0.x branch, points to the latest v0.x.y release. Explanation: 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. In this case, the issue is fixed in the master branch, and the fix is backported the to the v0.x branch. Then a new release is made from the v0.x branch. This workflow allow us to fix any major bug detected, without having to release bleeding edge feature too soon.",
+ "title": "v0.x branch"
+ },
+ {
+ "location": "/Versioning-and-Branches/#latest-branch",
+ "text": "This branch point the latest release. It recommended to use it to get the latest tested changes.",
+ "title": "latest branch"
+ },
+ {
+ "location": "/Versioning-and-Branches/#stable-branch",
+ "text": "The stable branch doesn't contain any major bug, and is one major digit version behind the latest release. For example, the current latest release is v0.8.3 , the stable branch is an alias to the latest v0.7.x release. When the v0.9.0 version will be released, the stable will move to the latest v0.8.x release. Remarks: Shaarli release pace isn't fast, and the stable branch might be a few months behind the latest release.",
+ "title": "stable branch"
+ },
+ {
+ "location": "/Versioning-and-Branches/#releases",
+ "text": "Releases are always made from the latest v0.x branch. Note that for every release, we manually generate a tarball which contains all Shaarli dependencies, making Shaarli's installation only one step.",
+ "title": "Releases"
+ },
+ {
+ "location": "/Versioning-and-Branches/#advices-on-3rd-party-git-repos-workflow",
+ "text": "",
+ "title": "Advices on 3rd party git repos workflow"
+ },
+ {
+ "location": "/Versioning-and-Branches/#versioning",
+ "text": "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 changelog ( Draft means not released yet) and the commit log (like tpl folder for themes)). You can either: 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. use your own versioning scheme, and state Shaarli compatibility in the release description. Using this, any user will be able to pick the release matching his own Shaarli version.",
+ "title": "Versioning"
+ },
+ {
+ "location": "/Versioning-and-Branches/#major-bugfix-backport-releases",
+ "text": "To be able to support backported fixes, it recommended to use our workflow: # In master, fix the major bug\ngit commit -m \"Katastrophe\"\ngit push origin master\n# Get your commit hash\ngit log --format=\"%H\" -n 1\n# Create a new branch from your latest release, let's say v0.8.2-1 (the tag name)\ngit checkout -b katastrophe v0.8.2-1\n# Backport the fix commit to your brand new branch\ngit cherry-pick \ngit push origin katastrophe\n# Then you just have to make a new release from the `katastrophe` branch tagged `v0.8.3-1`",
+ "title": "Major bugfix backport releases"
+ },
+ {
+ "location": "/Security/",
+ "text": "Client browser\n\n\n\n\nShaarli relies on \nHTTP_REFERER\n for some functions (like redirects and clicking on tags). If you have disabled or masqueraded \nHTTP_REFERER\n in your browser, some features of Shaarli may not work\n\n\n\n\nPHP\n\n\n\n\nmagic_quotes\n 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 \nmagic_quotes\n on, so you should not be bothered even on crappy hosts.\n\n\n\n\nServer and sessions\n\n\n\n\nDirectories are protected using \n.htaccess\n files\n\n\nForms are protected against XSRF (Cross-site requests forgery):\n\n\nForms which act on data (save,delete\u2026) contain a token generated by the server.\n\n\nAny posted form which does not contain a valid token is rejected.\n\n\nAny token can only be used once.\n\n\nTokens are attached to the session and cannot be reused in another session.\n\n\nSessions automatically expire after 60 minutes.\n\n\nSessions are protected against hijacking: the session ID cannot be used from a different IP address.\n\n\n\n\nShaarli datastore and configuration\n\n\n\n\nThe 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.\n\n\nLinks are stored as an associative array which is serialized, compressed (with deflate), base64-encoded and saved as a comment in a \n.php\n file.\n\n\nEven if the server does not support \n.htaccess\n files, the data file will still not be readable by URL.\n\n\nThe database looks like this:\n\n\n\n\n\n\n\n\n\n\n\nSmall hashes are used to make a link to an entry in Shaarli. They are unique. In fact, the date of the items (eg. \n20110923_150523\n) is hashed with CRC32, then converted to base64 and some characters are replaced. They are always 6 characters longs and use only \nA-Z a-z 0-9 - _\n and \n@\n.",
+ "title": "Security"
+ },
+ {
+ "location": "/Security/#client-browser",
+ "text": "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",
+ "title": "Client browser"
+ },
+ {
+ "location": "/Security/#php",
+ "text": "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.",
+ "title": "PHP"
+ },
+ {
+ "location": "/Security/#server-and-sessions",
+ "text": "Directories are protected using .htaccess files Forms are protected against XSRF (Cross-site requests forgery): Forms which act on data (save,delete\u2026) contain a token generated by the server. Any posted form which does not contain a valid token is rejected. Any token can only be used once. Tokens are attached to the session and cannot be reused in another session. Sessions automatically expire after 60 minutes. Sessions are protected against hijacking: the session ID cannot be used from a different IP address.",
+ "title": "Server and sessions"
+ },
+ {
+ "location": "/Security/#shaarli-datastore-and-configuration",
+ "text": "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. Links are stored as an associative array which is serialized, compressed (with deflate), base64-encoded and saved as a comment in a .php file. Even if the server does not support .htaccess files, the data file will still not be readable by URL. The database looks like this: 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 @ .",
+ "title": "Shaarli datastore and configuration"
+ },
+ {
+ "location": "/Static-analysis/",
+ "text": "WIP\n\n\nThis topic is currently being discussed here:\n- \nFix coding style (static analysis)\n (#95)\n- \nContinuous Integration tools & features\n (#130)\n\n\nUsage\n\n\nStatic analysis tools can be installed with Composer, and used through Shaarli's \nMakefile\n.\n\n\nFor an overview of the available features, see:\n- \nCode quality: Makefile to run static code checkers\n (#124)\n- \nRun PHPCS against different coding standards\n (#276)",
+ "title": "Static analysis"
+ },
+ {
+ "location": "/Static-analysis/#wip",
+ "text": "This topic is currently being discussed here:\n- Fix coding style (static analysis) (#95)\n- Continuous Integration tools & features (#130)",
+ "title": "WIP"
+ },
+ {
+ "location": "/Static-analysis/#usage",
+ "text": "Static analysis tools can be installed with Composer, and used through Shaarli's Makefile . For an overview of the available features, see:\n- Code quality: Makefile to run static code checkers (#124)\n- Run PHPCS against different coding standards (#276)",
+ "title": "Usage"
+ },
+ {
+ "location": "/Theming/",
+ "text": "Foreword\n\n\nThere are two ways of customizing how Shaarli looks:\n\n\n\n\nby using a custom CSS to override Shaarli's CSS\n\n\nby using a full theme that provides its own RainTPL templates, CSS and Javascript resources\n\n\n\n\nCustom CSS\n\n\nShaarli's appearance can be modified by adding CSS rules to:\n- Shaarli < \nv0.9.0\n: \ninc/user.css\n\n- Shaarli >= \nv0.9.0\n: \ndata/user.css\n\n\nThis file allows overriding rules defined in the template CSS files (only add changed rules), or define a whole new theme.\n\n\nNote\n: Do not edit \ntpl/default/css/shaarli.css\n! Your changes would be overridden when updating Shaarli.\n\n\nSee also \nDownload CSS styles from an OPML list\n\n\nThemes\n\n\nWARNING - This feature is currently being worked on and will be improved in the next releases. Experimental.\n\n\nInstallation:\n- find a theme you'd like to install\n- copy or clone the theme folder under \ntpl/\n\n- enable the theme:\n - Shaarli < \nv0.9.0\n: edit \ndata/config.json.php\n and set the value of \nraintpl_tpl\n to the new theme name:\n \n\"raintpl_tpl\": \"tpl\\/my-template\\/\"\n\n - Shaarli >= \nv0.9.0\n: select the theme through the \nTools\n page\n\n\nCommunity CSS & themes\n\n\nCustom CSS\n\n\n\n\nmrjovanovic/serious-theme-shaarli\n - A serious theme for Shaarli\n\n\nshaarli/shaarli-themes\n\n\n\n\nThemes\n\n\n\n\nAkibaTech/Shaarli Superhero Theme\n - A template/theme for Shaarli\n\n\nalexisju/albinomouse-template\n - A full template for Shaarli\n\n\nArthurHoaro/shaarli-launch\n - Customizable Shaarli theme\n\n\ndhoko/ShaarliTemplate\n - A template/theme for Shaarli\n\n\nkalvn/shaarli-blocks\n - A template/theme for Shaarli\n\n\nkalvn/Shaarli-Material\n - A theme (template) based on Google's Material Design for Shaarli, the superfast delicious clone\n\n\nManufacturaInd/shaarli-2004licious-theme\n - A template/theme as a humble homage to the early looks of the del.icio.us site\n\n\n\n\nShaarli forks\n\n\n\n\nmisterair/Limonade\n - A fork of (legacy) Shaarli with a new template\n\n\nvivienhaese/shaarlitheme\n - A Shaarli fork meant to be run in an openshift instance\n\n\n\n\nExample installation: AlbinoMouse theme\n\n\nWith the following configuration:\n- Apache 2 / PHP 5.6\n- user sites are enabled, e.g. \n/home/user/public_html/somedir\n is served as \nhttp://localhost/~user/somedir\n\n- \nhttp\n is the name of the Apache user\n\n\n$ cd ~/public_html\n\n# clone repositories\n$ git clone https://github.com/shaarli/Shaarli.git shaarli\n$ pushd shaarli/tpl\n$ git clone https://github.com/alexisju/albinomouse-template.git\n$ popd\n\n# set access rights for Apache\n$ chgrp -R http shaarli\n$ chmod g+rwx shaarli shaarli/cache shaarli/data shaarli/pagecache shaarli/tmp\n\n\n\n\nGet config written:\n- go to the freshly installed site\n- fill the install form\n- log in to Shaarli\n\n\nEdit Shaarli's \nconfiguration|Shaarli configuration\n:\n\n\n# the file should be owned by Apache, thus not writeable => sudo\n$ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php",
+ "title": "Theming"
+ },
+ {
+ "location": "/Theming/#foreword",
+ "text": "There are two ways of customizing how Shaarli looks: by using a custom CSS to override Shaarli's CSS by using a full theme that provides its own RainTPL templates, CSS and Javascript resources",
+ "title": "Foreword"
+ },
+ {
+ "location": "/Theming/#custom-css",
+ "text": "Shaarli's appearance can be modified by adding CSS rules to:\n- Shaarli < v0.9.0 : inc/user.css \n- Shaarli >= v0.9.0 : data/user.css This file allows overriding rules defined in the template CSS files (only add changed rules), or define a whole new theme. Note : Do not edit tpl/default/css/shaarli.css ! Your changes would be overridden when updating Shaarli. See also Download CSS styles from an OPML list",
+ "title": "Custom CSS"
+ },
+ {
+ "location": "/Theming/#themes",
+ "text": "WARNING - This feature is currently being worked on and will be improved in the next releases. Experimental. Installation:\n- find a theme you'd like to install\n- copy or clone the theme folder under tpl/ \n- enable the theme:\n - Shaarli < v0.9.0 : edit data/config.json.php and set the value of raintpl_tpl to the new theme name:\n \"raintpl_tpl\": \"tpl\\/my-template\\/\" \n - Shaarli >= v0.9.0 : select the theme through the Tools page",
+ "title": "Themes"
+ },
+ {
+ "location": "/Theming/#community-css-themes",
+ "text": "",
+ "title": "Community CSS & themes"
+ },
+ {
+ "location": "/Theming/#custom-css_1",
+ "text": "mrjovanovic/serious-theme-shaarli - A serious theme for Shaarli shaarli/shaarli-themes",
+ "title": "Custom CSS"
+ },
+ {
+ "location": "/Theming/#themes_1",
+ "text": "AkibaTech/Shaarli Superhero Theme - A template/theme for Shaarli alexisju/albinomouse-template - A full template for Shaarli ArthurHoaro/shaarli-launch - Customizable Shaarli theme dhoko/ShaarliTemplate - A template/theme for Shaarli kalvn/shaarli-blocks - A template/theme for Shaarli kalvn/Shaarli-Material - A theme (template) based on Google's Material Design for Shaarli, the superfast delicious clone ManufacturaInd/shaarli-2004licious-theme - A template/theme as a humble homage to the early looks of the del.icio.us site",
+ "title": "Themes"
+ },
+ {
+ "location": "/Theming/#shaarli-forks",
+ "text": "misterair/Limonade - A fork of (legacy) Shaarli with a new template vivienhaese/shaarlitheme - A Shaarli fork meant to be run in an openshift instance",
+ "title": "Shaarli forks"
+ },
+ {
+ "location": "/Theming/#example-installation-albinomouse-theme",
+ "text": "With the following configuration:\n- Apache 2 / PHP 5.6\n- user sites are enabled, e.g. /home/user/public_html/somedir is served as http://localhost/~user/somedir \n- http is the name of the Apache user $ cd ~/public_html\n\n# clone repositories\n$ git clone https://github.com/shaarli/Shaarli.git shaarli\n$ pushd shaarli/tpl\n$ git clone https://github.com/alexisju/albinomouse-template.git\n$ popd\n\n# set access rights for Apache\n$ chgrp -R http shaarli\n$ chmod g+rwx shaarli shaarli/cache shaarli/data shaarli/pagecache shaarli/tmp Get config written:\n- go to the freshly installed site\n- fill the install form\n- log in to Shaarli Edit Shaarli's configuration|Shaarli configuration : # the file should be owned by Apache, thus not writeable => sudo\n$ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php",
+ "title": "Example installation: AlbinoMouse theme"
+ },
+ {
+ "location": "/Unit-tests/",
+ "text": "Setup your environment for tests\n\n\nThe framework used is \nPHPUnit\n; it can be installed with \nComposer\n, which is a dependency management tool.\n\n\nRegarding Composer, you can either use:\n\n a system-wide version, e.g. installed through your distro's package manager\n\n a local version, downloadable \nhere\n\n\nSample usage\n\n\n# system-wide version\n$ composer install\n$ composer update\n\n# local version\n$ php composer.phar self-update\n$ php composer.phar install\n$ php composer.phar update\n\n\n\n\nInstall Shaarli dev dependencies\n\n\n$ cd /path/to/shaarli\n$ composer update\n\n\n\n\nInstall and enable Xdebug to generate PHPUnit coverage reports\n\n\nFor Debian-based distros:\n\n\n$ aptitude install php5-xdebug\n\n\n\n\nFor ArchLinux:\n\n\n$ pacman -S xdebug\n\n\n\n\nThen add the following line to \n/etc/php/php.ini\n:\n\n\nzend_extension=xdebug.so\n\n\n\n\nRun unit tests\n\n\nSuccessful test suite:\n\n\n$ make test\n\n-------\nPHPUNIT\n-------\nPHPUnit 4.6.9 by Sebastian Bergmann and contributors.\n\nConfiguration read from /home/virtualtam/public_html/shaarli/phpunit.xml\n\n....................................\n\nTime: 759 ms, Memory: 8.25Mb\n\nOK (36 tests, 65 assertions)\n\n\n\n\nTest suite with failures and errors:\n\n\n$ make test\n-------\nPHPUNIT\n-------\nPHPUnit 4.6.9 by Sebastian Bergmann and contributors.\n\nConfiguration read from /home/virtualtam/public_html/shaarli/phpunit.xml\n\nE..FF...............................\n\nTime: 802 ms, Memory: 8.25Mb\n\nThere was 1 error:\n\n1) LinkDBTest::testConstructLoggedIn\nMissing argument 2 for LinkDB::__construct(), called in /home/virtualtam/public_html/shaarli/tests/Link\\\nDBTest.php on line 79 and defined\n\n/home/virtualtam/public_html/shaarli/application/LinkDB.php:58\n/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:79\n\n--\n\nThere were 2 failures:\n\n1) LinkDBTest::testCheckDBNew\nFailed asserting that two strings are equal.\n--- Expected\n+++ Actual\n@@ @@\n-'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'\n+'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'\n\n/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:121\n\n2) LinkDBTest::testCheckDBLoad\nFailed asserting that two strings are equal.\n--- Expected\n+++ Actual\n@@ @@\n-'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'\n+'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'\n\n/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:133\n\nFAILURES!\nTests: 36, Assertions: 63, Errors: 1, Failures: 2.\n\n\n\n\nTest results and coverage\n\n\nBy default, PHPUnit will run all suitable tests found under the \ntests\n directory.\n\n\nEach test has 3 possible outcomes:\n\n \n.\n - success\n\n \nF\n - failure: the test was run but its results are invalid\n * the code does not behave as expected\n * dependencies to external elements: globals, session, cache...\n* \nE\n - error: something went wrong and the tested code has crashed\n * typos in the code, or in the test code\n * dependencies to missing external elements\n\n\nIf Xdebug has been installed and activated, two coverage reports will be generated:\n\n a summary in the console\n\n a detailed HTML report with metrics for tested code\n * to open it in a web browser: \nfirefox coverage/index.html &\n\n\nExecuting specific tests\n\n\nAdd a \n@group\n annotation in a test class or method comment:\n\n\n/**\n * Netscape bookmark import\n * @group WIP\n */\nclass BookmarkImportTest extends PHPUnit_Framework_TestCase\n{\n [...]\n}\n\n\n\n\nTo run all tests annotated with \n@group WIP\n:\n\n\n$ vendor/bin/phpunit --group WIP tests/",
+ "title": "Unit tests"
+ },
+ {
+ "location": "/Unit-tests/#setup-your-environment-for-tests",
+ "text": "The framework used is PHPUnit ; it can be installed with Composer , which is a dependency management tool. Regarding Composer, you can either use: a system-wide version, e.g. installed through your distro's package manager a local version, downloadable here",
+ "title": "Setup your environment for tests"
+ },
+ {
+ "location": "/Unit-tests/#sample-usage",
+ "text": "# system-wide version\n$ composer install\n$ composer update\n\n# local version\n$ php composer.phar self-update\n$ php composer.phar install\n$ php composer.phar update",
+ "title": "Sample usage"
+ },
+ {
+ "location": "/Unit-tests/#install-shaarli-dev-dependencies",
+ "text": "$ cd /path/to/shaarli\n$ composer update",
+ "title": "Install Shaarli dev dependencies"
+ },
+ {
+ "location": "/Unit-tests/#install-and-enable-xdebug-to-generate-phpunit-coverage-reports",
+ "text": "For Debian-based distros: $ aptitude install php5-xdebug For ArchLinux: $ pacman -S xdebug Then add the following line to /etc/php/php.ini : zend_extension=xdebug.so",
+ "title": "Install and enable Xdebug to generate PHPUnit coverage reports"
+ },
+ {
+ "location": "/Unit-tests/#run-unit-tests",
+ "text": "Successful test suite: $ make test\n\n-------\nPHPUNIT\n-------\nPHPUnit 4.6.9 by Sebastian Bergmann and contributors.\n\nConfiguration read from /home/virtualtam/public_html/shaarli/phpunit.xml\n\n....................................\n\nTime: 759 ms, Memory: 8.25Mb\n\nOK (36 tests, 65 assertions) Test suite with failures and errors: $ make test\n-------\nPHPUNIT\n-------\nPHPUnit 4.6.9 by Sebastian Bergmann and contributors.\n\nConfiguration read from /home/virtualtam/public_html/shaarli/phpunit.xml\n\nE..FF...............................\n\nTime: 802 ms, Memory: 8.25Mb\n\nThere was 1 error:\n\n1) LinkDBTest::testConstructLoggedIn\nMissing argument 2 for LinkDB::__construct(), called in /home/virtualtam/public_html/shaarli/tests/Link\\\nDBTest.php on line 79 and defined\n\n/home/virtualtam/public_html/shaarli/application/LinkDB.php:58\n/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:79\n\n--\n\nThere were 2 failures:\n\n1) LinkDBTest::testCheckDBNew\nFailed asserting that two strings are equal.\n--- Expected\n+++ Actual\n@@ @@\n-'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'\n+'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'\n\n/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:121\n\n2) LinkDBTest::testCheckDBLoad\nFailed asserting that two strings are equal.\n--- Expected\n+++ Actual\n@@ @@\n-'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'\n+'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'\n\n/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:133\n\nFAILURES!\nTests: 36, Assertions: 63, Errors: 1, Failures: 2.",
+ "title": "Run unit tests"
+ },
+ {
+ "location": "/Unit-tests/#test-results-and-coverage",
+ "text": "By default, PHPUnit will run all suitable tests found under the tests directory. Each test has 3 possible outcomes: . - success F - failure: the test was run but its results are invalid\n * the code does not behave as expected\n * dependencies to external elements: globals, session, cache...\n* E - error: something went wrong and the tested code has crashed\n * typos in the code, or in the test code\n * dependencies to missing external elements If Xdebug has been installed and activated, two coverage reports will be generated: a summary in the console a detailed HTML report with metrics for tested code\n * to open it in a web browser: firefox coverage/index.html &",
+ "title": "Test results and coverage"
+ },
+ {
+ "location": "/Unit-tests/#executing-specific-tests",
+ "text": "Add a @group annotation in a test class or method comment: /**\n * Netscape bookmark import\n * @group WIP\n */\nclass BookmarkImportTest extends PHPUnit_Framework_TestCase\n{\n [...]\n} To run all tests annotated with @group WIP : $ vendor/bin/phpunit --group WIP tests/",
+ "title": "Executing specific tests"
+ },
+ {
+ "location": "/FAQ/",
+ "text": "Why did you create Shaarli ?\n\n\nI 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\u2026 oh\u2026 \ntheir Firefox addon sends to Diigo every single URL you visit\n (Don't believe me ? Use \nTamper Data\n and open any page).\n\n\nEnough 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.\n\n\nWhy use Shaarli and not Delicious/Diigo ?\n\n\nWith Shaarli:\n\n\n\n\nThe data is yours: It's hosted on your server.\n\n\nNever fear of having your data locked-in.\n\n\nNever fear to have your data sold to third party.\n\n\nYour private links are not hosted on a third party server.\n\n\nYou are not tracked by browser addons (like Diigo does)\n\n\nYou can change the look and feel of the pages if you want.\n\n\nYou can change the behaviour of the program.\n\n\nIt's magnitude faster than most bookmarking services.\n\n\n\n\nWhat does Shaarli mean?\n\n\nShaarli is for shaaring your links.\n\n\nMy Shaarli is broken!\n\n\nFirst of all, ensure that both the \nweb server\n and \nShaarli\n are correctly configured, and that your installation is \nsupported\n.\n\n\nIf everything looks right but the issue(s) remain(s), please:\n- take a look at the \ntroubleshooting\n section\n- come \nchat with us\n on Gitter, we'll be happy to help ;-)\n- browse active \nissues\n and \nPull Requests\n\n - if you find one that is related to the issue, feel free to comment and provide additional details (host/Shaarli setup)\n - else, \nopen a new issue\n, and provide information about the problem:\n - \nwhat happens?\n - display glitches, invalid data, security flaws...\n - \nwhat is your configuration?\n - OS, server version, activated extensions, web browser...\n - \nis it reproducible?\n\n\nWhy not use a real database? Files are slow!\n\n\nDoes browsing \nthis page\n feel slow? Try browsing older pages, too.\n\n\nIt'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?\n\n\nThe 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.",
+ "title": "FAQ"
+ },
+ {
+ "location": "/FAQ/#why-did-you-create-shaarli",
+ "text": "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\u2026 oh\u2026 their Firefox addon sends to Diigo every single URL you visit (Don't believe me ? Use Tamper Data and open any page). 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.",
+ "title": "Why did you create Shaarli ?"
+ },
+ {
+ "location": "/FAQ/#why-use-shaarli-and-not-deliciousdiigo",
+ "text": "With Shaarli: The data is yours: It's hosted on your server. Never fear of having your data locked-in. Never fear to have your data sold to third party. Your private links are not hosted on a third party server. You are not tracked by browser addons (like Diigo does) You can change the look and feel of the pages if you want. You can change the behaviour of the program. It's magnitude faster than most bookmarking services.",
+ "title": "Why use Shaarli and not Delicious/Diigo ?"
+ },
+ {
+ "location": "/FAQ/#what-does-shaarli-mean",
+ "text": "Shaarli is for shaaring your links.",
+ "title": "What does Shaarli mean?"
+ },
+ {
+ "location": "/FAQ/#my-shaarli-is-broken",
+ "text": "First of all, ensure that both the web server and Shaarli are correctly configured, and that your installation is supported . If everything looks right but the issue(s) remain(s), please:\n- take a look at the troubleshooting section\n- come chat with us on Gitter, we'll be happy to help ;-)\n- browse active issues and Pull Requests \n - if you find one that is related to the issue, feel free to comment and provide additional details (host/Shaarli setup)\n - else, open a new issue , and provide information about the problem:\n - what happens? - display glitches, invalid data, security flaws...\n - what is your configuration? - OS, server version, activated extensions, web browser...\n - is it reproducible?",
+ "title": "My Shaarli is broken!"
+ },
+ {
+ "location": "/FAQ/#why-not-use-a-real-database-files-are-slow",
+ "text": "Does browsing this page feel slow? Try browsing older pages, too. 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? 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.",
+ "title": "Why not use a real database? Files are slow!"
+ },
+ {
+ "location": "/Community-&-Related-software/",
+ "text": "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.\n\n\nTODO: contact repos owners to see if they'd like to standardize their work with the community fork.\n\n\nCommunity\n\n\n\n\nLiens en vrac de sebsauvage\n - the original Shaarli\n\n\nA large list of Shaarlis\n\n\nA list of working Shaarli aggregators\n\n\nA list of some known Shaarlis\n\n\nAdieu Delicious, Diigo et StumbleUpon. Salut Shaarli ! - sebsauvage.net\n (fr) \n16/09/2011 - the original post about Shaarli\n\n\nOriginal ideas/fixme/TODO page\n\n\nOriginal discussion page\n (fr)\n\n\nOriginal revisions history\n\n\nShaarli.fr/my\n - Unofficial, unsupported (old fork) hosted Shaarlis provider, courtesy of \nDMeloni\n\n\n\n\nArticles and social media discussions\n\n\n\n\n2016-09-22 - Hacker News - https://news.ycombinator.com/item?id=12552176\n\n\n2015-08-15 - Reddit - \nQuestion about migrating from WordPress to Shaarli.\n\n\n2015-06-22 - Hacker News - https://news.ycombinator.com/item?id=9755366\n\n\n2015-05-12 - Reddit - \nshaarli - Self hosted Bookmarking / Delicious (PHP, MySQL)\n\n\n\n\nThird party plugins\n\n\n\n\nautosave\n by \n@kalvn\n: Automatically saves data when editing a link to avoid any loss in case of crash or unexpected shutdown.\n\n\nCode Coloration\n by \n@ArthurHoaro\n: client side code syntax highlighter.\n\n\nDisqus\n by \n@kalvn\n: Adds Disqus comment system to your Shaarli.\n\n\nemojione\n by \n@NerosTie\n: Add colorful emojis to your Shaarli.\n\n\ngoogle analytics\n by \n@ericjuden\n: Adds Google Analytics tracking support\n\n\nlaunch\n - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli.\n\n\nrelated\n by \n@ilesinge\n - Show related links based on the number of identical tags.\n\n\nsocial\n by \n@alexisju\n: share links to social networks.\n\n\nshaarli2twitter\n by \n@ArthurHoaro\n - Automatically tweet your shared links from Shaarli\n\n\n\n\nThemes\n\n\nSee \nTheming\n for the list of community-contributed themes, and an installation guide.\n\n\nServer apps\n\n\n\n\nshaarchiver\n - Archive your Shaarli bookmarks and their content\n\n\nshaarli-river\n - An aggregator for shaarlis with many features \n\n\nShaarlo\n - An aggregator for shaarlis with many features (a very popular running instance among french shaarliers: \nshaarli.fr\n)\n\n\nShaarlimages\n - An image-oriented aggregator for Shaarlis\n\n\nmknexen/shaarli-api\n - A REST API for Shaarli\n\n\nSelf dead link\n - Detect dead links on shaarli. This version use the database of shaarli. \nAnother version\n, can be used for other shaarli instances (but is more resource consuming).\n\n\nBookmark Archiver\n - Save an archived copy of all websites starred using browser bookmarks/Shaarli/Delicious/Instapaper/Unmark.it/Pocket/Pinboard. Outputs browseable html. \n\n\n\n\nMobile Apps\n\n\n\n\nShaarliOS\n iOS share extension - see \n#308\n for some promo codes,\n\n\nShaarli for Android\n - Android application that adds Shaarli as a sharing provider\n\n\nShaarlier for Android\n - Android application to simply add links directly into your Shaarli\n\n\n\n\nIntegration with other platforms\n\n\n\n\ntt-rss-shaarli\n - \nTiny-Tiny RSS\n plugin that adds support for sharing articles with Shaarli\n\n\noctopress-shaarli\n - Octopress plugin to retrieve Shaarli links on the sidebar\n\n\nScuttle to Shaarli\n - Import bookmarks from Scuttle\n\n\n\n\nAlternatives to Shaarli\n\n\nSee the \nbookmarks & link sharing\n section on \nawesome-selfhosted\n.",
+ "title": "Community & Related software"
+ },
+ {
+ "location": "/Community-&-Related-software/#community",
+ "text": "Liens en vrac de sebsauvage - the original Shaarli A large list of Shaarlis A list of working Shaarli aggregators A list of some known Shaarlis Adieu Delicious, Diigo et StumbleUpon. Salut Shaarli ! - sebsauvage.net (fr) 16/09/2011 - the original post about Shaarli Original ideas/fixme/TODO page Original discussion page (fr) Original revisions history Shaarli.fr/my - Unofficial, unsupported (old fork) hosted Shaarlis provider, courtesy of DMeloni",
+ "title": "Community"
+ },
+ {
+ "location": "/Community-&-Related-software/#articles-and-social-media-discussions",
+ "text": "2016-09-22 - Hacker News - https://news.ycombinator.com/item?id=12552176 2015-08-15 - Reddit - Question about migrating from WordPress to Shaarli. 2015-06-22 - Hacker News - https://news.ycombinator.com/item?id=9755366 2015-05-12 - Reddit - shaarli - Self hosted Bookmarking / Delicious (PHP, MySQL)",
+ "title": "Articles and social media discussions"
+ },
+ {
+ "location": "/Community-&-Related-software/#third-party-plugins",
+ "text": "autosave by @kalvn : Automatically saves data when editing a link to avoid any loss in case of crash or unexpected shutdown. Code Coloration by @ArthurHoaro : client side code syntax highlighter. Disqus by @kalvn : Adds Disqus comment system to your Shaarli. emojione by @NerosTie : Add colorful emojis to your Shaarli. google analytics by @ericjuden : Adds Google Analytics tracking support launch - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli. related by @ilesinge - Show related links based on the number of identical tags. social by @alexisju : share links to social networks. shaarli2twitter by @ArthurHoaro - Automatically tweet your shared links from Shaarli",
+ "title": "Third party plugins"
+ },
+ {
+ "location": "/Community-&-Related-software/#themes",
+ "text": "See Theming for the list of community-contributed themes, and an installation guide.",
+ "title": "Themes"
+ },
+ {
+ "location": "/Community-&-Related-software/#server-apps",
+ "text": "shaarchiver - Archive your Shaarli bookmarks and their content shaarli-river - An aggregator for shaarlis with many features Shaarlo - An aggregator for shaarlis with many features (a very popular running instance among french shaarliers: shaarli.fr ) Shaarlimages - An image-oriented aggregator for Shaarlis mknexen/shaarli-api - A REST API for Shaarli Self dead link - Detect dead links on shaarli. This version use the database of shaarli. Another version , can be used for other shaarli instances (but is more resource consuming). Bookmark Archiver - Save an archived copy of all websites starred using browser bookmarks/Shaarli/Delicious/Instapaper/Unmark.it/Pocket/Pinboard. Outputs browseable html.",
+ "title": "Server apps"
+ },
+ {
+ "location": "/Community-&-Related-software/#mobile-apps",
+ "text": "ShaarliOS iOS share extension - see #308 for some promo codes, Shaarli for Android - Android application that adds Shaarli as a sharing provider Shaarlier for Android - Android application to simply add links directly into your Shaarli",
+ "title": "Mobile Apps"
+ },
+ {
+ "location": "/Community-&-Related-software/#integration-with-other-platforms",
+ "text": "tt-rss-shaarli - Tiny-Tiny RSS plugin that adds support for sharing articles with Shaarli octopress-shaarli - Octopress plugin to retrieve Shaarli links on the sidebar Scuttle to Shaarli - Import bookmarks from Scuttle",
+ "title": "Integration with other platforms"
+ },
+ {
+ "location": "/Community-&-Related-software/#alternatives-to-shaarli",
+ "text": "See the bookmarks & link sharing section on awesome-selfhosted .",
+ "title": "Alternatives to Shaarli"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/doc/html/search.html b/doc/html/search.html
new file mode 100644
index 00000000..b492b8bd
--- /dev/null
+++ b/doc/html/search.html
@@ -0,0 +1,324 @@
+
+
+
+
+
+
+
+
+
+
+ Shaarli Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/doc/html/sitemap.xml b/doc/html/sitemap.xml
new file mode 100644
index 00000000..534f02b5
--- /dev/null
+++ b/doc/html/sitemap.xml
@@ -0,0 +1,266 @@
+
+
+
+
+
+ /
+ 2017-06-18
+ daily
+
+
+
+
+
+
+ /Download-and-Installation/
+ 2017-06-18
+ daily
+
+
+
+ /Upgrade-and-migration/
+ 2017-06-18
+ daily
+
+
+
+ /Server-requirements/
+ 2017-06-18
+ daily
+
+
+
+ /Server-configuration/
+ 2017-06-18
+ daily
+
+
+
+ /Server-security/
+ 2017-06-18
+ daily
+
+
+
+ /Shaarli-configuration/
+ 2017-06-18
+ daily
+
+
+
+ /Plugins/
+ 2017-06-18
+ daily
+
+
+
+
+
+
+
+ /Docker-101/
+ 2017-06-18
+ daily
+
+
+
+ /Shaarli-images/
+ 2017-06-18
+ daily
+
+
+
+ /Reverse-proxy-configuration/
+ 2017-06-18
+ daily
+
+
+
+ /Docker-resources/
+ 2017-06-18
+ daily
+
+
+
+
+
+
+
+ /Features/
+ 2017-06-18
+ daily
+
+
+
+ /Bookmarklet/
+ 2017-06-18
+ daily
+
+
+
+ /Browsing-and-searching/
+ 2017-06-18
+ daily
+
+
+
+ /Firefox-share/
+ 2017-06-18
+ daily
+
+
+
+ /RSS-feeds/
+ 2017-06-18
+ daily
+
+
+
+ /REST-API/
+ 2017-06-18
+ daily
+
+
+
+
+
+
+
+ /Backup,-restore,-import-and-export/
+ 2017-06-18
+ daily
+
+
+
+ /Copy-an-existing-installation-over-SSH-and-serve-it-locally/
+ 2017-06-18
+ daily
+
+
+
+ /Create-and-serve-multiple-Shaarlis-(farm)/
+ 2017-06-18
+ daily
+
+
+
+ /Download-CSS-styles-from-an-OPML-list/
+ 2017-06-18
+ daily
+
+
+
+ /Datastore-hacks/
+ 2017-06-18
+ daily
+
+
+
+
+
+
+ /Troubleshooting/
+ 2017-06-18
+ daily
+
+
+
+
+
+
+ /Development-guidelines/
+ 2017-06-18
+ daily
+
+
+
+ /Continuous-integration-tools/
+ 2017-06-18
+ daily
+
+
+
+ /GnuPG-signature/
+ 2017-06-18
+ daily
+
+
+
+ /Coding-guidelines/
+ 2017-06-18
+ daily
+
+
+
+ /Directory-structure/
+ 2017-06-18
+ daily
+
+
+
+ /3rd-party-libraries/
+ 2017-06-18
+ daily
+
+
+
+ /Plugin-System/
+ 2017-06-18
+ daily
+
+
+
+ /Release-Shaarli/
+ 2017-06-18
+ daily
+
+
+
+ /Versioning-and-Branches/
+ 2017-06-18
+ daily
+
+
+
+ /Security/
+ 2017-06-18
+ daily
+
+
+
+ /Static-analysis/
+ 2017-06-18
+ daily
+
+
+
+ /Theming/
+ 2017-06-18
+ daily
+
+
+
+ /Unit-tests/
+ 2017-06-18
+ daily
+
+
+
+
+
+
+
+ /FAQ/
+ 2017-06-18
+ daily
+
+
+
+ /Community-&-Related-software/
+ 2017-06-18
+ daily
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/images/bookmarklet.png b/doc/images/bookmarklet.png
deleted file mode 100644
index 0262578e..00000000
Binary files a/doc/images/bookmarklet.png and /dev/null differ
diff --git a/doc/images/doc-logo.png b/doc/images/doc-logo.png
deleted file mode 100644
index 3d8d1787..00000000
Binary files a/doc/images/doc-logo.png and /dev/null differ
diff --git a/doc/images/doc-logo.svg b/doc/images/doc-logo.svg
deleted file mode 100644
index 37fc6658..00000000
--- a/doc/images/doc-logo.svg
+++ /dev/null
@@ -1,522 +0,0 @@
-
-
diff --git a/doc/images/firefoxshare.png b/doc/images/firefoxshare.png
deleted file mode 100644
index 98c2fdd3..00000000
Binary files a/doc/images/firefoxshare.png and /dev/null differ
diff --git a/doc/images/rss-filter-1.png b/doc/images/rss-filter-1.png
deleted file mode 100644
index d2a03f67..00000000
Binary files a/doc/images/rss-filter-1.png and /dev/null differ
diff --git a/doc/images/rss-filter-2.png b/doc/images/rss-filter-2.png
deleted file mode 100644
index 538b126e..00000000
Binary files a/doc/images/rss-filter-2.png and /dev/null differ
diff --git a/doc/md/3rd-party-libraries.md b/doc/md/3rd-party-libraries.md
new file mode 100644
index 00000000..ebab7a46
--- /dev/null
+++ b/doc/md/3rd-party-libraries.md
@@ -0,0 +1,13 @@
+## CSS
+- Yahoo UI [CSS Reset](http://yuilibrary.com/yui/docs/cssreset/)
+ - resets default CSS properties for all HTML elements (overriding browsers' default values)
+ - ensures custom CSS stylessheets will provide the same results on all browsers
+
+## Javascript
+- [Awesomeplete](https://leaverou.github.io/awesomplete/) ([GitHub](https://github.com/LeaVerou/awesomplete)) - autocompletion in input forms
+- [bLazy](http://dinbror.dk/blazy/) ([GitHub](https://github.com/dinbror/blazy)) - lazy loading for thumbnails
+- [qr.js](http://neocotic.com/qr.js/) ([GitHub](https://github.com/neocotic/qr.js)) - QR code generation
+
+## PHP
+- [shaarli/netscape-bookmark-parser](https://github.com/shaarli/netscape-bookmark-parser) - Netscape bookmark parser
+- [RainTPL](https://github.com/rainphp/raintpl) - HTML templating for PHP
diff --git a/doc/md/Backup,-restore,-import-and-export.md b/doc/md/Backup,-restore,-import-and-export.md
new file mode 100644
index 00000000..d3252226
--- /dev/null
+++ b/doc/md/Backup,-restore,-import-and-export.md
@@ -0,0 +1,63 @@
+
+ * [Backup and restore the datastore file](#backup-and-restore-the-datastore-file)
+ * [Export links as...](#export-links-as)
+ * [Import links from...](#import-links-from)
+ * [Import Shaarli links to Firefox](#import-shaarli-links-to-firefox)
+
+----------------------
+
+## Backup and restore the datastore file
+
+Backup the file `data/datastore.php` (by FTP or SSH). Restore by putting the file back in place.
+
+Example command:
+```bash
+rsync -avzP my.server.com:/var/www/shaarli/data/datastore.php datastore-$(date +%Y-%m-%d_%H%M).php
+```
+
+## Export links as...
+
+To export links as an HTML file, under _Tools > Export_, choose:
+- _Export all_ to export both public and private links
+- _Export public_ to export public links only
+- _Export private_ to export private links only
+
+Restore by using the `Import` feature.
+* This can be done using the [shaarchiver](https://github.com/nodiscc/shaarchiver) tool.
+
+Example command:
+```bash
+./export-bookmarks.py --url=https://my.server.com/shaarli --username=myusername --password=mysupersecretpassword --download-dir=./ --type=all
+```
+
+## Import links from...
+
+### Diigo
+
+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.)
+
+### Mister Wong
+
+See [this issue](https://github.com/sebsauvage/Shaarli/issues/146) for import tweaks.
+
+### SemanticScuttle
+
+To 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).
+
+### Scuttle
+
+Shaarli 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.
+
+## Import Shaarli links to Firefox
+
+ * Export your Shaarli links as described above.
+ * For compatibility reasons, check `Prepend note permalinks with this Shaarli instance's URL (useful to import bookmarks in a web browser)`
+ * In Firefox, open the bookmark manager (not the sidebar! `Bookmarks menu > Show all bookmarks` or `Ctrl+Shift+B`)
+ * Select `Import and Backup > Import bookmarks in HTML format`
+
+Your 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.
+
+You may be interested in these Firefox addons to manage links imported from Shaarli
+
+ * [Bookmark Deduplicator](https://addons.mozilla.org/en-US/firefox/addon/bookmark-deduplicator/) - provides an easy way to deduplicate your bookmarks
+ * [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..265ced44
--- /dev/null
+++ b/doc/md/Bookmarklet.md
@@ -0,0 +1,30 @@
+### Add the sharing button (_bookmarklet_) to your browser
+
+ * Open your Shaarli and `Login`
+ * Click the `Tools` button in the top bar
+ * Drag the **`✚Shaare link` button**, and drop it to your browser's bookmarks bar.
+
+_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._
+
+
+
+### Share links using the _bookmarklet_
+
+ * When you are visiting a webpage you would like to share with Shaarli, click the _bookmarklet_ you just added.
+ * A window opens.
+ * You can freely edit title, description, tags... to find it later using the text search or tag filtering.
+ * You will be able to edit this link later using the  edit button.
+ * You can also check the “Private” box so that the link is saved but only visible to you.
+ * Click `Save`.**Voilà! Your link is now shared.**
+
+### Troubleshooting: The bookmarklet doesn't work with a few website (e.g. Github.com)
+
+Websites which enforce Content Security Policy (CSP), such as github.com, disallow usage of bookmarklets. Unfortunatly, there is nothing Shaarli can do about it.
+
+See [#196](https://github.com/shaarli/Shaarli#196).
+
+There is an open bug for both Firefox and Chromium:
+
+ * https://bugzilla.mozilla.org/show_bug.cgi?id=866522
+ * https://code.google.com/p/chromium/issues/detail?id=233903
+
diff --git a/doc/md/Browsing-and-searching.md b/doc/md/Browsing-and-searching.md
new file mode 100644
index 00000000..ad62c2f0
--- /dev/null
+++ b/doc/md/Browsing-and-searching.md
@@ -0,0 +1,23 @@
+## Plain text search
+
+Use the `Search text` field to search in _any_ of the fields of all links (Title, URL, Description...)
+
+**Exclude text/tags:** Use the `-` operator before a word or tag (example `-uninteresting`) to prevent entries containing (or tagged) `uninteresting` from showing up in the search results.
+
+**Exact text search:** Use double-quotes (example `"exact search"`) to search for the exact expression.
+
+Both exclude patterns and exact searches can be combined with normal searches (example `"exact search" term otherterm -notthis "very exact" stuff -notagain`)
+
+## Tags search
+
+Use the `Filter by tags` field to restrict displayed links to entries tagged with one or multiple tags (use space to separate tags).
+
+**Hidden tags:** Tags starting with a dot `.` (example `.secret`) are private. They can only be seen and searched when logged in.
+
+Alternatively you can use the `Tag cloud` to discover all tags and click on any of them to display related links.
+
+To search for links that are not tagged, enter `""` in the tag search field.
+
+## Filtering RSS feeds/Picture wall
+
+RSS feeds can also be restricted to only return items matching a text/tag search: see [[RSS feeds]].
diff --git a/doc/md/Coding-guidelines.md b/doc/md/Coding-guidelines.md
new file mode 100644
index 00000000..da47c498
--- /dev/null
+++ b/doc/md/Coding-guidelines.md
@@ -0,0 +1,5 @@
+## WIP
+
+This topic is currently being discussed here:
+- [Fix coding style (static analysis)](https://github.com/shaarli/Shaarli/issues/95) (#95)
+- [Continuous Integration tools & features](https://github.com/shaarli/Shaarli/issues/130) (#130)
diff --git a/doc/md/Community-&-Related-software.md b/doc/md/Community-&-Related-software.md
new file mode 100644
index 00000000..6ff7ed45
--- /dev/null
+++ b/doc/md/Community-&-Related-software.md
@@ -0,0 +1,60 @@
+_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._
+
+_TODO: contact repos owners to see if they'd like to standardize their work with the community fork._
+
+## Community
+- [Liens en vrac de sebsauvage](http://sebsauvage.net/links/) - the original Shaarli
+- [A large list of Shaarlis](http://porneia.free.fr/pub/links/ou-est-shaarli.html)
+- [A list of working Shaarli aggregators](https://raw.githubusercontent.com/Oros42/find_shaarlis/master/annuaires.json)
+- [A list of some known Shaarlis](https://github.com/Oros42/shaarlis_list)
+- [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_
+- [Original ideas/fixme/TODO page](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:ideas)
+- [Original discussion page](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:discussion) (fr)
+- [Original revisions history](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:history)
+- [Shaarli.fr/my](https://www.shaarli.fr/my.php) - Unofficial, unsupported (old fork) hosted Shaarlis provider, courtesy of [DMeloni](https://github.com/DMeloni)
+
+### Articles and social media discussions
+- 2016-09-22 - Hacker News - https://news.ycombinator.com/item?id=12552176
+- 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/)
+- 2015-06-22 - Hacker News - https://news.ycombinator.com/item?id=9755366
+- 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/)
+
+### Third party plugins
+
+
+ * [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.
+ * [Code Coloration](https://github.com/ArthurHoaro/code-coloration) by [@ArthurHoaro](https://github.com/ArthurHoaro): client side code syntax highlighter.
+ * [Disqus](https://github.com/kalvn/shaarli-plugin-disqus) by [@kalvn](https://github.com/kalvn): Adds Disqus comment system to your Shaarli.
+ * [emojione](https://github.com/NerosTie/emojione) by [@NerosTie](https://github.com/NerosTie): Add colorful emojis to your Shaarli.
+ * [google analytics](https://github.com/ericjuden/Shaarli-Google-Analytics-Plugin) by [@ericjuden](http://github.com/ericjuden): Adds Google Analytics tracking support
+ * [launch](https://github.com/ArthurHoaro/launch-plugin) - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli.
+ * [related](https://github.com/ilesinge/shaarli-related) by [@ilesinge](https://github.com/ilesinge) - Show related links based on the number of identical tags.
+ * [social](https://github.com/alexisju/social) by [@alexisju](https://github.com/alexisju): share links to social networks.
+ * [shaarli2twitter](https://github.com/ArthurHoaro/shaarli2twitter) by [@ArthurHoaro](https://github.com/ArthurHoaro) - Automatically tweet your shared links from Shaarli
+
+
+### Themes
+See [[Theming]] for the list of community-contributed themes, and an installation guide.
+
+### Server apps
+- [shaarchiver](https://github.com/nodiscc/shaarchiver) - Archive your Shaarli bookmarks and their content
+- [shaarli-river](https://github.com/mknexen/shaarli-river) - An aggregator for shaarlis with many features
+- [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/))
+- [Shaarlimages](https://github.com/BoboTiG/shaarlimages) - An image-oriented aggregator for Shaarlis
+- [mknexen/shaarli-api](https://github.com/mknexen/shaarli-api) - A REST API for Shaarli
+- [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).
+- [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.
+
+### Mobile Apps
+- [ShaarliOS](https://github.com/mro/ShaarliOS) iOS share extension - see [#308](https://github.com/shaarli/Shaarli/issues/308#issuecomment-184592070) for some promo codes,
+- [Shaarli for Android](http://sebsauvage.net/links/?ZAyDzg) - Android application that adds Shaarli as a sharing provider
+- [Shaarlier for Android](https://github.com/dimtion/Shaarlier) - Android application to simply add links directly into your Shaarli
+
+## Integration with other platforms
+- [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
+- [octopress-shaarli](https://github.com/ahmet2mir/octopress-shaarli) - Octopress plugin to retrieve Shaarli links on the sidebar
+- [Scuttle to Shaarli](https://github.com/q2apro/scuttle-to-shaarli) - Import bookmarks from Scuttle
+
+## Alternatives to Shaarli
+
+See the [bookmarks & link sharing](https://github.com/Kickball/awesome-selfhosted/#bookmarks--link-sharing) section 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..30dc474d
--- /dev/null
+++ b/doc/md/Continuous-integration-tools.md
@@ -0,0 +1,24 @@
+## Local development
+A [`Makefile`](https://github.com/shaarli/Shaarli/blob/master/Makefile) is available to perform project-related operations:
+- Documentation - generate a local HTML copy of the GitHub wiki
+- [[Static analysis]] - check that the code is compliant to PHP conventions
+- [[Unit tests]] - ensure there are no regressions introduced by new commits
+
+## Automatic builds
+[Travis CI](http://docs.travis-ci.com/) is a Continuous Integration build server, that runs a build:
+- each time a commit is merged to the mainline (`master` branch)
+- each time a Pull Request is submitted or updated
+
+A build is composed of several jobs: one for each supported PHP version (see [[Server requirements]]).
+
+Each build job:
+- updates Composer
+- installs 3rd-party test dependencies with Composer
+- runs [[Unit tests]]
+
+After all jobs have finished, Travis returns the results to GitHub:
+- a status icon represents the result for the `master` branch: [](https://travis-ci.org/shaarli/Shaarli)
+- Pull Requests are updated with the Travis result
+ - Green: all tests have passed
+ - Red: some tests failed
+ - Orange: tests are pending
diff --git a/doc/md/Copy-an-existing-installation-over-SSH-and-serve-it-locally.md b/doc/md/Copy-an-existing-installation-over-SSH-and-serve-it-locally.md
new file mode 100644
index 00000000..7583c9ea
--- /dev/null
+++ b/doc/md/Copy-an-existing-installation-over-SSH-and-serve-it-locally.md
@@ -0,0 +1,66 @@
+Example bash script:
+
+```bash
+#!/bin/bash
+#Description: Copy a Shaarli installation over SSH/SCP, serve it locally with php-cli
+#Will create a local-shaarli/ directory when you run it, backup your Shaarli there, and serve it locally.
+#Will NOT download linked pages. It's just a directly usable backup/copy/mirror of your Shaarli
+#Requires: ssh, scp and a working SSH access to the server where your Shaarli is installed
+#Usage: ./local-shaarli.sh
+#Author: nodiscc (nodiscc@gmail.com)
+#License: MIT (http://opensource.org/licenses/MIT)
+set -o errexit
+set -o nounset
+
+##### CONFIG #################
+#The port used by php's local server
+php_local_port=7431
+
+#Name of the SSH server and path where Shaarli is installed
+#TODO: pass these as command-line arguments
+remotehost="my.ssh.server"
+remote_shaarli_dir="/var/www/shaarli"
+
+
+###### FUNCTIONS #############
+_main() {
+ _CBSyncShaarli
+ _CBServeShaarli
+}
+
+_CBSyncShaarli() {
+ remote_temp_dir=$(ssh $remotehost mktemp -d)
+ remote_ssh_user=$(ssh $remotehost whoami)
+ ssh -t "$remotehost" sudo cp -r "$remote_shaarli_dir" "$remote_temp_dir"
+ ssh -t "$remotehost" sudo chown -R "$remote_ssh_user":"$remote_ssh_user" "$remote_temp_dir"
+ scp -rq "$remotehost":"$remote_temp_dir" local-shaarli
+ ssh "$remotehost" rm -r "$remote_temp_dir"
+}
+
+_CBServeShaarli() {
+ #TODO: allow serving a previously downloaded Shaarli
+ #TODO: ask before overwriting local copy, if it exists
+ cd local-shaarli/
+ php -S localhost:${php_local_port}
+ echo "Please go to http://localhost:${php_local_port}"
+}
+
+
+##### MAIN #################
+
+_main
+```
+
+This outputs:
+
+```bash
+$ ./local-shaarli.sh
+PHP 5.6.0RC4 Development Server started at Mon Sep 1 21:56:19 2014
+Listening on http://localhost:7431
+Document root is /home/user/local-shaarli/shaarli
+Press Ctrl-C to quit.
+
+[Mon Sep 1 21:56:27 2014] ::1:57868 [200]: /
+[Mon Sep 1 21:56:27 2014] ::1:57869 [200]: /index.html
+[Mon Sep 1 21:56:37 2014] ::1:57881 [200]: /...
+```
diff --git a/doc/md/Create-and-serve-multiple-Shaarlis-(farm).md b/doc/md/Create-and-serve-multiple-Shaarlis-(farm).md
new file mode 100644
index 00000000..d0d812a3
--- /dev/null
+++ b/doc/md/Create-and-serve-multiple-Shaarlis-(farm).md
@@ -0,0 +1,57 @@
+Example bash script (creates multiple shaarli instances and generates an HTML index of them)
+
+```bash
+#!/bin/bash
+set -o errexit
+set -o nounset
+
+#config
+shaarli_base_dir='/var/www/shaarli'
+accounts='bob john whatever username'
+shaarli_repo_url='https://github.com/shaarli/Shaarli'
+ref="master"
+
+#clone multiple shaarli instances
+if [ ! -d "$shaarli_base_dir" ]; then mkdir "$shaarli_base_dir"; fi
+
+for account in $accounts; do
+ if [ -d "$shaarli_base_dir/$account" ];
+ then echo "[info] account $account already exists, skipping";
+ else echo "[info] creating new account $account ..."; git clone --quiet "$shaarli_repo_url" -b "$ref" "$shaarli_base_dir/$account"; fi
+done
+
+#generate html index of shaarlis
+htmlhead='
+
+
+
+
+ My Shaarli farm
+
+
+
+
+
My Shaarli farm
+
'
+
+accountlinks=''
+
+htmlfooter='
+
+
+
+'
+
+
+
+for account in $accounts; do accountlinks="$accountlinks\n
"; done
+if [ -d "$shaarli_base_dir/index.html" ]; then echo "[removing old index.html]"; rm "$shaarli_base_dir/index.html" ]; fi
+echo "[info] generating new index of shaarlis"
+echo -e "$htmlhead $accountlinks $htmlfooter" > "$shaarli_base_dir/index.html"
+echo '[info] done.'
+echo "[info] list of accounts: $accounts"
+echo "[info] contents of $shaarli_base_dir:"
+tree -a -L 1 "$shaarli_base_dir"
+```
+
+This 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/)
\ No newline at end of file
diff --git a/doc/md/Datastore-hacks.md b/doc/md/Datastore-hacks.md
new file mode 100644
index 00000000..78baa005
--- /dev/null
+++ b/doc/md/Datastore-hacks.md
@@ -0,0 +1,25 @@
+### Decode datastore content
+
+To display the array representing the data saved in `data/datastore.php`, use the following snippet:
+
+```php
+$data = "tZNdb9MwFIb... ";
+$out = unserialize(gzinflate(base64_decode($data)));
+echo "
"; // Pretty printing is love, pretty printing is life
+print_r($out);
+echo "
";
+exit;
+```
+This will output the internal representation of the datastore, "unobfuscated" (if this can really be considered obfuscation).
+
+Alternatively, you can transform to JSON format (and pretty-print if you have `jq` installed):
+```
+php -r 'print(json_encode(unserialize(gzinflate(base64_decode(preg_replace("!.*/\* (.+) \*/.*!", "$1", file_get_contents("data/datastore.php")))))));' | jq .
+```
+
+### Changing the timestamp for a link
+
+* Look for `` in `tpl/editlink.tpl` (line 14)
+* Replace `type="hidden"` with `type="text"` from this line
+* A new date/time field becomes available in the edit/new link dialog.
+* You can set the timestamp manually by entering it in the format `YYYMMDD_HHMMS`.
diff --git a/doc/md/Development-guidelines.md b/doc/md/Development-guidelines.md
new file mode 100644
index 00000000..1480ec89
--- /dev/null
+++ b/doc/md/Development-guidelines.md
@@ -0,0 +1,9 @@
+## Development guidelines
+
+Please have a look at the following pages:
+- [Contributing to Shaarli](https://github.com/shaarli/Shaarli/tree/master/CONTRIBUTING.md)
+- [[Static analysis]] - patches should try to stick to the [PHP Standard Recommendations](http://www.php-fig.org/psr/) (PSR), especially:
+ - [PSR-1](http://www.php-fig.org/psr/psr-1/) - Basic Coding Standard
+ - [PSR-2](http://www.php-fig.org/psr/psr-2/) - Coding Style Guide
+- [[Unit tests]]
+- [[GnuPG signature]] for tags/releases
diff --git a/doc/md/Directory-structure.md b/doc/md/Directory-structure.md
new file mode 100644
index 00000000..eb50965b
--- /dev/null
+++ b/doc/md/Directory-structure.md
@@ -0,0 +1,34 @@
+TODO: This page is out of date
+
+Here is the directory structure of Shaarli and the purpose of the different files:
+
+```bash
+ index.php # Main program
+ application/ # Shaarli classes
+ ├── LinkDB.php
+ └── Utils.php
+ tests/ # Shaarli unitary & functional tests
+ ├── LinkDBTest.php
+ ├── utils # utilities to ease testing
+ │ └── ReferenceLinkDB.php
+ └── UtilsTest.php
+ COPYING # Shaarli license
+ inc/ # static assets and 3rd party libraries
+ ├── awesomplete.* # tags autocompletion library
+ ├── blazy.* # picture wall lazy image loading library
+ ├── shaarli.css, reset.css # Shaarli stylesheet.
+ ├── qr.* # qr code generation library
+ └──rain.tpl.class.php # RainTPL templating library
+ tpl/ # RainTPL templates for Shaarli. They are used to build the pages.
+ images/ # Images and icons used in Shaarli
+ data/ # data storage: bookmark database, configuration, logs, banlist…
+ ├── config.php # Shaarli configuration (login, password, timezone, title…)
+ ├── datastore.php # Your link database (compressed).
+ ├── ipban.php # IP address ban system data
+ ├── lastupdatecheck.txt # Update check timestamp file
+ └──log.txt # login/IPban log.
+ cache/ # thumbnails cache
+ # This directory is automatically created. You can erase it anytime you want.
+ tmp/ # Temporary directory for compiled RainTPL templates.
+ # This directory is automatically created. You can erase it anytime you want.
+```
diff --git a/doc/md/Docker-101.md b/doc/md/Docker-101.md
new file mode 100644
index 00000000..b02dd149
--- /dev/null
+++ b/doc/md/Docker-101.md
@@ -0,0 +1,62 @@
+## Basics
+Install [Docker](https://www.docker.com/), by following the instructions relevant
+to your OS / distribution, and start the service.
+
+### Search an image on [DockerHub](https://hub.docker.com/)
+
+```bash
+$ docker search debian
+
+NAME DESCRIPTION STARS OFFICIAL AUTOMATED
+ubuntu Ubuntu is a Debian-based Linux operating s... 2065 [OK]
+debian Debian is a Linux distribution that's comp... 603 [OK]
+google/debian 47 [OK]
+```
+
+### Show available tags for a repository
+```bash
+$ curl https://index.docker.io/v1/repositories/debian/tags | python -m json.tool
+
+% Total % Received % Xferd Average Speed Time Time Time Current
+Dload Upload Total Spent Left Speed
+100 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433
+```
+
+Sample output:
+```json
+[
+ {
+ "layer": "85a02782",
+ "name": "stretch"
+ },
+ {
+ "layer": "59abecbc",
+ "name": "testing"
+ },
+ {
+ "layer": "bf0fd686",
+ "name": "unstable"
+ },
+ {
+ "layer": "60c52dbe",
+ "name": "wheezy"
+ },
+ {
+ "layer": "c5b806fe",
+ "name": "wheezy-backports"
+ }
+]
+
+```
+
+### Pull an image from DockerHub
+```bash
+$ docker pull repository[:tag]
+
+$ docker pull debian:wheezy
+wheezy: Pulling from debian
+4c8cbfd2973e: Pull complete
+60c52dbe9d91: Pull complete
+Digest: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe
+Status: Downloaded newer image for debian:wheezy
+```
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 @@
+### Docker
+
+- [Interactive Docker training portal](https://www.katacoda.com/courses/docker/) on [Katakoda](https://www.katacoda.com/)
+- [Where are Docker images stored?](http://blog.thoward37.me/articles/where-are-docker-images-stored/)
+- [Dockerfile reference](https://docs.docker.com/reference/builder/)
+- [Dockerfile best practices](https://docs.docker.com/articles/dockerfile_best-practices/)
+- [Volumes](https://docs.docker.com/userguide/dockervolumes/)
+
+### DockerHub
+
+- [Repositories](https://docs.docker.com/userguide/dockerrepos/)
+- [Teams and organizations](https://docs.docker.com/docker-hub/orgs/)
+- [GitHub automated build](https://docs.docker.com/docker-hub/github/)
+
+### Service management
+
+- [Using supervisord](https://docs.docker.com/articles/using_supervisord/)
+- [Nginx in the foreground](http://nginx.org/en/docs/ngx_core_module.html#daemon)
+- [supervisord](http://supervisord.org/)
diff --git a/doc/md/Download-CSS-styles-from-an-OPML-list.md b/doc/md/Download-CSS-styles-from-an-OPML-list.md
new file mode 100644
index 00000000..26b7fb3e
--- /dev/null
+++ b/doc/md/Download-CSS-styles-from-an-OPML-list.md
@@ -0,0 +1,154 @@
+###Download CSS styles for shaarlis listed in an opml file
+Example php script:
+
+```php
+
+
+
+
+/**
+ * Source: https://github.com/Riduidel
+ * Download css styles for shaarlis listed in an opml file
+ */
+define("SHAARLI_RSS_OPML", "https://www.ecirtam.net/shaarlirss/custom/people.opml");
+
+define("THEMES_TEMP_FOLDER", "new_themes");
+
+if(!file_exists(THEMES_TEMP_FOLDER)) {
+ mkdir(THEMES_TEMP_FOLDER);
+}
+
+function siteUrl($pathInSite) {
+ $indexPos = strpos($pathInSite, "index.php");
+ if(!$indexPos) {
+ return $pathInSite;
+ } else {
+ return substr($pathInSite, 0, $indexPos);
+ }
+}
+
+function createShaarliHashFromOPMLL($opmlFile) {
+ $result = array();
+ $opml = file_get_contents($opmlFile);
+ $opmlXml = simplexml_load_string($opml);
+ $outlineElements = $opmlXml->xpath("body/outline");
+ foreach($outlineElements as $site) {
+ $siteUrl = siteUrl((string) $site['htmlUrl']);
+ $result[$siteUrl]=((string) $site['text']);
+ }
+ return $result;
+}
+
+function getSiteFolder($url) {
+ $domain = parse_url($url, PHP_URL_HOST);
+ return THEMES_TEMP_FOLDER."/".str_replace(".", "_", $domain);
+}
+
+function get_http_response_code($theURL) {
+ $headers = get_headers($theURL);
+ return substr($headers[0], 9, 3);
+}
+
+/**
+ * This makes the code PHP-5 only (particularly the call to "get_headers")
+ */
+function copyUserStyleFrom($url, $name, $knownStyles) {
+ $userStyle = $url."inc/user.css";
+ if(in_array($url, $knownStyles)) {
+ // TODO add log message
+ } else {
+ $statusCode = get_http_response_code($userStyle);
+ if(intval($statusCode)<300) {
+ $styleSheet = file_get_contents($userStyle);
+ $siteFolder = getSiteFolder($url);
+ if(!file_exists($siteFolder)) {
+ mkdir($siteFolder);
+ }
+ if(!file_exists($siteFolder.'/user.css')) {
+ // Copy stylesheet
+ file_put_contents($siteFolder.'/user.css', $styleSheet);
+ }
+ if(!file_exists($siteFolder.'/README.md')) {
+ // Then write a readme.md file
+ file_put_contents($siteFolder.'/README.md',
+ "User style from ".$name."\n"
+ ."============================="
+ ."\n\n"
+ ."This stylesheet was downloaded from ".$userStyle." on ".date(DATE_RFC822)
+ );
+ }
+ if(!file_exists($siteFolder.'/config.ini')) {
+ // Write a config file containing useful informations
+ file_put_contents($siteFolder.'/config.ini',
+ "site_url=".$url."\n"
+ ."site_name=".$name."\n"
+ );
+ }
+ if(!file_exists($siteFolder.'/home.png')) {
+ // And finally copy generated thumbnail
+ $homeThumb = $siteFolder.'/home.png';
+ file_put_contents($siteFolder.'/home.png', file_get_contents(getThumbnailUrl($url)));
+ }
+ echo 'Theme have been downloaded from '.$url.' into '.$siteFolder
+ .'. It looks like ';
+ }
+ }
+}
+
+function getThumbnailUrl($url) {
+ return 'http://api.webthumbnail.org/?url='.$url;
+}
+
+function copyUserStylesFrom($urlToNames, $knownStyles) {
+ foreach($urlToNames as $url => $name) {
+ copyUserStyleFrom($url, $name, $knownStyles);
+ }
+}
+
+/**
+ * Reading directory list, courtesy of http://www.laughing-buddha.net/php/dirlist/
+ * @param directory the directory we want to list files of
+ * @return a simple array containing the list of absolute file paths. Notice that current file (".") and parent one("..")
+ * are not listed here
+ */
+function getDirectoryList ($directory) {
+ $realPath = realpath($directory);
+ // create an array to hold directory list
+ $results = array();
+ // create a handler for the directory
+ $handler = opendir($directory);
+ // open directory and walk through the filenames
+ while ($file = readdir($handler)) {
+ // if file isn't this directory or its parent, add it to the results
+ if ($file != "." && $file != "..") {
+ $results[] = realpath($realPath . "/" . $file);
+ }
+ }
+ // tidy up: close the handler
+ closedir($handler);
+ // done!
+ return $results;
+}
+
+/**
+ * Start in themes folder and look in all subfolders for config.ini files.
+ * These config.ini files allow us not to download styles again and again
+ */
+function findKnownStyles() {
+ $result = array();
+ $subFolders = getDirectoryList("themes");
+ foreach($subFolders as $folder) {
+ $configFile = $folder."/config.ini";
+ if(file_exists($configFile)) {
+ $iniParameters = parse_ini_file($configFile);
+ array_push($result, $iniParameters['site_url']);
+ }
+ }
+ return $result;
+}
+
+$knownStyles = findKnownStyles();
+copyUserStylesFrom(createShaarliHashFromOPMLL(SHAARLI_RSS_OPML), $knownStyles);
+
+
+```
\ No newline at end of file
diff --git a/doc/md/Download-and-Installation.md b/doc/md/Download-and-Installation.md
new file mode 100644
index 00000000..7880aef4
--- /dev/null
+++ b/doc/md/Download-and-Installation.md
@@ -0,0 +1,99 @@
+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 [server](Server-requirements) is properly [configured](Server-configuration).
+
+Several releases are available:
+
+--------------------------------------------------------
+
+## Latest release (recommended)
+### Download as an archive
+Get the latest released version from the [releases](https://github.com/shaarli/Shaarli/releases) page.
+
+**Download our *shaarli-full* archive** to include dependencies.
+
+The current latest released version is `v0.8.4`
+
+Or in command lines:
+
+```bash
+$ wget https://github.com/shaarli/Shaarli/releases/download/v0.8.4/shaarli-v0.8.4-full.zip
+$ unzip shaarli-v0.8.4-full.zip
+$ mv Shaarli /path/to/shaarli/
+```
+
+| ! |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).|
+|-----|--------------------------|
+
+### Using git
+
+```
+mkdir -p /path/to/shaarli && cd /path/to/shaarli/
+git clone -b v0.8 https://github.com/shaarli/Shaarli.git .
+composer install --no-dev
+```
+
+--------------------------------------------------------
+
+## Stable version
+
+The stable version has been experienced by Shaarli users, and will receive security updates.
+
+### Download as an archive
+
+As a .zip archive:
+
+```bash
+$ wget https://github.com/shaarli/Shaarli/archive/stable.zip
+$ unzip stable.zip
+$ mv Shaarli-stable /path/to/shaarli/
+```
+
+As a .tar.gz archive :
+
+```bash
+$ wget https://github.com/shaarli/Shaarli/archive/stable.tar.gz
+$ tar xvf stable.tar.gz
+$ mv Shaarli-stable /path/to/shaarli/
+```
+
+### Clone with Git
+
+[Composer](https://getcomposer.org/) is required to build a functional Shaarli installation when pulling from git.
+
+```bash
+$ git clone https://github.com/shaarli/Shaarli.git -b stable /path/to/shaarli/
+# install/update third-party dependencies
+$ cd /path/to/shaarli/
+$ composer install --no-dev
+```
+
+--------------------------------------------------------
+
+## Development version (mainline)
+
+_Use at your own risk!_
+
+To get the latest changes from the `master` branch:
+
+```bash
+# clone the repository
+$ git clone https://github.com/shaarli/Shaarli.git -b master /path/to/shaarli/
+# install/update third-party dependencies
+$ cd /path/to/shaarli
+$ composer install --no-dev
+```
+
+--------------------------------------------------------
+
+## Finish Installation
+
+Once Shaarli is downloaded and files have been placed at the correct location, open it this location your favorite browser.
+
+
+
+Setup your Shaarli installation, and it's ready to use!
+
+--------------------------------------------------------
+
+## Updating Shaarli
+
+See [Upgrade and Migration](Upgrade-and-migration)
diff --git a/doc/md/Example-patch---add-new-via-field-for-links.md b/doc/md/Example-patch---add-new-via-field-for-links.md
new file mode 100644
index 00000000..d84ef25a
--- /dev/null
+++ b/doc/md/Example-patch---add-new-via-field-for-links.md
@@ -0,0 +1,189 @@
+Example 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**
+
+Thanks to @Knah-Tsaeb in https://github.com/sebsauvage/Shaarli/pull/158
+
+```
+From e0f363c18e8fe67990ed2bb1a08652e24e70bbcb Mon Sep 17 00:00:00 2001
+From: Knah Tsaeb
+Date: Fri, 11 Oct 2013 15:18:37 +0200
+Subject: [PATCH] Add a "via"/origin property for links, add new input in "edit link" dialog
+Thanks to:
+* https://github.com/Knah-Tsaeb/Shaarli/commit/040eb18ec8cdabd5ea855e108f81f97fbf0478c4
+* https://github.com/Knah-Tsaeb/Shaarli/commit/4123658eae44d7564d1128ce52ddd5689efee813
+* https://github.com/Knah-Tsaeb/Shaarli/commit/f1a8ca9cc8fe49b119d51b2d8382cc1a34542f96
+
+---
+ index.php | 43 ++++++++++++++++++++++++++++++++-----------
+ tpl/editlink.html | 1 +
+ tpl/linklist.html | 1 +
+ 3 files changed, 34 insertions(+), 11 deletions(-)
+
+diff --git a/index.php b/index.php
+index 6fae2f8..53f798e 100644
+--- a/index.php
++++ b/index.php
+@@ -436,6 +436,12 @@ if (isset($_POST['login']))
+ // ------------------------------------------------------------------------------------------
+ // Misc utility functions:
+
++// Try to get just domain for @via
++function getJustDomain($url){
++ $parts = parse_url($url);
++ return trim($parts['host']);
++ }
++
+ // Returns the server URL (including port and http/https), without path.
+ // e.g. "http://myserver.com:8080"
+ // You can append $_SERVER['SCRIPT_NAME'] to get the current script URL.
+@@ -799,7 +805,8 @@ class linkdb implements Iterator, Countable, ArrayAccess
+ $found= (strpos(strtolower($l['title']),$s)!==false)
+ || (strpos(strtolower($l['description']),$s)!==false)
+ || (strpos(strtolower($l['url']),$s)!==false)
+- || (strpos(strtolower($l['tags']),$s)!==false);
++ || (strpos(strtolower($l['tags']),$s)!==false)
++ || (!empty($l['via']) && (strpos(strtolower($l['via']),$s)!==false));
+ if ($found) $filtered[$l['linkdate']] = $l;
+ }
+ krsort($filtered);
+@@ -814,7 +821,7 @@ class linkdb implements Iterator, Countable, ArrayAccess
+ $t = str_replace(',',' ',($casesensitive?$tags:strtolower($tags)));
+ $searchtags=explode(' ',$t);
+ $filtered=array();
+- foreach($this->links as $l)
++ foreach($this-> links as $l)
+ {
+ $linktags = explode(' ',($casesensitive?$l['tags']:strtolower($l['tags'])));
+ if (count(array_intersect($linktags,$searchtags)) == count($searchtags))
+@@ -905,7 +912,7 @@ function showRSS()
+ else $linksToDisplay = $LINKSDB;
+ $nblinksToDisplay = 50; // Number of links to display.
+ if (!empty($_GET['nb'])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links.
+- {
++ {
+ $nblinksToDisplay = $_GET['nb']=='all' ? count($linksToDisplay) : max($_GET['nb']+0,1) ;
+ }
+
+@@ -944,7 +951,12 @@ function showRSS()
+ // If user wants permalinks first, put the final link in description
+ if ($usepermalinks===true) $descriptionlink = '(Link)';
+ if (strlen($link['description'])>0) $descriptionlink = ' '.$descriptionlink;
+- echo ''."\n\n";
++ if(!empty($link['via'])){
++ $via = ' Origine => '.htmlspecialchars(getJustDomain($link['via'])).'';
++ } else {
++ $via = '';
++ }
++ echo ''."\n\n";
+ $i++;
+ }
+ echo '';
+@@ -980,7 +992,7 @@ function showATOM()
+ else $linksToDisplay = $LINKSDB;
+ $nblinksToDisplay = 50; // Number of links to display.
+ if (!empty($_GET['nb'])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links.
+- {
++ {
+ $nblinksToDisplay = $_GET['nb']=='all' ? count($linksToDisplay) : max($_GET['nb']+0,1) ;
+ }
+
+@@ -1006,11 +1018,16 @@ function showATOM()
+
+ // Add permalink in description
+ $descriptionlink = htmlspecialchars('(Permalink)');
++ if(isset($link['via']) && !empty($link['via'])){
++ $via = htmlspecialchars(' Origine => '.getJustDomain($link['via']).'');
++ } else {
++ $via = '';
++ }
+ // If user wants permalinks first, put the final link in description
+ if ($usepermalinks===true) $descriptionlink = htmlspecialchars('(Link)');
+ if (strlen($link['description'])>0) $descriptionlink = '<br>'.$descriptionlink;
+
+- $entries.=''.htmlspecialchars(nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description']))))).$descriptionlink."\n";
++ $entries.=''.htmlspecialchars(nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description']))))).$descriptionlink.$via."\n";
+ if ($link['tags']!='') // Adding tags to each ATOM entry (as mentioned in ATOM specification)
+ {
+ foreach(explode(' ',$link['tags']) as $tag)
+@@ -1478,7 +1495,7 @@ function renderPage()
+ if (!startsWith($url,'http:') && !startsWith($url,'https:') && !startsWith($url,'ftp:') && !startsWith($url,'magnet:') && !startsWith($url,'?'))
+ $url = 'http://'.$url;
+ $link = array('title'=>trim($_POST['lf_title']),'url'=>$url,'description'=>trim($_POST['lf_description']),'private'=>(isset($_POST['lf_private']) ? 1 : 0),
+- 'linkdate'=>$linkdate,'tags'=>str_replace(',',' ',$tags));
++ 'linkdate'=>$linkdate,'tags'=>str_replace(',',' ',$tags), 'via'=>trim($_POST['lf_via']));
+ if ($link['title']=='') $link['title']=$link['url']; // If title is empty, use the URL as title.
+ $LINKSDB[$linkdate] = $link;
+ $LINKSDB->savedb(); // Save to disk.
+@@ -1556,7 +1573,8 @@ function renderPage()
+ $title = (empty($_GET['title']) ? '' : $_GET['title'] ); // Get title if it was provided in URL (by the bookmarklet).
+ $description = (empty($_GET['description']) ? '' : $_GET['description']); // Get description if it was provided in URL (by the bookmarklet). [Bronco added that]
+ $tags = (empty($_GET['tags']) ? '' : $_GET['tags'] ); // Get tags if it was provided in URL
+- $private = (!empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0); // Get private if it was provided in URL
++ $via = (empty($_GET['via']) ? '' : $_GET['via'] );
++ $private = (!empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0); // Get private if it was provided in URL
+ if (($url!='') && parse_url($url,PHP_URL_SCHEME)=='') $url = 'http://'.$url;
+ // 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.)
+ if (empty($title) && parse_url($url,PHP_URL_SCHEME)=='http')
+@@ -1567,7 +1585,7 @@ function renderPage()
+ {
+ // Look for charset in html header.
+ preg_match('##Usi', $data, $meta);
+-
++
+ // If found, extract encoding.
+ if (!empty($meta[0]))
+ {
+@@ -1577,7 +1595,7 @@ function renderPage()
+ $html_charset = (!empty($enc[1])) ? strtolower($enc[1]) : 'utf-8';
+ }
+ else { $html_charset = 'utf-8'; }
+-
++
+ // Extract title
+ $title = html_extract_title($data);
+ if (!empty($title))
+@@ -1592,7 +1610,7 @@ function renderPage()
+ $url='?'.smallHash($linkdate);
+ $title='Note: ';
+ }
+- $link = array('linkdate'=>$linkdate,'title'=>$title,'url'=>$url,'description'=>$description,'tags'=>$tags,'private'=>$private);
++ $link = array('linkdate'=>$linkdate,'title'=>$title,'url'=>$url,'description'=>$description,'tags'=>$tags,'via' => $via,'private'=>$private);
+ }
+
+ $PAGE = new pageBuilder;
+@@ -1842,6 +1860,9 @@ function buildLinkList($PAGE,$LINKSDB)
+ $taglist = explode(' ',$link['tags']);
+ uasort($taglist, 'strcasecmp');
+ $link['taglist']=$taglist;
++ if(!empty($link['via'])){
++ $link['via']=htmlspecialchars($link['via']);
++ }
+ $linkDisp[$keys[$i]] = $link;
+ $i++;
+ }
+diff --git a/tpl/editlink.html b/tpl/editlink.html
+index 4a2c30c..14d4f9c 100644
+--- a/tpl/editlink.html
++++ b/tpl/editlink.html
+@@ -16,6 +16,7 @@
+ Title
{/if}
+ {if="!$GLOBALS['config']['HIDE_TIMESTAMPS'] || isLoggedIn()"}
+ {$value.localdate|htmlspecialchars} - permalink -
+ {else}
+--
+2.1.1
+```
\ No newline at end of file
diff --git a/doc/md/FAQ.md b/doc/md/FAQ.md
new file mode 100644
index 00000000..151dcef5
--- /dev/null
+++ b/doc/md/FAQ.md
@@ -0,0 +1,43 @@
+### Why did you create Shaarli ?
+
+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… **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).
+
+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.
+
+### Why use Shaarli and not Delicious/Diigo ?
+
+With Shaarli:
+
+* The data is yours: It's hosted on your server.
+* Never fear of having your data locked-in.
+* Never fear to have your data sold to third party.
+* Your private links are not hosted on a third party server.
+* You are not tracked by browser addons (like Diigo does)
+* You can change the look and feel of the pages if you want.
+* You can change the behaviour of the program.
+* It's magnitude faster than most bookmarking services.
+
+### What does Shaarli mean?
+
+Shaarli is for shaaring your links.
+
+### My Shaarli is broken!
+First 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).
+
+If everything looks right but the issue(s) remain(s), please:
+- take a look at the [troubleshooting](Troubleshooting) section
+- come [chat with us](https://gitter.im/shaarli/Shaarli) on Gitter, we'll be happy to help ;-)
+- browse active [issues](https://github.com/shaarli/Shaarli/issues) and [Pull Requests](https://github.com/shaarli/Shaarli/pulls)
+ - if you find one that is related to the issue, feel free to comment and provide additional details (host/Shaarli setup)
+ - else, [open a new issue](https://github.com/shaarli/Shaarli/issues/new), and provide information about the problem:
+ - _what happens?_ - display glitches, invalid data, security flaws...
+ - _what is your configuration?_ - OS, server version, activated extensions, web browser...
+ - _is it reproducible?_
+
+### Why not use a real database? Files are slow!
+
+Does browsing [this page](http://sebsauvage.net/links/) feel slow? Try browsing older pages, too.
+
+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?
+
+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.
diff --git a/doc/md/Features.md b/doc/md/Features.md
new file mode 100644
index 00000000..116b1c9c
--- /dev/null
+++ b/doc/md/Features.md
@@ -0,0 +1,24 @@
+### Main features
+Shaarli is intended:
+ * to share, comment and save interesting links and news
+ * to bookmark useful/frequent personal links (as private links) and share them between computers
+ * as a minimal blog/microblog/writing platform (no character limit)
+ * as a read-it-later list (for example items tagged `readlater`)
+ * to draft and save articles/ideas
+ * to keep code snippets
+ * to keep notes and documentation
+ * as a shared clipboard between machines
+ * as a todo list
+ * to store playlists (e.g. with the `music` or `video` tags)
+ * to keep extracts/comments from webpages that may disappear
+ * to keep track of ongoing discussions (for example items tagged `discussion`)
+ * [to feed RSS aggregators](http://shaarli.chassegnouf.net/?9Efeiw) (planets) with specific tags
+ * to feed other social networks, blogs... using RSS feeds and external services (dlvr.it, ifttt.com ...)
+
+### Using Shaarli as a blog, notepad, pastebin...
+
+ * Go to your Shaarli setup and log in
+ * Click the `Add Link` button
+ * To share text only, do not enter any URL in the corresponding input field and click `Add Link`
+ * Pick a title and enter your article, or note, in the description field; add a few tags; optionally check `Private` then click `Save`
+ * 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..9ba57b04
--- /dev/null
+++ b/doc/md/Firefox-share.md
@@ -0,0 +1,15 @@
+### Add Shaarli as a sharing service to Firefox
+
+ * Open your Shaarli and `Login`
+ * Click the `Tools` button in the top bar
+ * Click the `✚Add to Firefox social` button and accept the activation.
+
+
+### Sharing links using Firefox share
+
+ * Add the sharing service as described above
+ * When you are visiting a webpage you would like to share with Shaarli, click the Firefox _Share_ button [[images/firefoxshare.png]]
+ * You can edit your link before and after saving, just like the bookmarklet above.
+
+| | 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. |
+|------|-------------------------------------------------------------------------------|
diff --git a/doc/md/GnuPG-signature.md b/doc/md/GnuPG-signature.md
new file mode 100644
index 00000000..1fb3b42f
--- /dev/null
+++ b/doc/md/GnuPG-signature.md
@@ -0,0 +1,76 @@
+## Introduction
+### PGP and GPG
+[Gnu Privacy Guard](https://gnupg.org/) (GnuPG) is an Open Source implementation of the [Pretty Good
+Privacy](https://en.wikipedia.org/wiki/Pretty_Good_Privacy#OpenPGP) (OpenPGP) specification. Its main purposes are digital authentication,
+signature and encryption.
+
+It is often used by the [FLOSS](https://en.wikipedia.org/wiki/Free_and_open-source_software) community to verify:
+- Linux package signatures: Debian [SecureApt](https://wiki.debian.org/SecureApt), ArchLinux [Master
+Keys](https://www.archlinux.org/master-keys/)
+- [SCM](https://en.wikipedia.org/wiki/Revision_control) releases & maintainer identity
+
+### Trust
+To quote Phil Pennock (the author of the [SKS](https://bitbucket.org/skskeyserver/sks-keyserver/wiki/Home) key server - http://sks.spodhuis.org/):
+
+> 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.
+
+Trust 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:
+- [The Keysigning party HOWTO](http://www.cryptnet.net/fdp/crypto/keysigning_party/en/keysigning_party.html)
+- [Web of trust](https://en.wikipedia.org/wiki/Web_of_trust)
+
+## Generate a GPG key
+- [Generating a GPG key for Git tagging](http://stackoverflow.com/a/16725717) (StackOverflow)
+- [Generating a GPG key](https://help.github.com/articles/generating-a-gpg-key/) (GitHub)
+
+### gpg - provide identity information
+```bash
+$ gpg --gen-key
+
+gpg (GnuPG) 2.1.6; Copyright (C) 2015 Free Software Foundation, Inc.
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+Note: Use "gpg2 --full-gen-key" for a full featured key generation dialog.
+
+GnuPG needs to construct a user ID to identify your key.
+
+Real name: Marvin the Paranoid Android
+Email address: marvin@h2g2.net
+You selected this USER-ID:
+ "Marvin the Paranoid Android "
+
+Change (N)ame, (E)mail, or (O)kay/(Q)uit? o
+We need to generate a lot of random bytes. It is a good idea to perform
+some other action (type on the keyboard, move the mouse, utilize the
+disks) during the prime generation; this gives the random number
+generator a better chance to gain enough entropy.
+```
+
+### gpg - entropy interlude
+At this point, you will:
+- be prompted for a secure password to protect your key (the input method will depend on your Desktop Environment and configuration)
+- be asked to use your machine's input devices (mouse, keyboard, etc.) to generate random entropy; this step _may take some time_
+
+### gpg - key creation confirmation
+```bash
+gpg: key A9D53A3E marked as ultimately trusted
+public and secret key created and signed.
+
+gpg: checking the trustdb
+gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
+gpg: depth: 0 valid: 2 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 2u
+pub rsa2048/A9D53A3E 2015-07-31
+ Key fingerprint = AF2A 5381 E54B 2FD2 14C4 A9A3 0E35 ACA4 A9D5 3A3E
+uid [ultimate] Marvin the Paranoid Android
+sub rsa2048/8C0EACF1 2015-07-31
+```
+
+### gpg - submit your public key to a PGP server (Optional)
+``` bash
+$ gpg --keyserver pgp.mit.edu --send-keys A9D53A3E
+gpg: sending key A9D53A3E to hkp server pgp.mit.edu
+```
+
+## Create and push a GPG-signed tag
+
+See [[Release Shaarli]].
diff --git a/doc/md/Plugin-System.md b/doc/md/Plugin-System.md
new file mode 100644
index 00000000..d55ffe7e
--- /dev/null
+++ b/doc/md/Plugin-System.md
@@ -0,0 +1,710 @@
+[**I am a developer.** Developer API.](#developer-api)
+
+[**I am a template designer.** Guide for template designer.](#guide-for-template-designer)
+
+## Developer API
+
+### What can I do with plugins?
+
+The plugin system let you:
+
+ * insert content into specific places across templates.
+ * alter data before templates rendering.
+ * alter data before saving new links.
+
+### How can I create a plugin for Shaarli?
+
+First, chose a plugin name, such as `demo_plugin`.
+
+Under `plugin` folder, create a folder named with your plugin name. Then create a .php file in that folder.
+
+You should have the following tree view:
+
+```
+| index.php
+| plugins/
+|---| demo_plugin/
+| |---| demo_plugin.php
+```
+
+### Plugin initialization
+
+At the beginning of Shaarli execution, all enabled plugins are loaded. At this point, the plugin system looks for an `init()` function to execute and run it if it exists. This function must be named this way, and takes the `ConfigManager` as parameter.
+
+ _init($conf)
+
+This function can be used to create initial data, load default settings, etc. But also to set *plugin errors*. If the initialization function returns an array of strings, they will be understand as errors, and displayed in the header to logged in users.
+
+### Understanding hooks
+
+A plugin is a set of functions. Each function will be triggered by the plugin system at certain point in Shaarli execution.
+
+These functions need to be named with this pattern:
+
+```
+hook__($data, $conf)
+```
+
+Parameters:
+
+ - data: see [$data section](https://github.com/shaarli/Shaarli/wiki/Plugin-System#plugins-data)
+ - conf: the `ConfigManager` instance.
+
+For exemple, if my plugin want to add data to the header, this function is needed:
+
+ hook_demo_plugin_render_header
+
+If this function is declared, and the plugin enabled, it will be called every time Shaarli is rendering the header.
+
+### Plugin's data
+
+#### Parameters
+
+Every hook function has a `$data` parameter. Its content differs for each hooks.
+
+**This parameter needs to be returned every time**, otherwise data is lost.
+
+ return $data;
+
+#### Filling templates placeholder
+
+Template placeholders are displayed in template in specific places.
+
+RainTPL displays every element contained in the placeholder's array. These element can be added by plugins.
+
+For example, let's add a value in the placeholder `top_placeholder` which is displayed at the top of my page:
+
+```php
+$data['top_placeholder'][] = 'My content';
+# OR
+array_push($data['top_placeholder'], 'My', 'content');
+
+return $data;
+```
+
+#### Data manipulation
+
+When a page is displayed, every variable send to the template engine is passed to plugins before that in `$data`.
+
+The data contained by this array can be altered before template rendering.
+
+For exemple, in linklist, it is possible to alter every title:
+
+```php
+// mind the reference if you want $data to be altered
+foreach ($data['links'] as &$value) {
+ // String reverse every title.
+ $value['title'] = strrev($value['title']);
+}
+
+return $data;
+```
+
+### Metadata
+
+Every plugin needs a `.meta` file, which is in fact an `.ini` file (`KEY="VALUE"`), to be listed in plugin administration.
+
+Each file contain two keys:
+
+ * `description`: plugin description
+ * `parameters`: user parameter names, separated by a `;`.
+ * `parameter.`: add a text description the specified parameter.
+
+> Note: In PHP, `parse_ini_file()` seems to want strings to be between by quotes `"` in the ini file.
+
+### It's not working!
+
+Use `demo_plugin` as a functional example. It covers most of the plugin system features.
+
+If it's still not working, please [open an issue](https://github.com/shaarli/Shaarli/issues/new).
+
+### Hooks
+
+| Hooks | Description |
+| ------------- |:-------------:|
+| [render_header](#render_header) | Allow plugin to add content in page headers. |
+| [render_includes](#render_includes) | Allow plugin to include their own CSS files. |
+| [render_footer](#render_footer) | Allow plugin to add content in page footer and include their own JS files. |
+| [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. |
+| [render_editlink](#render_editlink) | Allow to add fields in the form, or display elements. |
+| [render_tools](#render_tools) | Allow to add content at the end of the page. |
+| [render_picwall](#render_picwall) | Allow to add content at the top and bottom of the page. |
+| [render_tagcloud](#render_tagcloud) | Allow to add content at the top and bottom of the page, and after all tags. |
+| [render_taglist](#render_taglist) | Allow to add content at the top and bottom of the page, and after all tags. |
+| [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. |
+| [render_feed](#render_feed) | Allow to do add tags in RSS and ATOM feeds. |
+| [save_link](#save_link) | Allow to alter the link being saved in the datastore. |
+| [delete_link](#delete_link) | Allow to do an action before a link is deleted from the datastore. |
+
+
+
+#### render_header
+
+Triggered on every page.
+
+Allow plugin to add content in page headers.
+
+##### Data
+
+`$data` is an array containing:
+
+ * `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.).
+ * `_LOGGEDIN_`: true if user is logged in, false otherwise.
+
+##### Template placeholders
+
+Items can be displayed in templates by adding an entry in `$data['']` array.
+
+List of placeholders:
+
+ * `buttons_toolbar`: after the list of buttons in the header.
+
+
+
+ * `fields_toolbar`: after search fields in the header.
+
+> Note: This will only be called in linklist.
+
+
+
+#### render_includes
+
+Triggered on every page.
+
+Allow plugin to include their own CSS files.
+
+##### Data
+
+`$data` is an array containing:
+
+ * `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.).
+ * `_LOGGEDIN_`: true if user is logged in, false otherwise.
+
+##### Template placeholders
+
+Items can be displayed in templates by adding an entry in `$data['']` array.
+
+List of placeholders:
+
+ * `css_files`: called after loading default CSS.
+
+> Note: only add the path of the CSS file. E.g: `plugins/demo_plugin/custom_demo.css`.
+
+#### render_footer
+
+Triggered on every page.
+
+Allow plugin to add content in page footer and include their own JS files.
+
+##### Data
+
+`$data` is an array containing:
+
+ * `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.).
+ * `_LOGGEDIN_`: true if user is logged in, false otherwise.
+
+##### Template placeholders
+
+Items can be displayed in templates by adding an entry in `$data['']` array.
+
+List of placeholders:
+
+ * `text`: called after the end of the footer text.
+ * `endofpage`: called at the end of the page.
+
+
+
+ * `js_files`: called at the end of the page, to include custom JS scripts.
+
+> Note: only add the path of the JS file. E.g: `plugins/demo_plugin/custom_demo.js`.
+
+#### render_linklist
+
+Triggered when `linklist` is displayed (list of links, permalink, search, tag filtered, etc.).
+
+It allows to add content at the begining and end of the page, after every link displayed and to alter link data.
+
+##### Data
+
+`$data` is an array containing:
+
+ * `_LOGGEDIN_`: true if user is logged in, false otherwise.
+ * All templates data, including links.
+
+##### Template placeholders
+
+Items can be displayed in templates by adding an entry in `$data['']` array.
+
+List of placeholders:
+
+ * `action_plugin`: next to the button "private only" at the top and bottom of the page.
+
+
+
+ * `link_plugin`: for every link, between permalink and link URL.
+
+
+
+ * `plugin_start_zone`: before displaying the template content.
+
+
+
+ * `plugin_end_zone`: after displaying the template content.
+
+
+
+#### render_editlink
+
+Triggered when the link edition form is displayed.
+
+Allow to add fields in the form, or display elements.
+
+##### Data
+
+`$data` is an array containing:
+
+ * All templates data.
+
+##### Template placeholders
+
+Items can be displayed in templates by adding an entry in `$data['']` array.
+
+List of placeholders:
+
+ * `edit_link_plugin`: after tags field.
+
+
+
+#### render_tools
+
+Triggered when the "tools" page is displayed.
+
+Allow to add content at the end of the page.
+
+##### Data
+
+`$data` is an array containing:
+
+ * All templates data.
+
+##### Template placeholders
+
+Items can be displayed in templates by adding an entry in `$data['']` array.
+
+List of placeholders:
+
+ * `tools_plugin`: at the end of the page.
+
+
+
+#### render_picwall
+
+Triggered when picwall is displayed.
+
+Allow to add content at the top and bottom of the page.
+
+##### Data
+
+`$data` is an array containing:
+
+ * `_LOGGEDIN_`: true if user is logged in, false otherwise.
+ * All templates data.
+
+##### Template placeholders
+
+Items can be displayed in templates by adding an entry in `$data['']` array.
+
+List of placeholders:
+
+ * `plugin_start_zone`: before displaying the template content.
+
+ * `plugin_end_zone`: after displaying the template content.
+
+
+
+#### render_tagcloud
+
+Triggered when tagcloud is displayed.
+
+Allow to add content at the top and bottom of the page.
+
+##### Data
+
+`$data` is an array containing:
+
+ * `_LOGGEDIN_`: true if user is logged in, false otherwise.
+ * All templates data.
+
+##### Template placeholders
+
+Items can be displayed in templates by adding an entry in `$data['']` array.
+
+List of placeholders:
+
+ * `plugin_start_zone`: before displaying the template content.
+
+ * `plugin_end_zone`: after displaying the template content.
+
+For each tag, the following placeholder can be used:
+
+ * `tag_plugin`: after each tag
+
+
+
+
+#### render_taglist
+
+Triggered when taglist is displayed.
+
+Allow to add content at the top and bottom of the page.
+
+##### Data
+
+`$data` is an array containing:
+
+ * `_LOGGEDIN_`: true if user is logged in, false otherwise.
+ * All templates data.
+
+##### Template placeholders
+
+Items can be displayed in templates by adding an entry in `$data['']` array.
+
+List of placeholders:
+
+ * `plugin_start_zone`: before displaying the template content.
+
+ * `plugin_end_zone`: after displaying the template content.
+
+For each tag, the following placeholder can be used:
+
+ * `tag_plugin`: after each tag
+
+#### render_daily
+
+Triggered when tagcloud is displayed.
+
+Allow to add content at the top and bottom of the page, the bottom of each link and to alter data.
+
+##### Data
+
+`$data` is an array containing:
+
+ * `_LOGGEDIN_`: true if user is logged in, false otherwise.
+ * All templates data, including links.
+
+##### Template placeholders
+
+Items can be displayed in templates by adding an entry in `$data['']` array.
+
+List of placeholders:
+
+ * `link_plugin`: used at bottom of each link.
+
+
+
+ * `plugin_start_zone`: before displaying the template content.
+
+ * `plugin_end_zone`: after displaying the template content.
+
+#### render_feed
+
+Triggered when the ATOM or RSS feed is displayed.
+
+Allow to add tags in the feed, either in the header or for each items. Items (links) can also be altered before being rendered.
+
+##### Data
+
+`$data` is an array containing:
+
+ * `_LOGGEDIN_`: true if user is logged in, false otherwise.
+ * `_PAGE_`: containing either `rss` or `atom`.
+ * All templates data, including links.
+
+##### Template placeholders
+
+Tags can be added in feeds by adding an entry in `$data['']` array.
+
+List of placeholders:
+
+ * `feed_plugins_header`: used as a header tag in the feed.
+
+For each links:
+
+ * `feed_plugins`: additional tag for every link entry.
+
+#### save_link
+
+Triggered when a link is save (new link or edit).
+
+Allow to alter the link being saved in the datastore.
+
+##### Data
+
+`$data` is an array containing the link being saved:
+
+ * id
+ * title
+ * url
+ * shorturl
+ * description
+ * private
+ * tags
+ * created
+ * updated
+
+
+#### delete_link
+
+Triggered when a link is deleted.
+
+Allow to execute any action before the link is actually removed from the datastore
+
+##### Data
+
+`$data` is an array containing the link being saved:
+
+ * id
+ * title
+ * url
+ * shorturl
+ * description
+ * private
+ * tags
+ * created
+ * updated
+
+## Guide for template designer
+
+### Plugin administration
+
+Your theme must include a plugin administration page: `pluginsadmin.html`.
+
+> Note: repo's template link needs to be added when the PR is merged.
+
+Use the default one as an example.
+
+Aside from classic RainTPL loops, plugins order is handle by JavaScript. You can just include `plugin_admin.js`, only if:
+
+ * you're using a table.
+ * you call orderUp() and orderUp() onclick on arrows.
+ * you add data-line and data-order to your rows.
+
+Otherwise, you can use your own JS as long as this field is send by the form:
+
+
+
+### Placeholder system
+
+In order to make plugins work with every custom themes, you need to add variable placeholder in your templates.
+
+It's a RainTPL loop like this:
+
+ {loop="$plugin_variable"}
+ {$value}
+ {/loop}
+
+You should enable `demo_plugin` for testing purpose, since it uses every placeholder available.
+
+### List of placeholders
+
+**page.header.html**
+
+At the end of the menu:
+
+ {loop="$plugins_header.buttons_toolbar"}
+ {$value}
+ {/loop}
+
+At the end of file, before clearing floating blocks:
+
+ {if="!empty($plugin_errors) && isLoggedIn()"}
+
+ {loop="plugin_errors"}
+
{$value}
+ {/loop}
+
+ {/if}
+
+**includes.html**
+
+At the end of the file:
+
+```html
+{loop="$plugins_includes.css_files"}
+
+{/loop}
+```
+
+**page.footer.html**
+
+At the end of your footer notes:
+
+```html
+{loop="$plugins_footer.text"}
+ {$value}
+{/loop}
+```
+
+At the end of file:
+
+```html
+{loop="$plugins_footer.js_files"}
+
+{/loop}
+```
+
+**linklist.html**
+
+After search fields:
+
+```html
+{loop="$plugins_header.fields_toolbar"}
+ {$value}
+{/loop}
+```
+
+Before displaying the link list (after paging):
+
+```html
+{loop="$plugin_start_zone"}
+ {$value}
+{/loop}
+```
+
+For every links (icons):
+
+```html
+{loop="$value.link_plugin"}
+ {$value}
+{/loop}
+```
+
+Before end paging:
+
+```html
+{loop="$plugin_end_zone"}
+ {$value}
+{/loop}
+```
+
+**linklist.paging.html**
+
+After the "private only" icon:
+
+```html
+{loop="$action_plugin"}
+ {$value}
+{/loop}
+```
+
+**editlink.html**
+
+After tags field:
+
+```html
+{loop="$edit_link_plugin"}
+ {$value}
+{/loop}
+```
+
+**tools.html**
+
+After the last tool:
+
+```html
+{loop="$tools_plugin"}
+ {$value}
+{/loop}
+```
+
+**picwall.html**
+
+Top:
+
+```html
+
+```
+
+**feed.atom.xml** and **feed.rss.xml**:
+
+In headers tags section:
+```xml
+{loop="$feed_plugins_header"}
+ {$value}
+{/loop}
+```
+
+After each entry:
+```xml
+{loop="$value.feed_plugins"}
+ {$value}
+{/loop}
+```
diff --git a/doc/md/Plugins.md b/doc/md/Plugins.md
new file mode 100644
index 00000000..b52b8090
--- /dev/null
+++ b/doc/md/Plugins.md
@@ -0,0 +1,75 @@
+## Plugin installation
+
+There is a bunch of plugins shipped with Shaarli, where there is nothing to do to install them.
+
+If you want to install a third party plugin:
+
+ * Download it.
+ * Put it in the `plugins` directory in Shaarli's installation folder.
+ * Make sure you put it correctly:
+
+```
+| index.php
+| plugins/
+|---| custom_plugin/
+| |---| custom_plugin.php
+| |---| ...
+
+```
+
+ * Make sure your webserver can read and write the files in your plugin folder.
+
+## Plugin configuration
+
+In Shaarli's administration page (`Tools` link), go to `Plugin administration`.
+
+Here you can enable and disable all plugins available, and configure them.
+
+
+
+## Plugin order
+
+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.
+
+This is important in case plugins are depending on each other. Read plugins README details for more information.
+
+**Use case**: The (non existent) plugin `shaares_footer` adds a footer to every shaare in Markdown syntax. It needs to be processed *before* (higher in the list) the Markdown plugin. Otherwise its syntax won't be translated in HTML.
+
+## File mode
+
+Enabled plugin are stored in your `config.php` parameters file, under the `array`:
+
+```php
+$GLOBALS['config']['ENABLED_PLUGINS']
+```
+
+You can edit them manually here.
+Example:
+
+```php
+$GLOBALS['config']['ENABLED_PLUGINS'] = array(
+ 'qrcode',
+ 'archiveorg',
+ 'wallabag',
+ 'markdown',
+);
+```
+
+### Plugin usage
+
+#### Official plugins
+
+Usage of each plugin is documented in it's README file:
+
+ * `addlink-toolbar`: Adds the addlink input on the linklist page
+ * `archiveorg`: For each link, add an Archive.org icon
+ * [`markdown`](https://github.com/shaarli/Shaarli/blob/master/plugins/markdown/README.md): Render shaare description with Markdown syntax.
+ * [`playvideos`](https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md): Add a button in the toolbar allowing to watch all videos.
+ * `qrcode`: For each link, add a QRCode icon.
+ * [`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.
+
+
+
+#### Third party plugins
+
+See [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..8f3f7303
--- /dev/null
+++ b/doc/md/REST-API.md
@@ -0,0 +1,104 @@
+## Usage
+
+See the [REST API documentation](http://shaarli.github.io/api-documentation/).
+
+## Authentication
+
+All requests to Shaarli's API must include a JWT token to verify their authenticity.
+
+This token has to be included as an HTTP header called `Authentication: Bearer `.
+
+JWT resources :
+
+ * [jwt.io](https://jwt.io) (including a list of client per language).
+ * RFC : https://tools.ietf.org/html/rfc7519
+ * https://float-middle.com/json-web-tokens-jwt-vs-sessions/
+ * HackerNews thread: https://news.ycombinator.com/item?id=11929267
+
+
+### Shaarli JWT Token
+
+JWT tokens are composed by three parts, separated by a dot `.` and encoded in base64:
+
+```
+[header].[payload].[signature]
+```
+
+#### Header
+
+Shaarli only allow one hash algorithm, so the header will always be the same:
+
+```json
+{
+ "typ": "JWT",
+ "alg": "HS512"
+}
+```
+
+Encoded in base64, it gives:
+
+```
+ewogICAgICAgICJ0eXAiOiAiSldUIiwKICAgICAgICAiYWxnIjogIkhTNTEyIgogICAgfQ==
+```
+
+#### Payload
+
+**Validity duration**
+
+To 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.
+
+```json
+{
+ "iat": 1468663519
+}
+```
+
+See [RFC reference](https://tools.ietf.org/html/rfc7519#section-4.1.6).
+
+
+#### Signature
+
+The 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.
+
+Signature example with PHP:
+
+```php
+$content = base64_encode($header) . '.' . base64_encode($payload);
+$signature = hash_hmac('sha512', $content, $secret);
+```
+
+
+### Complete example
+
+#### PHP
+
+```php
+function generateToken($secret) {
+ $header = base64_encode('{
+ "typ": "JWT",
+ "alg": "HS512"
+ }');
+ $payload = base64_encode('{
+ "iat": '. time() .'
+ }');
+ $signature = hash_hmac('sha512', $header .'.'. $payload , $secret);
+ return $header .'.'. $payload .'.'. $signature;
+}
+
+$secret = 'mysecret';
+$token = generateToken($secret);
+echo $token;
+```
+
+> `ewogICAgICAgICJ0eXAiOiAiSldUIiwKICAgICAgICAiYWxnIjogIkhTNTEyIgogICAgfQ==.ewogICAgICAgICJpYXQiOiAxNDY4NjY3MDQ3CiAgICB9.1d2c54fa947daf594fdbf7591796195652c8bc63bffad7f6a6db2a41c313f495a542cbfb595acade79e83f3810d709b4251d7b940bbc10b531a6e6134af63a68`
+
+```php
+$options = [
+ 'http' => [
+ 'method' => 'GET',
+ 'jwt' => $token,
+ ],
+];
+$context = stream_context_create($options);
+file_get_contents($apiEndpoint, false, $context);
+```
diff --git a/doc/md/RSS-feeds.md b/doc/md/RSS-feeds.md
new file mode 100644
index 00000000..9d718172
--- /dev/null
+++ b/doc/md/RSS-feeds.md
@@ -0,0 +1,26 @@
+### Feeds options
+
+Feeds are available in ATOM with `?do=atom` and RSS with `do=RSS`.
+
+Options:
+- You can use `permalinks` in the feed URL to get permalink to Shaares instead of direct link to shaared URL.
+ - E.G. `https://my.shaarli.domain/?do=atom&permalinks`.
+- 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.
+ - `https://my.shaarli.domain/?do=atom&permalinks&nb=42`
+ - `https://my.shaarli.domain/?do=atom&permalinks&nb=all`
+
+### RSS Feeds or Picture Wall for a specific search/tag
+
+It 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**.
+
+For example, if you want to subscribe only to links tagged `photography`:
+- Go to the desired Shaarli instance.
+- Search for the `photography` tag in the _Filter by tag_ box. Links tagged `photography` are displayed.
+- Click on the `RSS Feed` button.
+- You are presented with an RSS feed showing only these links. Subscribe to it to receive only updates with this tag.
+- The same method **also works for a full-text search** (_Search_ box) **and for the Picture Wall** (want to only see pictures about `nature`?)
+- You can also build the URLs manually:
+ - `https://my.shaarli.domain/?do=rss&searchtags=nature`
+ - `https://my.shaarli.domain/links/?do=picwall&searchterm=poney`
+
+ 
diff --git a/doc/md/Release-Shaarli.md b/doc/md/Release-Shaarli.md
new file mode 100644
index 00000000..cce5e209
--- /dev/null
+++ b/doc/md/Release-Shaarli.md
@@ -0,0 +1,168 @@
+See [Git - Maintaining a project - Tagging your
+releases](http://git-scm.com/book/en/v2/Distributed-Git-Maintaining-a-Project#Tagging-Your-Releases).
+
+## Prerequisites
+This guide assumes that you have:
+- a GPG key matching your GitHub authentication credentials
+ - i.e., the email address identified by the GPG key is the same as the one in your `~/.gitconfig`
+- a GitHub fork of Shaarli
+- a local clone of your Shaarli fork, with the following remotes:
+ - `origin` pointing to your GitHub fork
+ - `upstream` pointing to the main Shaarli repository
+- maintainer permissions on the main Shaarli repository, to:
+ - push the signed tag
+ - create a new release
+- [Composer](https://getcomposer.org/) and [Pandoc](http://pandoc.org/) need to be installed
+
+## GitHub release draft and `CHANGELOG.md`
+See http://keepachangelog.com/en/0.3.0/ for changelog formatting.
+
+### GitHub release draft
+GitHub 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`.
+
+### `CHANGELOG.md`
+This file should contain the same information as the release note draft for the upcoming version.
+
+Update it to:
+- add new entries (additions, fixes, etc.)
+- mark the current version as released by setting its date and link
+- add a new section for the future unreleased version
+
+```bash
+$ cd /path/to/shaarli
+
+$ nano CHANGELOG.md
+
+[...]
+## vA.B.C - UNRELEASED
+TBA
+
+## [vX.Y.Z](https://github.com/shaarli/Shaarli/releases/tag/vX.Y.Z) - YYYY-MM-DD
+[...]
+```
+
+
+## Increment the version code, updated docs, create and push a signed tag
+### Generate documentation
+```bash
+$ cd /path/to/shaarli
+
+# create a new branch
+$ git fetch upstream
+$ git checkout upstream/master -b v0.5.0
+
+# rebuild the documentation from the wiki
+$ make htmldoc
+
+# commit the changes
+$ git add doc
+$ git commit -s -m "Generate documentation for v0.5.0"
+
+# push the commit on your GitHub fork
+$ git push origin v0.5.0
+```
+
+### Create and merge a Pull Request
+This one is pretty straightforward ;-)
+
+### Bump Shaarli version to v0.x branch
+
+```
+$ git checkout master
+$ git fetch upstream
+$ git pull upstream master
+
+# IF the branch doesn't exists
+$ git checkout -b v0.5
+# OR if the branch already exists
+$ git checkout v0.5
+$ git rebase upstream/master
+
+# Bump shaarli version from dev to 0.5.0, **without the `v`**
+$ vim shaarli_version.php
+$ git add shaarli_version
+$ git commit -s -m "Bump Shaarli version to v0.5.0"
+$ git push upstream v0.5
+```
+
+### Create and push a signed tag
+```bash
+# update your local copy
+$ git checkout v0.5
+$ git fetch upstream
+$ git pull upstream v0.5
+
+# create a signed tag
+$ git tag -s -m "Release v0.5.0" v0.5.0
+
+# push it to "upstream"
+$ git push --tags upstream
+```
+
+### Verify a signed tag
+[`v0.5.0`](https://github.com/shaarli/Shaarli/releases/tag/v0.5.0) is the first GPG-signed tag pushed on the Community Shaarli.
+
+Let's have a look at its signature!
+
+```bash
+$ cd /path/to/shaarli
+$ git fetch upstream
+
+# get the SHA1 reference of the tag
+$ git show-ref tags/v0.5.0
+f7762cf803f03f5caf4b8078359a63783d0090c1 refs/tags/v0.5.0
+
+# verify the tag signature information
+$ git verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1
+gpg: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F
+gpg: Good signature from "VirtualTam " [ultimate]
+```
+
+## Publish the GitHub release
+### Update release badges
+Update `README.md` so version badges display and point to the newly released Shaarli version(s), in the `master` branch.
+
+### Create a GitHub release from a Git tag
+From the previously drafted release:
+- edit the release notes (if needed)
+- specify the appropriate Git tag
+- publish the release
+- profit!
+
+### Generate and upload all-in-one release archives
+Users with a shared hosting may have:
+- no SSH access
+- no possibility to install PHP packages or server extensions
+- no possibility to run scripts
+
+To ease Shaarli installations, it is possible to generate and upload additional release archives,
+that will contain Shaarli code plus all required third-party libraries.
+
+**From the `v0.5` branch:**
+
+```bash
+$ make release_archive
+```
+
+This will create the following archives:
+- `shaarli-vX.Y.Z-full.tar`
+- `shaarli-vX.Y.Z-full.zip`
+
+The archives need to be manually uploaded on the previously created GitHub release.
+
+### Update `stable` and `latest` branches
+
+```
+$ git checkout latest
+# latest release
+$ git merge v0.5.0
+# fix eventual conflicts
+$ make test
+$ git push upstream latest
+$ git checkout stable
+# latest previous major
+$ git merge v0.4.5
+# fix eventual conflicts
+$ make test
+$ git push upstream stable
+```
diff --git a/doc/md/Reverse-proxy-configuration.md b/doc/md/Reverse-proxy-configuration.md
new file mode 100644
index 00000000..91ffecff
--- /dev/null
+++ b/doc/md/Reverse-proxy-configuration.md
@@ -0,0 +1,6 @@
+
+TODO, see https://github.com/shaarli/Shaarli/issues/888
+
+## HAProxy
+
+## Nginx
diff --git a/doc/md/Security.md b/doc/md/Security.md
new file mode 100644
index 00000000..aec37fa0
--- /dev/null
+++ b/doc/md/Security.md
@@ -0,0 +1,27 @@
+## Client browser
+* 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
+
+## PHP
+* `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.
+
+## Server and sessions
+* Directories are protected using `.htaccess` files
+* Forms are protected against XSRF (Cross-site requests forgery):
+ * Forms which act on data (save,delete…) contain a token generated by the server.
+ * Any posted form which does not contain a valid token is rejected.
+ * Any token can only be used once.
+ * Tokens are attached to the session and cannot be reused in another session.
+* Sessions automatically expire after 60 minutes.
+* Sessions are protected against hijacking: the session ID cannot be used from a different IP address.
+
+## Shaarli datastore and configuration
+* 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.
+* Links are stored as an associative array which is serialized, compressed (with deflate), base64-encoded and saved as a comment in a `.php` file.
+* Even if the server does not support `.htaccess` files, the data file will still not be readable by URL.
+* The database looks like this:
+```php
+
+```
+
+* 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/md/Server-configuration.md b/doc/md/Server-configuration.md
new file mode 100644
index 00000000..23fdbc8b
--- /dev/null
+++ b/doc/md/Server-configuration.md
@@ -0,0 +1,392 @@
+*Example virtual host configurations for popular web servers*
+
+- [Apache](#apache)
+- [Nginx](#nginx)
+
+## Prerequisites
+### Shaarli
+* Shaarli is installed in a directory readable/writeable by the user
+* the correct read/write permissions have been granted to the web server _user and/or group_
+* for HTTPS / SSL:
+ * a key pair (public, private) and a certificate have been generated
+ * the appropriate server SSL extension is installed and active
+
+### HTTPS, TLS and self-signed certificates
+Related guides:
+* [How to Create Self-Signed SSL Certificates with OpenSSL](http://www.xenocafe.com/tutorials/linux/centos/openssl/self_signed_certificates/index.php)
+* [How do I create my own Certificate Authority?](https://workaround.org/certificate-authority)
+* 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`
+
+### Proxies
+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:
+- `X-Forwarded-Proto`;
+- `X-Forwarded-Host`;
+- `X-Forwarded-For`.
+
+See also [proxy-related](https://github.com/shaarli/Shaarli/issues?utf8=%E2%9C%93&q=label%3Aproxy+) issues.
+
+## Apache
+### Minimal
+```apache
+
+ ServerName shaarli.my-domain.org
+ DocumentRoot /absolute/path/to/shaarli/
+
+```
+### Debug - Log all the things!
+This configuration will log both Apache and PHP errors, which may prove useful to identify server configuration errors.
+
+See:
+* [Apache/PHP - error log per VirtualHost](http://stackoverflow.com/q/176) (StackOverflow)
+* [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/)
+
+```apache
+
+ ServerName shaarli.my-domain.org
+ DocumentRoot /absolute/path/to/shaarli/
+
+ LogLevel warn
+ ErrorLog /var/log/apache2/shaarli-error.log
+ CustomLog /var/log/apache2/shaarli-access.log combined
+
+ php_flag log_errors on
+ php_flag display_errors on
+ php_value error_reporting 2147483647
+ php_value error_log /var/log/apache2/shaarli-php-error.log
+
+```
+
+### Standard - Keep access and error logs
+```apache
+
+ ServerName shaarli.my-domain.org
+ DocumentRoot /absolute/path/to/shaarli/
+
+ LogLevel warn
+ ErrorLog /var/log/apache2/shaarli-error.log
+ CustomLog /var/log/apache2/shaarli-access.log combined
+
+```
+
+### Paranoid - Redirect HTTP (:80) to HTTPS (:443)
+See [Server-side TLS](https://wiki.mozilla.org/Security/Server_Side_TLS#Apache) (Mozilla).
+
+```apache
+
+ ServerName shaarli.my-domain.org
+ DocumentRoot /absolute/path/to/shaarli/
+
+ SSLEngine on
+ SSLCertificateFile /absolute/path/to/the/website/certificate.pem
+ SSLCertificateKeyFile /absolute/path/to/the/website/key.key
+
+
+ AllowOverride All
+ Options Indexes FollowSymLinks MultiViews
+ Order allow,deny
+ allow from all
+
+
+ LogLevel warn
+ ErrorLog /var/log/apache2/shaarli-error.log
+ CustomLog /var/log/apache2/shaarli-access.log combined
+
+
+ ServerName shaarli.my-domain.org
+ Redirect 301 / https://shaarli.my-domain.org
+
+ LogLevel warn
+ ErrorLog /var/log/apache2/shaarli-error.log
+ CustomLog /var/log/apache2/shaarli-access.log combined
+
+```
+
+### .htaccess
+
+Shaarli 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.
+
+**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.
+
+Apache 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.
+
+## LightHttpd
+
+## Nginx
+### Foreword
+Nginx 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.
+
+Required packages:
+- [nginx](http://nginx.org)
+- [php-fpm](http://php-fpm.org) - PHP FastCGI Process Manager
+
+Official documentation:
+- [Beginner's guide](http://nginx.org/en/docs/beginners_guide.html)
+- [ngx_http_fastcgi_module](http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html)
+- [Pitfalls](http://wiki.nginx.org/Pitfalls)
+
+Community resources:
+- [Server-side TLS (Nginx)](https://wiki.mozilla.org/Security/Server_Side_TLS#Nginx) (Mozilla)
+- [PHP configuration examples](http://kbeezie.com/nginx-configuration-examples/) (Karl Blessing)
+
+### Common setup
+Once Nginx and PHP-FPM are installed, we need to ensure:
+- Nginx and PHP-FPM are running using the _same user and group_
+- both these user and group have
+ - `read` permissions for Shaarli resources
+ - `execute` permissions for Shaarli directories _AND_ their parent directories
+
+On a production server:
+- `user:group` will likely be `http:http`, `www:www` or `www-data:www-data`
+- files will be located under `/var/www`, `/var/http` or `/usr/share/nginx`
+
+On a development server:
+- files may be located in a user's home directory
+- in this case, make sure both Nginx and PHP-FPM are running as the local user/group!
+
+For all following configuration examples, this user/group pair will be used:
+- `user:group = john:users`,
+
+which corresponds to the following service configuration:
+
+```ini
+; /etc/php/php-fpm.conf
+user = john
+group = users
+
+[...]
+listen.owner = john
+listen.group = users
+```
+
+```nginx
+# /etc/nginx/nginx.conf
+user john users;
+
+http {
+ [...]
+}
+```
+
+### (Optional) Increase the maximum file upload size
+Some bookmark dumps generated by web browsers can be _huge_ due to the presence of Base64-encoded images and favicons, as well as extra verbosity when nesting links in (sub-)folders.
+
+To increase upload size, you will need to modify both nginx and PHP configuration:
+
+```nginx
+# /etc/nginx/nginx.conf
+
+http {
+ [...]
+
+ client_max_body_size 10m;
+
+ [...]
+}
+```
+
+```ini
+# /etc/php5/fpm/php.ini
+
+[...]
+post_max_size = 10M
+[...]
+upload_max_filesize = 10M
+```
+
+### Minimal
+_WARNING: Use for development only!_
+
+```nginx
+user john users;
+worker_processes 1;
+events {
+ worker_connections 1024;
+}
+
+http {
+ include mime.types;
+ default_type application/octet-stream;
+ keepalive_timeout 20;
+
+ index index.html index.php;
+
+ server {
+ listen 80;
+ server_name localhost;
+ root /home/john/web;
+
+ access_log /var/log/nginx/access.log;
+ error_log /var/log/nginx/error.log;
+
+ location /shaarli/ {
+ try_files $uri /shaarli/index.php$is_args$args;
+ access_log /var/log/nginx/shaarli.access.log;
+ error_log /var/log/nginx/shaarli.error.log;
+ }
+
+ location ~ (index)\.php$ {
+ try_files $uri =404;
+ fastcgi_split_path_info ^(.+\.php)(/.+)$;
+ fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
+ fastcgi_index index.php;
+ include fastcgi.conf;
+ }
+ }
+}
+```
+
+### Modular
+The previous setup is sufficient for development purposes, but has several major caveats:
+- every content that does not match the PHP rule will be sent to client browsers:
+ - dotfiles - in our case, `.htaccess`
+ - temporary files, e.g. Vim or Emacs files: `index.php~`
+- asset / static resource caching is not optimized
+- if serving several PHP sites, there will be a lot of duplication: `location /shaarli/`, `location /mysite/`, etc.
+
+To solve this, we will split Nginx configuration in several parts, that will be included when needed:
+
+```nginx
+# /etc/nginx/deny.conf
+location ~ /\. {
+ # deny access to dotfiles
+ access_log off;
+ log_not_found off;
+ deny all;
+}
+
+location ~ ~$ {
+ # deny access to temp editor files, e.g. "script.php~"
+ access_log off;
+ log_not_found off;
+ deny all;
+}
+```
+
+```nginx
+# /etc/nginx/php.conf
+location ~ (index)\.php$ {
+ # Slim - split URL path into (script_filename, path_info)
+ try_files $uri =404;
+ fastcgi_split_path_info ^(.+\.php)(/.+)$;
+
+ # filter and proxy PHP requests to PHP-FPM
+ fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
+ fastcgi_index index.php;
+ include fastcgi.conf;
+}
+
+location ~ \.php$ {
+ # deny access to all other PHP scripts
+ deny all;
+}
+```
+
+```nginx
+# /etc/nginx/static_assets.conf
+location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
+ expires max;
+ add_header Pragma public;
+ add_header Cache-Control "public, must-revalidate, proxy-revalidate";
+}
+```
+
+```nginx
+# /etc/nginx/nginx.conf
+[...]
+
+http {
+ [...]
+
+ root /home/john/web;
+ access_log /var/log/nginx/access.log;
+ error_log /var/log/nginx/error.log;
+
+ server {
+ # virtual host for a first domain
+ listen 80;
+ server_name my.first.domain.org;
+
+ location /shaarli/ {
+ # Slim - rewrite URLs
+ try_files $uri /shaarli/index.php$is_args$args;
+
+ access_log /var/log/nginx/shaarli.access.log;
+ error_log /var/log/nginx/shaarli.error.log;
+ }
+
+ location = /shaarli/favicon.ico {
+ # serve the Shaarli favicon from its custom location
+ alias /var/www/shaarli/images/favicon.ico;
+ }
+
+ include deny.conf;
+ include static_assets.conf;
+ include php.conf;
+ }
+
+ server {
+ # virtual host for a second domain
+ listen 80;
+ server_name second.domain.com;
+
+ location /minigal/ {
+ access_log /var/log/nginx/minigal.access.log;
+ error_log /var/log/nginx/minigal.error.log;
+ }
+
+ include deny.conf;
+ include static_assets.conf;
+ include php.conf;
+ }
+}
+```
+
+### Redirect HTTP to HTTPS
+Assuming 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.
+
+```nginx
+# /etc/nginx/nginx.conf
+[...]
+
+http {
+ [...]
+
+ index index.html index.php;
+
+ root /home/john/web;
+ access_log /var/log/nginx/access.log;
+ error_log /var/log/nginx/error.log;
+
+ server {
+ listen 80;
+ server_name localhost;
+
+ return 301 https://localhost$request_uri;
+ }
+
+ server {
+ listen 443 ssl;
+ server_name localhost;
+
+ ssl_certificate /home/john/ssl/localhost.crt;
+ ssl_certificate_key /home/john/ssl/localhost.key;
+
+ location /shaarli/ {
+ # Slim - rewrite URLs
+ try_files $uri /index.php$is_args$args;
+
+ access_log /var/log/nginx/shaarli.access.log;
+ error_log /var/log/nginx/shaarli.error.log;
+ }
+
+ location = /shaarli/favicon.ico {
+ # serve the Shaarli favicon from its custom location
+ alias /var/www/shaarli/images/favicon.ico;
+ }
+
+ include deny.conf;
+ include static_assets.conf;
+ include php.conf;
+ }
+}
+```
diff --git a/doc/md/Server-requirements.md b/doc/md/Server-requirements.md
new file mode 100644
index 00000000..b6bbd66a
--- /dev/null
+++ b/doc/md/Server-requirements.md
@@ -0,0 +1,40 @@
+## PHP
+
+### Release information
+- [PHP: Supported versions](http://php.net/supported-versions.php)
+- [PHP: Unsupported versions](http://php.net/eol.php) _(EOL - End Of Life)_
+- [PHP 7 Changelog](http://php.net/ChangeLog-7.php)
+- [PHP 5 Changelog](http://php.net/ChangeLog-5.php)
+- [PHP: Bugs](https://bugs.php.net/)
+
+### Supported versions
+Version | Status | Shaarli compatibility
+:---:|:---:|:---:
+7.1 | Supported (v0.9.x) | :white_check_mark:
+7.0 | Supported | :white_check_mark:
+5.6 | Supported | :white_check_mark:
+5.5 | EOL: 2016-07-10 | :white_check_mark:
+5.4 | EOL: 2015-09-14 | :white_check_mark: (up to Shaarli 0.8.x)
+5.3 | EOL: 2014-08-14 | :white_check_mark: (up to Shaarli 0.8.x)
+
+See also:
+- [Travis configuration](https://github.com/shaarli/Shaarli/blob/master/.travis.yml)
+
+### Dependency management
+Starting with Shaarli `v0.8.x`, [Composer](https://getcomposer.org/) is used to resolve,
+download and install third-party PHP dependencies.
+
+Library | Required? | Usage
+---|:---:|---
+[`shaarli/netscape-bookmark-parser`](https://packagist.org/packages/shaarli/netscape-bookmark-parser) | All | Import bookmarks from Netscape files
+[`erusev/parsedown`](https://packagist.org/packages/erusev/parsedown) | All | Parse MarkDown syntax for the MarkDown plugin
+[`slim/slim`](https://packagist.org/packages/slim/slim) | All | Handle routes and middleware for the REST API
+
+### Extensions
+Extension | Required? | Usage
+---|:---:|---
+[`openssl`](http://php.net/manual/en/book.openssl.php) | All | OpenSSL, HTTPS
+[`php-mbstring`](http://php.net/manual/en/book.mbstring.php) | CentOS, Fedora, RHEL, Windows | multibyte (Unicode) string support
+[`php-gd`](http://php.net/manual/en/book.image.php) | optional | thumbnail resizing
+[`php-intl`](http://php.net/manual/en/book.intl.php) | optional | localized text sorting (e.g. `e->è->f`)
+[`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/md/Server-security.md b/doc/md/Server-security.md
new file mode 100644
index 00000000..8df36f46
--- /dev/null
+++ b/doc/md/Server-security.md
@@ -0,0 +1,73 @@
+## php.ini
+PHP settings are defined in:
+- a main configuration file, usually found under `/etc/php5/php.ini`; some distributions provide different configuration environments, e.g.
+ - `/etc/php5/php.ini` - used when running console scripts
+ - `/etc/php5/apache2/php.ini` - used when a client requests PHP resources from Apache
+ - `/etc/php5/php-fpm.conf` - used when PHP requests are proxied to PHP-FPM
+- additional configuration files/entries, depending on the installed/enabled extensions:
+ - `/etc/php/conf.d/xdebug.ini`
+
+### Locate .ini files
+#### Console environment
+```bash
+$ php --ini
+Configuration File (php.ini) Path: /etc/php
+Loaded Configuration File: /etc/php/php.ini
+Scan for additional .ini files in: /etc/php/conf.d
+Additional .ini files parsed: /etc/php/conf.d/xdebug.ini
+```
+
+#### Server environment
+- create a `phpinfo.php` script located in a path supported by the web server, e.g.
+ - Apache (with user dirs enabled): `/home/myself/public_html/phpinfo.php`
+ - `/var/www/test/phpinfo.php`
+- make sure the script is readable by the web server user/group (usually, `www`, `www-data` or `httpd`)
+- access the script from a web browser
+- look at the _Loaded Configuration File_ and _Scan this dir for additional .ini files_ entries
+```php
+
+```
+
+## fail2ban
+`fail2ban` is an intrusion prevention framework that reads server (Apache, SSH, etc.) and uses `iptables` profiles to block brute-force attempts:
+- [Official website](http://www.fail2ban.org/wiki/index.php/Main_Page)
+- [Source code](https://github.com/fail2ban/fail2ban)
+
+### Read Shaarli logs to ban IPs
+Example configuration:
+- allow 3 login attempts per IP address
+- after 3 failures, permanently ban the corresponding IP adddress
+
+`/etc/fail2ban/jail.local`
+```ini
+[shaarli-auth]
+enabled = true
+port = https,http
+filter = shaarli-auth
+logpath = /var/www/path/to/shaarli/data/log.txt
+maxretry = 3
+bantime = -1
+```
+
+`/etc/fail2ban/filter.d/shaarli-auth.conf`
+```ini
+[INCLUDES]
+before = common.conf
+[Definition]
+failregex = \s-\s\s-\sLogin failed for user.*$
+ignoreregex =
+```
+
+## Robots - Restricting search engines and web crawler traffic
+
+Creating a `robots.txt` with the following contents at the root of your Shaarli installation will prevent _honest_ 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.
+
+```
+User-agent: *
+Disallow: /
+```
+
+See:
+- http://www.robotstxt.org/
+- http://www.robotstxt.org/robotstxt.html
+- http://www.robotstxt.org/meta.html
diff --git a/doc/md/Shaarli-configuration.md b/doc/md/Shaarli-configuration.md
new file mode 100644
index 00000000..933f5245
--- /dev/null
+++ b/doc/md/Shaarli-configuration.md
@@ -0,0 +1,215 @@
+## Foreword
+
+**Do not edit configuration options in index.php! Your changes would be lost.**
+
+Once your Shaarli instance is installed, the file `data/config.json.php` is generated:
+* it contains all settings in JSON format, and can be edited to customize values
+* it defines which [plugins](Plugin-System) are enabled[](.html)
+* its values override those defined in `index.php`
+* it is wrap in a PHP comment to prevent anyone accessing it, regardless of server configuration
+
+## File and directory permissions
+
+The server process running Shaarli must have:
+- `read` access to the following resources:
+ - PHP scripts: `index.php`, `application/*.php`, `plugins/*.php`
+ - 3rd party PHP and Javascript libraries: `inc/*.php`, `inc/*.js`
+ - static assets:
+ - CSS stylesheets: `inc/*.css`
+ - `images/*`
+ - RainTPL templates: `tpl/*.html`
+- `read`, `write` and `execution` access to the following directories:
+ - `cache` - thumbnail cache
+ - `data` - link data store, configuration options
+ - `pagecache` - Atom/RSS feed cache
+ - `tmp` - RainTPL page cache
+
+On a Linux distribution:
+- the web server user will likely be `www` or `http` (for Apache2)
+- it will be a member of a group of the same name: `www:www`, `http:http`
+- to give it access to Shaarli, either:
+ - unzip Shaarli in the default web server location (usually `/var/www/`) and set the web server user as the owner
+ - put users in the same group as the web server, and set the appropriate access rights
+- if you have a domain / subdomain to serve Shaarli, [configure the server](Server-configuration) accordingly[](.html)
+
+## Configuration
+
+In `data/config.json.php`.
+
+See also [Plugin System](Plugin-System.html).
+
+### Credentials
+
+> You shouldn't edit those.
+
+**login**: Login username.
+**hash**: Generated password hash.
+**salt**: Password salt.
+
+### General
+
+**title**: Shaarli's instance title.
+**header_link**: Link to the homepage.
+**links_per_page**: Number of shaares displayed per page.
+**timezone**: See [the list of supported timezones](http://php.net/manual/en/timezones.php).
+**enabled_plugins**: List of enabled plugins.
+
+### Security
+
+**session_protection_disabled**: Disable session cookie hijacking protection (not recommended).
+It might be useful if your IP adress often changes.
+**ban_after**: Failed login attempts before being IP banned.
+**ban_duration**: IP ban duration in seconds.
+**open_shaarli**: Anyone can add a new link while logged out if enabled.
+**trusted_proxies**: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy.
+**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"]`).
+
+### Resources
+
+**data_dir**: Data directory.
+**datastore**: Shaarli's links database file path.
+**history**: Shaarli's operation history file path.
+**updates**: File path for the ran updates file.
+**log**: Log file path.
+**update_check**: Last update check file path.
+**raintpl_tpl**: Templates directory.
+**raintpl_tmp**: Template engine cache directory.
+**thumbnails_cache**: Thumbnails cache directory.
+**page_cache**: Shaarli's internal cache directory.
+**ban_file**: Banned IP file path.
+
+### Updates
+
+**check_updates**: Enable or disable update check to the git repository.
+**check_updates_branch**: Git branch used to check updates (e.g. `stable` or `master`).
+**check_updates_interval**: Look for new version every N seconds (default: every day).
+
+### Privacy
+
+**default_private_links**: Check the private checkbox by default for every new link.
+**hide_public_links**: All links are hidden while logged out.
+**hide_timestamps**: Timestamps are hidden.
+
+### Feed
+
+**rss_permalinks**: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL.
+**show_atom**: Display ATOM feed button.
+
+### Thumbnail
+
+**enable_thumbnails**: Enable or disable thumbnail display.
+**enable_localcache**: Enable or disable local cache.
+
+### Redirector
+
+**url**: Redirector URL, such as `anonym.to`.
+**encode_url**: Enable this if the redirector needs encoded URL to work properly.
+
+## Configuration file example
+
+```json
+",
+ "hash": "",
+ "salt": ""
+ },
+ "security": {
+ "ban_after": 4,
+ "session_protection_disabled": false,
+ "ban_duration": 1800,
+ "trusted_proxies": [
+ "1.2.3.4",
+ "5.6.7.8"
+ ],
+ "allowed_protocols": [
+ "ftp",
+ "ftps",
+ "magnet"
+ ]
+ },
+ "resources": {
+ "data_dir": "data",
+ "config": "data\/config.php",
+ "datastore": "data\/datastore.php",
+ "ban_file": "data\/ipbans.php",
+ "updates": "data\/updates.txt",
+ "log": "data\/log.txt",
+ "update_check": "data\/lastupdatecheck.txt",
+ "raintpl_tmp": "tmp\/",
+ "raintpl_tpl": "tpl\/",
+ "thumbnails_cache": "cache",
+ "page_cache": "pagecache"
+ },
+ "general": {
+ "check_updates": true,
+ "rss_permalinks": true,
+ "links_per_page": 20,
+ "default_private_links": true,
+ "enable_thumbnails": true,
+ "enable_localcache": true,
+ "check_updates_branch": "stable",
+ "check_updates_interval": 86400,
+ "enabled_plugins": [
+ "markdown",
+ "wallabag",
+ "archiveorg"
+ ],
+ "timezone": "Europe\/Paris",
+ "title": "My Shaarli",
+ "header_link": "?"
+ },
+ "extras": {
+ "show_atom": false,
+ "hide_public_links": false,
+ "hide_timestamps": false,
+ "open_shaarli": false,
+ "redirector": "http://anonym.to/?",
+ "redirector_encode_url": false
+ },
+ "general": {
+ "header_link": "?",
+ "links_per_page": 20,
+ "enabled_plugins": [
+ "markdown",
+ "wallabag"
+ ],
+ "timezone": "Europe\/Paris",
+ "title": "My Shaarli"
+ },
+ "updates": {
+ "check_updates": true,
+ "check_updates_branch": "stable",
+ "check_updates_interval": 86400
+ },
+ "feed": {
+ "rss_permalinks": true,
+ "show_atom": false
+ },
+ "privacy": {
+ "default_private_links": true,
+ "hide_public_links": false,
+ "hide_timestamps": false
+ },
+ "thumbnail": {
+ "enable_thumbnails": true,
+ "enable_localcache": true
+ },
+ "redirector": {
+ "url": "http://anonym.to/?",
+ "encode_url": false
+ },
+ "plugins": {
+ "WALLABAG_URL": "http://demo.wallabag.org",
+ "WALLABAG_VERSION": "1"
+ }
+} ?>
+```
+
+## Additional configuration
+
+The playvideos plugin may require that you adapt your server's
+[Content Security Policy](https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md#troubleshooting)
+configuration to work properly.[](.html)
+
diff --git a/doc/md/Shaarli-images.md b/doc/md/Shaarli-images.md
new file mode 100644
index 00000000..25f6cfdd
--- /dev/null
+++ b/doc/md/Shaarli-images.md
@@ -0,0 +1,72 @@
+## Get and run a Shaarli image
+
+### DockerHub repository
+The images can be found in the [`shaarli/shaarli`](https://hub.docker.com/r/shaarli/shaarli/)
+repository.
+
+### Available image tags
+- `latest`: master branch (tarball release)
+- `stable`: stable branch (tarball release)
+- `dev`: master branch (Git clone)
+
+All images rely on:
+- [Debian 8 Jessie](https://hub.docker.com/_/debian/)
+- [PHP5-FPM](http://php-fpm.org/)
+- [Nginx](http://nginx.org/)
+
+### Download from DockerHub
+```bash
+$ docker pull shaarli/shaarli
+latest: Pulling from shaarli/shaarli
+32716d9fcddb: Pull complete
+84899d045435: Pull complete
+4b6ad7444763: Pull complete
+e0345ef7a3e0: Pull complete
+5c1dd344094f: Pull complete
+6422305a200b: Pull complete
+7d63f861dbef: Pull complete
+3eb97210645c: Pull complete
+869319d746ff: Already exists
+869319d746ff: Pulling fs layer
+902b87aaaec9: Already exists
+Digest: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98
+Status: Downloaded newer image for shaarli/shaarli:latest
+```
+
+### Create and start a new container from the image
+```bash
+# map the host's :8000 port to the container's :80 port
+$ docker create -p 8000:80 shaarli/shaarli
+d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
+
+# launch the container in the background
+$ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
+d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
+
+# list active containers
+$ docker ps
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo
+```
+
+### Stop and destroy a container
+```bash
+$ docker stop backstabbing_galileo # those docker guys are really rude to physicists!
+backstabbing_galileo
+
+# check the container is stopped
+$ docker ps
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+
+# list ALL containers
+$ docker ps -a
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo
+
+# destroy the container
+$ docker rm backstabbing_galileo # let's put an end to these barbarian practices
+backstabbing_galileo
+
+$ docker ps -a
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+```
diff --git a/doc/md/Static-analysis.md b/doc/md/Static-analysis.md
new file mode 100644
index 00000000..ee4f5978
--- /dev/null
+++ b/doc/md/Static-analysis.md
@@ -0,0 +1,11 @@
+## WIP
+This topic is currently being discussed here:
+- [Fix coding style (static analysis)](https://github.com/shaarli/Shaarli/issues/95) (#95)
+- [Continuous Integration tools & features](https://github.com/shaarli/Shaarli/issues/130) (#130)
+
+### Usage
+Static analysis tools can be installed with Composer, and used through Shaarli's [Makefile](https://github.com/shaarli/Shaarli/blob/master/Makefile).
+
+For an overview of the available features, see:
+- [Code quality: Makefile to run static code checkers](https://github.com/shaarli/Shaarli/pull/124) (#124)
+- [Run PHPCS against different coding standards](https://github.com/shaarli/Shaarli/pull/276) (#276)
diff --git a/doc/md/Theming.md b/doc/md/Theming.md
new file mode 100644
index 00000000..ae68db38
--- /dev/null
+++ b/doc/md/Theming.md
@@ -0,0 +1,84 @@
+## Foreword
+
+There are two ways of customizing how Shaarli looks:
+
+1. by using a custom CSS to override Shaarli's CSS
+2. by using a full theme that provides its own RainTPL templates, CSS and Javascript resources
+
+## Custom CSS
+
+Shaarli's appearance can be modified by adding CSS rules to:
+- Shaarli < `v0.9.0`: `inc/user.css`
+- Shaarli >= `v0.9.0`: `data/user.css`
+
+This file allows overriding rules defined in the template CSS files (only add changed rules), or define a whole new theme.
+
+**Note**: Do not edit `tpl/default/css/shaarli.css`! Your changes would be overridden when updating Shaarli.
+
+See also [[Download CSS styles from an OPML list]]
+
+## Themes
+
+_WARNING - This feature is currently being worked on and will be improved in the next releases. Experimental._
+
+Installation:
+- find a theme you'd like to install
+- copy or clone the theme folder under `tpl/`
+- enable the theme:
+ - Shaarli < `v0.9.0`: edit `data/config.json.php` and set the value of `raintpl_tpl` to the new theme name:
+ `"raintpl_tpl": "tpl\/my-template\/"`
+ - Shaarli >= `v0.9.0`: select the theme through the _Tools_ page
+
+## Community CSS & themes
+
+### Custom CSS
+
+- [mrjovanovic/serious-theme-shaarli](https://github.com/mrjovanovic/serious-theme-shaarli) - A serious theme for Shaarli
+- [shaarli/shaarli-themes](https://github.com/shaarli/shaarli-themes)
+
+### Themes
+
+- [AkibaTech/Shaarli Superhero Theme](https://github.com/AkibaTech/Shaarli---SuperHero-Theme) - A template/theme for Shaarli
+- [alexisju/albinomouse-template](https://github.com/alexisju/albinomouse-template) - A full template for Shaarli
+- [ArthurHoaro/shaarli-launch](https://github.com/ArthurHoaro/shaarli-launch) - Customizable Shaarli theme
+- [dhoko/ShaarliTemplate](https://github.com/dhoko/ShaarliTemplate) - A template/theme for Shaarli
+- [kalvn/shaarli-blocks](https://github.com/kalvn/shaarli-blocks) - A template/theme for Shaarli
+- [kalvn/Shaarli-Material](https://github.com/kalvn/Shaarli-Material) - A theme (template) based on Google's Material Design for Shaarli, the superfast delicious clone
+- [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
+
+### Shaarli forks
+
+- [misterair/Limonade](https://github.com/misterair/limonade) - A fork of (legacy) Shaarli with a new template
+- [vivienhaese/shaarlitheme](https://github.com/vivienhaese/shaarlitheme) - A Shaarli fork meant to be run in an openshift instance
+
+## Example installation: AlbinoMouse theme
+
+With the following configuration:
+- Apache 2 / PHP 5.6
+- user sites are enabled, e.g. `/home/user/public_html/somedir` is served as `http://localhost/~user/somedir`
+- `http` is the name of the Apache user
+
+```bash
+$ cd ~/public_html
+
+# clone repositories
+$ git clone https://github.com/shaarli/Shaarli.git shaarli
+$ pushd shaarli/tpl
+$ git clone https://github.com/alexisju/albinomouse-template.git
+$ popd
+
+# set access rights for Apache
+$ chgrp -R http shaarli
+$ chmod g+rwx shaarli shaarli/cache shaarli/data shaarli/pagecache shaarli/tmp
+```
+
+Get config written:
+- go to the freshly installed site
+- fill the install form
+- log in to Shaarli
+
+Edit Shaarli's [[configuration|Shaarli configuration]]:
+```bash
+# the file should be owned by Apache, thus not writeable => sudo
+$ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php
+```
diff --git a/doc/md/Troubleshooting.md b/doc/md/Troubleshooting.md
new file mode 100644
index 00000000..13005526
--- /dev/null
+++ b/doc/md/Troubleshooting.md
@@ -0,0 +1,123 @@
+# Troubleshooting
+
+## Browser
+
+### Redirection issues (HTTP Referer)
+
+Depending on its configuration and installed plugins, the browser may remove or alter (spoof) HTTP referers, thus preventing Shaarli from properly redirecting between pages.
+
+See:
+- [HTTP referer](https://en.wikipedia.org/wiki/HTTP_referer) (Wikipedia)
+- [Improve online privacy by controlling referrer information](http://www.ghacks.net/2015/01/22/improve-online-privacy-by-controlling-referrer-information/)
+- [Better security, privacy and anonymity in Firefox](http://b.agilob.net/better-security-privacy-and-anonymity-in-firefox/)
+
+### Firefox HTTP Referer options
+
+HTTP settings are available by browsing `about:config`, here are the available settings and their values.
+
+`network.http.sendRefererHeader` - determines when to send the Referer HTTP header
+- 0: Never send the referring URL
+ - not recommended, may break some sites
+- 1: Send only on clicked links
+- 2 (default): Send for links and images
+
+`network.http.referer.XOriginPolicy` - Cross-domain origin policy
+- 0 (default): Always send
+- 1: Send if base domains match
+- 2: Send if hosts match
+
+`network.http.referer.spoofSource` - Referer spoofing (~faking)
+- false (default): real referer
+- true: spoof referer (use target URI as referer)
+ - known to break some functionality in Shaarli
+
+`network.http.referer.trimmingPolicy` - trim the URI not to send a full Referer
+- 0 (default): send full URI
+- 1: scheme+host+port+path
+- 2: scheme+host+port
+
+### Firefox, localhost and redirections
+
+`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.
+
+To solve this, assign a local domain to your host, e.g.
+```
+127.0.0.1 localhost desktop localhost.lan
+::1 localhost desktop localhost.lan
+```
+
+and browse Shaarli at http://localhost.lan/.
+
+Related threads:
+- [What is localhost.localdomain for?](https://bbs.archlinux.org/viewtopic.php?id=156064)
+- [Stop returning to the first page after editing a bookmark from another page](https://github.com/shaarli/Shaarli/issues/311)
+
+## Login
+
+### I forgot my password!
+
+Delete the file `data/config.php` and display the page again. You will be asked for a new login/password.
+
+### I'm locked out - Login bruteforce protection
+
+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.
+
+To remove the current IP bans, delete the file `data/ipbans.php`
+
+### List of all login attempts
+
+The file `data/log.txt` shows all logins (successful or failed) and bans/lifted bans.
+Search for `failed` in this file to look for unauthorized login attempts.
+
+## Hosting problems
+
+### Old PHP versions
+
+ * 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:
+
+```ini
+
+php56 1
+
+```
+
+ * 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`
+ * 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).
+ * 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:
+
+```php
+//list($status,$headers,$data) = getHTTP($url,4); // Short timeout to keep the application responsive.
+// FIXME: Decode charset according to charset specified in either 1) HTTP response headers or 2) in html
+//if (strpos($status,'200 OK')) $title=html_extract_title($data);
+```
+
+ * On hosts which forbid outgoing HTTP requests (such as free.fr), some thumbnails will not work.
+ * 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`
+
+### Dates are not properly formatted
+
+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 :-( )
+
+### Problems on CentOS servers
+
+On **CentOS**/RedHat derivatives, you may need to install the `php-mbstring` package.
+
+
+### My session expires! I can't stay logged in
+
+This can be caused by several things:
+
+* 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.
+* 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 !)
+* 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).
+* Some browser addons may interfer with HTTP headers (ipfuck/ipflood/GreaseMonkey…). Try disabling those.
+* You may be using OperaTurbo or OperaMini, which use their own proxies which may change from time to time.
+* If you have another application on the same webserver where Shaarli is installed, these application may forcefully expire php sessions.
+
+## Sessions do not seem to work correctly on your server
+
+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 **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)).
+
+### pubsubhubbub support
+
+Download [publisher.php](https://pubsubhubbub.googlecode.com/git/publisher_clients/php/library/publisher.php) at the root of your Shaarli installation and set `$GLOBALS['config']['PUBSUBHUB_URL']` in your `config.php`
diff --git a/doc/md/Unit-tests.md b/doc/md/Unit-tests.md
new file mode 100644
index 00000000..19838721
--- /dev/null
+++ b/doc/md/Unit-tests.md
@@ -0,0 +1,152 @@
+### Setup your environment for tests
+
+The framework used is [PHPUnit](https://phpunit.de/); it can be installed with [Composer](https://getcomposer.org/), which is a dependency management tool.
+
+Regarding Composer, you can either use:
+* a system-wide version, e.g. installed through your distro's package manager
+* a local version, downloadable [here](https://getcomposer.org/download/)
+
+#### Sample usage
+
+```bash
+# system-wide version
+$ composer install
+$ composer update
+
+# local version
+$ php composer.phar self-update
+$ php composer.phar install
+$ php composer.phar update
+```
+
+#### Install Shaarli dev dependencies
+
+```bash
+$ cd /path/to/shaarli
+$ composer update
+```
+
+#### Install and enable Xdebug to generate PHPUnit coverage reports
+
+For Debian-based distros:
+```bash
+$ aptitude install php5-xdebug
+```
+For ArchLinux:
+```bash
+$ pacman -S xdebug
+```
+
+Then add the following line to `/etc/php/php.ini`:
+```ini
+zend_extension=xdebug.so
+```
+
+#### Run unit tests
+
+Successful test suite:
+```bash
+$ make test
+
+-------
+PHPUNIT
+-------
+PHPUnit 4.6.9 by Sebastian Bergmann and contributors.
+
+Configuration read from /home/virtualtam/public_html/shaarli/phpunit.xml
+
+....................................
+
+Time: 759 ms, Memory: 8.25Mb
+
+OK (36 tests, 65 assertions)
+```
+
+Test suite with failures and errors:
+```bash
+$ make test
+-------
+PHPUNIT
+-------
+PHPUnit 4.6.9 by Sebastian Bergmann and contributors.
+
+Configuration read from /home/virtualtam/public_html/shaarli/phpunit.xml
+
+E..FF...............................
+
+Time: 802 ms, Memory: 8.25Mb
+
+There was 1 error:
+
+1) LinkDBTest::testConstructLoggedIn
+Missing argument 2 for LinkDB::__construct(), called in /home/virtualtam/public_html/shaarli/tests/Link\
+DBTest.php on line 79 and defined
+
+/home/virtualtam/public_html/shaarli/application/LinkDB.php:58
+/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:79
+
+--
+
+There were 2 failures:
+
+1) LinkDBTest::testCheckDBNew
+Failed asserting that two strings are equal.
+--- Expected
++++ Actual
+@@ @@
+-'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'
++'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'
+
+/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:121
+
+2) LinkDBTest::testCheckDBLoad
+Failed asserting that two strings are equal.
+--- Expected
++++ Actual
+@@ @@
+-'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'
++'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'
+
+/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:133
+
+FAILURES!
+Tests: 36, Assertions: 63, Errors: 1, Failures: 2.
+```
+
+#### Test results and coverage
+
+By default, PHPUnit will run all suitable tests found under the `tests` directory.
+
+Each test has 3 possible outcomes:
+* `.` - success
+* `F` - failure: the test was run but its results are invalid
+ * the code does not behave as expected
+ * dependencies to external elements: globals, session, cache...
+* `E` - error: something went wrong and the tested code has crashed
+ * typos in the code, or in the test code
+ * dependencies to missing external elements
+
+If Xdebug has been installed and activated, two coverage reports will be generated:
+* a summary in the console
+* a detailed HTML report with metrics for tested code
+ * to open it in a web browser: `firefox coverage/index.html &`
+
+### Executing specific tests
+
+Add a [`@group`](https://phpunit.de/manual/current/en/appendixes.annotations.html#appendixes.annotations.group) annotation in a test class or method comment:
+
+```php
+/**
+ * Netscape bookmark import
+ * @group WIP
+ */
+class BookmarkImportTest extends PHPUnit_Framework_TestCase
+{
+ [...]
+}
+```
+
+To run all tests annotated with `@group WIP`:
+```bash
+$ vendor/bin/phpunit --group WIP tests/
+```
diff --git a/doc/md/Upgrade-and-migration.md b/doc/md/Upgrade-and-migration.md
new file mode 100644
index 00000000..7348891f
--- /dev/null
+++ b/doc/md/Upgrade-and-migration.md
@@ -0,0 +1,194 @@
+## Preparation
+
+### Note your current version
+
+If anything goes wrong, it's important for us to know which version you're upgrading from.
+The current version is present in the `version.php` file.
+
+### Backup your data
+
+Shaarli stores all user data under the `data` directory:
+- `data/config.php` - main configuration file
+- `data/datastore.php` - bookmarked links
+- `data/ipbans.php` - banned IP addresses
+- `data/updates.txt` - contains all automatic update to the configuration and datastore files already run
+
+See [[Shaarli configuration]] for more information about Shaarli resources.
+
+It is recommended to backup this repository _before_ starting updating/upgrading Shaarli:
+- users with SSH access: copy or archive the directory to a temporary location
+- users with FTP access: download a local copy of your Shaarli installation using your favourite client
+
+### Migrating data from a previous installation
+
+As 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:
+
+- backup the `data` directory
+- install or update Shaarli:
+ - fresh installation - see [[Download and installation]]
+ - update - see the following sections
+- check or restore the `data` directory
+
+## Recommended : Upgrading from release archives
+
+All tagged revisions can be downloaded as tarballs or ZIP archives from the [releases](https://github.com/shaarli/Shaarli/releases) page.
+
+We recommend that you use the latest release tarball with the `-full` suffix. It contains the dependencies, please read [[Download and installation]] for `git` complete instructions.
+
+Once downloaded, extract the archive locally and update your remote installation (e.g. via FTP) -be sure you keep the content of the `data` directory!
+
+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 `data/config.json.php` (see [[Shaarli configuration]] for more details).
+
+## Upgrading with Git
+
+### Updating a community Shaarli
+
+If 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:
+
+```bash
+$ cd /path/to/shaarli
+$ git pull
+
+From github.com:shaarli/Shaarli
+ * branch master -> FETCH_HEAD
+Updating ebd67c6..521f0e6
+Fast-forward
+ application/Url.php | 1 +
+ shaarli_version.php | 2 +-
+ tests/Url/UrlTest.php | 1 +
+ 3 files changed, 3 insertions(+), 1 deletion(-)
+```
+
+Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/):
+
+```bash
+$ composer install --no-dev
+
+Loading composer repositories with package information
+Updating dependencies
+ - Installing shaarli/netscape-bookmark-parser (v1.0.1)
+ Downloading: 100%
+```
+
+### Migrating and upgrading from Sebsauvage's repository
+
+If 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.
+
+The following guide assumes that:
+- 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)
+- the default remote is named `origin` and points to Sebsauvage's repository
+- the current branch is `master`
+ - 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!
+- the working copy is clean:
+ - no versioned file has been locally modified
+ - no untracked files are present
+
+#### Step 0: show repository information
+
+```bash
+$ cd /path/to/shaarli
+
+$ git remote -v
+origin https://github.com/sebsauvage/Shaarli (fetch)
+origin https://github.com/sebsauvage/Shaarli (push)
+
+$ git branch -vv
+* master 029f75f [origin/master] Update README.md
+
+$ git status
+On branch master
+Your branch is up-to-date with 'origin/master'.
+nothing to commit, working directory clean
+```
+
+#### Step 1: update Git remotes
+
+```
+$ git remote rename origin sebsauvage
+$ git remote -v
+sebsauvage https://github.com/sebsauvage/Shaarli (fetch)
+sebsauvage https://github.com/sebsauvage/Shaarli (push)
+
+$ git remote add origin https://github.com/shaarli/Shaarli
+$ git fetch origin
+
+remote: Counting objects: 3015, done.
+remote: Compressing objects: 100% (19/19), done.
+remote: Total 3015 (delta 446), reused 457 (delta 446), pack-reused 2550
+Receiving objects: 100% (3015/3015), 2.59 MiB | 918.00 KiB/s, done.
+Resolving deltas: 100% (1899/1899), completed with 48 local objects.
+From https://github.com/shaarli/Shaarli
+ * [new branch] master -> origin/master
+ * [new branch] stable -> origin/stable
+[...]
+ * [new tag] v0.6.4 -> v0.6.4
+ * [new tag] v0.7.0 -> v0.7.0
+```
+
+#### Step 2: use the stable community branch
+
+```bash
+$ git checkout origin/stable -b stable
+Branch stable set up to track remote branch stable from origin.
+Switched to a new branch 'stable'
+
+$ git branch -vv
+ master 029f75f [sebsauvage/master] Update README.md
+* stable 890afc3 [origin/stable] Merge pull request #509 from ArthurHoaro/v0.6.5
+```
+
+Shaarli >= `v0.8.x`: install/update third-party PHP dependencies using [Composer](https://getcomposer.org/):
+
+```bash
+$ composer install --no-dev
+
+Loading composer repositories with package information
+Updating dependencies
+ - Installing shaarli/netscape-bookmark-parser (v1.0.1)
+ Downloading: 100%
+```
+
+Optionally, you can delete information related to the legacy version:
+
+```bash
+$ git branch -D master
+Deleted branch master (was 029f75f).
+
+$ git remote remove sebsauvage
+
+$ git remote -v
+origin https://github.com/shaarli/Shaarli (fetch)
+origin https://github.com/shaarli/Shaarli (push)
+
+$ git gc
+Counting objects: 3317, done.
+Delta compression using up to 8 threads.
+Compressing objects: 100% (1237/1237), done.
+Writing objects: 100% (3317/3317), done.
+Total 3317 (delta 2050), reused 3301 (delta 2034)to
+```
+
+#### Step 3: configuration
+
+After 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]] for more details).
+
+## Troubleshooting
+
+If the solutions provided here doesn't work, please open an issue specifying which version you're upgrading from and to.
+
+### You must specify an integer as a key
+
+In `v0.8.1` we changed how link keys are handled (from timestamps to incremental integers).
+Take a look at `data/updates.txt` content.
+
+#### `updates.txt` contains `updateMethodDatastoreIds`
+
+Try to delete it and refresh your page while being logged in.
+
+#### `updates.txt` doesn't exists or doesn't contain `updateMethodDatastoreIds`
+
+ 1. Create `data/updates.txt` if it doesn't exist.
+ 2. Paste this string in the update file `;updateMethodRenameDashTags;`
+ 3. Login to Shaarli.
+ 4. Delete the update file.
+ 5. Refresh.
diff --git a/doc/md/Versioning-and-Branches.md b/doc/md/Versioning-and-Branches.md
new file mode 100644
index 00000000..e1d998e0
--- /dev/null
+++ b/doc/md/Versioning-and-Branches.md
@@ -0,0 +1,75 @@
+**WORK IN PROGRESS**
+
+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.
+
+## `master` branch
+
+The `master` branch is the development branch. Any new change MUST go through this branch using Pull Requests.
+
+Remarks:
+
+ * This branch shouldn't be used for production as it isn't necessary stable.
+ * 3rd party aren't required to be compatible with the latest changes.
+ * Official plugins, themes and libraries (contained within Shaarli organization repos) must be compatible with the master branch.
+ * The version in this branch is always `dev`.
+
+## `v0.x` branch
+
+This `v0.x` branch, points to the latest `v0.x.y` release.
+
+Explanation:
+
+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.
+
+In this case, the issue is fixed in the `master` branch, and the fix is backported the to the `v0.x` branch. Then a new release is made from the `v0.x` branch.
+
+This workflow allow us to fix any major bug detected, without having to release bleeding edge feature too soon.
+
+## `latest` branch
+
+This branch point the latest release. It recommended to use it to get the latest tested changes.
+
+## `stable` branch
+
+The `stable` branch doesn't contain any major bug, and is one major digit version behind the latest release.
+
+For example, the current latest release is `v0.8.3`, the stable branch is an alias to the latest `v0.7.x` release. When the `v0.9.0` version will be released, the stable will move to the latest `v0.8.x` release.
+
+Remarks:
+
+ * Shaarli release pace isn't fast, and the stable branch might be a few months behind the latest release.
+
+## Releases
+
+Releases are always made from the latest `v0.x` branch.
+
+Note that for every release, we manually generate a tarball which contains all Shaarli dependencies, making Shaarli's installation only one step.
+
+## Advices on 3rd party git repos workflow
+
+### Versioning
+
+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 [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:
+
+ - 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.
+ - use your own versioning scheme, and state Shaarli compatibility in the release description.
+
+Using this, any user will be able to pick the release matching his own Shaarli version.
+
+### Major bugfix backport releases
+
+To be able to support backported fixes, it recommended to use our workflow:
+
+```bash
+# In master, fix the major bug
+git commit -m "Katastrophe"
+git push origin master
+# Get your commit hash
+git log --format="%H" -n 1
+# Create a new branch from your latest release, let's say v0.8.2-1 (the tag name)
+git checkout -b katastrophe v0.8.2-1
+# Backport the fix commit to your brand new branch
+git cherry-pick
+git push origin katastrophe
+# Then you just have to make a new release from the `katastrophe` branch tagged `v0.8.3-1`
+```
diff --git a/doc/md/_Footer.md b/doc/md/_Footer.md
new file mode 100644
index 00000000..648b1298
--- /dev/null
+++ b/doc/md/_Footer.md
@@ -0,0 +1 @@
+_Shaarli, the personal, minimalist, super-fast, database-free bookmarking service_
\ No newline at end of file
diff --git a/doc/md/_Sidebar.md b/doc/md/_Sidebar.md
new file mode 100644
index 00000000..fe0e4229
--- /dev/null
+++ b/doc/md/_Sidebar.md
@@ -0,0 +1,45 @@
+- [[Home]]
+- Setup
+ - [[Download and Installation]]
+ - [[Upgrade and migration]]
+ - [[Server requirements]]
+ - [[Server configuration]]
+ - [[Server security]]
+ - [[Shaarli configuration]]
+ - [[Plugins]]
+- Docker
+ - [[Docker 101]]
+ - [[Shaarli images]]
+ - [[Reverse proxy configuration]]
+ - [[Docker resources]]
+- Usage
+ - [[Features]]
+ - [[Bookmarklet]]
+ - [[Browsing and Searching]]
+ - [[Firefox share]]
+ - [[RSS feeds]]
+ - [[REST API]]
+- How To
+ - [[Backup, restore, import and export]]
+ - [[Copy an existing installation over SSH and serve it locally]]
+ - [[Create and serve multiple Shaarlis (farm)]]
+ - [[Download CSS styles from an OPML list]]
+ - [[Datastore hacks]]
+- [[Troubleshooting]]
+- Development:
+ - [[Development guidelines]]
+ - [[Continuous integration tools]]
+ - [[GnuPG signature]]
+ - [[Coding guidelines]]
+ - [[Directory structure]]
+ - [[3rd party libraries]]
+ - [[Plugin System]]
+ - [[Release Shaarli]]
+ - [[Versioning and Branches]]
+ - [[Security]]
+ - [[Static analysis]]
+ - [[Theming]]
+ - [[Unit tests]]
+- About
+ - [[FAQ]]
+ - [[Community & Related software]]
diff --git a/doc/md/config.json b/doc/md/config.json
new file mode 100644
index 00000000..cc4de307
--- /dev/null
+++ b/doc/md/config.json
@@ -0,0 +1,6 @@
+{
+ "useSideMenu": true,
+ "lineBreaks": "gfm",
+ "additionalFooterText": "",
+ "title": "Shaarli documentation"
+}
\ No newline at end of file
diff --git a/doc/md/github-markdown.css b/doc/md/github-markdown.css
new file mode 100644
index 00000000..581350ae
--- /dev/null
+++ b/doc/md/github-markdown.css
@@ -0,0 +1,287 @@
+#local-sidebar {
+ width: 230px;
+ float: right;
+ position: relative;
+ z-index: 4;
+ background-color: #fff;
+ border: 1px solid #e2e2e2;
+ border-radius: 3px;
+}
+
+body {
+ font-family: Helvetica, arial, sans-serif;
+ font-size: 14px;
+ line-height: 1.6;
+ padding-top: 10px;
+ padding-bottom: 10px;
+ background-color: white;
+ padding: 10px 20%; }
+
+body > *:first-child {
+ margin-top: 0 !important; }
+body > *:last-child {
+ margin-bottom: 0 !important; }
+
+a {
+ color: #4183C4; }
+a.absent {
+ color: #cc0000; }
+a.anchor {
+ display: block;
+ padding-left: 30px;
+ margin-left: -30px;
+ cursor: pointer;
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0; }
+
+h1, h2, h3, h4, h5, h6 {
+ margin: 20px 0 10px;
+ padding: 0;
+ font-weight: bold;
+ -webkit-font-smoothing: antialiased;
+ cursor: text;
+ position: relative; }
+
+h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor {
+ background: url("../../images/modules/styleguide/para.png") no-repeat 10px center;
+ text-decoration: none; }
+
+h1 tt, h1 code {
+ font-size: inherit; }
+
+h2 tt, h2 code {
+ font-size: inherit; }
+
+h3 tt, h3 code {
+ font-size: inherit; }
+
+h4 tt, h4 code {
+ font-size: inherit; }
+
+h5 tt, h5 code {
+ font-size: inherit; }
+
+h6 tt, h6 code {
+ font-size: inherit; }
+
+h1 {
+ font-size: 28px;
+ color: black; }
+
+h2 {
+ font-size: 24px;
+ border-bottom: 1px solid #cccccc;
+ color: black; }
+
+h3 {
+ font-size: 18px; }
+
+h4 {
+ font-size: 16px; }
+
+h5 {
+ font-size: 14px; }
+
+h6 {
+ color: #777777;
+ font-size: 14px; }
+
+p, blockquote, ol, dl, table, pre {
+ margin: 15px 0; }
+
+hr {
+ background: transparent url("../../images/modules/pulls/dirty-shade.png") repeat-x 0 0;
+ border: 0 none;
+ color: #cccccc;
+ height: 4px;
+ padding: 0; }
+
+body > h2:first-child {
+ margin-top: 0;
+ padding-top: 0; }
+body > h1:first-child {
+ margin-top: 0;
+ padding-top: 0; }
+ body > h1:first-child + h2 {
+ margin-top: 0;
+ padding-top: 0; }
+body > h3:first-child, body > h4:first-child, body > h5:first-child, body > h6:first-child {
+ margin-top: 0;
+ padding-top: 0; }
+
+a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {
+ margin-top: 0;
+ padding-top: 0; }
+
+h1 p, h2 p, h3 p, h4 p, h5 p, h6 p {
+ margin-top: 0; }
+
+li p.first {
+ display: inline-block; }
+
+ul, ol {
+ padding-left: 30px; }
+
+ul :first-child, ol :first-child {
+ margin-top: 0; }
+
+ul :last-child, ol :last-child {
+ margin-bottom: 0; }
+
+dl {
+ padding: 0; }
+ dl dt {
+ font-size: 14px;
+ font-weight: bold;
+ font-style: italic;
+ padding: 0;
+ margin: 15px 0 5px; }
+ dl dt:first-child {
+ padding: 0; }
+ dl dt > :first-child {
+ margin-top: 0; }
+ dl dt > :last-child {
+ margin-bottom: 0; }
+ dl dd {
+ margin: 0 0 15px;
+ padding: 0 15px; }
+ dl dd > :first-child {
+ margin-top: 0; }
+ dl dd > :last-child {
+ margin-bottom: 0; }
+
+blockquote {
+ border-left: 4px solid #dddddd;
+ padding: 0 15px;
+ color: #777777; }
+ blockquote > :first-child {
+ margin-top: 0; }
+ blockquote > :last-child {
+ margin-bottom: 0; }
+
+table {
+ padding: 0; }
+ table tr {
+ border-top: 1px solid #cccccc;
+ background-color: white;
+ margin: 0;
+ padding: 0; }
+ table tr:nth-child(2n) {
+ background-color: #f8f8f8; }
+ table tr th {
+ font-weight: bold;
+ border: 1px solid #cccccc;
+ text-align: left;
+ margin: 0;
+ padding: 6px 13px; }
+ table tr td {
+ border: 1px solid #cccccc;
+ text-align: left;
+ margin: 0;
+ padding: 6px 13px; }
+ table tr th :first-child, table tr td :first-child {
+ margin-top: 0; }
+ table tr th :last-child, table tr td :last-child {
+ margin-bottom: 0; }
+
+img {
+ max-width: 100%; }
+
+span.frame {
+ display: block;
+ overflow: hidden; }
+ span.frame > span {
+ border: 1px solid #dddddd;
+ display: block;
+ float: left;
+ overflow: hidden;
+ margin: 13px 0 0;
+ padding: 7px;
+ width: auto; }
+ span.frame span img {
+ display: block;
+ float: left; }
+ span.frame span span {
+ clear: both;
+ color: #333333;
+ display: block;
+ padding: 5px 0 0; }
+span.align-center {
+ display: block;
+ overflow: hidden;
+ clear: both; }
+ span.align-center > span {
+ display: block;
+ overflow: hidden;
+ margin: 13px auto 0;
+ text-align: center; }
+ span.align-center span img {
+ margin: 0 auto;
+ text-align: center; }
+span.align-right {
+ display: block;
+ overflow: hidden;
+ clear: both; }
+ span.align-right > span {
+ display: block;
+ overflow: hidden;
+ margin: 13px 0 0;
+ text-align: right; }
+ span.align-right span img {
+ margin: 0;
+ text-align: right; }
+span.float-left {
+ display: block;
+ margin-right: 13px;
+ overflow: hidden;
+ float: left; }
+ span.float-left span {
+ margin: 13px 0 0; }
+span.float-right {
+ display: block;
+ margin-left: 13px;
+ overflow: hidden;
+ float: right; }
+ span.float-right > span {
+ display: block;
+ overflow: hidden;
+ margin: 13px auto 0;
+ text-align: right; }
+
+code, tt {
+ margin: 0 2px;
+ padding: 0 5px;
+ white-space: nowrap;
+ border: 1px solid #eaeaea;
+ background-color: #f8f8f8;
+ border-radius: 3px; }
+
+pre code {
+ margin: 0;
+ padding: 0;
+ white-space: pre;
+ border: none;
+ background: transparent; }
+
+.highlight pre {
+ background-color: #f8f8f8;
+ border: 1px solid #cccccc;
+ font-size: 13px;
+ line-height: 19px;
+ overflow: auto;
+ padding: 6px 10px;
+ border-radius: 3px; }
+
+pre {
+ background-color: #f8f8f8;
+ border: 1px solid #cccccc;
+ font-size: 13px;
+ line-height: 19px;
+ overflow: auto;
+ padding: 6px 10px;
+ border-radius: 3px; }
+ pre code, pre tt {
+ background-color: transparent;
+ border: none; }
diff --git a/doc/md/images/bookmarklet.png b/doc/md/images/bookmarklet.png
new file mode 100644
index 00000000..0262578e
Binary files /dev/null and b/doc/md/images/bookmarklet.png differ
diff --git a/doc/md/images/doc-logo.png b/doc/md/images/doc-logo.png
new file mode 100644
index 00000000..3d8d1787
Binary files /dev/null and b/doc/md/images/doc-logo.png differ
diff --git a/doc/md/images/doc-logo.svg b/doc/md/images/doc-logo.svg
new file mode 100644
index 00000000..37fc6658
--- /dev/null
+++ b/doc/md/images/doc-logo.svg
@@ -0,0 +1,522 @@
+
+
diff --git a/doc/md/images/firefoxshare.png b/doc/md/images/firefoxshare.png
new file mode 100644
index 00000000..98c2fdd3
Binary files /dev/null and b/doc/md/images/firefoxshare.png differ
diff --git a/doc/md/images/rss-filter-1.png b/doc/md/images/rss-filter-1.png
new file mode 100644
index 00000000..d2a03f67
Binary files /dev/null and b/doc/md/images/rss-filter-1.png differ
diff --git a/doc/md/images/rss-filter-2.png b/doc/md/images/rss-filter-2.png
new file mode 100644
index 00000000..538b126e
Binary files /dev/null and b/doc/md/images/rss-filter-2.png differ
diff --git a/doc/md/index.md b/doc/md/index.md
new file mode 100644
index 00000000..37a9c1fc
--- /dev/null
+++ b/doc/md/index.md
@@ -0,0 +1,11 @@
+Welcome to the [Shaarli](https://github.com/shaarli/Shaarli/) wiki!
+
+Here you can find some info on how to use, configure, tweak and solve problems with your Shaarli.
+
+For general info, read the [README](https://github.com/shaarli/Shaarli/blob/master/README.md).
+
+If 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).
+
+If 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).
+
+_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/sidebar.html b/doc/sidebar.html
deleted file mode 100644
index 478840d1..00000000
--- a/doc/sidebar.html
+++ /dev/null
@@ -1,52 +0,0 @@
-
"; done
-if [ -d "$shaarli_base_dir/index.html" ]; then echo "[removing old index.html]"; rm "$shaarli_base_dir/index.html" ]; fi
-echo "[info] generating new index of shaarlis"
-echo -e "$htmlhead $accountlinks $htmlfooter" > "$shaarli_base_dir/index.html"
-echo '[info] done.'
-echo "[info] list of accounts: $accounts"
-echo "[info] contents of $shaarli_base_dir:"
-tree -a -L 1 "$shaarli_base_dir"
-```
-
-This 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/)
\ No newline at end of file
diff --git a/doc/md/Datastore-hacks.md b/doc/md/Datastore-hacks.md
deleted file mode 100644
index 78baa005..00000000
--- a/doc/md/Datastore-hacks.md
+++ /dev/null
@@ -1,25 +0,0 @@
-### Decode datastore content
-
-To display the array representing the data saved in `data/datastore.php`, use the following snippet:
-
-```php
-$data = "tZNdb9MwFIb... ";
-$out = unserialize(gzinflate(base64_decode($data)));
-echo "
"; // Pretty printing is love, pretty printing is life
-print_r($out);
-echo "
";
-exit;
-```
-This will output the internal representation of the datastore, "unobfuscated" (if this can really be considered obfuscation).
-
-Alternatively, you can transform to JSON format (and pretty-print if you have `jq` installed):
-```
-php -r 'print(json_encode(unserialize(gzinflate(base64_decode(preg_replace("!.*/\* (.+) \*/.*!", "$1", file_get_contents("data/datastore.php")))))));' | jq .
-```
-
-### Changing the timestamp for a link
-
-* Look for `` in `tpl/editlink.tpl` (line 14)
-* Replace `type="hidden"` with `type="text"` from this line
-* A new date/time field becomes available in the edit/new link dialog.
-* You can set the timestamp manually by entering it in the format `YYYMMDD_HHMMS`.
diff --git a/doc/md/Download-CSS-styles-from-an-OPML-list.md b/doc/md/Download-CSS-styles-from-an-OPML-list.md
deleted file mode 100644
index 26b7fb3e..00000000
--- a/doc/md/Download-CSS-styles-from-an-OPML-list.md
+++ /dev/null
@@ -1,154 +0,0 @@
-###Download CSS styles for shaarlis listed in an opml file
-Example php script:
-
-```php
-
-
-
-
-/**
- * Source: https://github.com/Riduidel
- * Download css styles for shaarlis listed in an opml file
- */
-define("SHAARLI_RSS_OPML", "https://www.ecirtam.net/shaarlirss/custom/people.opml");
-
-define("THEMES_TEMP_FOLDER", "new_themes");
-
-if(!file_exists(THEMES_TEMP_FOLDER)) {
- mkdir(THEMES_TEMP_FOLDER);
-}
-
-function siteUrl($pathInSite) {
- $indexPos = strpos($pathInSite, "index.php");
- if(!$indexPos) {
- return $pathInSite;
- } else {
- return substr($pathInSite, 0, $indexPos);
- }
-}
-
-function createShaarliHashFromOPMLL($opmlFile) {
- $result = array();
- $opml = file_get_contents($opmlFile);
- $opmlXml = simplexml_load_string($opml);
- $outlineElements = $opmlXml->xpath("body/outline");
- foreach($outlineElements as $site) {
- $siteUrl = siteUrl((string) $site['htmlUrl']);
- $result[$siteUrl]=((string) $site['text']);
- }
- return $result;
-}
-
-function getSiteFolder($url) {
- $domain = parse_url($url, PHP_URL_HOST);
- return THEMES_TEMP_FOLDER."/".str_replace(".", "_", $domain);
-}
-
-function get_http_response_code($theURL) {
- $headers = get_headers($theURL);
- return substr($headers[0], 9, 3);
-}
-
-/**
- * This makes the code PHP-5 only (particularly the call to "get_headers")
- */
-function copyUserStyleFrom($url, $name, $knownStyles) {
- $userStyle = $url."inc/user.css";
- if(in_array($url, $knownStyles)) {
- // TODO add log message
- } else {
- $statusCode = get_http_response_code($userStyle);
- if(intval($statusCode)<300) {
- $styleSheet = file_get_contents($userStyle);
- $siteFolder = getSiteFolder($url);
- if(!file_exists($siteFolder)) {
- mkdir($siteFolder);
- }
- if(!file_exists($siteFolder.'/user.css')) {
- // Copy stylesheet
- file_put_contents($siteFolder.'/user.css', $styleSheet);
- }
- if(!file_exists($siteFolder.'/README.md')) {
- // Then write a readme.md file
- file_put_contents($siteFolder.'/README.md',
- "User style from ".$name."\n"
- ."============================="
- ."\n\n"
- ."This stylesheet was downloaded from ".$userStyle." on ".date(DATE_RFC822)
- );
- }
- if(!file_exists($siteFolder.'/config.ini')) {
- // Write a config file containing useful informations
- file_put_contents($siteFolder.'/config.ini',
- "site_url=".$url."\n"
- ."site_name=".$name."\n"
- );
- }
- if(!file_exists($siteFolder.'/home.png')) {
- // And finally copy generated thumbnail
- $homeThumb = $siteFolder.'/home.png';
- file_put_contents($siteFolder.'/home.png', file_get_contents(getThumbnailUrl($url)));
- }
- echo 'Theme have been downloaded from '.$url.' into '.$siteFolder
- .'. It looks like ';
- }
- }
-}
-
-function getThumbnailUrl($url) {
- return 'http://api.webthumbnail.org/?url='.$url;
-}
-
-function copyUserStylesFrom($urlToNames, $knownStyles) {
- foreach($urlToNames as $url => $name) {
- copyUserStyleFrom($url, $name, $knownStyles);
- }
-}
-
-/**
- * Reading directory list, courtesy of http://www.laughing-buddha.net/php/dirlist/
- * @param directory the directory we want to list files of
- * @return a simple array containing the list of absolute file paths. Notice that current file (".") and parent one("..")
- * are not listed here
- */
-function getDirectoryList ($directory) {
- $realPath = realpath($directory);
- // create an array to hold directory list
- $results = array();
- // create a handler for the directory
- $handler = opendir($directory);
- // open directory and walk through the filenames
- while ($file = readdir($handler)) {
- // if file isn't this directory or its parent, add it to the results
- if ($file != "." && $file != "..") {
- $results[] = realpath($realPath . "/" . $file);
- }
- }
- // tidy up: close the handler
- closedir($handler);
- // done!
- return $results;
-}
-
-/**
- * Start in themes folder and look in all subfolders for config.ini files.
- * These config.ini files allow us not to download styles again and again
- */
-function findKnownStyles() {
- $result = array();
- $subFolders = getDirectoryList("themes");
- foreach($subFolders as $folder) {
- $configFile = $folder."/config.ini";
- if(file_exists($configFile)) {
- $iniParameters = parse_ini_file($configFile);
- array_push($result, $iniParameters['site_url']);
- }
- }
- return $result;
-}
-
-$knownStyles = findKnownStyles();
-copyUserStylesFrom(createShaarliHashFromOPMLL(SHAARLI_RSS_OPML), $knownStyles);
-
-
-```
\ No newline at end of file
diff --git a/doc/md/Example-patch---add-new-via-field-for-links.md b/doc/md/Example-patch---add-new-via-field-for-links.md
deleted file mode 100644
index d84ef25a..00000000
--- a/doc/md/Example-patch---add-new-via-field-for-links.md
+++ /dev/null
@@ -1,189 +0,0 @@
-Example 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**
-
-Thanks to @Knah-Tsaeb in https://github.com/sebsauvage/Shaarli/pull/158
-
-```
-From e0f363c18e8fe67990ed2bb1a08652e24e70bbcb Mon Sep 17 00:00:00 2001
-From: Knah Tsaeb
-Date: Fri, 11 Oct 2013 15:18:37 +0200
-Subject: [PATCH] Add a "via"/origin property for links, add new input in "edit link" dialog
-Thanks to:
-* https://github.com/Knah-Tsaeb/Shaarli/commit/040eb18ec8cdabd5ea855e108f81f97fbf0478c4
-* https://github.com/Knah-Tsaeb/Shaarli/commit/4123658eae44d7564d1128ce52ddd5689efee813
-* https://github.com/Knah-Tsaeb/Shaarli/commit/f1a8ca9cc8fe49b119d51b2d8382cc1a34542f96
-
----
- index.php | 43 ++++++++++++++++++++++++++++++++-----------
- tpl/editlink.html | 1 +
- tpl/linklist.html | 1 +
- 3 files changed, 34 insertions(+), 11 deletions(-)
-
-diff --git a/index.php b/index.php
-index 6fae2f8..53f798e 100644
---- a/index.php
-+++ b/index.php
-@@ -436,6 +436,12 @@ if (isset($_POST['login']))
- // ------------------------------------------------------------------------------------------
- // Misc utility functions:
-
-+// Try to get just domain for @via
-+function getJustDomain($url){
-+ $parts = parse_url($url);
-+ return trim($parts['host']);
-+ }
-+
- // Returns the server URL (including port and http/https), without path.
- // e.g. "http://myserver.com:8080"
- // You can append $_SERVER['SCRIPT_NAME'] to get the current script URL.
-@@ -799,7 +805,8 @@ class linkdb implements Iterator, Countable, ArrayAccess
- $found= (strpos(strtolower($l['title']),$s)!==false)
- || (strpos(strtolower($l['description']),$s)!==false)
- || (strpos(strtolower($l['url']),$s)!==false)
-- || (strpos(strtolower($l['tags']),$s)!==false);
-+ || (strpos(strtolower($l['tags']),$s)!==false)
-+ || (!empty($l['via']) && (strpos(strtolower($l['via']),$s)!==false));
- if ($found) $filtered[$l['linkdate']] = $l;
- }
- krsort($filtered);
-@@ -814,7 +821,7 @@ class linkdb implements Iterator, Countable, ArrayAccess
- $t = str_replace(',',' ',($casesensitive?$tags:strtolower($tags)));
- $searchtags=explode(' ',$t);
- $filtered=array();
-- foreach($this->links as $l)
-+ foreach($this-> links as $l)
- {
- $linktags = explode(' ',($casesensitive?$l['tags']:strtolower($l['tags'])));
- if (count(array_intersect($linktags,$searchtags)) == count($searchtags))
-@@ -905,7 +912,7 @@ function showRSS()
- else $linksToDisplay = $LINKSDB;
- $nblinksToDisplay = 50; // Number of links to display.
- if (!empty($_GET['nb'])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links.
-- {
-+ {
- $nblinksToDisplay = $_GET['nb']=='all' ? count($linksToDisplay) : max($_GET['nb']+0,1) ;
- }
-
-@@ -944,7 +951,12 @@ function showRSS()
- // If user wants permalinks first, put the final link in description
- if ($usepermalinks===true) $descriptionlink = '(Link)';
- if (strlen($link['description'])>0) $descriptionlink = ' '.$descriptionlink;
-- echo ''."\n\n";
-+ if(!empty($link['via'])){
-+ $via = ' Origine => '.htmlspecialchars(getJustDomain($link['via'])).'';
-+ } else {
-+ $via = '';
-+ }
-+ echo ''."\n\n";
- $i++;
- }
- echo '';
-@@ -980,7 +992,7 @@ function showATOM()
- else $linksToDisplay = $LINKSDB;
- $nblinksToDisplay = 50; // Number of links to display.
- if (!empty($_GET['nb'])) // In URL, you can specificy the number of links. Example: nb=200 or nb=all for all links.
-- {
-+ {
- $nblinksToDisplay = $_GET['nb']=='all' ? count($linksToDisplay) : max($_GET['nb']+0,1) ;
- }
-
-@@ -1006,11 +1018,16 @@ function showATOM()
-
- // Add permalink in description
- $descriptionlink = htmlspecialchars('(Permalink)');
-+ if(isset($link['via']) && !empty($link['via'])){
-+ $via = htmlspecialchars(' Origine => '.getJustDomain($link['via']).'');
-+ } else {
-+ $via = '';
-+ }
- // If user wants permalinks first, put the final link in description
- if ($usepermalinks===true) $descriptionlink = htmlspecialchars('(Link)');
- if (strlen($link['description'])>0) $descriptionlink = '<br>'.$descriptionlink;
-
-- $entries.=''.htmlspecialchars(nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description']))))).$descriptionlink."\n";
-+ $entries.=''.htmlspecialchars(nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description']))))).$descriptionlink.$via."\n";
- if ($link['tags']!='') // Adding tags to each ATOM entry (as mentioned in ATOM specification)
- {
- foreach(explode(' ',$link['tags']) as $tag)
-@@ -1478,7 +1495,7 @@ function renderPage()
- if (!startsWith($url,'http:') && !startsWith($url,'https:') && !startsWith($url,'ftp:') && !startsWith($url,'magnet:') && !startsWith($url,'?'))
- $url = 'http://'.$url;
- $link = array('title'=>trim($_POST['lf_title']),'url'=>$url,'description'=>trim($_POST['lf_description']),'private'=>(isset($_POST['lf_private']) ? 1 : 0),
-- 'linkdate'=>$linkdate,'tags'=>str_replace(',',' ',$tags));
-+ 'linkdate'=>$linkdate,'tags'=>str_replace(',',' ',$tags), 'via'=>trim($_POST['lf_via']));
- if ($link['title']=='') $link['title']=$link['url']; // If title is empty, use the URL as title.
- $LINKSDB[$linkdate] = $link;
- $LINKSDB->savedb(); // Save to disk.
-@@ -1556,7 +1573,8 @@ function renderPage()
- $title = (empty($_GET['title']) ? '' : $_GET['title'] ); // Get title if it was provided in URL (by the bookmarklet).
- $description = (empty($_GET['description']) ? '' : $_GET['description']); // Get description if it was provided in URL (by the bookmarklet). [Bronco added that]
- $tags = (empty($_GET['tags']) ? '' : $_GET['tags'] ); // Get tags if it was provided in URL
-- $private = (!empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0); // Get private if it was provided in URL
-+ $via = (empty($_GET['via']) ? '' : $_GET['via'] );
-+ $private = (!empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0); // Get private if it was provided in URL
- if (($url!='') && parse_url($url,PHP_URL_SCHEME)=='') $url = 'http://'.$url;
- // 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.)
- if (empty($title) && parse_url($url,PHP_URL_SCHEME)=='http')
-@@ -1567,7 +1585,7 @@ function renderPage()
- {
- // Look for charset in html header.
- preg_match('##Usi', $data, $meta);
--
-+
- // If found, extract encoding.
- if (!empty($meta[0]))
- {
-@@ -1577,7 +1595,7 @@ function renderPage()
- $html_charset = (!empty($enc[1])) ? strtolower($enc[1]) : 'utf-8';
- }
- else { $html_charset = 'utf-8'; }
--
-+
- // Extract title
- $title = html_extract_title($data);
- if (!empty($title))
-@@ -1592,7 +1610,7 @@ function renderPage()
- $url='?'.smallHash($linkdate);
- $title='Note: ';
- }
-- $link = array('linkdate'=>$linkdate,'title'=>$title,'url'=>$url,'description'=>$description,'tags'=>$tags,'private'=>$private);
-+ $link = array('linkdate'=>$linkdate,'title'=>$title,'url'=>$url,'description'=>$description,'tags'=>$tags,'via' => $via,'private'=>$private);
- }
-
- $PAGE = new pageBuilder;
-@@ -1842,6 +1860,9 @@ function buildLinkList($PAGE,$LINKSDB)
- $taglist = explode(' ',$link['tags']);
- uasort($taglist, 'strcasecmp');
- $link['taglist']=$taglist;
-+ if(!empty($link['via'])){
-+ $link['via']=htmlspecialchars($link['via']);
-+ }
- $linkDisp[$keys[$i]] = $link;
- $i++;
- }
-diff --git a/tpl/editlink.html b/tpl/editlink.html
-index 4a2c30c..14d4f9c 100644
---- a/tpl/editlink.html
-+++ b/tpl/editlink.html
-@@ -16,6 +16,7 @@
- Title
#!/bin/bash
-#Description: Copy a Shaarli installation over SSH/SCP, serve it locally with php-cli
-#Will create a local-shaarli/ directory when you run it, backup your Shaarli there, and serve it locally.
-#Will NOT download linked pages. It's just a directly usable backup/copy/mirror of your Shaarli
-#Requires: ssh, scp and a working SSH access to the server where your Shaarli is installed
-#Usage: ./local-shaarli.sh
-#Author: nodiscc (nodiscc@gmail.com)
-#License: MIT (http://opensource.org/licenses/MIT)
-set -o errexit
-set -o nounset
-
-##### CONFIG #################
-#The port used by php's local server
-php_local_port=7431
-
-#Name of the SSH server and path where Shaarli is installed
-#TODO: pass these as command-line arguments
-remotehost="my.ssh.server"
-remote_shaarli_dir="/var/www/shaarli"
-
-
-###### FUNCTIONS #############
-_main() {
- _CBSyncShaarli
- _CBServeShaarli
-}
-
-_CBSyncShaarli() {
- remote_temp_dir=$(ssh $remotehost mktemp -d)
- remote_ssh_user=$(ssh $remotehost whoami)
- ssh -t "$remotehost" sudo cp -r "$remote_shaarli_dir" "$remote_temp_dir"
- ssh -t "$remotehost" sudo chown -R "$remote_ssh_user":"$remote_ssh_user" "$remote_temp_dir"
- scp -rq "$remotehost":"$remote_temp_dir" local-shaarli
- ssh "$remotehost" rm -r "$remote_temp_dir"
-}
-
-_CBServeShaarli() {
- #TODO: allow serving a previously downloaded Shaarli
- #TODO: ask before overwriting local copy, if it exists
- cd local-shaarli/
- php -S localhost:${php_local_port}
- echo "Please go to http://localhost:${php_local_port}"
-}
-
-
-##### MAIN #################
-
-_main
-
-
-
This outputs:
-
$ ./local-shaarli.sh
-PHP 5.6.0RC4 Development Server started at Mon Sep 1 21:56:19 2014
-Listening on http://localhost:7431
-Document root is /home/user/local-shaarli/shaarli
-Press Ctrl-C to quit.
-
-[Mon Sep 1 21:56:27 2014] ::1:57868 [200]: /
-[Mon Sep 1 21:56:27 2014] ::1:57869 [200]: /index.html
-[Mon Sep 1 21:56:37 2014] ::1:57881 [200]: /...
-
Example bash script (creates multiple shaarli instances and generates an HTML index of them)
-
#!/bin/bash
-set -o errexit
-set -o nounset
-
-#config
-shaarli_base_dir='/var/www/shaarli'
-accounts='bob john whatever username'
-shaarli_repo_url='https://github.com/shaarli/Shaarli'
-ref="master"
-
-#clone multiple shaarli instances
-if [ ! -d "$shaarli_base_dir" ]; then mkdir "$shaarli_base_dir"; fi
-
-for account in $accounts; do
- if [ -d "$shaarli_base_dir/$account" ];
- then echo "[info] account $account already exists, skipping";
- else echo "[info] creating new account $account ..."; git clone --quiet "$shaarli_repo_url" -b "$ref" "$shaarli_base_dir/$account"; fi
-done
-
-#generate html index of shaarlis
-htmlhead='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<!-- Minimal html template thanks to http://www.sitepoint.com/a-minimal-html-document/ -->
-<html lang="en">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8">
- <title>My Shaarli farm</title>
- <style>body {font-family: "Open Sans"}</style>
- </head>
- <body>
- <div>
- <h1>My Shaarli farm</h1>
- <ul style="list-style-type: none;">'
-
-accountlinks=''
-
-htmlfooter='
- </ul>
- </div>
- </body>
-</html>'
-
-
-
-for account in $accounts; do accountlinks="$accountlinks\n<li><a href=\"$account\">$account</a></li>"; done
-if [ -d "$shaarli_base_dir/index.html" ]; then echo "[removing old index.html]"; rm "$shaarli_base_dir/index.html" ]; fi
-echo "[info] generating new index of shaarlis"
-echo -e "$htmlhead $accountlinks $htmlfooter" > "$shaarli_base_dir/index.html"
-echo '[info] done.'
-echo "[info] list of accounts: $accounts"
-echo "[info] contents of $shaarli_base_dir:"
-tree -a -L 1 "$shaarli_base_dir"
-
-
-
This script just serves as an example. More precise or complex (applying custom configuration, etc) automation is possible using configuration management software like Ansible
@@ -340,5 +328,5 @@
diff --git a/doc/html/mkdocs/search_index.json b/doc/html/mkdocs/search_index.json
index 2222a95b..7ef1837c 100644
--- a/doc/html/mkdocs/search_index.json
+++ b/doc/html/mkdocs/search_index.json
@@ -691,39 +691,24 @@
"title": "Import Shaarli links to Firefox"
},
{
- "location": "/Copy-an-existing-installation-over-SSH-and-serve-it-locally/",
- "text": "Example bash script:\n\n\n#!/bin/bash\n#Description: Copy a Shaarli installation over SSH/SCP, serve it locally with php-cli\n#Will create a local-shaarli/ directory when you run it, backup your Shaarli there, and serve it locally.\n#Will NOT download linked pages. It's just a directly usable backup/copy/mirror of your Shaarli\n#Requires: ssh, scp and a working SSH access to the server where your Shaarli is installed\n#Usage: ./local-shaarli.sh\n#Author: nodiscc (nodiscc@gmail.com)\n#License: MIT (http://opensource.org/licenses/MIT)\nset -o errexit\nset -o nounset\n\n##### CONFIG #################\n#The port used by php's local server\nphp_local_port=7431\n\n#Name of the SSH server and path where Shaarli is installed\n#TODO: pass these as command-line arguments\nremotehost=\"my.ssh.server\"\nremote_shaarli_dir=\"/var/www/shaarli\"\n\n\n###### FUNCTIONS #############\n_main() {\n _CBSyncShaarli\n _CBServeShaarli\n}\n\n_CBSyncShaarli() {\n remote_temp_dir=$(ssh $remotehost mktemp -d)\n remote_ssh_user=$(ssh $remotehost whoami)\n ssh -t \"$remotehost\" sudo cp -r \"$remote_shaarli_dir\" \"$remote_temp_dir\"\n ssh -t \"$remotehost\" sudo chown -R \"$remote_ssh_user\":\"$remote_ssh_user\" \"$remote_temp_dir\"\n scp -rq \"$remotehost\":\"$remote_temp_dir\" local-shaarli\n ssh \"$remotehost\" rm -r \"$remote_temp_dir\"\n}\n\n_CBServeShaarli() {\n #TODO: allow serving a previously downloaded Shaarli\n #TODO: ask before overwriting local copy, if it exists\n cd local-shaarli/\n php -S localhost:${php_local_port}\n echo \"Please go to http://localhost:${php_local_port}\"\n}\n\n\n##### MAIN #################\n\n_main\n\n\n\n\nThis outputs:\n\n\n$ ./local-shaarli.sh\nPHP 5.6.0RC4 Development Server started at Mon Sep 1 21:56:19 2014\nListening on http://localhost:7431\nDocument root is /home/user/local-shaarli/shaarli\nPress Ctrl-C to quit.\n\n[Mon Sep 1 21:56:27 2014] ::1:57868 [200]: /\n[Mon Sep 1 21:56:27 2014] ::1:57869 [200]: /index.html\n[Mon Sep 1 21:56:37 2014] ::1:57881 [200]: /...",
- "title": "Copy an existing installation over SSH and serve it locally"
+ "location": "/Various-hacks/",
+ "text": "Decode datastore content\n\n\nTo display the array representing the data saved in \ndata/datastore.php\n, use the following snippet:\n\n\n$data = \"tZNdb9MwFIb... \";\n$out = unserialize(gzinflate(base64_decode($data)));\necho \"
\"; // Pretty printing is love, pretty printing is life\nprint_r($out);\necho \"
\";\nexit;\n\n\n\n\nThis will output the internal representation of the datastore, \"unobfuscated\" (if this can really be considered obfuscation).\n\n\nAlternatively, you can transform to JSON format (and pretty-print if you have \njq\n installed):\n\n\nphp -r 'print(json_encode(unserialize(gzinflate(base64_decode(preg_replace(\"!.*/\\* (.+) \\*/.*!\", \"$1\", file_get_contents(\"data/datastore.php\")))))));' | jq .\n\n\n\n\nChanging the timestamp for a shaare\n\n\n\n\nLook for \n\n in \ntpl/editlink.tpl\n (line 14)\n\n\nReplace \ntype=\"hidden\"\n with \ntype=\"text\"\n from this line\n\n\nA new date/time field becomes available in the edit/new link dialog.\n\n\nYou can set the timestamp manually by entering it in the format \nYYYMMDD_HHMMS\n.\n\n\n\n\nSee also\n\n\n\n\nAdd a new custom field to shaares (example patch)\n\n\nDownload CSS styles for shaarlis listed in an opml file\n\n\nCopy an existing Shaarli installation over SSH, and serve it locally\n\n\nCreate multiple Shaarli instances, generate an HTML index of them",
+ "title": "Various hacks"
},
{
- "location": "/Create-and-serve-multiple-Shaarlis-(farm)/",
- "text": "Example bash script (creates multiple shaarli instances and generates an HTML index of them)\n\n\n#!/bin/bash\nset -o errexit\nset -o nounset\n\n#config\nshaarli_base_dir='/var/www/shaarli'\naccounts='bob john whatever username'\nshaarli_repo_url='https://github.com/shaarli/Shaarli'\nref=\"master\"\n\n#clone multiple shaarli instances\nif [ ! -d \"$shaarli_base_dir\" ]; then mkdir \"$shaarli_base_dir\"; fi\n\nfor account in $accounts; do\n if [ -d \"$shaarli_base_dir/$account\" ];\n then echo \"[info] account $account already exists, skipping\";\n else echo \"[info] creating new account $account ...\"; git clone --quiet \"$shaarli_repo_url\" -b \"$ref\" \"$shaarli_base_dir/$account\"; fi\ndone\n\n#generate html index of shaarlis\nhtmlhead='\n\n\n \n \n My Shaarli farm\n \n \n \n
\n
My Shaarli farm
\n
'\n\naccountlinks=''\n\nhtmlfooter='\n
\n
\n \n' \n\n\n\nfor account in $accounts; do accountlinks=\"$accountlinks\\n
\"; done\nif [ -d \"$shaarli_base_dir/index.html\" ]; then echo \"[removing old index.html]\"; rm \"$shaarli_base_dir/index.html\" ]; fi\necho \"[info] generating new index of shaarlis\"\necho -e \"$htmlhead $accountlinks $htmlfooter\" > \"$shaarli_base_dir/index.html\"\necho '[info] done.'\necho \"[info] list of accounts: $accounts\"\necho \"[info] contents of $shaarli_base_dir:\"\ntree -a -L 1 \"$shaarli_base_dir\"\n\n\n\n\nThis script just serves as an example. More precise or complex (applying custom configuration, etc) automation is possible using configuration management software like \nAnsible",
- "title": "Create and serve multiple Shaarlis (farm)"
- },
- {
- "location": "/Download-CSS-styles-from-an-OPML-list/",
- "text": "Download CSS styles for shaarlis listed in an opml file\n\n\nExample php script:\n\n\n\n\n\n\n/**\n * Source: https://github.com/Riduidel\n * Download css styles for shaarlis listed in an opml file\n */\ndefine(\"SHAARLI_RSS_OPML\", \"https://www.ecirtam.net/shaarlirss/custom/people.opml\");\n\ndefine(\"THEMES_TEMP_FOLDER\", \"new_themes\");\n\nif(!file_exists(THEMES_TEMP_FOLDER)) {\n mkdir(THEMES_TEMP_FOLDER);\n}\n\nfunction siteUrl($pathInSite) {\n $indexPos = strpos($pathInSite, \"index.php\");\n if(!$indexPos) {\n return $pathInSite;\n } else {\n return substr($pathInSite, 0, $indexPos);\n }\n}\n\nfunction createShaarliHashFromOPMLL($opmlFile) {\n $result = array();\n $opml = file_get_contents($opmlFile);\n $opmlXml = simplexml_load_string($opml);\n $outlineElements = $opmlXml->xpath(\"body/outline\");\n foreach($outlineElements as $site) {\n $siteUrl = siteUrl((string) $site['htmlUrl']);\n $result[$siteUrl]=((string) $site['text']);\n }\n return $result;\n}\n\nfunction getSiteFolder($url) {\n $domain = parse_url($url, PHP_URL_HOST);\n return THEMES_TEMP_FOLDER.\"/\".str_replace(\".\", \"_\", $domain);\n}\n\nfunction get_http_response_code($theURL) {\n $headers = get_headers($theURL);\n return substr($headers[0], 9, 3);\n}\n\n/**\n * This makes the code PHP-5 only (particularly the call to \"get_headers\")\n */\nfunction copyUserStyleFrom($url, $name, $knownStyles) {\n $userStyle = $url.\"inc/user.css\";\n if(in_array($url, $knownStyles)) {\n // TODO add log message\n } else {\n $statusCode = get_http_response_code($userStyle);\n if(intval($statusCode)<300) {\n $styleSheet = file_get_contents($userStyle);\n $siteFolder = getSiteFolder($url);\n if(!file_exists($siteFolder)) {\n mkdir($siteFolder);\n }\n if(!file_exists($siteFolder.'/user.css')) {\n // Copy stylesheet\n file_put_contents($siteFolder.'/user.css', $styleSheet);\n }\n if(!file_exists($siteFolder.'/README.md')) {\n // Then write a readme.md file\n file_put_contents($siteFolder.'/README.md', \n \"User style from \".$name.\"\\n\"\n .\"=============================\"\n .\"\\n\\n\"\n .\"This stylesheet was downloaded from \".$userStyle.\" on \".date(DATE_RFC822)\n );\n }\n if(!file_exists($siteFolder.'/config.ini')) {\n // Write a config file containing useful informations\n file_put_contents($siteFolder.'/config.ini', \n \"site_url=\".$url.\"\\n\"\n .\"site_name=\".$name.\"\\n\"\n );\n }\n if(!file_exists($siteFolder.'/home.png')) {\n // And finally copy generated thumbnail\n $homeThumb = $siteFolder.'/home.png';\n file_put_contents($siteFolder.'/home.png', file_get_contents(getThumbnailUrl($url)));\n }\n echo 'Theme have been downloaded from '.$url.' into '.$siteFolder\n .'. It looks like ';\n }\n }\n}\n\nfunction getThumbnailUrl($url) {\n return 'http://api.webthumbnail.org/?url='.$url;\n}\n\nfunction copyUserStylesFrom($urlToNames, $knownStyles) {\n foreach($urlToNames as $url => $name) {\n copyUserStyleFrom($url, $name, $knownStyles);\n }\n}\n\n/**\n * Reading directory list, courtesy of http://www.laughing-buddha.net/php/dirlist/\n * @param directory the directory we want to list files of\n * @return a simple array containing the list of absolute file paths. Notice that current file (\".\") and parent one(\"..\")\n * are not listed here\n */\nfunction getDirectoryList ($directory) {\n $realPath = realpath($directory);\n // create an array to hold directory list\n $results = array();\n // create a handler for the directory\n $handler = opendir($directory);\n // open directory and walk through the filenames\n while ($file = readdir($handler)) {\n // if file isn't this directory or its parent, add it to the results\n if ($file != \".\" && $file != \"..\") {\n $results[] = realpath($realPath . \"/\" . $file);\n }\n }\n // tidy up: close the handler\n closedir($handler);\n // done!\n return $results;\n}\n\n/**\n * Start in themes folder and look in all subfolders for config.ini files. \n * These config.ini files allow us not to download styles again and again\n */\nfunction findKnownStyles() {\n $result = array();\n $subFolders = getDirectoryList(\"themes\");\n foreach($subFolders as $folder) {\n $configFile = $folder.\"/config.ini\";\n if(file_exists($configFile)) {\n $iniParameters = parse_ini_file($configFile);\n array_push($result, $iniParameters['site_url']);\n }\n }\n return $result;\n}\n\n$knownStyles = findKnownStyles();\ncopyUserStylesFrom(createShaarliHashFromOPMLL(SHAARLI_RSS_OPML), $knownStyles);\n\n",
- "title": "Download CSS styles from an OPML list"
- },
- {
- "location": "/Download-CSS-styles-from-an-OPML-list/#download-css-styles-for-shaarlis-listed-in-an-opml-file",
- "text": "Example php script: \n\n\n\n/**\n * Source: https://github.com/Riduidel\n * Download css styles for shaarlis listed in an opml file\n */\ndefine(\"SHAARLI_RSS_OPML\", \"https://www.ecirtam.net/shaarlirss/custom/people.opml\");\n\ndefine(\"THEMES_TEMP_FOLDER\", \"new_themes\");\n\nif(!file_exists(THEMES_TEMP_FOLDER)) {\n mkdir(THEMES_TEMP_FOLDER);\n}\n\nfunction siteUrl($pathInSite) {\n $indexPos = strpos($pathInSite, \"index.php\");\n if(!$indexPos) {\n return $pathInSite;\n } else {\n return substr($pathInSite, 0, $indexPos);\n }\n}\n\nfunction createShaarliHashFromOPMLL($opmlFile) {\n $result = array();\n $opml = file_get_contents($opmlFile);\n $opmlXml = simplexml_load_string($opml);\n $outlineElements = $opmlXml->xpath(\"body/outline\");\n foreach($outlineElements as $site) {\n $siteUrl = siteUrl((string) $site['htmlUrl']);\n $result[$siteUrl]=((string) $site['text']);\n }\n return $result;\n}\n\nfunction getSiteFolder($url) {\n $domain = parse_url($url, PHP_URL_HOST);\n return THEMES_TEMP_FOLDER.\"/\".str_replace(\".\", \"_\", $domain);\n}\n\nfunction get_http_response_code($theURL) {\n $headers = get_headers($theURL);\n return substr($headers[0], 9, 3);\n}\n\n/**\n * This makes the code PHP-5 only (particularly the call to \"get_headers\")\n */\nfunction copyUserStyleFrom($url, $name, $knownStyles) {\n $userStyle = $url.\"inc/user.css\";\n if(in_array($url, $knownStyles)) {\n // TODO add log message\n } else {\n $statusCode = get_http_response_code($userStyle);\n if(intval($statusCode)<300) {\n $styleSheet = file_get_contents($userStyle);\n $siteFolder = getSiteFolder($url);\n if(!file_exists($siteFolder)) {\n mkdir($siteFolder);\n }\n if(!file_exists($siteFolder.'/user.css')) {\n // Copy stylesheet\n file_put_contents($siteFolder.'/user.css', $styleSheet);\n }\n if(!file_exists($siteFolder.'/README.md')) {\n // Then write a readme.md file\n file_put_contents($siteFolder.'/README.md', \n \"User style from \".$name.\"\\n\"\n .\"=============================\"\n .\"\\n\\n\"\n .\"This stylesheet was downloaded from \".$userStyle.\" on \".date(DATE_RFC822)\n );\n }\n if(!file_exists($siteFolder.'/config.ini')) {\n // Write a config file containing useful informations\n file_put_contents($siteFolder.'/config.ini', \n \"site_url=\".$url.\"\\n\"\n .\"site_name=\".$name.\"\\n\"\n );\n }\n if(!file_exists($siteFolder.'/home.png')) {\n // And finally copy generated thumbnail\n $homeThumb = $siteFolder.'/home.png';\n file_put_contents($siteFolder.'/home.png', file_get_contents(getThumbnailUrl($url)));\n }\n echo 'Theme have been downloaded from '.$url.' into '.$siteFolder\n .'. It looks like ';\n }\n }\n}\n\nfunction getThumbnailUrl($url) {\n return 'http://api.webthumbnail.org/?url='.$url;\n}\n\nfunction copyUserStylesFrom($urlToNames, $knownStyles) {\n foreach($urlToNames as $url => $name) {\n copyUserStyleFrom($url, $name, $knownStyles);\n }\n}\n\n/**\n * Reading directory list, courtesy of http://www.laughing-buddha.net/php/dirlist/\n * @param directory the directory we want to list files of\n * @return a simple array containing the list of absolute file paths. Notice that current file (\".\") and parent one(\"..\")\n * are not listed here\n */\nfunction getDirectoryList ($directory) {\n $realPath = realpath($directory);\n // create an array to hold directory list\n $results = array();\n // create a handler for the directory\n $handler = opendir($directory);\n // open directory and walk through the filenames\n while ($file = readdir($handler)) {\n // if file isn't this directory or its parent, add it to the results\n if ($file != \".\" && $file != \"..\") {\n $results[] = realpath($realPath . \"/\" . $file);\n }\n }\n // tidy up: close the handler\n closedir($handler);\n // done!\n return $results;\n}\n\n/**\n * Start in themes folder and look in all subfolders for config.ini files. \n * These config.ini files allow us not to download styles again and again\n */\nfunction findKnownStyles() {\n $result = array();\n $subFolders = getDirectoryList(\"themes\");\n foreach($subFolders as $folder) {\n $configFile = $folder.\"/config.ini\";\n if(file_exists($configFile)) {\n $iniParameters = parse_ini_file($configFile);\n array_push($result, $iniParameters['site_url']);\n }\n }\n return $result;\n}\n\n$knownStyles = findKnownStyles();\ncopyUserStylesFrom(createShaarliHashFromOPMLL(SHAARLI_RSS_OPML), $knownStyles);\n\n",
- "title": "Download CSS styles for shaarlis listed in an opml file"
- },
- {
- "location": "/Datastore-hacks/",
- "text": "Decode datastore content\n\n\nTo display the array representing the data saved in \ndata/datastore.php\n, use the following snippet:\n\n\n$data = \"tZNdb9MwFIb... \";\n$out = unserialize(gzinflate(base64_decode($data)));\necho \"
\"; // Pretty printing is love, pretty printing is life\nprint_r($out);\necho \"
\";\nexit;\n\n\n\n\nThis will output the internal representation of the datastore, \"unobfuscated\" (if this can really be considered obfuscation).\n\n\nAlternatively, you can transform to JSON format (and pretty-print if you have \njq\n installed):\n\n\nphp -r 'print(json_encode(unserialize(gzinflate(base64_decode(preg_replace(\"!.*/\\* (.+) \\*/.*!\", \"$1\", file_get_contents(\"data/datastore.php\")))))));' | jq .\n\n\n\n\nChanging the timestamp for a link\n\n\n\n\nLook for \n\n in \ntpl/editlink.tpl\n (line 14)\n\n\nReplace \ntype=\"hidden\"\n with \ntype=\"text\"\n from this line\n\n\nA new date/time field becomes available in the edit/new link dialog.\n\n\nYou can set the timestamp manually by entering it in the format \nYYYMMDD_HHMMS\n.",
- "title": "Datastore hacks"
- },
- {
- "location": "/Datastore-hacks/#decode-datastore-content",
+ "location": "/Various-hacks/#decode-datastore-content",
"text": "To display the array representing the data saved in data/datastore.php , use the following snippet: $data = \"tZNdb9MwFIb... \";\n$out = unserialize(gzinflate(base64_decode($data)));\necho \"
\"; // Pretty printing is love, pretty printing is life\nprint_r($out);\necho \"
\";\nexit; This will output the internal representation of the datastore, \"unobfuscated\" (if this can really be considered obfuscation). Alternatively, you can transform to JSON format (and pretty-print if you have jq installed): php -r 'print(json_encode(unserialize(gzinflate(base64_decode(preg_replace(\"!.*/\\* (.+) \\*/.*!\", \"$1\", file_get_contents(\"data/datastore.php\")))))));' | jq .",
"title": "Decode datastore content"
},
{
- "location": "/Datastore-hacks/#changing-the-timestamp-for-a-link",
+ "location": "/Various-hacks/#changing-the-timestamp-for-a-shaare",
"text": "Look for in tpl/editlink.tpl (line 14) Replace type=\"hidden\" with type=\"text\" from this line A new date/time field becomes available in the edit/new link dialog. You can set the timestamp manually by entering it in the format YYYMMDD_HHMMS .",
- "title": "Changing the timestamp for a link"
+ "title": "Changing the timestamp for a shaare"
+ },
+ {
+ "location": "/Various-hacks/#see-also",
+ "text": "Add a new custom field to shaares (example patch) Download CSS styles for shaarlis listed in an opml file Copy an existing Shaarli installation over SSH, and serve it locally Create multiple Shaarli instances, generate an HTML index of them",
+ "title": "See also"
},
{
"location": "/Troubleshooting/",
diff --git a/doc/html/search.html b/doc/html/search.html
index b492b8bd..49541cda 100644
--- a/doc/html/search.html
+++ b/doc/html/search.html
@@ -148,19 +148,7 @@
diff --git a/doc/html/sitemap.xml b/doc/html/sitemap.xml
index 534f02b5..2a1b009e 100644
--- a/doc/html/sitemap.xml
+++ b/doc/html/sitemap.xml
@@ -132,25 +132,7 @@
- /Copy-an-existing-installation-over-SSH-and-serve-it-locally/
- 2017-06-18
- daily
-
-
-
- /Create-and-serve-multiple-Shaarlis-(farm)/
- 2017-06-18
- daily
-
-
-
- /Download-CSS-styles-from-an-OPML-list/
- 2017-06-18
- daily
-
-
-
- /Datastore-hacks/
+ /Various-hacks/2017-06-18daily
diff --git a/doc/md/Browsing-and-searching.md b/doc/md/Browsing-and-searching.md
index ad62c2f0..35707482 100644
--- a/doc/md/Browsing-and-searching.md
+++ b/doc/md/Browsing-and-searching.md
@@ -20,4 +20,4 @@ To search for links that are not tagged, enter `""` in the tag search field.
## Filtering RSS feeds/Picture wall
-RSS feeds can also be restricted to only return items matching a text/tag search: see [[RSS feeds]].
+RSS 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
index 6ff7ed45..b8b7cccd 100644
--- a/doc/md/Community-&-Related-software.md
+++ b/doc/md/Community-&-Related-software.md
@@ -34,7 +34,7 @@ _TODO: contact repos owners to see if they'd like to standardize their work with
### Themes
-See [[Theming]] for the list of community-contributed themes, and an installation guide.
+See [Theming](Theming) for the list of community-contributed themes, and an installation guide.
### Server apps
- [shaarchiver](https://github.com/nodiscc/shaarchiver) - Archive your Shaarli bookmarks and their content
diff --git a/doc/md/Continuous-integration-tools.md b/doc/md/Continuous-integration-tools.md
index 30dc474d..849257f7 100644
--- a/doc/md/Continuous-integration-tools.md
+++ b/doc/md/Continuous-integration-tools.md
@@ -1,20 +1,20 @@
## Local development
A [`Makefile`](https://github.com/shaarli/Shaarli/blob/master/Makefile) is available to perform project-related operations:
- Documentation - generate a local HTML copy of the GitHub wiki
-- [[Static analysis]] - check that the code is compliant to PHP conventions
-- [[Unit tests]] - ensure there are no regressions introduced by new commits
+- [Static analysis](Static analysis) - check that the code is compliant to PHP conventions
+- [Unit tests](Unit tests) - ensure there are no regressions introduced by new commits
## Automatic builds
[Travis CI](http://docs.travis-ci.com/) is a Continuous Integration build server, that runs a build:
- each time a commit is merged to the mainline (`master` branch)
- each time a Pull Request is submitted or updated
-A build is composed of several jobs: one for each supported PHP version (see [[Server requirements]]).
+A build is composed of several jobs: one for each supported PHP version (see [Server requirements](Server requirements)).
Each build job:
- updates Composer
- installs 3rd-party test dependencies with Composer
-- runs [[Unit tests]]
+- runs [Unit tests](Unit tests)
After all jobs have finished, Travis returns the results to GitHub:
- a status icon represents the result for the `master` branch: [](https://travis-ci.org/shaarli/Shaarli)
diff --git a/doc/md/Development-guidelines.md b/doc/md/Development-guidelines.md
index 1480ec89..3a248767 100644
--- a/doc/md/Development-guidelines.md
+++ b/doc/md/Development-guidelines.md
@@ -2,8 +2,8 @@
Please have a look at the following pages:
- [Contributing to Shaarli](https://github.com/shaarli/Shaarli/tree/master/CONTRIBUTING.md)
-- [[Static analysis]] - patches should try to stick to the [PHP Standard Recommendations](http://www.php-fig.org/psr/) (PSR), especially:
+- [Static analysis](Static analysis) - patches should try to stick to the [PHP Standard Recommendations](http://www.php-fig.org/psr/) (PSR), especially:
- [PSR-1](http://www.php-fig.org/psr/psr-1/) - Basic Coding Standard
- [PSR-2](http://www.php-fig.org/psr/psr-2/) - Coding Style Guide
-- [[Unit tests]]
-- [[GnuPG signature]] for tags/releases
+- [Unit tests](Unit tests)
+- [GnuPG signature](GnuPG signature) for tags/releases
diff --git a/doc/md/Firefox-share.md b/doc/md/Firefox-share.md
index 9ba57b04..595b9400 100644
--- a/doc/md/Firefox-share.md
+++ b/doc/md/Firefox-share.md
@@ -8,7 +8,7 @@
### Sharing links using Firefox share
* Add the sharing service as described above
- * When you are visiting a webpage you would like to share with Shaarli, click the Firefox _Share_ button [[images/firefoxshare.png]]
+ * When you are visiting a webpage you would like to share with Shaarli, click the Firefox _Share_ button [images/firefoxshare.png](images/firefoxshare.png)
* You can edit your link before and after saving, just like the bookmarklet above.
| | 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. |
diff --git a/doc/md/GnuPG-signature.md b/doc/md/GnuPG-signature.md
index 1fb3b42f..62a17d33 100644
--- a/doc/md/GnuPG-signature.md
+++ b/doc/md/GnuPG-signature.md
@@ -73,4 +73,4 @@ gpg: sending key A9D53A3E to hkp server pgp.mit.edu
## Create and push a GPG-signed tag
-See [[Release Shaarli]].
+See [Release Shaarli](Release Shaarli).
diff --git a/doc/md/Theming.md b/doc/md/Theming.md
index ae68db38..d72c2ffd 100644
--- a/doc/md/Theming.md
+++ b/doc/md/Theming.md
@@ -15,7 +15,7 @@ This file allows overriding rules defined in the template CSS files (only add ch
**Note**: Do not edit `tpl/default/css/shaarli.css`! Your changes would be overridden when updating Shaarli.
-See also [[Download CSS styles from an OPML list]]
+See also [Download CSS styles from an OPML list](Download CSS styles from an OPML list)
## Themes
@@ -77,7 +77,7 @@ Get config written:
- fill the install form
- log in to Shaarli
-Edit Shaarli's [[configuration|Shaarli configuration]]:
+Edit Shaarli's [configuration|Shaarli configuration](configuration|Shaarli configuration):
```bash
# the file should be owned by Apache, thus not writeable => sudo
$ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php
diff --git a/doc/md/Upgrade-and-migration.md b/doc/md/Upgrade-and-migration.md
index 7348891f..2002a4e2 100644
--- a/doc/md/Upgrade-and-migration.md
+++ b/doc/md/Upgrade-and-migration.md
@@ -13,7 +13,7 @@ Shaarli stores all user data under the `data` directory:
- `data/ipbans.php` - banned IP addresses
- `data/updates.txt` - contains all automatic update to the configuration and datastore files already run
-See [[Shaarli configuration]] for more information about Shaarli resources.
+See [Shaarli configuration](Shaarli configuration) for more information about Shaarli resources.
It is recommended to backup this repository _before_ starting updating/upgrading Shaarli:
- users with SSH access: copy or archive the directory to a temporary location
@@ -25,7 +25,7 @@ As all user data is kept under `data`, this is the only directory you need to wo
- backup the `data` directory
- install or update Shaarli:
- - fresh installation - see [[Download and installation]]
+ - fresh installation - see [Download and installation](Download and installation)
- update - see the following sections
- check or restore the `data` directory
@@ -33,11 +33,11 @@ As all user data is kept under `data`, this is the only directory you need to wo
All tagged revisions can be downloaded as tarballs or ZIP archives from the [releases](https://github.com/shaarli/Shaarli/releases) page.
-We recommend that you use the latest release tarball with the `-full` suffix. It contains the dependencies, please read [[Download and installation]] for `git` complete instructions.
+We 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.
Once downloaded, extract the archive locally and update your remote installation (e.g. via FTP) -be sure you keep the content of the `data` directory!
-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 `data/config.json.php` (see [[Shaarli configuration]] for more details).
+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 `data/config.json.php` (see [Shaarli configuration](Shaarli configuration) for more details).
## Upgrading with Git
@@ -170,7 +170,7 @@ Total 3317 (delta 2050), reused 3301 (delta 2034)to
#### Step 3: configuration
-After 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]] for more details).
+After 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).
## Troubleshooting
--
cgit v1.2.3
From 12e1877917dc6c29cd93bce7781e26c9f4415c16 Mon Sep 17 00:00:00 2001
From: nodiscc
Date: Sun, 18 Jun 2017 22:15:50 +0200
Subject: move README contents to doc/md/index.md
---
doc/md/index.md | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 106 insertions(+), 3 deletions(-)
(limited to 'doc')
diff --git a/doc/md/index.md b/doc/md/index.md
index 37a9c1fc..1106334b 100644
--- a/doc/md/index.md
+++ b/doc/md/index.md
@@ -1,11 +1,114 @@
-Welcome to the [Shaarli](https://github.com/shaarli/Shaarli/) wiki!
+# [Shaarli](https://github.com/shaarli/Shaarli/) documentation
Here you can find some info on how to use, configure, tweak and solve problems with your Shaarli.
For general info, read the [README](https://github.com/shaarli/Shaarli/blob/master/README.md).
-If 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).
+If 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).
+If you've found a bug, please create a [new issue](https://github.com/shaarli/Shaarli/issues/new).
If 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).
-_Note: This documentation is available online at https://github.com/shaarli/Shaarli/wiki, and locally in the `doc/` directory of your Shaarli installation._
+_Note: This documentation is available online at https://shaarli.readthedocs.io/, and locally in the `doc/html/` directory of your Shaarli installation._
+
+[](https://gitter.im/shaarli/Shaarli)
+[](https://www.bountysource.com/teams/shaarli/issues)
+[](https://hub.docker.com/r/shaarli/shaarli/)
+
+### Demo
+
+You can use this [public demo instance of Shaarli](https://demo.shaarli.org).
+It runs the latest development version of Shaarli and is updated/reset daily.
+
+Login: `demo`; Password: `demo`
+
+
+## Features
+
+### Interface
+- minimalist design (simple is beautiful)
+- FAST
+- ATOM and RSS feeds
+- views:
+ - paginated link list
+ - tag cloud
+ - picture wall: image and video thumbnails
+ - daily: newspaper-like daily digest
+ - daily RSS feed
+- permalinks for easy reference
+- links can be public or private
+- extensible through [plugins](https://github.com/shaarli/Shaarli/wiki/Plugins#plugin-usage)
+
+### Tag, view and search your links!
+- add a custom title and description to archived links
+- add tags to classify and search links
+ - features tag autocompletion, renaming, merging and deletion
+- full-text and tag search
+
+### Easy setup
+- dead-simple installation: drop the files, open the page
+- links are stored in a file
+ - compact storage
+ - no database required
+ - easy backup: simply copy the datastore file
+- import and export links as Netscape bookmarks
+
+### Accessibility
+- Firefox bookmarlet to share links in one click
+- support for mobile browsers
+- works with Javascript disabled
+- easy page customization through HTML/CSS/RainTPL
+
+### Security
+- bruteforce-proof login form
+- protected against [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)
+and session cookie hijacking
+
+### Goodies
+- thumbnail generation for images and video services:
+dailymotion, flickr, imageshack, imgur, vimeo, xkcd, youtube...
+ - lazy-loading with [bLazy](http://dinbror.dk/blazy/)
+- [PubSubHubbub](https://code.google.com/p/pubsubhubbub/) protocol support
+- URL cleanup: automatic removal of `?utm_source=...`, `fb=...`
+- discreet pop-up notification when a new release is available
+
+### REST API
+
+Easily extensible by any client using the REST API exposed by Shaarli.
+
+See the [API documentation](http://shaarli.github.io/api-documentation/).
+
+### Other usages
+Though Shaarli is primarily a bookmarking application, it can serve other purposes
+(see [usage examples](https://github.com/shaarli/Shaarli/wiki#usage-examples)):
+- micro-blogging
+- pastebin
+- online notepad
+- snippet archive
+
+## About
+### Shaarli community fork
+This friendly fork is maintained by the Shaarli community at https://github.com/shaarli/Shaarli
+
+This is a community fork of the original [Shaarli](https://github.com/sebsauvage/Shaarli/) project by [Sébastien Sauvage](http://sebsauvage.net/).
+
+The original project is currently unmaintained, and the developer [has informed us](https://github.com/sebsauvage/Shaarli/issues/191)
+that he would have no time to work on Shaarli in the near future.
+The Shaarli community has carried on the work to provide
+[many patches](https://github.com/shaarli/Shaarli/compare/sebsauvage:master...master)
+for [bug fixes and enhancements](https://github.com/shaarli/Shaarli/issues?q=is%3Aclosed+)
+in this repository, and will keep maintaining the project for the foreseeable future, while keeping Shaarli simple and efficient.
+
+### Contributing
+If you'd like to help, please:
+- have a look at the open [issues](https://github.com/shaarli/Shaarli/issues)
+and [pull requests](https://github.com/shaarli/Shaarli/pulls)
+- feel free to report bugs (feedback is much appreciated)
+- suggest new features and improvements to both code and [documentation](https://github.com/shaarli/Shaarli/wiki)
+- propose solutions to existing problems
+- submit pull requests :-)
+
+
+### License
+Shaarli 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.
+
--
cgit v1.2.3
From 081a73486ff6eb73191294a047c51ea15e2b312a Mon Sep 17 00:00:00 2001
From: nodiscc
Date: Sun, 18 Jun 2017 22:22:34 +0200
Subject: doc: replace pandoc requirement with python3-venv
---
doc/md/Release-Shaarli.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'doc')
diff --git a/doc/md/Release-Shaarli.md b/doc/md/Release-Shaarli.md
index cce5e209..59175352 100644
--- a/doc/md/Release-Shaarli.md
+++ b/doc/md/Release-Shaarli.md
@@ -12,7 +12,8 @@ This guide assumes that you have:
- maintainer permissions on the main Shaarli repository, to:
- push the signed tag
- create a new release
-- [Composer](https://getcomposer.org/) and [Pandoc](http://pandoc.org/) need to be installed
+- [Composer](https://getcomposer.org/) needs to be installed
+- The [venv](https://docs.python.org/3/library/venv.html) Python 3 module needs to be installed for HTML documentation generation.
## GitHub release draft and `CHANGELOG.md`
See http://keepachangelog.com/en/0.3.0/ for changelog formatting.
--
cgit v1.2.3
From 2f9c1ecf8853d513ec86427b20e0d006b5296c9c Mon Sep 17 00:00:00 2001
From: nodiscc
Date: Tue, 4 Jul 2017 21:26:01 +0200
Subject: doc: release: update doc generation instructions
---
doc/md/Release-Shaarli.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'doc')
diff --git a/doc/md/Release-Shaarli.md b/doc/md/Release-Shaarli.md
index 59175352..0e445272 100644
--- a/doc/md/Release-Shaarli.md
+++ b/doc/md/Release-Shaarli.md
@@ -52,8 +52,8 @@ $ cd /path/to/shaarli
$ git fetch upstream
$ git checkout upstream/master -b v0.5.0
-# rebuild the documentation from the wiki
-$ make htmldoc
+# rebuild the HTML documentation from Markdown
+$ make htmlpages
# commit the changes
$ git add doc
--
cgit v1.2.3
From 366247c84cdb0bb0457552468103814d4d31ce5c Mon Sep 17 00:00:00 2001
From: nodiscc
Date: Tue, 4 Jul 2017 21:30:31 +0200
Subject: make htmlpages
---
doc/html/Release-Shaarli/index.html | 7 ++-
doc/html/index.html | 121 ++++++++++++++++++++++++++++++++++--
doc/html/mkdocs/search_index.json | 83 +++++++++++++++++++++++--
doc/html/sitemap.xml | 72 ++++++++++-----------
4 files changed, 236 insertions(+), 47 deletions(-)
(limited to 'doc')
diff --git a/doc/html/Release-Shaarli/index.html b/doc/html/Release-Shaarli/index.html
index 92433203..5857a52f 100644
--- a/doc/html/Release-Shaarli/index.html
+++ b/doc/html/Release-Shaarli/index.html
@@ -337,7 +337,8 @@ releases.
- maintainer permissions on the main Shaarli repository, to:
- push the signed tag
- create a new release
-- Composer and Pandoc need to be installed
+- Composer needs to be installed
+- The venv Python 3 module needs to be installed for HTML documentation generation.
GitHub release draft and CHANGELOG.md
See http://keepachangelog.com/en/0.3.0/ for changelog formatting.
GitHub release draft
@@ -368,8 +369,8 @@ TBA
$ git fetch upstream
$ git checkout upstream/master -b v0.5.0
-# rebuild the documentation from the wiki
-$ make htmldoc
+# rebuild the HTML documentation from Markdown
+$ make htmlpages
# commit the changes
$ git add doc
diff --git a/doc/html/index.html b/doc/html/index.html
index e6d4ef78..93f4ba5d 100644
--- a/doc/html/index.html
+++ b/doc/html/index.html
@@ -53,6 +53,19 @@
Home
If you have any questions or ideas, please join the chat (also reachable via IRC), post them in our general discussion (archive) or read the current issues. If you've found a bug, please create a new issue.
+
If you have any questions or ideas, please join the chat (also reachable via IRC), post them in our general discussion or read the current issues.
+If you've found a bug, please create a new issue.
If you would like a feature added to Shaarli, check the issues labeled feature, enhancement, and plugin.
-
Note: This documentation is available online at https://github.com/shaarli/Shaarli/wiki, and locally in the doc/ directory of your Shaarli installation.
+
Note: This documentation is available online at https://shaarli.readthedocs.io/, and locally in the doc/html/ directory of your Shaarli installation.
+
+
+
+
Demo
+
You can use this public demo instance of Shaarli.
+It runs the latest development version of Shaarli and is updated/reset daily.
Though Shaarli is primarily a bookmarking application, it can serve other purposes
+(see usage examples):
+- micro-blogging
+- pastebin
+- online notepad
+- snippet archive
+
About
+
Shaarli community fork
+
This friendly fork is maintained by the Shaarli community at https://github.com/shaarli/Shaarli
The original project is currently unmaintained, and the developer has informed us
+that he would have no time to work on Shaarli in the near future.
+The Shaarli community has carried on the work to provide
+many patches
+for bug fixes and enhancements
+in this repository, and will keep maintaining the project for the foreseeable future, while keeping Shaarli simple and efficient.
+
Contributing
+
If you'd like to help, please:
+- have a look at the open issues
+and pull requests
+- feel free to report bugs (feedback is much appreciated)
+- suggest new features and improvements to both code and documentation
+- propose solutions to existing problems
+- submit pull requests :-)
+
License
+
Shaarli is Free Software. See COPYING for a detail of the contributors and licenses for each individual component.
@@ -328,5 +441,5 @@
diff --git a/doc/html/mkdocs/search_index.json b/doc/html/mkdocs/search_index.json
index 7ef1837c..71bc2bcf 100644
--- a/doc/html/mkdocs/search_index.json
+++ b/doc/html/mkdocs/search_index.json
@@ -2,9 +2,84 @@
"docs": [
{
"location": "/",
- "text": "Welcome to the \nShaarli\n wiki!\n\n\nHere you can find some info on how to use, configure, tweak and solve problems with your Shaarli.\n\n\nFor general info, read the \nREADME\n.\n\n\nIf you have any questions or ideas, please join the \nchat\n (also reachable via \nIRC\n), post them in our \ngeneral discussion\n (\narchive\n) or read the current \nissues\n. If you've found a bug, please create a \nnew issue\n.\n\n\nIf you would like a feature added to Shaarli, check the issues labeled \nfeature\n, \nenhancement\n, and \nplugin\n.\n\n\nNote: This documentation is available online at https://github.com/shaarli/Shaarli/wiki, and locally in the \ndoc/\n directory of your Shaarli installation.",
+ "text": "Shaarli\n documentation\n\n\nHere you can find some info on how to use, configure, tweak and solve problems with your Shaarli.\n\n\nFor general info, read the \nREADME\n.\n\n\nIf you have any questions or ideas, please join the \nchat\n (also reachable via \nIRC\n), post them in our \ngeneral discussion\n or read the current \nissues\n.\nIf you've found a bug, please create a \nnew issue\n.\n\n\nIf you would like a feature added to Shaarli, check the issues labeled \nfeature\n, \nenhancement\n, and \nplugin\n.\n\n\nNote: This documentation is available online at https://shaarli.readthedocs.io/, and locally in the \ndoc/html/\n directory of your Shaarli installation.\n\n\n\n\n\n\n\n\nDemo\n\n\nYou can use this \npublic demo instance of Shaarli\n.\nIt runs the latest development version of Shaarli and is updated/reset daily.\n\n\nLogin: \ndemo\n; Password: \ndemo\n\n\nFeatures\n\n\nInterface\n\n\n\n\nminimalist design (simple is beautiful)\n\n\nFAST\n\n\nATOM and RSS feeds\n\n\nviews:\n\n\npaginated link list\n\n\ntag cloud\n\n\npicture wall: image and video thumbnails\n\n\ndaily: newspaper-like daily digest\n\n\ndaily RSS feed\n\n\n\n\n\n\npermalinks for easy reference\n\n\nlinks can be public or private\n\n\nextensible through \nplugins\n\n\n\n\nTag, view and search your links!\n\n\n\n\nadd a custom title and description to archived links\n\n\nadd tags to classify and search links\n\n\nfeatures tag autocompletion, renaming, merging and deletion\n\n\n\n\n\n\nfull-text and tag search\n\n\n\n\nEasy setup\n\n\n\n\ndead-simple installation: drop the files, open the page\n\n\nlinks are stored in a file\n\n\ncompact storage\n\n\nno database required\n\n\neasy backup: simply copy the datastore file\n\n\n\n\n\n\nimport and export links as Netscape bookmarks\n\n\n\n\nAccessibility\n\n\n\n\nFirefox bookmarlet to share links in one click\n\n\nsupport for mobile browsers\n\n\nworks with Javascript disabled\n\n\neasy page customization through HTML/CSS/RainTPL\n\n\n\n\nSecurity\n\n\n\n\nbruteforce-proof login form\n\n\nprotected against \nXSRF\n\nand session cookie hijacking\n\n\n\n\nGoodies\n\n\n\n\nthumbnail generation for images and video services:\ndailymotion, flickr, imageshack, imgur, vimeo, xkcd, youtube...\n\n\nlazy-loading with \nbLazy\n\n\n\n\n\n\nPubSubHubbub\n protocol support\n\n\nURL cleanup: automatic removal of \n?utm_source=...\n, \nfb=...\n\n\ndiscreet pop-up notification when a new release is available\n\n\n\n\nREST API\n\n\nEasily extensible by any client using the REST API exposed by Shaarli.\n\n\nSee the \nAPI documentation\n.\n\n\nOther usages\n\n\nThough Shaarli is primarily a bookmarking application, it can serve other purposes\n(see \nusage examples\n):\n- micro-blogging\n- pastebin\n- online notepad\n- snippet archive\n\n\nAbout\n\n\nShaarli community fork\n\n\nThis friendly fork is maintained by the Shaarli community at https://github.com/shaarli/Shaarli\n\n\nThis is a community fork of the original \nShaarli\n project by \nS\u00e9bastien Sauvage\n.\n\n\nThe original project is currently unmaintained, and the developer \nhas informed us\n\nthat he would have no time to work on Shaarli in the near future.\nThe Shaarli community has carried on the work to provide\n\nmany patches\n\nfor \nbug fixes and enhancements\n\nin this repository, and will keep maintaining the project for the foreseeable future, while keeping Shaarli simple and efficient.\n\n\nContributing\n\n\nIf you'd like to help, please:\n- have a look at the open \nissues\n\nand \npull requests\n\n- feel free to report bugs (feedback is much appreciated)\n- suggest new features and improvements to both code and \ndocumentation\n\n- propose solutions to existing problems\n- submit pull requests :-)\n\n\nLicense\n\n\nShaarli is \nFree Software\n. See \nCOPYING\n for a detail of the contributors and licenses for each individual component.",
"title": "Home"
},
+ {
+ "location": "/#shaarli-documentation",
+ "text": "Here you can find some info on how to use, configure, tweak and solve problems with your Shaarli. For general info, read the README . If you have any questions or ideas, please join the chat (also reachable via IRC ), post them in our general discussion or read the current issues .\nIf you've found a bug, please create a new issue . If you would like a feature added to Shaarli, check the issues labeled feature , enhancement , and plugin . Note: This documentation is available online at https://shaarli.readthedocs.io/, and locally in the doc/html/ directory of your Shaarli installation.",
+ "title": "Shaarli documentation"
+ },
+ {
+ "location": "/#demo",
+ "text": "You can use this public demo instance of Shaarli .\nIt runs the latest development version of Shaarli and is updated/reset daily. Login: demo ; Password: demo",
+ "title": "Demo"
+ },
+ {
+ "location": "/#features",
+ "text": "",
+ "title": "Features"
+ },
+ {
+ "location": "/#interface",
+ "text": "minimalist design (simple is beautiful) FAST ATOM and RSS feeds views: paginated link list tag cloud picture wall: image and video thumbnails daily: newspaper-like daily digest daily RSS feed permalinks for easy reference links can be public or private extensible through plugins",
+ "title": "Interface"
+ },
+ {
+ "location": "/#tag-view-and-search-your-links",
+ "text": "add a custom title and description to archived links add tags to classify and search links features tag autocompletion, renaming, merging and deletion full-text and tag search",
+ "title": "Tag, view and search your links!"
+ },
+ {
+ "location": "/#easy-setup",
+ "text": "dead-simple installation: drop the files, open the page links are stored in a file compact storage no database required easy backup: simply copy the datastore file import and export links as Netscape bookmarks",
+ "title": "Easy setup"
+ },
+ {
+ "location": "/#accessibility",
+ "text": "Firefox bookmarlet to share links in one click support for mobile browsers works with Javascript disabled easy page customization through HTML/CSS/RainTPL",
+ "title": "Accessibility"
+ },
+ {
+ "location": "/#security",
+ "text": "bruteforce-proof login form protected against XSRF \nand session cookie hijacking",
+ "title": "Security"
+ },
+ {
+ "location": "/#goodies",
+ "text": "thumbnail generation for images and video services:\ndailymotion, flickr, imageshack, imgur, vimeo, xkcd, youtube... lazy-loading with bLazy PubSubHubbub protocol support URL cleanup: automatic removal of ?utm_source=... , fb=... discreet pop-up notification when a new release is available",
+ "title": "Goodies"
+ },
+ {
+ "location": "/#rest-api",
+ "text": "Easily extensible by any client using the REST API exposed by Shaarli. See the API documentation .",
+ "title": "REST API"
+ },
+ {
+ "location": "/#other-usages",
+ "text": "Though Shaarli is primarily a bookmarking application, it can serve other purposes\n(see usage examples ):\n- micro-blogging\n- pastebin\n- online notepad\n- snippet archive",
+ "title": "Other usages"
+ },
+ {
+ "location": "/#about",
+ "text": "",
+ "title": "About"
+ },
+ {
+ "location": "/#shaarli-community-fork",
+ "text": "This friendly fork is maintained by the Shaarli community at https://github.com/shaarli/Shaarli This is a community fork of the original Shaarli project by S\u00e9bastien Sauvage . The original project is currently unmaintained, and the developer has informed us \nthat he would have no time to work on Shaarli in the near future.\nThe Shaarli community has carried on the work to provide many patches \nfor bug fixes and enhancements \nin this repository, and will keep maintaining the project for the foreseeable future, while keeping Shaarli simple and efficient.",
+ "title": "Shaarli community fork"
+ },
+ {
+ "location": "/#contributing",
+ "text": "If you'd like to help, please:\n- have a look at the open issues \nand pull requests \n- feel free to report bugs (feedback is much appreciated)\n- suggest new features and improvements to both code and documentation \n- propose solutions to existing problems\n- submit pull requests :-)",
+ "title": "Contributing"
+ },
+ {
+ "location": "/#license",
+ "text": "Shaarli is Free Software . See COPYING for a detail of the contributors and licenses for each individual component.",
+ "title": "License"
+ },
{
"location": "/Download-and-Installation/",
"text": "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 \nserver\n is properly \nconfigured\n.\n\n\nSeveral releases are available:\n\n\n\n\nLatest release (recommended)\n\n\nDownload as an archive\n\n\nGet the latest released version from the \nreleases\n page.\n\n\nDownload our \nshaarli-full\n archive\n to include dependencies.\n\n\nThe current latest released version is \nv0.8.4\n\n\nOr in command lines:\n\n\n$ wget https://github.com/shaarli/Shaarli/releases/download/v0.8.4/shaarli-v0.8.4-full.zip\n$ unzip shaarli-v0.8.4-full.zip\n$ mv Shaarli /path/to/shaarli/\n\n\n\n\n\n\n\n\n\n\n!\n\n\nIn most cases, download Shaarli from the \nreleases\n page. Cloning using \ngit\n or downloading Github branches as zip files requires additional steps (see below).\n\n\n\n\n\n\n\n\n\n\nUsing git\n\n\nmkdir -p /path/to/shaarli && cd /path/to/shaarli/\ngit clone -b v0.8 https://github.com/shaarli/Shaarli.git .\ncomposer install --no-dev\n\n\n\n\n\n\nStable version\n\n\nThe stable version has been experienced by Shaarli users, and will receive security updates.\n\n\nDownload as an archive\n\n\nAs a .zip archive:\n\n\n$ wget https://github.com/shaarli/Shaarli/archive/stable.zip\n$ unzip stable.zip\n$ mv Shaarli-stable /path/to/shaarli/\n\n\n\n\nAs a .tar.gz archive :\n\n\n$ wget https://github.com/shaarli/Shaarli/archive/stable.tar.gz\n$ tar xvf stable.tar.gz\n$ mv Shaarli-stable /path/to/shaarli/\n\n\n\n\nClone with Git\n\n\nComposer\n is required to build a functional Shaarli installation when pulling from git.\n\n\n$ git clone https://github.com/shaarli/Shaarli.git -b stable /path/to/shaarli/\n# install/update third-party dependencies\n$ cd /path/to/shaarli/\n$ composer install --no-dev\n\n\n\n\n\n\nDevelopment version (mainline)\n\n\nUse at your own risk!\n\n\nTo get the latest changes from the \nmaster\n branch:\n\n\n# clone the repository \n$ git clone https://github.com/shaarli/Shaarli.git -b master /path/to/shaarli/\n# install/update third-party dependencies\n$ cd /path/to/shaarli\n$ composer install --no-dev\n\n\n\n\n\n\nFinish Installation\n\n\nOnce Shaarli is downloaded and files have been placed at the correct location, open it this location your favorite browser.\n\n\n\n\nSetup your Shaarli installation, and it's ready to use!\n\n\n\n\nUpdating Shaarli\n\n\nSee \nUpgrade and Migration",
@@ -1177,12 +1252,12 @@
},
{
"location": "/Release-Shaarli/",
- "text": "See \nGit - Maintaining a project - Tagging your \nreleases\n.\n\n\nPrerequisites\n\n\nThis guide assumes that you have:\n- a GPG key matching your GitHub authentication credentials\n - i.e., the email address identified by the GPG key is the same as the one in your \n~/.gitconfig\n \n- a GitHub fork of Shaarli\n- a local clone of your Shaarli fork, with the following remotes:\n - \norigin\n pointing to your GitHub fork\n - \nupstream\n pointing to the main Shaarli repository\n- maintainer permissions on the main Shaarli repository, to:\n - push the signed tag\n - create a new release\n- \nComposer\n and \nPandoc\n need to be installed\n\n\nGitHub release draft and \nCHANGELOG.md\n\n\nSee http://keepachangelog.com/en/0.3.0/ for changelog formatting.\n\n\nGitHub release draft\n\n\nGitHub allows drafting the release note for the upcoming release, from the \nReleases\n page. This way, the release note can be drafted while contributions are merged to \nmaster\n.\n\n\nCHANGELOG.md\n\n\nThis file should contain the same information as the release note draft for the upcoming version.\n\n\nUpdate it to:\n- add new entries (additions, fixes, etc.)\n- mark the current version as released by setting its date and link\n- add a new section for the future unreleased version\n\n\n$ cd /path/to/shaarli\n\n$ nano CHANGELOG.md\n\n[...]\n## vA.B.C - UNRELEASED\nTBA\n\n## [vX.Y.Z](https://github.com/shaarli/Shaarli/releases/tag/vX.Y.Z) - YYYY-MM-DD\n[...]\n\n\n\n\nIncrement the version code, updated docs, create and push a signed tag\n\n\nGenerate documentation\n\n\n$ cd /path/to/shaarli\n\n# create a new branch\n$ git fetch upstream\n$ git checkout upstream/master -b v0.5.0\n\n# rebuild the documentation from the wiki\n$ make htmldoc\n\n# commit the changes\n$ git add doc\n$ git commit -s -m \"Generate documentation for v0.5.0\"\n\n# push the commit on your GitHub fork\n$ git push origin v0.5.0\n\n\n\n\nCreate and merge a Pull Request\n\n\nThis one is pretty straightforward ;-)\n\n\nBump Shaarli version to v0.x branch\n\n\n$ git checkout master\n$ git fetch upstream\n$ git pull upstream master\n\n# IF the branch doesn't exists\n$ git checkout -b v0.5\n# OR if the branch already exists\n$ git checkout v0.5\n$ git rebase upstream/master\n\n# Bump shaarli version from dev to 0.5.0, **without the `v`**\n$ vim shaarli_version.php\n$ git add shaarli_version\n$ git commit -s -m \"Bump Shaarli version to v0.5.0\"\n$ git push upstream v0.5\n\n\n\n\nCreate and push a signed tag\n\n\n# update your local copy\n$ git checkout v0.5\n$ git fetch upstream\n$ git pull upstream v0.5\n\n# create a signed tag\n$ git tag -s -m \"Release v0.5.0\" v0.5.0\n\n# push it to \"upstream\"\n$ git push --tags upstream\n\n\n\n\nVerify a signed tag\n\n\nv0.5.0\n is the first GPG-signed tag pushed on the Community Shaarli.\n\n\nLet's have a look at its signature!\n\n\n$ cd /path/to/shaarli\n$ git fetch upstream\n\n# get the SHA1 reference of the tag\n$ git show-ref tags/v0.5.0\nf7762cf803f03f5caf4b8078359a63783d0090c1 refs/tags/v0.5.0\n\n# verify the tag signature information\n$ git verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1\ngpg: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F\ngpg: Good signature from \"VirtualTam \" [ultimate]\n\n\n\n\nPublish the GitHub release\n\n\nUpdate release badges\n\n\nUpdate \nREADME.md\n so version badges display and point to the newly released Shaarli version(s), in the \nmaster\n branch.\n\n\nCreate a GitHub release from a Git tag\n\n\nFrom the previously drafted release:\n- edit the release notes (if needed)\n- specify the appropriate Git tag\n- publish the release\n- profit!\n\n\nGenerate and upload all-in-one release archives\n\n\nUsers with a shared hosting may have:\n- no SSH access\n- no possibility to install PHP packages or server extensions\n- no possibility to run scripts\n\n\nTo ease Shaarli installations, it is possible to generate and upload additional release archives,\nthat will contain Shaarli code plus all required third-party libraries.\n\n\nFrom the \nv0.5\n branch:\n\n\n$ make release_archive\n\n\n\n\nThis will create the following archives:\n- \nshaarli-vX.Y.Z-full.tar\n\n- \nshaarli-vX.Y.Z-full.zip\n\n\nThe archives need to be manually uploaded on the previously created GitHub release.\n\n\nUpdate \nstable\n and \nlatest\n branches\n\n\n$ git checkout latest\n# latest release\n$ git merge v0.5.0\n# fix eventual conflicts\n$ make test\n$ git push upstream latest\n$ git checkout stable\n# latest previous major\n$ git merge v0.4.5 \n# fix eventual conflicts\n$ make test\n$ git push upstream stable",
+ "text": "See \nGit - Maintaining a project - Tagging your \nreleases\n.\n\n\nPrerequisites\n\n\nThis guide assumes that you have:\n- a GPG key matching your GitHub authentication credentials\n - i.e., the email address identified by the GPG key is the same as the one in your \n~/.gitconfig\n \n- a GitHub fork of Shaarli\n- a local clone of your Shaarli fork, with the following remotes:\n - \norigin\n pointing to your GitHub fork\n - \nupstream\n pointing to the main Shaarli repository\n- maintainer permissions on the main Shaarli repository, to:\n - push the signed tag\n - create a new release\n- \nComposer\n needs to be installed\n- The \nvenv\n Python 3 module needs to be installed for HTML documentation generation.\n\n\nGitHub release draft and \nCHANGELOG.md\n\n\nSee http://keepachangelog.com/en/0.3.0/ for changelog formatting.\n\n\nGitHub release draft\n\n\nGitHub allows drafting the release note for the upcoming release, from the \nReleases\n page. This way, the release note can be drafted while contributions are merged to \nmaster\n.\n\n\nCHANGELOG.md\n\n\nThis file should contain the same information as the release note draft for the upcoming version.\n\n\nUpdate it to:\n- add new entries (additions, fixes, etc.)\n- mark the current version as released by setting its date and link\n- add a new section for the future unreleased version\n\n\n$ cd /path/to/shaarli\n\n$ nano CHANGELOG.md\n\n[...]\n## vA.B.C - UNRELEASED\nTBA\n\n## [vX.Y.Z](https://github.com/shaarli/Shaarli/releases/tag/vX.Y.Z) - YYYY-MM-DD\n[...]\n\n\n\n\nIncrement the version code, updated docs, create and push a signed tag\n\n\nGenerate documentation\n\n\n$ cd /path/to/shaarli\n\n# create a new branch\n$ git fetch upstream\n$ git checkout upstream/master -b v0.5.0\n\n# rebuild the HTML documentation from Markdown\n$ make htmlpages\n\n# commit the changes\n$ git add doc\n$ git commit -s -m \"Generate documentation for v0.5.0\"\n\n# push the commit on your GitHub fork\n$ git push origin v0.5.0\n\n\n\n\nCreate and merge a Pull Request\n\n\nThis one is pretty straightforward ;-)\n\n\nBump Shaarli version to v0.x branch\n\n\n$ git checkout master\n$ git fetch upstream\n$ git pull upstream master\n\n# IF the branch doesn't exists\n$ git checkout -b v0.5\n# OR if the branch already exists\n$ git checkout v0.5\n$ git rebase upstream/master\n\n# Bump shaarli version from dev to 0.5.0, **without the `v`**\n$ vim shaarli_version.php\n$ git add shaarli_version\n$ git commit -s -m \"Bump Shaarli version to v0.5.0\"\n$ git push upstream v0.5\n\n\n\n\nCreate and push a signed tag\n\n\n# update your local copy\n$ git checkout v0.5\n$ git fetch upstream\n$ git pull upstream v0.5\n\n# create a signed tag\n$ git tag -s -m \"Release v0.5.0\" v0.5.0\n\n# push it to \"upstream\"\n$ git push --tags upstream\n\n\n\n\nVerify a signed tag\n\n\nv0.5.0\n is the first GPG-signed tag pushed on the Community Shaarli.\n\n\nLet's have a look at its signature!\n\n\n$ cd /path/to/shaarli\n$ git fetch upstream\n\n# get the SHA1 reference of the tag\n$ git show-ref tags/v0.5.0\nf7762cf803f03f5caf4b8078359a63783d0090c1 refs/tags/v0.5.0\n\n# verify the tag signature information\n$ git verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1\ngpg: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F\ngpg: Good signature from \"VirtualTam \" [ultimate]\n\n\n\n\nPublish the GitHub release\n\n\nUpdate release badges\n\n\nUpdate \nREADME.md\n so version badges display and point to the newly released Shaarli version(s), in the \nmaster\n branch.\n\n\nCreate a GitHub release from a Git tag\n\n\nFrom the previously drafted release:\n- edit the release notes (if needed)\n- specify the appropriate Git tag\n- publish the release\n- profit!\n\n\nGenerate and upload all-in-one release archives\n\n\nUsers with a shared hosting may have:\n- no SSH access\n- no possibility to install PHP packages or server extensions\n- no possibility to run scripts\n\n\nTo ease Shaarli installations, it is possible to generate and upload additional release archives,\nthat will contain Shaarli code plus all required third-party libraries.\n\n\nFrom the \nv0.5\n branch:\n\n\n$ make release_archive\n\n\n\n\nThis will create the following archives:\n- \nshaarli-vX.Y.Z-full.tar\n\n- \nshaarli-vX.Y.Z-full.zip\n\n\nThe archives need to be manually uploaded on the previously created GitHub release.\n\n\nUpdate \nstable\n and \nlatest\n branches\n\n\n$ git checkout latest\n# latest release\n$ git merge v0.5.0\n# fix eventual conflicts\n$ make test\n$ git push upstream latest\n$ git checkout stable\n# latest previous major\n$ git merge v0.4.5 \n# fix eventual conflicts\n$ make test\n$ git push upstream stable",
"title": "Release Shaarli"
},
{
"location": "/Release-Shaarli/#prerequisites",
- "text": "This guide assumes that you have:\n- a GPG key matching your GitHub authentication credentials\n - i.e., the email address identified by the GPG key is the same as the one in your ~/.gitconfig \n- a GitHub fork of Shaarli\n- a local clone of your Shaarli fork, with the following remotes:\n - origin pointing to your GitHub fork\n - upstream pointing to the main Shaarli repository\n- maintainer permissions on the main Shaarli repository, to:\n - push the signed tag\n - create a new release\n- Composer and Pandoc need to be installed",
+ "text": "This guide assumes that you have:\n- a GPG key matching your GitHub authentication credentials\n - i.e., the email address identified by the GPG key is the same as the one in your ~/.gitconfig \n- a GitHub fork of Shaarli\n- a local clone of your Shaarli fork, with the following remotes:\n - origin pointing to your GitHub fork\n - upstream pointing to the main Shaarli repository\n- maintainer permissions on the main Shaarli repository, to:\n - push the signed tag\n - create a new release\n- Composer needs to be installed\n- The venv Python 3 module needs to be installed for HTML documentation generation.",
"title": "Prerequisites"
},
{
@@ -1207,7 +1282,7 @@
},
{
"location": "/Release-Shaarli/#generate-documentation",
- "text": "$ cd /path/to/shaarli\n\n# create a new branch\n$ git fetch upstream\n$ git checkout upstream/master -b v0.5.0\n\n# rebuild the documentation from the wiki\n$ make htmldoc\n\n# commit the changes\n$ git add doc\n$ git commit -s -m \"Generate documentation for v0.5.0\"\n\n# push the commit on your GitHub fork\n$ git push origin v0.5.0",
+ "text": "$ cd /path/to/shaarli\n\n# create a new branch\n$ git fetch upstream\n$ git checkout upstream/master -b v0.5.0\n\n# rebuild the HTML documentation from Markdown\n$ make htmlpages\n\n# commit the changes\n$ git add doc\n$ git commit -s -m \"Generate documentation for v0.5.0\"\n\n# push the commit on your GitHub fork\n$ git push origin v0.5.0",
"title": "Generate documentation"
},
{
diff --git a/doc/html/sitemap.xml b/doc/html/sitemap.xml
index 2a1b009e..cbf35654 100644
--- a/doc/html/sitemap.xml
+++ b/doc/html/sitemap.xml
@@ -4,7 +4,7 @@
/
- 2017-06-18
+ 2017-07-04daily
@@ -13,43 +13,43 @@
/Download-and-Installation/
- 2017-06-18
+ 2017-07-04daily/Upgrade-and-migration/
- 2017-06-18
+ 2017-07-04daily/Server-requirements/
- 2017-06-18
+ 2017-07-04daily/Server-configuration/
- 2017-06-18
+ 2017-07-04daily/Server-security/
- 2017-06-18
+ 2017-07-04daily/Shaarli-configuration/
- 2017-06-18
+ 2017-07-04daily/Plugins/
- 2017-06-18
+ 2017-07-04daily
@@ -59,25 +59,25 @@
/Docker-101/
- 2017-06-18
+ 2017-07-04daily/Shaarli-images/
- 2017-06-18
+ 2017-07-04daily/Reverse-proxy-configuration/
- 2017-06-18
+ 2017-07-04daily/Docker-resources/
- 2017-06-18
+ 2017-07-04daily
@@ -87,37 +87,37 @@
/Features/
- 2017-06-18
+ 2017-07-04daily/Bookmarklet/
- 2017-06-18
+ 2017-07-04daily/Browsing-and-searching/
- 2017-06-18
+ 2017-07-04daily/Firefox-share/
- 2017-06-18
+ 2017-07-04daily/RSS-feeds/
- 2017-06-18
+ 2017-07-04daily/REST-API/
- 2017-06-18
+ 2017-07-04daily
@@ -127,13 +127,13 @@
/Backup,-restore,-import-and-export/
- 2017-06-18
+ 2017-07-04daily/Various-hacks/
- 2017-06-18
+ 2017-07-04daily
@@ -142,7 +142,7 @@
/Troubleshooting/
- 2017-06-18
+ 2017-07-04daily
@@ -151,79 +151,79 @@
/Development-guidelines/
- 2017-06-18
+ 2017-07-04daily/Continuous-integration-tools/
- 2017-06-18
+ 2017-07-04daily/GnuPG-signature/
- 2017-06-18
+ 2017-07-04daily/Coding-guidelines/
- 2017-06-18
+ 2017-07-04daily/Directory-structure/
- 2017-06-18
+ 2017-07-04daily/3rd-party-libraries/
- 2017-06-18
+ 2017-07-04daily/Plugin-System/
- 2017-06-18
+ 2017-07-04daily/Release-Shaarli/
- 2017-06-18
+ 2017-07-04daily/Versioning-and-Branches/
- 2017-06-18
+ 2017-07-04daily/Security/
- 2017-06-18
+ 2017-07-04daily/Static-analysis/
- 2017-06-18
+ 2017-07-04daily/Theming/
- 2017-06-18
+ 2017-07-04daily/Unit-tests/
- 2017-06-18
+ 2017-07-04daily
@@ -233,13 +233,13 @@
/FAQ/
- 2017-06-18
+ 2017-07-04daily/Community-&-Related-software/
- 2017-06-18
+ 2017-07-04daily
--
cgit v1.2.3
From 6d074b4c908d6ba10e0397302ed55ed07742313a Mon Sep 17 00:00:00 2001
From: nodiscc
Date: Thu, 20 Jul 2017 19:52:39 +0200
Subject: doc: fix bullet list formatting
https://shaarli.readthedocs.io/en/master/Shaarli-configuration/
---
doc/md/Shaarli-configuration.md | 2 ++
1 file changed, 2 insertions(+)
(limited to 'doc')
diff --git a/doc/md/Shaarli-configuration.md b/doc/md/Shaarli-configuration.md
index 933f5245..0c605459 100644
--- a/doc/md/Shaarli-configuration.md
+++ b/doc/md/Shaarli-configuration.md
@@ -11,6 +11,7 @@ Once your Shaarli instance is installed, the file `data/config.json.php` is gene
## File and directory permissions
The server process running Shaarli must have:
+
- `read` access to the following resources:
- PHP scripts: `index.php`, `application/*.php`, `plugins/*.php`
- 3rd party PHP and Javascript libraries: `inc/*.php`, `inc/*.js`
@@ -25,6 +26,7 @@ The server process running Shaarli must have:
- `tmp` - RainTPL page cache
On a Linux distribution:
+
- the web server user will likely be `www` or `http` (for Apache2)
- it will be a member of a group of the same name: `www:www`, `http:http`
- to give it access to Shaarli, either:
--
cgit v1.2.3
From 84d0632a2df1cf833610bc8dd45d4808e4a8dc0e Mon Sep 17 00:00:00 2001
From: VirtualTam
Date: Sat, 29 Jul 2017 15:26:27 +0200
Subject: docker: remove `dev` image, update documentation
Relates to https://github.com/shaarli/Shaarli/issues/843
Changed:
- Update Docker image list
- Update Docker documentation structure
Removed:
- Delete Dockerfile and resources for the `dev` image
- Cleanup `doc/` resources
Signed-off-by: VirtualTam
---
doc/Docker.md | 158 ---------------------------
doc/REST-API.md | 105 ------------------
doc/Versioning-and-Branches.md | 76 -------------
doc/_Sidebar.md | 39 -------
doc/md/Docker-101.md | 62 -----------
doc/md/Docker-resources.md | 19 ----
doc/md/Reverse-proxy-configuration.md | 6 -
doc/md/Shaarli-images.md | 72 ------------
doc/md/docker/docker-101.md | 62 +++++++++++
doc/md/docker/resources.md | 19 ++++
doc/md/docker/reverse-proxy-configuration.md | 6 +
doc/md/docker/shaarli-images.md | 71 ++++++++++++
12 files changed, 158 insertions(+), 537 deletions(-)
delete mode 100644 doc/Docker.md
delete mode 100644 doc/REST-API.md
delete mode 100644 doc/Versioning-and-Branches.md
delete mode 100644 doc/_Sidebar.md
delete mode 100644 doc/md/Docker-101.md
delete mode 100644 doc/md/Docker-resources.md
delete mode 100644 doc/md/Reverse-proxy-configuration.md
delete mode 100644 doc/md/Shaarli-images.md
create mode 100644 doc/md/docker/docker-101.md
create mode 100644 doc/md/docker/resources.md
create mode 100644 doc/md/docker/reverse-proxy-configuration.md
create mode 100644 doc/md/docker/shaarli-images.md
(limited to 'doc')
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 @@
-#Docker
-- [Docker usage](#docker-usage)[](.html)
-- [Get and run a Shaarli image](#get-and-run-a-shaarli-image)[](.html)
-- [Resources](#resources)[](.html)
-
-## Docker usage
-### Basics
-Install [Docker](https://www.docker.com/), by following the instructions relevant[](.html)
-to your OS / distribution, and start the service.
-
-#### Search an image on [DockerHub](https://hub.docker.com/)[](.html)
-
-```bash
-$ docker search debian
-
-NAME DESCRIPTION STARS OFFICIAL AUTOMATED
-ubuntu Ubuntu is a Debian-based Linux operating s... 2065 [OK][](.html)
-debian Debian is a Linux distribution that's comp... 603 [OK][](.html)
-google/debian 47 [OK][](.html)
-```
-
-#### Show available tags for a repository
-```bash
-$ curl https://index.docker.io/v1/repositories/debian/tags | python -m json.tool
-
-% Total % Received % Xferd Average Speed Time Time Time Current
-Dload Upload Total Spent Left Speed
-100 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433
-```
-
-Sample output:
-```json
-[[](.html)
- {
- "layer": "85a02782",
- "name": "stretch"
- },
- {
- "layer": "59abecbc",
- "name": "testing"
- },
- {
- "layer": "bf0fd686",
- "name": "unstable"
- },
- {
- "layer": "60c52dbe",
- "name": "wheezy"
- },
- {
- "layer": "c5b806fe",
- "name": "wheezy-backports"
- }
-]
-
-```
-
-#### Pull an image from DockerHub
-```bash
-$ docker pull repository[:tag][](.html)
-
-$ docker pull debian:wheezy
-wheezy: Pulling from debian
-4c8cbfd2973e: Pull complete
-60c52dbe9d91: Pull complete
-Digest: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe
-Status: Downloaded newer image for debian:wheezy
-```
-
-## Get and run a Shaarli image
-### DockerHub repository
-The images can be found in the [`shaarli/shaarli`](https://hub.docker.com/r/shaarli/shaarli/)[](.html)
-repository.
-
-### Available image tags
-- `latest`: master branch (tarball release)
-- `stable`: stable branch (tarball release)
-- `dev`: master branch (Git clone)
-
-All images rely on:
-- [Debian 8 Jessie](https://hub.docker.com/_/debian/)[](.html)
-- [PHP5-FPM](http://php-fpm.org/)[](.html)
-- [Nginx](http://nginx.org/)[](.html)
-
-### Download from DockerHub
-```bash
-$ docker pull shaarli/shaarli
-latest: Pulling from shaarli/shaarli
-32716d9fcddb: Pull complete
-84899d045435: Pull complete
-4b6ad7444763: Pull complete
-e0345ef7a3e0: Pull complete
-5c1dd344094f: Pull complete
-6422305a200b: Pull complete
-7d63f861dbef: Pull complete
-3eb97210645c: Pull complete
-869319d746ff: Already exists
-869319d746ff: Pulling fs layer
-902b87aaaec9: Already exists
-Digest: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98
-Status: Downloaded newer image for shaarli/shaarli:latest
-```
-
-### Create and start a new container from the image
-```bash
-# map the host's :8000 port to the container's :80 port
-$ docker create -p 8000:80 shaarli/shaarli
-d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
-
-# launch the container in the background
-$ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
-d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
-
-# list active containers
-$ docker ps
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo
-```
-
-### Stop and destroy a container
-```bash
-$ docker stop backstabbing_galileo # those docker guys are really rude to physicists!
-backstabbing_galileo
-
-# check the container is stopped
-$ docker ps
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-
-# list ALL containers
-$ docker ps -a
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo
-
-# destroy the container
-$ docker rm backstabbing_galileo # let's put an end to these barbarian practices
-backstabbing_galileo
-
-$ docker ps -a
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-```
-
-## Resources
-### Docker
-- [Interactive Docker training portal](https://www.katacoda.com/courses/docker/) on [Katakoda](https://www.katacoda.com/)[](.html)
-- [Where are Docker images stored?](http://blog.thoward37.me/articles/where-are-docker-images-stored/)[](.html)
-- [Dockerfile reference](https://docs.docker.com/reference/builder/)[](.html)
-- [Dockerfile best practices](https://docs.docker.com/articles/dockerfile_best-practices/)[](.html)
-- [Volumes](https://docs.docker.com/userguide/dockervolumes/)[](.html)
-
-### DockerHub
-- [Repositories](https://docs.docker.com/userguide/dockerrepos/)[](.html)
-- [Teams and organizations](https://docs.docker.com/docker-hub/orgs/)[](.html)
-- [GitHub automated build](https://docs.docker.com/docker-hub/github/)[](.html)
-
-### Service management
-- [Using supervisord](https://docs.docker.com/articles/using_supervisord/)[](.html)
-- [Nginx in the foreground](http://nginx.org/en/docs/ngx_core_module.html#daemon)[](.html)
-- [supervisord](http://supervisord.org/)[](.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 @@
-#REST API
-## Usage
-
-See the [REST API documentation](http://shaarli.github.io/api-documentation/).[](.html)
-
-## Authentication
-
-All requests to Shaarli's API must include a JWT token to verify their authenticity.
-
-This token has to be included as an HTTP header called `Authentication: Bearer `.
-
-JWT resources :
-
- * [jwt.io](https://jwt.io) (including a list of client per language).[](.html)
- * RFC : https://tools.ietf.org/html/rfc7519
- * https://float-middle.com/json-web-tokens-jwt-vs-sessions/
- * HackerNews thread: https://news.ycombinator.com/item?id=11929267
-
-
-### Shaarli JWT Token
-
-JWT tokens are composed by three parts, separated by a dot `.` and encoded in base64:
-
-```
-[header].[payload].[signature][](.html)
-```
-
-#### Header
-
-Shaarli only allow one hash algorithm, so the header will always be the same:
-
-```json
-{
- "typ": "JWT",
- "alg": "HS512"
-}
-```
-
-Encoded in base64, it gives:
-
-```
-ewogICAgICAgICJ0eXAiOiAiSldUIiwKICAgICAgICAiYWxnIjogIkhTNTEyIgogICAgfQ==
-```
-
-#### Payload
-
-**Validity duration**
-
-To 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.
-
-```json
-{
- "iat": 1468663519
-}
-```
-
-See [RFC reference](https://tools.ietf.org/html/rfc7519#section-4.1.6).[](.html)
-
-
-#### Signature
-
-The 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.
-
-Signature example with PHP:
-
-```php
-$content = base64_encode($header) . '.' . base64_encode($payload);
-$signature = hash_hmac('sha512', $content, $secret);
-```
-
-
-### Complete example
-
-#### PHP
-
-```php
-function generateToken($secret) {
- $header = base64_encode('{
- "typ": "JWT",
- "alg": "HS512"
- }');
- $payload = base64_encode('{
- "iat": '. time() .'
- }');
- $signature = hash_hmac('sha512', $header .'.'. $payload , $secret);
- return $header .'.'. $payload .'.'. $signature;
-}
-
-$secret = 'mysecret';
-$token = generateToken($secret);
-echo $token;
-```
-
-> `ewogICAgICAgICJ0eXAiOiAiSldUIiwKICAgICAgICAiYWxnIjogIkhTNTEyIgogICAgfQ==.ewogICAgICAgICJpYXQiOiAxNDY4NjY3MDQ3CiAgICB9.1d2c54fa947daf594fdbf7591796195652c8bc63bffad7f6a6db2a41c313f495a542cbfb595acade79e83f3810d709b4251d7b940bbc10b531a6e6134af63a68`
-
-```php
-$options = [[](.html)
- 'http' => [[](.html)
- 'method' => 'GET',
- 'jwt' => $token,
- ],
-];
-$context = stream_context_create($options);
-file_get_contents($apiEndpoint, false, $context);
-```
diff --git a/doc/Versioning-and-Branches.md b/doc/Versioning-and-Branches.md
deleted file mode 100644
index bbc7719e..00000000
--- a/doc/Versioning-and-Branches.md
+++ /dev/null
@@ -1,76 +0,0 @@
-#Versioning and Branches
-[**WORK IN PROGRESS**][](.html)
-
-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.
-
-## `master` branch
-
-The `master` branch is the development branch. Any new change MUST go through this branch using Pull Requests.
-
-Remarks:
-
- * This branch shouldn't be used for production as it isn't necessary stable.
- * 3rd party aren't required to be compatible with the latest changes.
- * Official plugins, themes and libraries (contained within Shaarli organization repos) must be compatible with the master branch.
- * The version in this branch is always `dev`.
-
-## `v0.x` branch
-
-This `v0.x` branch, points to the latest `v0.x.y` release.
-
-Explanation:
-
-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.
-
-In this case, the issue is fixed in the `master` branch, and the fix is backported the to the `v0.x` branch. Then a new release is made from the `v0.x` branch.
-
-This workflow allow us to fix any major bug detected, without having to release bleeding edge feature too soon.
-
-## `latest` branch
-
-This branch point the latest release. It recommended to use it to get the latest tested changes.
-
-## `stable` branch
-
-The `stable` branch doesn't contain any major bug, and is one major digit version behind the latest release.
-
-For example, the current latest release is `v0.8.3`, the stable branch is an alias to the latest `v0.7.x` release. When the `v0.9.0` version will be released, the stable will move to the latest `v0.8.x` release.
-
-Remarks:
-
- * Shaarli release pace isn't fast, and the stable branch might be a few months behind the latest release.
-
-## Releases
-
-Releases are always made from the latest `v0.x` branch.
-
-Note that for every release, we manually generate a tarball which contains all Shaarli dependencies, making Shaarli's installation only one step.
-
-## Advices on 3rd party git repos workflow
-
-### Versioning
-
-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 [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)
-
- - 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.
- - use your own versioning scheme, and state Shaarli compatibility in the release description.
-
-Using this, any user will be able to pick the release matching his own Shaarli version.
-
-### Major bugfix backport releases
-
-To be able to support backported fixes, it recommended to use our workflow:
-
-```bash
-# In master, fix the major bug
-git commit -m "Katastrophe"
-git push origin master
-# Get your commit hash
-git log --format="%H" -n 1
-# Create a new branch from your latest release, let's say v0.8.2-1 (the tag name)
-git checkout -b katastrophe v0.8.2-1
-# Backport the fix commit to your brand new branch
-git cherry-pick
-git push origin katastrophe
-# Then you just have to make a new release from the `katastrophe` branch tagged `v0.8.3-1`
-```
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 @@
-#_Sidebar
-- [Home](Home.html)
-- Setup
- - [Download and Installation](Download-and-Installation.html)
- - [Upgrade and migration](Upgrade-and-migration.html)
- - [Server requirements](Server-requirements.html)
- - [Server configuration](Server-configuration.html)
- - [Server security](Server-security.html)
- - [Shaarli configuration](Shaarli-configuration.html)
- - [Plugins](Plugins.html)
-- [Docker](Docker.html)
-- [Usage](Usage.html)
- - [Sharing button](Sharing-button.html) (bookmarklet)
- - [Browsing and Searching](Browsing-and-Searching.html)
- - [Firefox share](Firefox-share.html)
- - [RSS feeds](RSS-feeds.html)
- - [REST API](REST-API.html)
-- How To
- - [Backup, restore, import and export](Backup,-restore,-import-and-export.html)
- - [Copy an existing installation over SSH and serve it locally](Copy-an-existing-installation-over-SSH-and-serve-it-locally.html)
- - [Create and serve multiple Shaarlis (farm)](Create-and-serve-multiple-Shaarlis-(farm).html)
- - [Download CSS styles from an OPML list](Download-CSS-styles-from-an-OPML-list.html)
- - [Datastore hacks](Datastore-hacks.html)
-- [Troubleshooting](Troubleshooting.html)
-- [Development](Development.html)
- - [GnuPG signature](GnuPG-signature.html)
- - [Coding guidelines](Coding-guidelines.html)
- - [Directory structure](Directory-structure.html)
- - [3rd party libraries](3rd-party-libraries.html)
- - [Plugin System](Plugin-System.html)
- - [Release Shaarli](Release-Shaarli.html)
- - [Versioning and Branches](Versioning-and-Branches.html)
- - [Security](Security.html)
- - [Static analysis](Static-analysis.html)
- - [Theming](Theming.html)
- - [Unit tests](Unit-tests.html)
-- About
- - [FAQ](FAQ.html)
- - [Community & Related software](Community-&-Related-software.html)
diff --git a/doc/md/Docker-101.md b/doc/md/Docker-101.md
deleted file mode 100644
index b02dd149..00000000
--- a/doc/md/Docker-101.md
+++ /dev/null
@@ -1,62 +0,0 @@
-## Basics
-Install [Docker](https://www.docker.com/), by following the instructions relevant
-to your OS / distribution, and start the service.
-
-### Search an image on [DockerHub](https://hub.docker.com/)
-
-```bash
-$ docker search debian
-
-NAME DESCRIPTION STARS OFFICIAL AUTOMATED
-ubuntu Ubuntu is a Debian-based Linux operating s... 2065 [OK]
-debian Debian is a Linux distribution that's comp... 603 [OK]
-google/debian 47 [OK]
-```
-
-### Show available tags for a repository
-```bash
-$ curl https://index.docker.io/v1/repositories/debian/tags | python -m json.tool
-
-% Total % Received % Xferd Average Speed Time Time Time Current
-Dload Upload Total Spent Left Speed
-100 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433
-```
-
-Sample output:
-```json
-[
- {
- "layer": "85a02782",
- "name": "stretch"
- },
- {
- "layer": "59abecbc",
- "name": "testing"
- },
- {
- "layer": "bf0fd686",
- "name": "unstable"
- },
- {
- "layer": "60c52dbe",
- "name": "wheezy"
- },
- {
- "layer": "c5b806fe",
- "name": "wheezy-backports"
- }
-]
-
-```
-
-### Pull an image from DockerHub
-```bash
-$ docker pull repository[:tag]
-
-$ docker pull debian:wheezy
-wheezy: Pulling from debian
-4c8cbfd2973e: Pull complete
-60c52dbe9d91: Pull complete
-Digest: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe
-Status: Downloaded newer image for debian:wheezy
-```
diff --git a/doc/md/Docker-resources.md b/doc/md/Docker-resources.md
deleted file mode 100644
index 082d4a46..00000000
--- a/doc/md/Docker-resources.md
+++ /dev/null
@@ -1,19 +0,0 @@
-### Docker
-
-- [Interactive Docker training portal](https://www.katacoda.com/courses/docker/) on [Katakoda](https://www.katacoda.com/)
-- [Where are Docker images stored?](http://blog.thoward37.me/articles/where-are-docker-images-stored/)
-- [Dockerfile reference](https://docs.docker.com/reference/builder/)
-- [Dockerfile best practices](https://docs.docker.com/articles/dockerfile_best-practices/)
-- [Volumes](https://docs.docker.com/userguide/dockervolumes/)
-
-### DockerHub
-
-- [Repositories](https://docs.docker.com/userguide/dockerrepos/)
-- [Teams and organizations](https://docs.docker.com/docker-hub/orgs/)
-- [GitHub automated build](https://docs.docker.com/docker-hub/github/)
-
-### Service management
-
-- [Using supervisord](https://docs.docker.com/articles/using_supervisord/)
-- [Nginx in the foreground](http://nginx.org/en/docs/ngx_core_module.html#daemon)
-- [supervisord](http://supervisord.org/)
diff --git a/doc/md/Reverse-proxy-configuration.md b/doc/md/Reverse-proxy-configuration.md
deleted file mode 100644
index 91ffecff..00000000
--- a/doc/md/Reverse-proxy-configuration.md
+++ /dev/null
@@ -1,6 +0,0 @@
-
-TODO, see https://github.com/shaarli/Shaarli/issues/888
-
-## HAProxy
-
-## Nginx
diff --git a/doc/md/Shaarli-images.md b/doc/md/Shaarli-images.md
deleted file mode 100644
index 25f6cfdd..00000000
--- a/doc/md/Shaarli-images.md
+++ /dev/null
@@ -1,72 +0,0 @@
-## Get and run a Shaarli image
-
-### DockerHub repository
-The images can be found in the [`shaarli/shaarli`](https://hub.docker.com/r/shaarli/shaarli/)
-repository.
-
-### Available image tags
-- `latest`: master branch (tarball release)
-- `stable`: stable branch (tarball release)
-- `dev`: master branch (Git clone)
-
-All images rely on:
-- [Debian 8 Jessie](https://hub.docker.com/_/debian/)
-- [PHP5-FPM](http://php-fpm.org/)
-- [Nginx](http://nginx.org/)
-
-### Download from DockerHub
-```bash
-$ docker pull shaarli/shaarli
-latest: Pulling from shaarli/shaarli
-32716d9fcddb: Pull complete
-84899d045435: Pull complete
-4b6ad7444763: Pull complete
-e0345ef7a3e0: Pull complete
-5c1dd344094f: Pull complete
-6422305a200b: Pull complete
-7d63f861dbef: Pull complete
-3eb97210645c: Pull complete
-869319d746ff: Already exists
-869319d746ff: Pulling fs layer
-902b87aaaec9: Already exists
-Digest: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98
-Status: Downloaded newer image for shaarli/shaarli:latest
-```
-
-### Create and start a new container from the image
-```bash
-# map the host's :8000 port to the container's :80 port
-$ docker create -p 8000:80 shaarli/shaarli
-d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
-
-# launch the container in the background
-$ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
-d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
-
-# list active containers
-$ docker ps
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo
-```
-
-### Stop and destroy a container
-```bash
-$ docker stop backstabbing_galileo # those docker guys are really rude to physicists!
-backstabbing_galileo
-
-# check the container is stopped
-$ docker ps
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-
-# list ALL containers
-$ docker ps -a
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo
-
-# destroy the container
-$ docker rm backstabbing_galileo # let's put an end to these barbarian practices
-backstabbing_galileo
-
-$ docker ps -a
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-```
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 @@
+## Basics
+Install [Docker](https://www.docker.com/), by following the instructions relevant
+to your OS / distribution, and start the service.
+
+### Search an image on [DockerHub](https://hub.docker.com/)
+
+```bash
+$ docker search debian
+
+NAME DESCRIPTION STARS OFFICIAL AUTOMATED
+ubuntu Ubuntu is a Debian-based Linux operating s... 2065 [OK]
+debian Debian is a Linux distribution that's comp... 603 [OK]
+google/debian 47 [OK]
+```
+
+### Show available tags for a repository
+```bash
+$ curl https://index.docker.io/v1/repositories/debian/tags | python -m json.tool
+
+% Total % Received % Xferd Average Speed Time Time Time Current
+Dload Upload Total Spent Left Speed
+100 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433
+```
+
+Sample output:
+```json
+[
+ {
+ "layer": "85a02782",
+ "name": "stretch"
+ },
+ {
+ "layer": "59abecbc",
+ "name": "testing"
+ },
+ {
+ "layer": "bf0fd686",
+ "name": "unstable"
+ },
+ {
+ "layer": "60c52dbe",
+ "name": "wheezy"
+ },
+ {
+ "layer": "c5b806fe",
+ "name": "wheezy-backports"
+ }
+]
+
+```
+
+### Pull an image from DockerHub
+```bash
+$ docker pull repository[:tag]
+
+$ docker pull debian:wheezy
+wheezy: Pulling from debian
+4c8cbfd2973e: Pull complete
+60c52dbe9d91: Pull complete
+Digest: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe
+Status: Downloaded newer image for debian:wheezy
+```
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 @@
+### Docker
+
+- [Interactive Docker training portal](https://www.katacoda.com/courses/docker/) on [Katakoda](https://www.katacoda.com/)
+- [Where are Docker images stored?](http://blog.thoward37.me/articles/where-are-docker-images-stored/)
+- [Dockerfile reference](https://docs.docker.com/reference/builder/)
+- [Dockerfile best practices](https://docs.docker.com/articles/dockerfile_best-practices/)
+- [Volumes](https://docs.docker.com/userguide/dockervolumes/)
+
+### DockerHub
+
+- [Repositories](https://docs.docker.com/userguide/dockerrepos/)
+- [Teams and organizations](https://docs.docker.com/docker-hub/orgs/)
+- [GitHub automated build](https://docs.docker.com/docker-hub/github/)
+
+### Service management
+
+- [Using supervisord](https://docs.docker.com/articles/using_supervisord/)
+- [Nginx in the foreground](http://nginx.org/en/docs/ngx_core_module.html#daemon)
+- [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 @@
+
+TODO, see https://github.com/shaarli/Shaarli/issues/888
+
+## HAProxy
+
+## 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 @@
+## Get and run a Shaarli image
+
+### DockerHub repository
+The images can be found in the [`shaarli/shaarli`](https://hub.docker.com/r/shaarli/shaarli/)
+repository.
+
+### Available image tags
+- `latest`: master branch (tarball release)
+- `stable`: stable branch (tarball release)
+
+All images rely on:
+- [Debian 8 Jessie](https://hub.docker.com/_/debian/)
+- [PHP5-FPM](http://php-fpm.org/)
+- [Nginx](http://nginx.org/)
+
+### Download from DockerHub
+```bash
+$ docker pull shaarli/shaarli
+latest: Pulling from shaarli/shaarli
+32716d9fcddb: Pull complete
+84899d045435: Pull complete
+4b6ad7444763: Pull complete
+e0345ef7a3e0: Pull complete
+5c1dd344094f: Pull complete
+6422305a200b: Pull complete
+7d63f861dbef: Pull complete
+3eb97210645c: Pull complete
+869319d746ff: Already exists
+869319d746ff: Pulling fs layer
+902b87aaaec9: Already exists
+Digest: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98
+Status: Downloaded newer image for shaarli/shaarli:latest
+```
+
+### Create and start a new container from the image
+```bash
+# map the host's :8000 port to the container's :80 port
+$ docker create -p 8000:80 shaarli/shaarli
+d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
+
+# launch the container in the background
+$ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
+d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
+
+# list active containers
+$ docker ps
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo
+```
+
+### Stop and destroy a container
+```bash
+$ docker stop backstabbing_galileo # those docker guys are really rude to physicists!
+backstabbing_galileo
+
+# check the container is stopped
+$ docker ps
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+
+# list ALL containers
+$ docker ps -a
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo
+
+# destroy the container
+$ docker rm backstabbing_galileo # let's put an end to these barbarian practices
+backstabbing_galileo
+
+$ docker ps -a
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+```
--
cgit v1.2.3
From 3a6f91a9ccbdd8f2ed8e33c88c7800f2623cfd3a Mon Sep 17 00:00:00 2001
From: VirtualTam
Date: Sat, 29 Jul 2017 15:29:54 +0200
Subject: Generate HTML documentation
Signed-off-by: VirtualTam
---
doc/html/3rd-party-libraries/index.html | 8 +-
.../Backup,-restore,-import-and-export/index.html | 8 +-
doc/html/Bookmarklet/index.html | 8 +-
doc/html/Browsing-and-searching/index.html | 8 +-
doc/html/Coding-guidelines/index.html | 8 +-
doc/html/Community-&-Related-software/index.html | 8 +-
doc/html/Continuous-integration-tools/index.html | 8 +-
doc/html/Development-guidelines/index.html | 8 +-
doc/html/Directory-structure/index.html | 8 +-
doc/html/Docker-101/index.html | 398 --------------------
doc/html/Docker-resources/index.html | 358 ------------------
doc/html/Download-and-Installation/index.html | 8 +-
doc/html/FAQ/index.html | 8 +-
doc/html/Features/index.html | 12 +-
doc/html/Firefox-share/index.html | 8 +-
doc/html/GnuPG-signature/index.html | 8 +-
doc/html/Plugin-System/index.html | 8 +-
doc/html/Plugins/index.html | 12 +-
doc/html/REST-API/index.html | 8 +-
doc/html/RSS-feeds/index.html | 8 +-
doc/html/Release-Shaarli/index.html | 8 +-
doc/html/Reverse-proxy-configuration/index.html | 338 -----------------
doc/html/Security/index.html | 8 +-
doc/html/Server-configuration/index.html | 8 +-
doc/html/Server-requirements/index.html | 8 +-
doc/html/Server-security/index.html | 8 +-
doc/html/Shaarli-configuration/index.html | 60 +--
doc/html/Shaarli-images/index.html | 413 ---------------------
doc/html/Static-analysis/index.html | 8 +-
doc/html/Theming/index.html | 8 +-
doc/html/Troubleshooting/index.html | 8 +-
doc/html/Unit-tests/index.html | 8 +-
doc/html/Upgrade-and-migration/index.html | 8 +-
doc/html/Various-hacks/index.html | 8 +-
doc/html/Versioning-and-Branches/index.html | 8 +-
doc/html/docker/docker-101/index.html | 398 ++++++++++++++++++++
doc/html/docker/resources/index.html | 358 ++++++++++++++++++
.../docker/reverse-proxy-configuration/index.html | 338 +++++++++++++++++
doc/html/docker/shaarli-images/index.html | 412 ++++++++++++++++++++
doc/html/index.html | 10 +-
doc/html/mkdocs/search_index.json | 46 +--
doc/html/search.html | 8 +-
doc/html/sitemap.xml | 80 ++--
43 files changed, 1738 insertions(+), 1727 deletions(-)
delete mode 100644 doc/html/Docker-101/index.html
delete mode 100644 doc/html/Docker-resources/index.html
delete mode 100644 doc/html/Reverse-proxy-configuration/index.html
delete mode 100644 doc/html/Shaarli-images/index.html
create mode 100644 doc/html/docker/docker-101/index.html
create mode 100644 doc/html/docker/resources/index.html
create mode 100644 doc/html/docker/reverse-proxy-configuration/index.html
create mode 100644 doc/html/docker/shaarli-images/index.html
(limited to 'doc')
diff --git a/doc/html/3rd-party-libraries/index.html b/doc/html/3rd-party-libraries/index.html
index 0d62007d..d7754471 100644
--- a/doc/html/3rd-party-libraries/index.html
+++ b/doc/html/3rd-party-libraries/index.html
@@ -94,19 +94,19 @@
$ docker search debian
-
-NAME DESCRIPTION STARS OFFICIAL AUTOMATED
-ubuntu Ubuntu is a Debian-based Linux operating s... 2065 [OK]
-debian Debian is a Linux distribution that's comp... 603 [OK]
-google/debian 47 [OK]
-
-
-
Show available tags for a repository
-
$ curl https://index.docker.io/v1/repositories/debian/tags | python -m json.tool
-
-% Total % Received % Xferd Average Speed Time Time Time Current
-Dload Upload Total Spent Left Speed
-100 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433
-
@@ -323,26 +323,38 @@
its values override those defined in index.php it is wrap in a PHP comment to prevent anyone accessing it, regardless of server configuration
File and directory permissions
-
The server process running Shaarli must have:
-- read access to the following resources:
- - PHP scripts: index.php, application/*.php, plugins/*.php
- - 3rd party PHP and Javascript libraries: inc/*.php, inc/*.js
- - static assets:
- - CSS stylesheets: inc/*.css
- - images/*
- - RainTPL templates: tpl/*.html
-- read, write and execution access to the following directories:
- - cache - thumbnail cache
- - data - link data store, configuration options
- - pagecache - Atom/RSS feed cache
- - tmp - RainTPL page cache
-
On a Linux distribution:
-- the web server user will likely be www or http (for Apache2)
-- it will be a member of a group of the same name: www:www, http:http
-- to give it access to Shaarli, either:
- - unzip Shaarli in the default web server location (usually /var/www/) and set the web server user as the owner
- - put users in the same group as the web server, and set the appropriate access rights
-- if you have a domain / subdomain to serve Shaarli, configure the server accordingly
# map the host's :8000 port to the container's :80 port
-$ docker create -p 8000:80 shaarli/shaarli
-d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
-
-# launch the container in the background
-$ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
-d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
-
-# list active containers
-$ docker ps
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo
-
-
-
Stop and destroy a container
-
$ docker stop backstabbing_galileo # those docker guys are really rude to physicists!
-backstabbing_galileo
-
-# check the container is stopped
-$ docker ps
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-
-# list ALL containers
-$ docker ps -a
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo
-
-# destroy the container
-$ docker rm backstabbing_galileo # let's put an end to these barbarian practices
-backstabbing_galileo
-
-$ docker ps -a
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-
$ docker search debian
+
+NAME DESCRIPTION STARS OFFICIAL AUTOMATED
+ubuntu Ubuntu is a Debian-based Linux operating s... 2065 [OK]
+debian Debian is a Linux distribution that's comp... 603 [OK]
+google/debian 47 [OK]
+
+
+
Show available tags for a repository
+
$ curl https://index.docker.io/v1/repositories/debian/tags | python -m json.tool
+
+% Total % Received % Xferd Average Speed Time Time Time Current
+Dload Upload Total Spent Left Speed
+100 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433
+
# map the host's :8000 port to the container's :80 port
+$ docker create -p 8000:80 shaarli/shaarli
+d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
+
+# launch the container in the background
+$ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
+d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
+
+# list active containers
+$ docker ps
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo
+
+
+
Stop and destroy a container
+
$ docker stop backstabbing_galileo # those docker guys are really rude to physicists!
+backstabbing_galileo
+
+# check the container is stopped
+$ docker ps
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+
+# list ALL containers
+$ docker ps -a
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo
+
+# destroy the container
+$ docker rm backstabbing_galileo # let's put an end to these barbarian practices
+backstabbing_galileo
+
+$ docker ps -a
+CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
+
@@ -441,5 +441,5 @@ and pull requests
diff --git a/doc/html/mkdocs/search_index.json b/doc/html/mkdocs/search_index.json
index 71bc2bcf..d9e8b5b8 100644
--- a/doc/html/mkdocs/search_index.json
+++ b/doc/html/mkdocs/search_index.json
@@ -382,7 +382,7 @@
},
{
"location": "/Shaarli-configuration/",
- "text": "Foreword\n\n\nDo not edit configuration options in index.php! Your changes would be lost.\n \n\n\nOnce your Shaarli instance is installed, the file \ndata/config.json.php\n is generated:\n\n it contains all settings in JSON format, and can be edited to customize values\n\n it defines which \nplugins\n are enabled\n\n\n its values override those defined in \nindex.php\n\n\n it is wrap in a PHP comment to prevent anyone accessing it, regardless of server configuration\n\n\nFile and directory permissions\n\n\nThe server process running Shaarli must have:\n- \nread\n access to the following resources:\n - PHP scripts: \nindex.php\n, \napplication/*.php\n, \nplugins/*.php\n\n - 3rd party PHP and Javascript libraries: \ninc/*.php\n, \ninc/*.js\n\n - static assets:\n - CSS stylesheets: \ninc/*.css\n\n - \nimages/*\n\n - RainTPL templates: \ntpl/*.html\n\n- \nread\n, \nwrite\n and \nexecution\n access to the following directories:\n - \ncache\n - thumbnail cache\n - \ndata\n - link data store, configuration options\n - \npagecache\n - Atom/RSS feed cache\n - \ntmp\n - RainTPL page cache\n\n\nOn a Linux distribution:\n- the web server user will likely be \nwww\n or \nhttp\n (for Apache2)\n- it will be a member of a group of the same name: \nwww:www\n, \nhttp:http\n\n- to give it access to Shaarli, either:\n - unzip Shaarli in the default web server location (usually \n/var/www/\n) and set the web server user as the owner\n - put users in the same group as the web server, and set the appropriate access rights\n- if you have a domain / subdomain to serve Shaarli, \nconfigure the server\n accordingly\n\n\nConfiguration\n\n\nIn \ndata/config.json.php\n.\n\n\nSee also \nPlugin System\n.\n\n\nCredentials\n\n\n\n\nYou shouldn't edit those.\n\n\n\n\nlogin\n: Login username.\n\n\nhash\n: Generated password hash.\n\n\nsalt\n: Password salt.\n\n\nGeneral\n\n\ntitle\n: Shaarli's instance title.\n\n\nheader_link\n: Link to the homepage.\n\n\nlinks_per_page\n: Number of shaares displayed per page.\n\n\ntimezone\n: See \nthe list of supported timezones\n.\n\n\nenabled_plugins\n: List of enabled plugins.\n\n\nSecurity\n\n\nsession_protection_disabled\n: Disable session cookie hijacking protection (not recommended). \nIt might be useful if your IP adress often changes.\n\n\nban_after\n: Failed login attempts before being IP banned.\n\n\nban_duration\n: IP ban duration in seconds.\n\n\nopen_shaarli\n: Anyone can add a new link while logged out if enabled.\n\n\ntrusted_proxies\n: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy.\n\n\nallowed_protocols\n: List of allowed protocols in shaare URLs or markdown-rendered descriptions. Useful if you want to store \njavascript:\n links (bookmarklets) in Shaarli (default: \n[\"ftp\", \"ftps\", \"magnet\"]\n).\n\n\nResources\n\n\ndata_dir\n: Data directory.\n\n\ndatastore\n: Shaarli's links database file path.\n\n\nhistory\n: Shaarli's operation history file path.\n\nupdates\n: File path for the ran updates file.\n\n\nlog\n: Log file path.\n\n\nupdate_check\n: Last update check file path.\n\n\nraintpl_tpl\n: Templates directory.\n\n\nraintpl_tmp\n: Template engine cache directory.\n\n\nthumbnails_cache\n: Thumbnails cache directory.\n\n\npage_cache\n: Shaarli's internal cache directory.\n\n\nban_file\n: Banned IP file path.\n\n\nUpdates\n\n\ncheck_updates\n: Enable or disable update check to the git repository.\n\n\ncheck_updates_branch\n: Git branch used to check updates (e.g. \nstable\n or \nmaster\n).\n\n\ncheck_updates_interval\n: Look for new version every N seconds (default: every day).\n\n\nPrivacy\n\n\ndefault_private_links\n: Check the private checkbox by default for every new link.\n\n\nhide_public_links\n: All links are hidden while logged out.\n\n\nhide_timestamps\n: Timestamps are hidden.\n\n\nFeed\n\n\nrss_permalinks\n: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL.\n\n\nshow_atom\n: Display ATOM feed button.\n\n\nThumbnail\n\n\nenable_thumbnails\n: Enable or disable thumbnail display.\n\n\nenable_localcache\n: Enable or disable local cache.\n\n\nRedirector\n\n\nurl\n: Redirector URL, such as \nanonym.to\n.\n\n\nencode_url\n: Enable this if the redirector needs encoded URL to work properly.\n\n\nConfiguration file example\n\n\n\",\n \"hash\": \"\",\n \"salt\": \"\"\n },\n \"security\": {\n \"ban_after\": 4,\n \"session_protection_disabled\": false,\n \"ban_duration\": 1800,\n \"trusted_proxies\": [\n \"1.2.3.4\",\n \"5.6.7.8\"\n ],\n \"allowed_protocols\": [\n \"ftp\",\n \"ftps\",\n \"magnet\"\n ]\n },\n \"resources\": {\n \"data_dir\": \"data\",\n \"config\": \"data\\/config.php\",\n \"datastore\": \"data\\/datastore.php\",\n \"ban_file\": \"data\\/ipbans.php\",\n \"updates\": \"data\\/updates.txt\",\n \"log\": \"data\\/log.txt\",\n \"update_check\": \"data\\/lastupdatecheck.txt\",\n \"raintpl_tmp\": \"tmp\\/\",\n \"raintpl_tpl\": \"tpl\\/\",\n \"thumbnails_cache\": \"cache\",\n \"page_cache\": \"pagecache\"\n },\n \"general\": {\n \"check_updates\": true,\n \"rss_permalinks\": true,\n \"links_per_page\": 20,\n \"default_private_links\": true,\n \"enable_thumbnails\": true,\n \"enable_localcache\": true,\n \"check_updates_branch\": \"stable\",\n \"check_updates_interval\": 86400,\n \"enabled_plugins\": [\n \"markdown\",\n \"wallabag\",\n \"archiveorg\"\n ],\n \"timezone\": \"Europe\\/Paris\",\n \"title\": \"My Shaarli\",\n \"header_link\": \"?\"\n },\n \"extras\": {\n \"show_atom\": false,\n \"hide_public_links\": false,\n \"hide_timestamps\": false,\n \"open_shaarli\": false,\n \"redirector\": \"http://anonym.to/?\",\n \"redirector_encode_url\": false\n },\n \"general\": {\n \"header_link\": \"?\",\n \"links_per_page\": 20,\n \"enabled_plugins\": [\n \"markdown\",\n \"wallabag\"\n ],\n \"timezone\": \"Europe\\/Paris\",\n \"title\": \"My Shaarli\"\n },\n \"updates\": {\n \"check_updates\": true,\n \"check_updates_branch\": \"stable\",\n \"check_updates_interval\": 86400\n },\n \"feed\": {\n \"rss_permalinks\": true,\n \"show_atom\": false\n },\n \"privacy\": {\n \"default_private_links\": true,\n \"hide_public_links\": false,\n \"hide_timestamps\": false\n },\n \"thumbnail\": {\n \"enable_thumbnails\": true,\n \"enable_localcache\": true\n },\n \"redirector\": {\n \"url\": \"http://anonym.to/?\",\n \"encode_url\": false\n },\n \"plugins\": {\n \"WALLABAG_URL\": \"http://demo.wallabag.org\",\n \"WALLABAG_VERSION\": \"1\"\n }\n} ?>\n\n\n\n\nAdditional configuration\n\n\nThe playvideos plugin may require that you adapt your server's \n\nContent Security Policy\n \nconfiguration to work properly.",
+ "text": "Foreword\n\n\nDo not edit configuration options in index.php! Your changes would be lost.\n \n\n\nOnce your Shaarli instance is installed, the file \ndata/config.json.php\n is generated:\n\n it contains all settings in JSON format, and can be edited to customize values\n\n it defines which \nplugins\n are enabled\n\n\n its values override those defined in \nindex.php\n\n\n it is wrap in a PHP comment to prevent anyone accessing it, regardless of server configuration\n\n\nFile and directory permissions\n\n\nThe server process running Shaarli must have:\n\n\n\n\nread\n access to the following resources:\n\n\nPHP scripts: \nindex.php\n, \napplication/*.php\n, \nplugins/*.php\n\n\n3rd party PHP and Javascript libraries: \ninc/*.php\n, \ninc/*.js\n\n\nstatic assets:\n\n\nCSS stylesheets: \ninc/*.css\n\n\nimages/*\n\n\n\n\n\n\nRainTPL templates: \ntpl/*.html\n\n\n\n\n\n\nread\n, \nwrite\n and \nexecution\n access to the following directories:\n\n\ncache\n - thumbnail cache\n\n\ndata\n - link data store, configuration options\n\n\npagecache\n - Atom/RSS feed cache\n\n\ntmp\n - RainTPL page cache\n\n\n\n\n\n\n\n\nOn a Linux distribution:\n\n\n\n\nthe web server user will likely be \nwww\n or \nhttp\n (for Apache2)\n\n\nit will be a member of a group of the same name: \nwww:www\n, \nhttp:http\n\n\nto give it access to Shaarli, either:\n\n\nunzip Shaarli in the default web server location (usually \n/var/www/\n) and set the web server user as the owner\n\n\nput users in the same group as the web server, and set the appropriate access rights\n\n\n\n\n\n\nif you have a domain / subdomain to serve Shaarli, \nconfigure the server\n accordingly\n\n\n\n\nConfiguration\n\n\nIn \ndata/config.json.php\n.\n\n\nSee also \nPlugin System\n.\n\n\nCredentials\n\n\n\n\nYou shouldn't edit those.\n\n\n\n\nlogin\n: Login username.\n\n\nhash\n: Generated password hash.\n\n\nsalt\n: Password salt.\n\n\nGeneral\n\n\ntitle\n: Shaarli's instance title.\n\n\nheader_link\n: Link to the homepage.\n\n\nlinks_per_page\n: Number of shaares displayed per page.\n\n\ntimezone\n: See \nthe list of supported timezones\n.\n\n\nenabled_plugins\n: List of enabled plugins.\n\n\nSecurity\n\n\nsession_protection_disabled\n: Disable session cookie hijacking protection (not recommended). \nIt might be useful if your IP adress often changes.\n\n\nban_after\n: Failed login attempts before being IP banned.\n\n\nban_duration\n: IP ban duration in seconds.\n\n\nopen_shaarli\n: Anyone can add a new link while logged out if enabled.\n\n\ntrusted_proxies\n: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy.\n\n\nallowed_protocols\n: List of allowed protocols in shaare URLs or markdown-rendered descriptions. Useful if you want to store \njavascript:\n links (bookmarklets) in Shaarli (default: \n[\"ftp\", \"ftps\", \"magnet\"]\n).\n\n\nResources\n\n\ndata_dir\n: Data directory.\n\n\ndatastore\n: Shaarli's links database file path.\n\n\nhistory\n: Shaarli's operation history file path.\n\nupdates\n: File path for the ran updates file.\n\n\nlog\n: Log file path.\n\n\nupdate_check\n: Last update check file path.\n\n\nraintpl_tpl\n: Templates directory.\n\n\nraintpl_tmp\n: Template engine cache directory.\n\n\nthumbnails_cache\n: Thumbnails cache directory.\n\n\npage_cache\n: Shaarli's internal cache directory.\n\n\nban_file\n: Banned IP file path.\n\n\nUpdates\n\n\ncheck_updates\n: Enable or disable update check to the git repository.\n\n\ncheck_updates_branch\n: Git branch used to check updates (e.g. \nstable\n or \nmaster\n).\n\n\ncheck_updates_interval\n: Look for new version every N seconds (default: every day).\n\n\nPrivacy\n\n\ndefault_private_links\n: Check the private checkbox by default for every new link.\n\n\nhide_public_links\n: All links are hidden while logged out.\n\n\nhide_timestamps\n: Timestamps are hidden.\n\n\nFeed\n\n\nrss_permalinks\n: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL.\n\n\nshow_atom\n: Display ATOM feed button.\n\n\nThumbnail\n\n\nenable_thumbnails\n: Enable or disable thumbnail display.\n\n\nenable_localcache\n: Enable or disable local cache.\n\n\nRedirector\n\n\nurl\n: Redirector URL, such as \nanonym.to\n.\n\n\nencode_url\n: Enable this if the redirector needs encoded URL to work properly.\n\n\nConfiguration file example\n\n\n\",\n \"hash\": \"\",\n \"salt\": \"\"\n },\n \"security\": {\n \"ban_after\": 4,\n \"session_protection_disabled\": false,\n \"ban_duration\": 1800,\n \"trusted_proxies\": [\n \"1.2.3.4\",\n \"5.6.7.8\"\n ],\n \"allowed_protocols\": [\n \"ftp\",\n \"ftps\",\n \"magnet\"\n ]\n },\n \"resources\": {\n \"data_dir\": \"data\",\n \"config\": \"data\\/config.php\",\n \"datastore\": \"data\\/datastore.php\",\n \"ban_file\": \"data\\/ipbans.php\",\n \"updates\": \"data\\/updates.txt\",\n \"log\": \"data\\/log.txt\",\n \"update_check\": \"data\\/lastupdatecheck.txt\",\n \"raintpl_tmp\": \"tmp\\/\",\n \"raintpl_tpl\": \"tpl\\/\",\n \"thumbnails_cache\": \"cache\",\n \"page_cache\": \"pagecache\"\n },\n \"general\": {\n \"check_updates\": true,\n \"rss_permalinks\": true,\n \"links_per_page\": 20,\n \"default_private_links\": true,\n \"enable_thumbnails\": true,\n \"enable_localcache\": true,\n \"check_updates_branch\": \"stable\",\n \"check_updates_interval\": 86400,\n \"enabled_plugins\": [\n \"markdown\",\n \"wallabag\",\n \"archiveorg\"\n ],\n \"timezone\": \"Europe\\/Paris\",\n \"title\": \"My Shaarli\",\n \"header_link\": \"?\"\n },\n \"extras\": {\n \"show_atom\": false,\n \"hide_public_links\": false,\n \"hide_timestamps\": false,\n \"open_shaarli\": false,\n \"redirector\": \"http://anonym.to/?\",\n \"redirector_encode_url\": false\n },\n \"general\": {\n \"header_link\": \"?\",\n \"links_per_page\": 20,\n \"enabled_plugins\": [\n \"markdown\",\n \"wallabag\"\n ],\n \"timezone\": \"Europe\\/Paris\",\n \"title\": \"My Shaarli\"\n },\n \"updates\": {\n \"check_updates\": true,\n \"check_updates_branch\": \"stable\",\n \"check_updates_interval\": 86400\n },\n \"feed\": {\n \"rss_permalinks\": true,\n \"show_atom\": false\n },\n \"privacy\": {\n \"default_private_links\": true,\n \"hide_public_links\": false,\n \"hide_timestamps\": false\n },\n \"thumbnail\": {\n \"enable_thumbnails\": true,\n \"enable_localcache\": true\n },\n \"redirector\": {\n \"url\": \"http://anonym.to/?\",\n \"encode_url\": false\n },\n \"plugins\": {\n \"WALLABAG_URL\": \"http://demo.wallabag.org\",\n \"WALLABAG_VERSION\": \"1\"\n }\n} ?>\n\n\n\n\nAdditional configuration\n\n\nThe playvideos plugin may require that you adapt your server's \n\nContent Security Policy\n \nconfiguration to work properly.",
"title": "Shaarli configuration"
},
{
@@ -392,7 +392,7 @@
},
{
"location": "/Shaarli-configuration/#file-and-directory-permissions",
- "text": "The server process running Shaarli must have:\n- read access to the following resources:\n - PHP scripts: index.php , application/*.php , plugins/*.php \n - 3rd party PHP and Javascript libraries: inc/*.php , inc/*.js \n - static assets:\n - CSS stylesheets: inc/*.css \n - images/* \n - RainTPL templates: tpl/*.html \n- read , write and execution access to the following directories:\n - cache - thumbnail cache\n - data - link data store, configuration options\n - pagecache - Atom/RSS feed cache\n - tmp - RainTPL page cache On a Linux distribution:\n- the web server user will likely be www or http (for Apache2)\n- it will be a member of a group of the same name: www:www , http:http \n- to give it access to Shaarli, either:\n - unzip Shaarli in the default web server location (usually /var/www/ ) and set the web server user as the owner\n - put users in the same group as the web server, and set the appropriate access rights\n- if you have a domain / subdomain to serve Shaarli, configure the server accordingly",
+ "text": "The server process running Shaarli must have: read access to the following resources: PHP scripts: index.php , application/*.php , plugins/*.php 3rd party PHP and Javascript libraries: inc/*.php , inc/*.js static assets: CSS stylesheets: inc/*.css images/* RainTPL templates: tpl/*.html read , write and execution access to the following directories: cache - thumbnail cache data - link data store, configuration options pagecache - Atom/RSS feed cache tmp - RainTPL page cache On a Linux distribution: the web server user will likely be www or http (for Apache2) it will be a member of a group of the same name: www:www , http:http to give it access to Shaarli, either: unzip Shaarli in the default web server location (usually /var/www/ ) and set the web server user as the owner put users in the same group as the web server, and set the appropriate access rights if you have a domain / subdomain to serve Shaarli, configure the server accordingly",
"title": "File and directory permissions"
},
{
@@ -496,97 +496,97 @@
"title": "Third party plugins"
},
{
- "location": "/Docker-101/",
+ "location": "/docker/docker-101/",
"text": "Basics\n\n\nInstall \nDocker\n, by following the instructions relevant\nto your OS / distribution, and start the service.\n\n\nSearch an image on \nDockerHub\n\n\n$ docker search debian\n\nNAME DESCRIPTION STARS OFFICIAL AUTOMATED\nubuntu Ubuntu is a Debian-based Linux operating s... 2065 [OK]\ndebian Debian is a Linux distribution that's comp... 603 [OK]\ngoogle/debian 47 [OK]\n\n\n\n\nShow available tags for a repository\n\n\n$ curl https://index.docker.io/v1/repositories/debian/tags | python -m json.tool\n\n% Total % Received % Xferd Average Speed Time Time Time Current\nDload Upload Total Spent Left Speed\n100 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433\n\n\n\n\nSample output:\n\n\n[\n {\n \"layer\": \"85a02782\",\n \"name\": \"stretch\"\n },\n {\n \"layer\": \"59abecbc\",\n \"name\": \"testing\"\n },\n {\n \"layer\": \"bf0fd686\",\n \"name\": \"unstable\"\n },\n {\n \"layer\": \"60c52dbe\",\n \"name\": \"wheezy\"\n },\n {\n \"layer\": \"c5b806fe\",\n \"name\": \"wheezy-backports\"\n }\n]\n\n\n\n\n\nPull an image from DockerHub\n\n\n$ docker pull repository[:tag]\n\n$ docker pull debian:wheezy\nwheezy: Pulling from debian\n4c8cbfd2973e: Pull complete\n60c52dbe9d91: Pull complete\nDigest: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe\nStatus: Downloaded newer image for debian:wheezy",
"title": "Docker 101"
},
{
- "location": "/Docker-101/#basics",
+ "location": "/docker/docker-101/#basics",
"text": "Install Docker , by following the instructions relevant\nto your OS / distribution, and start the service.",
"title": "Basics"
},
{
- "location": "/Docker-101/#search-an-image-on-dockerhub",
+ "location": "/docker/docker-101/#search-an-image-on-dockerhub",
"text": "$ docker search debian\n\nNAME DESCRIPTION STARS OFFICIAL AUTOMATED\nubuntu Ubuntu is a Debian-based Linux operating s... 2065 [OK]\ndebian Debian is a Linux distribution that's comp... 603 [OK]\ngoogle/debian 47 [OK]",
"title": "Search an image on DockerHub"
},
{
- "location": "/Docker-101/#show-available-tags-for-a-repository",
+ "location": "/docker/docker-101/#show-available-tags-for-a-repository",
"text": "$ curl https://index.docker.io/v1/repositories/debian/tags | python -m json.tool\n\n% Total % Received % Xferd Average Speed Time Time Time Current\nDload Upload Total Spent Left Speed\n100 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433 Sample output: [\n {\n \"layer\": \"85a02782\",\n \"name\": \"stretch\"\n },\n {\n \"layer\": \"59abecbc\",\n \"name\": \"testing\"\n },\n {\n \"layer\": \"bf0fd686\",\n \"name\": \"unstable\"\n },\n {\n \"layer\": \"60c52dbe\",\n \"name\": \"wheezy\"\n },\n {\n \"layer\": \"c5b806fe\",\n \"name\": \"wheezy-backports\"\n }\n]",
"title": "Show available tags for a repository"
},
{
- "location": "/Docker-101/#pull-an-image-from-dockerhub",
+ "location": "/docker/docker-101/#pull-an-image-from-dockerhub",
"text": "$ docker pull repository[:tag]\n\n$ docker pull debian:wheezy\nwheezy: Pulling from debian\n4c8cbfd2973e: Pull complete\n60c52dbe9d91: Pull complete\nDigest: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe\nStatus: Downloaded newer image for debian:wheezy",
"title": "Pull an image from DockerHub"
},
{
- "location": "/Shaarli-images/",
- "text": "Get and run a Shaarli image\n\n\nDockerHub repository\n\n\nThe images can be found in the \nshaarli/shaarli\n\nrepository.\n\n\nAvailable image tags\n\n\n\n\nlatest\n: master branch (tarball release)\n\n\nstable\n: stable branch (tarball release)\n\n\ndev\n: master branch (Git clone)\n\n\n\n\nAll images rely on:\n- \nDebian 8 Jessie\n\n- \nPHP5-FPM\n\n- \nNginx\n\n\nDownload from DockerHub\n\n\n$ docker pull shaarli/shaarli\nlatest: Pulling from shaarli/shaarli\n32716d9fcddb: Pull complete\n84899d045435: Pull complete\n4b6ad7444763: Pull complete\ne0345ef7a3e0: Pull complete\n5c1dd344094f: Pull complete\n6422305a200b: Pull complete\n7d63f861dbef: Pull complete\n3eb97210645c: Pull complete\n869319d746ff: Already exists\n869319d746ff: Pulling fs layer\n902b87aaaec9: Already exists\nDigest: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98\nStatus: Downloaded newer image for shaarli/shaarli:latest\n\n\n\n\nCreate and start a new container from the image\n\n\n# map the host's :8000 port to the container's :80 port\n$ docker create -p 8000:80 shaarli/shaarli\nd40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101\n\n# launch the container in the background\n$ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101\nd40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101\n\n# list active containers\n$ docker ps\nCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\nd40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo\n\n\n\n\nStop and destroy a container\n\n\n$ docker stop backstabbing_galileo # those docker guys are really rude to physicists!\nbackstabbing_galileo\n\n# check the container is stopped\n$ docker ps\nCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\n\n# list ALL containers\n$ docker ps -a\nCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\nd40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo\n\n# destroy the container\n$ docker rm backstabbing_galileo # let's put an end to these barbarian practices\nbackstabbing_galileo\n\n$ docker ps -a\nCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES",
+ "location": "/docker/shaarli-images/",
+ "text": "Get and run a Shaarli image\n\n\nDockerHub repository\n\n\nThe images can be found in the \nshaarli/shaarli\n\nrepository.\n\n\nAvailable image tags\n\n\n\n\nlatest\n: master branch (tarball release)\n\n\nstable\n: stable branch (tarball release)\n\n\n\n\nAll images rely on:\n- \nDebian 8 Jessie\n\n- \nPHP5-FPM\n\n- \nNginx\n\n\nDownload from DockerHub\n\n\n$ docker pull shaarli/shaarli\nlatest: Pulling from shaarli/shaarli\n32716d9fcddb: Pull complete\n84899d045435: Pull complete\n4b6ad7444763: Pull complete\ne0345ef7a3e0: Pull complete\n5c1dd344094f: Pull complete\n6422305a200b: Pull complete\n7d63f861dbef: Pull complete\n3eb97210645c: Pull complete\n869319d746ff: Already exists\n869319d746ff: Pulling fs layer\n902b87aaaec9: Already exists\nDigest: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98\nStatus: Downloaded newer image for shaarli/shaarli:latest\n\n\n\n\nCreate and start a new container from the image\n\n\n# map the host's :8000 port to the container's :80 port\n$ docker create -p 8000:80 shaarli/shaarli\nd40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101\n\n# launch the container in the background\n$ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101\nd40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101\n\n# list active containers\n$ docker ps\nCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\nd40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo\n\n\n\n\nStop and destroy a container\n\n\n$ docker stop backstabbing_galileo # those docker guys are really rude to physicists!\nbackstabbing_galileo\n\n# check the container is stopped\n$ docker ps\nCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\n\n# list ALL containers\n$ docker ps -a\nCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\nd40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo\n\n# destroy the container\n$ docker rm backstabbing_galileo # let's put an end to these barbarian practices\nbackstabbing_galileo\n\n$ docker ps -a\nCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES",
"title": "Shaarli images"
},
{
- "location": "/Shaarli-images/#get-and-run-a-shaarli-image",
+ "location": "/docker/shaarli-images/#get-and-run-a-shaarli-image",
"text": "",
"title": "Get and run a Shaarli image"
},
{
- "location": "/Shaarli-images/#dockerhub-repository",
+ "location": "/docker/shaarli-images/#dockerhub-repository",
"text": "The images can be found in the shaarli/shaarli \nrepository.",
"title": "DockerHub repository"
},
{
- "location": "/Shaarli-images/#available-image-tags",
- "text": "latest : master branch (tarball release) stable : stable branch (tarball release) dev : master branch (Git clone) All images rely on:\n- Debian 8 Jessie \n- PHP5-FPM \n- Nginx",
+ "location": "/docker/shaarli-images/#available-image-tags",
+ "text": "latest : master branch (tarball release) stable : stable branch (tarball release) All images rely on:\n- Debian 8 Jessie \n- PHP5-FPM \n- Nginx",
"title": "Available image tags"
},
{
- "location": "/Shaarli-images/#download-from-dockerhub",
+ "location": "/docker/shaarli-images/#download-from-dockerhub",
"text": "$ docker pull shaarli/shaarli\nlatest: Pulling from shaarli/shaarli\n32716d9fcddb: Pull complete\n84899d045435: Pull complete\n4b6ad7444763: Pull complete\ne0345ef7a3e0: Pull complete\n5c1dd344094f: Pull complete\n6422305a200b: Pull complete\n7d63f861dbef: Pull complete\n3eb97210645c: Pull complete\n869319d746ff: Already exists\n869319d746ff: Pulling fs layer\n902b87aaaec9: Already exists\nDigest: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98\nStatus: Downloaded newer image for shaarli/shaarli:latest",
"title": "Download from DockerHub"
},
{
- "location": "/Shaarli-images/#create-and-start-a-new-container-from-the-image",
+ "location": "/docker/shaarli-images/#create-and-start-a-new-container-from-the-image",
"text": "# map the host's :8000 port to the container's :80 port\n$ docker create -p 8000:80 shaarli/shaarli\nd40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101\n\n# launch the container in the background\n$ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101\nd40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101\n\n# list active containers\n$ docker ps\nCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\nd40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo",
"title": "Create and start a new container from the image"
},
{
- "location": "/Shaarli-images/#stop-and-destroy-a-container",
+ "location": "/docker/shaarli-images/#stop-and-destroy-a-container",
"text": "$ docker stop backstabbing_galileo # those docker guys are really rude to physicists!\nbackstabbing_galileo\n\n# check the container is stopped\n$ docker ps\nCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\n\n# list ALL containers\n$ docker ps -a\nCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\nd40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo\n\n# destroy the container\n$ docker rm backstabbing_galileo # let's put an end to these barbarian practices\nbackstabbing_galileo\n\n$ docker ps -a\nCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES",
"title": "Stop and destroy a container"
},
{
- "location": "/Reverse-proxy-configuration/",
+ "location": "/docker/reverse-proxy-configuration/",
"text": "TODO, see https://github.com/shaarli/Shaarli/issues/888\n\n\nHAProxy\n\n\nNginx",
"title": "Reverse proxy configuration"
},
{
- "location": "/Reverse-proxy-configuration/#haproxy",
+ "location": "/docker/reverse-proxy-configuration/#haproxy",
"text": "",
"title": "HAProxy"
},
{
- "location": "/Reverse-proxy-configuration/#nginx",
+ "location": "/docker/reverse-proxy-configuration/#nginx",
"text": "",
"title": "Nginx"
},
{
- "location": "/Docker-resources/",
+ "location": "/docker/resources/",
"text": "Docker\n\n\n\n\nInteractive Docker training portal\n on \nKatakoda\n\n\nWhere are Docker images stored?\n\n\nDockerfile reference\n\n\nDockerfile best practices\n\n\nVolumes\n\n\n\n\nDockerHub\n\n\n\n\nRepositories\n\n\nTeams and organizations\n\n\nGitHub automated build\n\n\n\n\nService management\n\n\n\n\nUsing supervisord\n\n\nNginx in the foreground\n\n\nsupervisord",
"title": "Docker resources"
},
{
- "location": "/Docker-resources/#docker",
+ "location": "/docker/resources/#docker",
"text": "Interactive Docker training portal on Katakoda Where are Docker images stored? Dockerfile reference Dockerfile best practices Volumes",
"title": "Docker"
},
{
- "location": "/Docker-resources/#dockerhub",
+ "location": "/docker/resources/#dockerhub",
"text": "Repositories Teams and organizations GitHub automated build",
"title": "DockerHub"
},
{
- "location": "/Docker-resources/#service-management",
+ "location": "/docker/resources/#service-management",
"text": "Using supervisord Nginx in the foreground supervisord",
"title": "Service management"
},
diff --git a/doc/html/search.html b/doc/html/search.html
index 49541cda..cf6e46b9 100644
--- a/doc/html/search.html
+++ b/doc/html/search.html
@@ -90,19 +90,19 @@
To export links as an HTML file, under Tools > Export, choose:
-- Export all to export both public and private links
-- Export public to export public links only
-- Export private to export private links only
-
Restore by using the Import feature.
-* This can be done using the shaarchiver tool.
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.)
To correctly import the tags from a SemanticScuttle HTML export, edit the HTML file before importing and replace all occurences of tags= (lowercase) to TAGS= (uppercase).
-
Scuttle
-
Shaarli cannot import data directly from 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.
-
Import Shaarli links to Firefox
-
-
Export your Shaarli links as described above.
-
For compatibility reasons, check Prepend note permalinks with this Shaarli instance's URL (useful to import bookmarks in a web browser)
-
In Firefox, open the bookmark manager (not the sidebar! Bookmarks menu > Show all bookmarks or Ctrl+Shift+B)
-
Select Import and Backup > Import bookmarks in HTML format
-
-
Your 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.
-
You may be interested in these Firefox addons to manage links imported from Shaarli
Add the sharing button (bookmarklet) to your browser
-
-
Open your Shaarli and Login
-
Click the Tools button in the top bar
-
Drag the ✚Shaare link button, and drop it to your browser's bookmarks bar.
-
-
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.
-
-
Share links using the bookmarklet
-
-
When you are visiting a webpage you would like to share with Shaarli, click the bookmarklet you just added.
-
A window opens.
-
You can freely edit title, description, tags... to find it later using the text search or tag filtering.
-
You will be able to edit this link later using the edit button.
-
You can also check the “Private” box so that the link is saved but only visible to you.
-
Click Save.Voilà! Your link is now shared.
-
-
Troubleshooting: The bookmarklet doesn't work with a few website (e.g. Github.com)
-
Websites which enforce Content Security Policy (CSP), such as github.com, disallow usage of bookmarklets. Unfortunatly, there is nothing Shaarli can do about it.
Use the Search text field to search in any of the fields of all links (Title, URL, Description...)
-
Exclude text/tags: Use the - operator before a word or tag (example -uninteresting) to prevent entries containing (or tagged) uninteresting from showing up in the search results.
-
Exact text search: Use double-quotes (example "exact search") to search for the exact expression.
-
Both exclude patterns and exact searches can be combined with normal searches (example "exact search" term otherterm -notthis "very exact" stuff -notagain)
-
Tags search
-
Use the Filter by tags field to restrict displayed links to entries tagged with one or multiple tags (use space to separate tags).
-
Hidden tags: Tags starting with a dot . (example .secret) are private. They can only be seen and searched when logged in.
-
Alternatively you can use the Tag cloud to discover all tags and click on any of them to display related links.
-
To search for links that are not tagged, enter "" in the tag search field.
-
Filtering RSS feeds/Picture wall
-
RSS feeds can also be restricted to only return items matching a text/tag search: see RSS feeds.
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.
-
TODO: contact repos owners to see if they'd like to standardize their work with the community fork.
Self dead link - Detect dead links on shaarli. This version use the database of shaarli. Another version, can be used for other shaarli instances (but is more resource consuming).
-
Bookmark Archiver - Save an archived copy of all websites starred using browser bookmarks/Shaarli/Delicious/Instapaper/Unmark.it/Pocket/Pinboard. Outputs browseable html.
-
-
Mobile Apps
-
-
ShaarliOS iOS share extension - see #308 for some promo codes,
-
Shaarli for Android - Android application that adds Shaarli as a sharing provider
-
Shaarlier for Android - Android application to simply add links directly into your Shaarli
A Makefile is available to perform project-related operations:
-- Documentation - generate a local HTML copy of the GitHub wiki
-- Static analysis - check that the code is compliant to PHP conventions
-- Unit tests - ensure there are no regressions introduced by new commits
-
Automatic builds
-
Travis CI is a Continuous Integration build server, that runs a build:
-- each time a commit is merged to the mainline (master branch)
-- each time a Pull Request is submitted or updated
-
A build is composed of several jobs: one for each supported PHP version (see Server requirements).
-
Each build job:
-- updates Composer
-- installs 3rd-party test dependencies with Composer
-- runs Unit tests
-
After all jobs have finished, Travis returns the results to GitHub:
-- a status icon represents the result for the master branch:
-- Pull Requests are updated with the Travis result
- - Green: all tests have passed
- - Red: some tests failed
- - Orange: tests are pending
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 server is properly configured.
-
Several releases are available:
-
-
Latest release (recommended)
-
Download as an archive
-
Get the latest released version from the releases page.
-
Download our shaarli-full archive to include dependencies.
In most cases, download Shaarli from the releases page. Cloning using git or downloading Github branches as zip files requires additional steps (see below).
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… their Firefox addon sends to Diigo every single URL you visit (Don't believe me ? Use Tamper Data and open any page).
-
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.
-
Why use Shaarli and not Delicious/Diigo ?
-
With Shaarli:
-
-
The data is yours: It's hosted on your server.
-
Never fear of having your data locked-in.
-
Never fear to have your data sold to third party.
-
Your private links are not hosted on a third party server.
-
You are not tracked by browser addons (like Diigo does)
-
You can change the look and feel of the pages if you want.
-
You can change the behaviour of the program.
-
It's magnitude faster than most bookmarking services.
-
-
What does Shaarli mean?
-
Shaarli is for shaaring your links.
-
My Shaarli is broken!
-
First of all, ensure that both the web server and Shaarli are correctly configured, and that your installation is supported.
-
If everything looks right but the issue(s) remain(s), please:
-- take a look at the troubleshooting section
-- come chat with us on Gitter, we'll be happy to help ;-)
-- browse active issues and Pull Requests
- - if you find one that is related to the issue, feel free to comment and provide additional details (host/Shaarli setup)
- - else, open a new issue, and provide information about the problem:
- - what happens? - display glitches, invalid data, security flaws...
- - what is your configuration? - OS, server version, activated extensions, web browser...
- - is it reproducible?
-
Why not use a real database? Files are slow!
-
Does browsing this page feel slow? Try browsing older pages, too.
-
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?
-
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.
Shaarli is intended:
- * to share, comment and save interesting links and news
- * to bookmark useful/frequent personal links (as private links) and share them between computers
- * as a minimal blog/microblog/writing platform (no character limit)
- * as a read-it-later list (for example items tagged readlater)
- * to draft and save articles/ideas
- * to keep code snippets
- * to keep notes and documentation
- * as a shared clipboard between machines
- * as a todo list
- * to store playlists (e.g. with the music or video tags)
- * to keep extracts/comments from webpages that may disappear
- * to keep track of ongoing discussions (for example items tagged discussion)
- * to feed RSS aggregators (planets) with specific tags
- * to feed other social networks, blogs... using RSS feeds and external services (dlvr.it, ifttt.com ...)
-
Using Shaarli as a blog, notepad, pastebin...
-
-
Go to your Shaarli setup and log in
-
Click the Add Link button
-
To share text only, do not enter any URL in the corresponding input field and click Add Link
-
Pick a title and enter your article, or note, in the description field; add a few tags; optionally check Private then click Save
-
Voilà! Your article is now published (privately if you selected that option) and accessible using its permalink.
Click the ✚Add to Firefox social button and accept the activation.
-
-
Sharing links using Firefox share
-
-
Add the sharing service as described above
-
When you are visiting a webpage you would like to share with Shaarli, click the Firefox Share button images/firefoxshare.png
-
You can edit your link before and after saving, just like the bookmarklet above.
-
-
-
-
-
-
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.
Gnu Privacy Guard (GnuPG) is an Open Source implementation of the Pretty Good
-Privacy (OpenPGP) specification. Its main purposes are digital authentication,
-signature and encryption.
-
It is often used by the FLOSS community to verify:
-- Linux package signatures: Debian SecureApt, ArchLinux Master
-Keys
-- SCM releases & maintainer identity
-
Trust
-
To quote Phil Pennock (the author of the SKS key server - http://sks.spodhuis.org/):
-
-
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.
$ gpg --gen-key
-
-gpg (GnuPG) 2.1.6; Copyright (C) 2015 Free Software Foundation, Inc.
-This is free software: you are free to change and redistribute it.
-There is NO WARRANTY, to the extent permitted by law.
-
-Note: Use "gpg2 --full-gen-key" for a full featured key generation dialog.
-
-GnuPG needs to construct a user ID to identify your key.
-
-Real name: Marvin the Paranoid Android
-Email address: marvin@h2g2.net
-You selected this USER-ID:
- "Marvin the Paranoid Android <marvin@h2g2.net>"
-
-Change (N)ame, (E)mail, or (O)kay/(Q)uit? o
-We need to generate a lot of random bytes. It is a good idea to perform
-some other action (type on the keyboard, move the mouse, utilize the
-disks) during the prime generation; this gives the random number
-generator a better chance to gain enough entropy.
-
-
-
gpg - entropy interlude
-
At this point, you will:
-- be prompted for a secure password to protect your key (the input method will depend on your Desktop Environment and configuration)
-- be asked to use your machine's input devices (mouse, keyboard, etc.) to generate random entropy; this step may take some time
At the beginning of Shaarli execution, all enabled plugins are loaded. At this point, the plugin system looks for an init() function to execute and run it if it exists. This function must be named this way, and takes the ConfigManager as parameter.
-
<plugin_name>_init($conf)
-
-
This function can be used to create initial data, load default settings, etc. But also to set plugin errors. If the initialization function returns an array of strings, they will be understand as errors, and displayed in the header to logged in users.
-
Understanding hooks
-
A plugin is a set of functions. Each function will be triggered by the plugin system at certain point in Shaarli execution.
-
These functions need to be named with this pattern:
When a page is displayed, every variable send to the template engine is passed to plugins before that in $data.
-
The data contained by this array can be altered before template rendering.
-
For exemple, in linklist, it is possible to alter every title:
-
// mind the reference if you want $data to be altered
-foreach ($data['links'] as &$value) {
- // String reverse every title.
- $value['title'] = strrev($value['title']);
-}
-
-return $data;
-
-
-
Metadata
-
Every plugin needs a <plugin_name>.meta file, which is in fact an .ini file (KEY="VALUE"), to be listed in plugin administration.
-
Each file contain two keys:
-
-
description: plugin description
-
parameters: user parameter names, separated by a ;.
-
parameter.<PARAMETER_NAME>: add a text description the specified parameter.
-
-
-
Note: In PHP, parse_ini_file() seems to want strings to be between by quotes " in the ini file.
-
-
It's not working!
-
Use demo_plugin as a functional example. It covers most of the plugin system features.
Make sure your webserver can read and write the files in your plugin folder.
-
-
Plugin configuration
-
In Shaarli's administration page (Tools link), go to Plugin administration.
-
Here you can enable and disable all plugins available, and configure them.
-
-
Plugin order
-
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.
-
This is important in case plugins are depending on each other. Read plugins README details for more information.
-
Use case: The (non existent) plugin shaares_footer adds a footer to every shaare in Markdown syntax. It needs to be processed before (higher in the list) the Markdown plugin. Otherwise its syntax won't be translated in HTML.
-
File mode
-
Enabled plugin are stored in your config.php parameters file, under the array:
To 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.
The 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.
Feeds are available in ATOM with ?do=atom and RSS with do=RSS.
-
Options:
-- You can use permalinks in the feed URL to get permalink to Shaares instead of direct link to shaared URL.
- - E.G. https://my.shaarli.domain/?do=atom&permalinks.
-- 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.
- - https://my.shaarli.domain/?do=atom&permalinks&nb=42
- - https://my.shaarli.domain/?do=atom&permalinks&nb=all
-
RSS Feeds or Picture Wall for a specific search/tag
-
It 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.
-
For example, if you want to subscribe only to links tagged photography:
-- Go to the desired Shaarli instance.
-- Search for the photography tag in the Filter by tag box. Links tagged photography are displayed.
-- Click on the RSS Feed button.
-- You are presented with an RSS feed showing only these links. Subscribe to it to receive only updates with this tag.
-- The same method also works for a full-text search (Search box) and for the Picture Wall (want to only see pictures about nature?)
-- You can also build the URLs manually:
- - https://my.shaarli.domain/?do=rss&searchtags=nature
- - https://my.shaarli.domain/links/?do=picwall&searchterm=poney
This guide assumes that you have:
-- a GPG key matching your GitHub authentication credentials
- - i.e., the email address identified by the GPG key is the same as the one in your ~/.gitconfig
-- a GitHub fork of Shaarli
-- a local clone of your Shaarli fork, with the following remotes:
- - origin pointing to your GitHub fork
- - upstream pointing to the main Shaarli repository
-- maintainer permissions on the main Shaarli repository, to:
- - push the signed tag
- - create a new release
-- Composer needs to be installed
-- The venv Python 3 module needs to be installed for HTML documentation generation.
-
GitHub release draft and CHANGELOG.md
-
See http://keepachangelog.com/en/0.3.0/ for changelog formatting.
-
GitHub release draft
-
GitHub allows drafting the release note for the upcoming release, from the Releases page. This way, the release note can be drafted while contributions are merged to master.
-
CHANGELOG.md
-
This file should contain the same information as the release note draft for the upcoming version.
-
Update it to:
-- add new entries (additions, fixes, etc.)
-- mark the current version as released by setting its date and link
-- add a new section for the future unreleased version
Increment the version code, updated docs, create and push a signed tag
-
Generate documentation
-
$ cd /path/to/shaarli
-
-# create a new branch
-$ git fetch upstream
-$ git checkout upstream/master -b v0.5.0
-
-# rebuild the HTML documentation from Markdown
-$ make htmlpages
-
-# commit the changes
-$ git add doc
-$ git commit -s -m "Generate documentation for v0.5.0"
-
-# push the commit on your GitHub fork
-$ git push origin v0.5.0
-
-
-
Create and merge a Pull Request
-
This one is pretty straightforward ;-)
-
Bump Shaarli version to v0.x branch
-
$ git checkout master
-$ git fetch upstream
-$ git pull upstream master
-
-# IF the branch doesn't exists
-$ git checkout -b v0.5
-# OR if the branch already exists
-$ git checkout v0.5
-$ git rebase upstream/master
-
-# Bump shaarli version from dev to 0.5.0, **without the `v`**
-$ vim shaarli_version.php
-$ git add shaarli_version
-$ git commit -s -m "Bump Shaarli version to v0.5.0"
-$ git push upstream v0.5
-
-
-
Create and push a signed tag
-
# update your local copy
-$ git checkout v0.5
-$ git fetch upstream
-$ git pull upstream v0.5
-
-# create a signed tag
-$ git tag -s -m "Release v0.5.0" v0.5.0
-
-# push it to "upstream"
-$ git push --tags upstream
-
-
-
Verify a signed tag
-
v0.5.0 is the first GPG-signed tag pushed on the Community Shaarli.
-
Let's have a look at its signature!
-
$ cd /path/to/shaarli
-$ git fetch upstream
-
-# get the SHA1 reference of the tag
-$ git show-ref tags/v0.5.0
-f7762cf803f03f5caf4b8078359a63783d0090c1 refs/tags/v0.5.0
-
-# verify the tag signature information
-$ git verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1
-gpg: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F
-gpg: Good signature from "VirtualTam <virtualtam@flibidi.net>" [ultimate]
-
-
-
Publish the GitHub release
-
Update release badges
-
Update README.md so version badges display and point to the newly released Shaarli version(s), in the master branch.
-
Create a GitHub release from a Git tag
-
From the previously drafted release:
-- edit the release notes (if needed)
-- specify the appropriate Git tag
-- publish the release
-- profit!
-
Generate and upload all-in-one release archives
-
Users with a shared hosting may have:
-- no SSH access
-- no possibility to install PHP packages or server extensions
-- no possibility to run scripts
-
To ease Shaarli installations, it is possible to generate and upload additional release archives,
-that will contain Shaarli code plus all required third-party libraries.
-
From the v0.5 branch:
-
$ make release_archive
-
-
-
This will create the following archives:
-- shaarli-vX.Y.Z-full.tar
-- shaarli-vX.Y.Z-full.zip
-
The archives need to be manually uploaded on the previously created GitHub release.
-
Update stable and latest branches
-
$ git checkout latest
-# latest release
-$ git merge v0.5.0
-# fix eventual conflicts
-$ make test
-$ git push upstream latest
-$ git checkout stable
-# latest previous major
-$ git merge v0.4.5
-# fix eventual conflicts
-$ make test
-$ git push upstream stable
-
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
-
-
PHP
-
-
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.
-
-
Server and sessions
-
-
Directories are protected using .htaccess files
-
Forms are protected against XSRF (Cross-site requests forgery):
-
Forms which act on data (save,delete…) contain a token generated by the server.
-
Any posted form which does not contain a valid token is rejected.
-
Any token can only be used once.
-
Tokens are attached to the session and cannot be reused in another session.
-
Sessions automatically expire after 60 minutes.
-
Sessions are protected against hijacking: the session ID cannot be used from a different IP address.
-
-
Shaarli datastore and configuration
-
-
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.
-
Links are stored as an associative array which is serialized, compressed (with deflate), base64-encoded and saved as a comment in a .php file.
-
Even if the server does not support .htaccess files, the data file will still not be readable by URL.
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 @.
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:
-- X-Forwarded-Proto;
-- X-Forwarded-Host;
-- X-Forwarded-For.
Shaarli 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.
-
Warning: If you use Apache 2.2 or lower, you need mod_version to be installed and enabled.
-
Apache module mod_rewritemust be enabled to use the REST API. URL rewriting rules for the Slim microframework are stated in the root .htaccess file.
-
LightHttpd
-
Nginx
-
Foreword
-
Nginx does not natively interpret PHP scripts; to this effect, we will run a FastCGI service, to which Nginx's FastCGI module will proxy all requests to PHP resources.
Once Nginx and PHP-FPM are installed, we need to ensure:
-- Nginx and PHP-FPM are running using the same user and group
-- both these user and group have
- - read permissions for Shaarli resources
- - execute permissions for Shaarli directories AND their parent directories
-
On a production server:
-- user:group will likely be http:http, www:www or www-data:www-data
-- files will be located under /var/www, /var/http or /usr/share/nginx
-
On a development server:
-- files may be located in a user's home directory
-- in this case, make sure both Nginx and PHP-FPM are running as the local user/group!
-
For all following configuration examples, this user/group pair will be used:
-- user:group = john:users,
-
which corresponds to the following service configuration:
-
; /etc/php/php-fpm.conf
-user = john
-group = users
-
-[...]
-listen.owner = john
-listen.group = users
-
Some bookmark dumps generated by web browsers can be huge due to the presence of Base64-encoded images and favicons, as well as extra verbosity when nesting links in (sub-)folders.
-
To increase upload size, you will need to modify both nginx and PHP configuration:
The previous setup is sufficient for development purposes, but has several major caveats:
-- every content that does not match the PHP rule will be sent to client browsers:
- - dotfiles - in our case, .htaccess
- - temporary files, e.g. Vim or Emacs files: index.php~
-- asset / static resource caching is not optimized
-- if serving several PHP sites, there will be a lot of duplication: location /shaarli/, location /mysite/, etc.
-
To solve this, we will split Nginx configuration in several parts, that will be included when needed:
# /etc/nginx/nginx.conf
-[...]
-
-http {
- [...]
-
- root /home/john/web;
- access_log /var/log/nginx/access.log;
- error_log /var/log/nginx/error.log;
-
- server {
- # virtual host for a first domain
- listen 80;
- server_name my.first.domain.org;
-
- location /shaarli/ {
- # Slim - rewrite URLs
- try_files $uri /shaarli/index.php$is_args$args;
-
- access_log /var/log/nginx/shaarli.access.log;
- error_log /var/log/nginx/shaarli.error.log;
- }
-
- location = /shaarli/favicon.ico {
- # serve the Shaarli favicon from its custom location
- alias /var/www/shaarli/images/favicon.ico;
- }
-
- include deny.conf;
- include static_assets.conf;
- include php.conf;
- }
-
- server {
- # virtual host for a second domain
- listen 80;
- server_name second.domain.com;
-
- location /minigal/ {
- access_log /var/log/nginx/minigal.access.log;
- error_log /var/log/nginx/minigal.error.log;
- }
-
- include deny.conf;
- include static_assets.conf;
- include php.conf;
- }
-}
-
-
-
Redirect HTTP to HTTPS
-
Assuming 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.
PHP settings are defined in:
-- a main configuration file, usually found under /etc/php5/php.ini; some distributions provide different configuration environments, e.g.
- - /etc/php5/php.ini - used when running console scripts
- - /etc/php5/apache2/php.ini - used when a client requests PHP resources from Apache
- - /etc/php5/php-fpm.conf - used when PHP requests are proxied to PHP-FPM
-- additional configuration files/entries, depending on the installed/enabled extensions:
- - /etc/php/conf.d/xdebug.ini
create a phpinfo.php script located in a path supported by the web server, e.g.
-
Apache (with user dirs enabled): /home/myself/public_html/phpinfo.php
-
/var/www/test/phpinfo.php
-
-
-
make sure the script is readable by the web server user/group (usually, www, www-data or httpd)
-
access the script from a web browser
-
look at the Loaded Configuration File and Scan this dir for additional .ini files entries
-
-
<?php phpinfo(); ?>
-
-
-
fail2ban
-
fail2ban is an intrusion prevention framework that reads server (Apache, SSH, etc.) and uses iptables profiles to block brute-force attempts:
-- Official website
-- Source code
-
Read Shaarli logs to ban IPs
-
Example configuration:
-- allow 3 login attempts per IP address
-- after 3 failures, permanently ban the corresponding IP adddress
Robots - Restricting search engines and web crawler traffic
-
Creating a robots.txt with the following contents at the root of your Shaarli installation will prevent honest 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.
Do not edit configuration options in index.php! Your changes would be lost.
-
Once your Shaarli instance is installed, the file data/config.json.php is generated:
- it contains all settings in JSON format, and can be edited to customize values
- it defines which plugins are enabled
- its values override those defined in index.php
- it is wrap in a PHP comment to prevent anyone accessing it, regardless of server configuration
title: Shaarli's instance title.
-header_link: Link to the homepage.
-links_per_page: Number of shaares displayed per page.
-timezone: See the list of supported timezones.
-enabled_plugins: List of enabled plugins.
-
Security
-
session_protection_disabled: Disable session cookie hijacking protection (not recommended).
-It might be useful if your IP adress often changes.
-ban_after: Failed login attempts before being IP banned.
-ban_duration: IP ban duration in seconds.
-open_shaarli: Anyone can add a new link while logged out if enabled.
-trusted_proxies: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy.
-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"]).
-
Resources
-
data_dir: Data directory.
-datastore: Shaarli's links database file path.
-history: Shaarli's operation history file path.
-updates: File path for the ran updates file.
-log: Log file path.
-update_check: Last update check file path.
-raintpl_tpl: Templates directory.
-raintpl_tmp: Template engine cache directory.
-thumbnails_cache: Thumbnails cache directory.
-page_cache: Shaarli's internal cache directory.
-ban_file: Banned IP file path.
-
Updates
-
check_updates: Enable or disable update check to the git repository.
-check_updates_branch: Git branch used to check updates (e.g. stable or master).
-check_updates_interval: Look for new version every N seconds (default: every day).
-
Privacy
-
default_private_links: Check the private checkbox by default for every new link.
-hide_public_links: All links are hidden while logged out.
-hide_timestamps: Timestamps are hidden.
-
Feed
-
rss_permalinks: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL.
-show_atom: Display ATOM feed button.
-
Thumbnail
-
enable_thumbnails: Enable or disable thumbnail display.
-enable_localcache: Enable or disable local cache.
-
Redirector
-
url: Redirector URL, such as anonym.to.
-encode_url: Enable this if the redirector needs encoded URL to work properly.
WARNING - This feature is currently being worked on and will be improved in the next releases. Experimental.
-
Installation:
-- find a theme you'd like to install
-- copy or clone the theme folder under tpl/<a_sweet_theme>
-- enable the theme:
- - Shaarli < v0.9.0: edit data/config.json.php and set the value of raintpl_tpl to the new theme name:
- "raintpl_tpl": "tpl\/my-template\/"
- - Shaarli >= v0.9.0: select the theme through the Tools page
With the following configuration:
-- Apache 2 / PHP 5.6
-- user sites are enabled, e.g. /home/user/public_html/somedir is served as http://localhost/~user/somedir
-- http is the name of the Apache user
Depending on its configuration and installed plugins, the browser may remove or alter (spoof) HTTP referers, thus preventing Shaarli from properly redirecting between pages.
HTTP settings are available by browsing about:config, here are the available settings and their values.
-
network.http.sendRefererHeader - determines when to send the Referer HTTP header
-- 0: Never send the referring URL
- - not recommended, may break some sites
-- 1: Send only on clicked links
-- 2 (default): Send for links and images
-
network.http.referer.XOriginPolicy - Cross-domain origin policy
-- 0 (default): Always send
-- 1: Send if base domains match
-- 2: Send if hosts match
-
network.http.referer.spoofSource - Referer spoofing (~faking)
-- false (default): real referer
-- true: spoof referer (use target URI as referer)
- - known to break some functionality in Shaarli
-
network.http.referer.trimmingPolicy - trim the URI not to send a full Referer
-- 0 (default): send full URI
-- 1: scheme+host+port+path
-- 2: scheme+host+port
-
Firefox, localhost and redirections
-
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.
-
To solve this, assign a local domain to your host, e.g.
Delete the file data/config.php and display the page again. You will be asked for a new login/password.
-
I'm locked out - Login bruteforce protection
-
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.
-
To remove the current IP bans, delete the file data/ipbans.php
-
List of all login attempts
-
The file data/log.txt shows all logins (successful or failed) and bans/lifted bans.
-Search for failed in this file to look for unauthorized login attempts.
-
Hosting problems
-
Old PHP versions
-
-
On free.fr : free.fr now support php 5.6.x(link)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:
-
-
<IfDefine Free>
-php56 1
-</IfDefine>
-
-
-
-
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
-
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).
-
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:
-
-
//list($status,$headers,$data) = getHTTP($url,4); // Short timeout to keep the application responsive.
-// FIXME: Decode charset according to charset specified in either 1) HTTP response headers or 2) <head> in html
-//if (strpos($status,'200 OK')) $title=html_extract_title($data);
-
-
-
-
On hosts which forbid outgoing HTTP requests (such as free.fr), some thumbnails will not work.
-
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
-
-
Dates are not properly formatted
-
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 :-( )
-
Problems on CentOS servers
-
On CentOS/RedHat derivatives, you may need to install the php-mbstring package.
-
My session expires! I can't stay logged in
-
This can be caused by several things:
-
-
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.
-
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 !)
-
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).
-
Some browser addons may interfer with HTTP headers (ipfuck/ipflood/GreaseMonkey…). Try disabling those.
-
You may be using OperaTurbo or OperaMini, which use their own proxies which may change from time to time.
-
If you have another application on the same webserver where Shaarli is installed, these application may forcefully expire php sessions.
-
-
Sessions do not seem to work correctly on your server
-
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 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).
-
pubsubhubbub support
-
Download publisher.php at the root of your Shaarli installation and set $GLOBALS['config']['PUBSUBHUB_URL'] in your config.php
The framework used is PHPUnit; it can be installed with Composer, which is a dependency management tool.
-
Regarding Composer, you can either use:
- a system-wide version, e.g. installed through your distro's package manager
- a local version, downloadable here
-
Sample usage
-
# system-wide version
-$ composer install
-$ composer update
-
-# local version
-$ php composer.phar self-update
-$ php composer.phar install
-$ php composer.phar update
-
-
-
Install Shaarli dev dependencies
-
$ cd /path/to/shaarli
-$ composer update
-
-
-
Install and enable Xdebug to generate PHPUnit coverage reports
-
For Debian-based distros:
-
$ aptitude install php5-xdebug
-
-
-
For ArchLinux:
-
$ pacman -S xdebug
-
-
-
Then add the following line to /etc/php/php.ini:
-
zend_extension=xdebug.so
-
-
-
Run unit tests
-
Successful test suite:
-
$ make test
-
--------
-PHPUNIT
--------
-PHPUnit 4.6.9 by Sebastian Bergmann and contributors.
-
-Configuration read from /home/virtualtam/public_html/shaarli/phpunit.xml
-
-....................................
-
-Time: 759 ms, Memory: 8.25Mb
-
-OK (36 tests, 65 assertions)
-
-
-
Test suite with failures and errors:
-
$ make test
--------
-PHPUNIT
--------
-PHPUnit 4.6.9 by Sebastian Bergmann and contributors.
-
-Configuration read from /home/virtualtam/public_html/shaarli/phpunit.xml
-
-E..FF...............................
-
-Time: 802 ms, Memory: 8.25Mb
-
-There was 1 error:
-
-1) LinkDBTest::testConstructLoggedIn
-Missing argument 2 for LinkDB::__construct(), called in /home/virtualtam/public_html/shaarli/tests/Link\
-DBTest.php on line 79 and defined
-
-/home/virtualtam/public_html/shaarli/application/LinkDB.php:58
-/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:79
-
---
-
-There were 2 failures:
-
-1) LinkDBTest::testCheckDBNew
-Failed asserting that two strings are equal.
---- Expected
-+++ Actual
-@@ @@
--'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'
-+'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'
-
-/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:121
-
-2) LinkDBTest::testCheckDBLoad
-Failed asserting that two strings are equal.
---- Expected
-+++ Actual
-@@ @@
--'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'
-+'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'
-
-/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:133
-
-FAILURES!
-Tests: 36, Assertions: 63, Errors: 1, Failures: 2.
-
-
-
Test results and coverage
-
By default, PHPUnit will run all suitable tests found under the tests directory.
-
Each test has 3 possible outcomes:
-. - success
-F - failure: the test was run but its results are invalid
- * the code does not behave as expected
- * dependencies to external elements: globals, session, cache...
-* E - error: something went wrong and the tested code has crashed
- * typos in the code, or in the test code
- * dependencies to missing external elements
-
If Xdebug has been installed and activated, two coverage reports will be generated:
- a summary in the console
- a detailed HTML report with metrics for tested code
- * to open it in a web browser: firefox coverage/index.html &
-
Executing specific tests
-
Add a @group annotation in a test class or method comment:
If anything goes wrong, it's important for us to know which version you're upgrading from.
-The current version is present in the version.php file.
-
Backup your data
-
Shaarli stores all user data under the data directory:
-- data/config.php - main configuration file
-- data/datastore.php - bookmarked links
-- data/ipbans.php - banned IP addresses
-- data/updates.txt - contains all automatic update to the configuration and datastore files already run
It is recommended to backup this repository before starting updating/upgrading Shaarli:
-- users with SSH access: copy or archive the directory to a temporary location
-- users with FTP access: download a local copy of your Shaarli installation using your favourite client
-
Migrating data from a previous installation
-
As 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:
All tagged revisions can be downloaded as tarballs or ZIP archives from the releases page.
-
We recommend that you use the latest release tarball with the -full suffix. It contains the dependencies, please read Download and installation for git complete instructions.
-
Once downloaded, extract the archive locally and update your remote installation (e.g. via FTP) -be sure you keep the content of the data directory!
-
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 data/config.json.php (see Shaarli configuration for more details).
The following guide assumes that:
-- you have a basic knowledge of Git branching and remote repositories
-- the default remote is named origin and points to Sebsauvage's repository
-- the current branch is master
- - if you have personal branches containing customizations, you will need to rebase them 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!
-- the working copy is clean:
- - no versioned file has been locally modified
- - no untracked files are present
-
Step 0: show repository information
-
$ cd /path/to/shaarli
-
-$ git remote -v
-origin https://github.com/sebsauvage/Shaarli (fetch)
-origin https://github.com/sebsauvage/Shaarli (push)
-
-$ git branch -vv
-* master 029f75f [origin/master] Update README.md
-
-$ git status
-On branch master
-Your branch is up-to-date with 'origin/master'.
-nothing to commit, working directory clean
-
After 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 for more details).
-
Troubleshooting
-
If the solutions provided here doesn't work, please open an issue specifying which version you're upgrading from and to.
-
You must specify an integer as a key
-
In v0.8.1 we changed how link keys are handled (from timestamps to incremental integers).
-Take a look at data/updates.txt content.
-
updates.txt contains updateMethodDatastoreIds
-
Try to delete it and refresh your page while being logged in.
-
updates.txt doesn't exists or doesn't contain updateMethodDatastoreIds
-
-
Create data/updates.txt if it doesn't exist.
-
Paste this string in the update file ;updateMethodRenameDashTags;
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.
-
master branch
-
The master branch is the development branch. Any new change MUST go through this branch using Pull Requests.
-
Remarks:
-
-
This branch shouldn't be used for production as it isn't necessary stable.
-
3rd party aren't required to be compatible with the latest changes.
-
Official plugins, themes and libraries (contained within Shaarli organization repos) must be compatible with the master branch.
-
The version in this branch is always dev.
-
-
v0.x branch
-
This v0.x branch, points to the latest v0.x.y release.
-
Explanation:
-
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.
-
In this case, the issue is fixed in the master branch, and the fix is backported the to the v0.x branch. Then a new release is made from the v0.x branch.
-
This workflow allow us to fix any major bug detected, without having to release bleeding edge feature too soon.
-
latest branch
-
This branch point the latest release. It recommended to use it to get the latest tested changes.
-
stable branch
-
The stable branch doesn't contain any major bug, and is one major digit version behind the latest release.
-
For example, the current latest release is v0.8.3, the stable branch is an alias to the latest v0.7.x release. When the v0.9.0 version will be released, the stable will move to the latest v0.8.x release.
-
Remarks:
-
-
Shaarli release pace isn't fast, and the stable branch might be a few months behind the latest release.
-
-
Releases
-
Releases are always made from the latest v0.x branch.
-
Note that for every release, we manually generate a tarball which contains all Shaarli dependencies, making Shaarli's installation only one step.
-
Advices on 3rd party git repos workflow
-
Versioning
-
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 changelog (Draft means not released yet) and the commit log (like tpl folder for themes)). You can either:
-
-
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.
-
use your own versioning scheme, and state Shaarli compatibility in the release description.
-
-
Using this, any user will be able to pick the release matching his own Shaarli version.
-
Major bugfix backport releases
-
To be able to support backported fixes, it recommended to use our workflow:
-
# In master, fix the major bug
-git commit -m "Katastrophe"
-git push origin master
-# Get your commit hash
-git log --format="%H" -n 1
-# Create a new branch from your latest release, let's say v0.8.2-1 (the tag name)
-git checkout -b katastrophe v0.8.2-1
-# Backport the fix commit to your brand new branch
-git cherry-pick <fix commit hash>
-git push origin katastrophe
-# Then you just have to make a new release from the `katastrophe` branch tagged `v0.8.3-1`
-
$ docker search debian
-
-NAME DESCRIPTION STARS OFFICIAL AUTOMATED
-ubuntu Ubuntu is a Debian-based Linux operating s... 2065 [OK]
-debian Debian is a Linux distribution that's comp... 603 [OK]
-google/debian 47 [OK]
-
-
-
Show available tags for a repository
-
$ curl https://index.docker.io/v1/repositories/debian/tags | python -m json.tool
-
-% Total % Received % Xferd Average Speed Time Time Time Current
-Dload Upload Total Spent Left Speed
-100 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433
-
# map the host's :8000 port to the container's :80 port
-$ docker create -p 8000:80 shaarli/shaarli
-d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
-
-# launch the container in the background
-$ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
-d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
-
-# list active containers
-$ docker ps
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo
-
-
-
Stop and destroy a container
-
$ docker stop backstabbing_galileo # those docker guys are really rude to physicists!
-backstabbing_galileo
-
-# check the container is stopped
-$ docker ps
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-
-# list ALL containers
-$ docker ps -a
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo
-
-# destroy the container
-$ docker rm backstabbing_galileo # let's put an end to these barbarian practices
-backstabbing_galileo
-
-$ docker ps -a
-CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
-
If you have any questions or ideas, please join the chat (also reachable via IRC), post them in our general discussion or read the current issues.
-If you've found a bug, please create a new issue.
-
If you would like a feature added to Shaarli, check the issues labeled feature, enhancement, and plugin.
-
Note: This documentation is available online at https://shaarli.readthedocs.io/, and locally in the doc/html/ directory of your Shaarli installation.
-
-
-
-
Demo
-
You can use this public demo instance of Shaarli.
-It runs the latest development version of Shaarli and is updated/reset daily.
Though Shaarli is primarily a bookmarking application, it can serve other purposes
-(see usage examples):
-- micro-blogging
-- pastebin
-- online notepad
-- snippet archive
-
About
-
Shaarli community fork
-
This friendly fork is maintained by the Shaarli community at https://github.com/shaarli/Shaarli
The original project is currently unmaintained, and the developer has informed us
-that he would have no time to work on Shaarli in the near future.
-The Shaarli community has carried on the work to provide
-many patches
-for bug fixes and enhancements
-in this repository, and will keep maintaining the project for the foreseeable future, while keeping Shaarli simple and efficient.
-
Contributing
-
If you'd like to help, please:
-- have a look at the open issues
-and pull requests
-- feel free to report bugs (feedback is much appreciated)
-- suggest new features and improvements to both code and documentation
-- propose solutions to existing problems
-- submit pull requests :-)
-
License
-
Shaarli is Free Software. See COPYING for a detail of the contributors and licenses for each individual component.
\n\n\n\n\nfeed.atom.xml\n and \nfeed.rss.xml\n:\n\n\nIn headers tags section:\n\n\n{loop=\"$feed_plugins_header\"}\n {$value}\n{/loop}\n\n\n\n\nAfter each entry:\n\n\n{loop=\"$value.feed_plugins\"}\n {$value}\n{/loop}",
- "title": "Plugin System"
- },
- {
- "location": "/Plugin-System/#developer-api",
- "text": "",
- "title": "Developer API"
- },
- {
- "location": "/Plugin-System/#what-can-i-do-with-plugins",
- "text": "The plugin system let you: insert content into specific places across templates. alter data before templates rendering. alter data before saving new links.",
- "title": "What can I do with plugins?"
- },
- {
- "location": "/Plugin-System/#how-can-i-create-a-plugin-for-shaarli",
- "text": "First, chose a plugin name, such as demo_plugin . Under plugin folder, create a folder named with your plugin name. Then create a .php file in that folder. You should have the following tree view: | index.php\n| plugins/\n|---| demo_plugin/\n| |---| demo_plugin.php",
- "title": "How can I create a plugin for Shaarli?"
- },
- {
- "location": "/Plugin-System/#plugin-initialization",
- "text": "At the beginning of Shaarli execution, all enabled plugins are loaded. At this point, the plugin system looks for an init() function to execute and run it if it exists. This function must be named this way, and takes the ConfigManager as parameter. _init($conf) This function can be used to create initial data, load default settings, etc. But also to set plugin errors . If the initialization function returns an array of strings, they will be understand as errors, and displayed in the header to logged in users.",
- "title": "Plugin initialization"
- },
- {
- "location": "/Plugin-System/#understanding-hooks",
- "text": "A plugin is a set of functions. Each function will be triggered by the plugin system at certain point in Shaarli execution. These functions need to be named with this pattern: hook__($data, $conf) Parameters: data: see $data section conf: the ConfigManager instance. For exemple, if my plugin want to add data to the header, this function is needed: hook_demo_plugin_render_header If this function is declared, and the plugin enabled, it will be called every time Shaarli is rendering the header.",
- "title": "Understanding hooks"
- },
- {
- "location": "/Plugin-System/#plugins-data",
- "text": "",
- "title": "Plugin's data"
- },
- {
- "location": "/Plugin-System/#parameters",
- "text": "Every hook function has a $data parameter. Its content differs for each hooks. This parameter needs to be returned every time , otherwise data is lost. return $data;",
- "title": "Parameters"
- },
- {
- "location": "/Plugin-System/#filling-templates-placeholder",
- "text": "Template placeholders are displayed in template in specific places. RainTPL displays every element contained in the placeholder's array. These element can be added by plugins. For example, let's add a value in the placeholder top_placeholder which is displayed at the top of my page: $data['top_placeholder'][] = 'My content';\n# OR\narray_push($data['top_placeholder'], 'My', 'content');\n\nreturn $data;",
- "title": "Filling templates placeholder"
- },
- {
- "location": "/Plugin-System/#data-manipulation",
- "text": "When a page is displayed, every variable send to the template engine is passed to plugins before that in $data . The data contained by this array can be altered before template rendering. For exemple, in linklist, it is possible to alter every title: // mind the reference if you want $data to be altered\nforeach ($data['links'] as &$value) {\n // String reverse every title.\n $value['title'] = strrev($value['title']);\n}\n\nreturn $data;",
- "title": "Data manipulation"
- },
- {
- "location": "/Plugin-System/#metadata",
- "text": "Every plugin needs a .meta file, which is in fact an .ini file ( KEY=\"VALUE\" ), to be listed in plugin administration. Each file contain two keys: description : plugin description parameters : user parameter names, separated by a ; . parameter. : add a text description the specified parameter. Note: In PHP, parse_ini_file() seems to want strings to be between by quotes \" in the ini file.",
- "title": "Metadata"
- },
- {
- "location": "/Plugin-System/#its-not-working",
- "text": "Use demo_plugin as a functional example. It covers most of the plugin system features. If it's still not working, please open an issue .",
- "title": "It's not working!"
- },
- {
- "location": "/Plugin-System/#hooks",
- "text": "Hooks Description render_header Allow plugin to add content in page headers. render_includes Allow plugin to include their own CSS files. render_footer Allow plugin to add content in page footer and include their own JS files. render_linklist It allows to add content at the begining and end of the page, after every link displayed and to alter link data. render_editlink Allow to add fields in the form, or display elements. render_tools Allow to add content at the end of the page. render_picwall Allow to add content at the top and bottom of the page. render_tagcloud Allow to add content at the top and bottom of the page, and after all tags. render_taglist Allow to add content at the top and bottom of the page, and after all tags. render_daily Allow to add content at the top and bottom of the page, the bottom of each link and to alter data. render_feed Allow to do add tags in RSS and ATOM feeds. save_link Allow to alter the link being saved in the datastore. delete_link Allow to do an action before a link is deleted from the datastore.",
- "title": "Hooks"
- },
- {
- "location": "/Plugin-System/#render_header",
- "text": "Triggered on every page. Allow plugin to add content in page headers.",
- "title": "render_header"
- },
- {
- "location": "/Plugin-System/#data",
- "text": "$data is an array containing: _PAGE_ : current target page (eg: linklist , picwall , etc.). _LOGGEDIN_ : true if user is logged in, false otherwise.",
- "title": "Data"
- },
- {
- "location": "/Plugin-System/#template-placeholders",
- "text": "Items can be displayed in templates by adding an entry in $data[''] array. List of placeholders: buttons_toolbar : after the list of buttons in the header. fields_toolbar : after search fields in the header. Note: This will only be called in linklist.",
- "title": "Template placeholders"
- },
- {
- "location": "/Plugin-System/#render_includes",
- "text": "Triggered on every page. Allow plugin to include their own CSS files.",
- "title": "render_includes"
- },
- {
- "location": "/Plugin-System/#data_1",
- "text": "$data is an array containing: _PAGE_ : current target page (eg: linklist , picwall , etc.). _LOGGEDIN_ : true if user is logged in, false otherwise.",
- "title": "Data"
- },
- {
- "location": "/Plugin-System/#template-placeholders_1",
- "text": "Items can be displayed in templates by adding an entry in $data[''] array. List of placeholders: css_files : called after loading default CSS. Note: only add the path of the CSS file. E.g: plugins/demo_plugin/custom_demo.css .",
- "title": "Template placeholders"
- },
- {
- "location": "/Plugin-System/#render_footer",
- "text": "Triggered on every page. Allow plugin to add content in page footer and include their own JS files.",
- "title": "render_footer"
- },
- {
- "location": "/Plugin-System/#data_2",
- "text": "$data is an array containing: _PAGE_ : current target page (eg: linklist , picwall , etc.). _LOGGEDIN_ : true if user is logged in, false otherwise.",
- "title": "Data"
- },
- {
- "location": "/Plugin-System/#template-placeholders_2",
- "text": "Items can be displayed in templates by adding an entry in $data[''] array. List of placeholders: text : called after the end of the footer text. endofpage : called at the end of the page. js_files : called at the end of the page, to include custom JS scripts. Note: only add the path of the JS file. E.g: plugins/demo_plugin/custom_demo.js .",
- "title": "Template placeholders"
- },
- {
- "location": "/Plugin-System/#render_linklist",
- "text": "Triggered when linklist is displayed (list of links, permalink, search, tag filtered, etc.). It allows to add content at the begining and end of the page, after every link displayed and to alter link data.",
- "title": "render_linklist"
- },
- {
- "location": "/Plugin-System/#data_3",
- "text": "$data is an array containing: _LOGGEDIN_ : true if user is logged in, false otherwise. All templates data, including links.",
- "title": "Data"
- },
- {
- "location": "/Plugin-System/#template-placeholders_3",
- "text": "Items can be displayed in templates by adding an entry in $data[''] array. List of placeholders: action_plugin : next to the button \"private only\" at the top and bottom of the page. link_plugin : for every link, between permalink and link URL. plugin_start_zone : before displaying the template content. plugin_end_zone : after displaying the template content.",
- "title": "Template placeholders"
- },
- {
- "location": "/Plugin-System/#render_editlink",
- "text": "Triggered when the link edition form is displayed. Allow to add fields in the form, or display elements.",
- "title": "render_editlink"
- },
- {
- "location": "/Plugin-System/#data_4",
- "text": "$data is an array containing: All templates data.",
- "title": "Data"
- },
- {
- "location": "/Plugin-System/#template-placeholders_4",
- "text": "Items can be displayed in templates by adding an entry in $data[''] array. List of placeholders: edit_link_plugin : after tags field.",
- "title": "Template placeholders"
- },
- {
- "location": "/Plugin-System/#render_tools",
- "text": "Triggered when the \"tools\" page is displayed. Allow to add content at the end of the page.",
- "title": "render_tools"
- },
- {
- "location": "/Plugin-System/#data_5",
- "text": "$data is an array containing: All templates data.",
- "title": "Data"
- },
- {
- "location": "/Plugin-System/#template-placeholders_5",
- "text": "Items can be displayed in templates by adding an entry in $data[''] array. List of placeholders: tools_plugin : at the end of the page.",
- "title": "Template placeholders"
- },
- {
- "location": "/Plugin-System/#render_picwall",
- "text": "Triggered when picwall is displayed. Allow to add content at the top and bottom of the page.",
- "title": "render_picwall"
- },
- {
- "location": "/Plugin-System/#data_6",
- "text": "$data is an array containing: _LOGGEDIN_ : true if user is logged in, false otherwise. All templates data.",
- "title": "Data"
- },
- {
- "location": "/Plugin-System/#template-placeholders_6",
- "text": "Items can be displayed in templates by adding an entry in $data[''] array. List of placeholders: plugin_start_zone : before displaying the template content. plugin_end_zone : after displaying the template content.",
- "title": "Template placeholders"
- },
- {
- "location": "/Plugin-System/#render_tagcloud",
- "text": "Triggered when tagcloud is displayed. Allow to add content at the top and bottom of the page.",
- "title": "render_tagcloud"
- },
- {
- "location": "/Plugin-System/#data_7",
- "text": "$data is an array containing: _LOGGEDIN_ : true if user is logged in, false otherwise. All templates data.",
- "title": "Data"
- },
- {
- "location": "/Plugin-System/#template-placeholders_7",
- "text": "Items can be displayed in templates by adding an entry in $data[''] array. List of placeholders: plugin_start_zone : before displaying the template content. plugin_end_zone : after displaying the template content. For each tag, the following placeholder can be used: tag_plugin : after each tag",
- "title": "Template placeholders"
- },
- {
- "location": "/Plugin-System/#render_taglist",
- "text": "Triggered when taglist is displayed. Allow to add content at the top and bottom of the page.",
- "title": "render_taglist"
- },
- {
- "location": "/Plugin-System/#data_8",
- "text": "$data is an array containing: _LOGGEDIN_ : true if user is logged in, false otherwise. All templates data.",
- "title": "Data"
- },
- {
- "location": "/Plugin-System/#template-placeholders_8",
- "text": "Items can be displayed in templates by adding an entry in $data[''] array. List of placeholders: plugin_start_zone : before displaying the template content. plugin_end_zone : after displaying the template content. For each tag, the following placeholder can be used: tag_plugin : after each tag",
- "title": "Template placeholders"
- },
- {
- "location": "/Plugin-System/#render_daily",
- "text": "Triggered when tagcloud is displayed. Allow to add content at the top and bottom of the page, the bottom of each link and to alter data.",
- "title": "render_daily"
- },
- {
- "location": "/Plugin-System/#data_9",
- "text": "$data is an array containing: _LOGGEDIN_ : true if user is logged in, false otherwise. All templates data, including links.",
- "title": "Data"
- },
- {
- "location": "/Plugin-System/#template-placeholders_9",
- "text": "Items can be displayed in templates by adding an entry in $data[''] array. List of placeholders: link_plugin : used at bottom of each link. plugin_start_zone : before displaying the template content. plugin_end_zone : after displaying the template content.",
- "title": "Template placeholders"
- },
- {
- "location": "/Plugin-System/#render_feed",
- "text": "Triggered when the ATOM or RSS feed is displayed. Allow to add tags in the feed, either in the header or for each items. Items (links) can also be altered before being rendered.",
- "title": "render_feed"
- },
- {
- "location": "/Plugin-System/#data_10",
- "text": "$data is an array containing: _LOGGEDIN_ : true if user is logged in, false otherwise. _PAGE_ : containing either rss or atom . All templates data, including links.",
- "title": "Data"
- },
- {
- "location": "/Plugin-System/#template-placeholders_10",
- "text": "Tags can be added in feeds by adding an entry in $data[''] array. List of placeholders: feed_plugins_header : used as a header tag in the feed. For each links: feed_plugins : additional tag for every link entry.",
- "title": "Template placeholders"
- },
- {
- "location": "/Plugin-System/#save_link",
- "text": "Triggered when a link is save (new link or edit). Allow to alter the link being saved in the datastore.",
- "title": "save_link"
- },
- {
- "location": "/Plugin-System/#data_11",
- "text": "$data is an array containing the link being saved: id title url shorturl description private tags created updated",
- "title": "Data"
- },
- {
- "location": "/Plugin-System/#delete_link",
- "text": "Triggered when a link is deleted. Allow to execute any action before the link is actually removed from the datastore",
- "title": "delete_link"
- },
- {
- "location": "/Plugin-System/#data_12",
- "text": "$data is an array containing the link being saved: id title url shorturl description private tags created updated",
- "title": "Data"
- },
- {
- "location": "/Plugin-System/#guide-for-template-designer",
- "text": "",
- "title": "Guide for template designer"
- },
- {
- "location": "/Plugin-System/#plugin-administration",
- "text": "Your theme must include a plugin administration page: pluginsadmin.html . Note: repo's template link needs to be added when the PR is merged. Use the default one as an example. Aside from classic RainTPL loops, plugins order is handle by JavaScript. You can just include plugin_admin.js , only if: you're using a table. you call orderUp() and orderUp() onclick on arrows. you add data-line and data-order to your rows. Otherwise, you can use your own JS as long as this field is send by the form:",
- "title": "Plugin administration"
- },
- {
- "location": "/Plugin-System/#placeholder-system",
- "text": "In order to make plugins work with every custom themes, you need to add variable placeholder in your templates. It's a RainTPL loop like this: {loop=\"$plugin_variable\"}\n {$value}\n{/loop} You should enable demo_plugin for testing purpose, since it uses every placeholder available.",
- "title": "Placeholder system"
- },
- {
- "location": "/Plugin-System/#list-of-placeholders",
- "text": "page.header.html At the end of the menu: {loop=\"$plugins_header.buttons_toolbar\"}\n {$value}\n{/loop} At the end of file, before clearing floating blocks: {if=\"!empty($plugin_errors) && isLoggedIn()\"}\n
\n {loop=\"plugin_errors\"}\n
{$value}
\n {/loop}\n
\n{/if} includes.html At the end of the file: {loop=\"$plugins_includes.css_files\"}\n\n{/loop} page.footer.html At the end of your footer notes: {loop=\"$plugins_footer.text\"}\n {$value}\n{/loop} At the end of file: {loop=\"$plugins_footer.js_files\"}\n \n{/loop} linklist.html After search fields: {loop=\"$plugins_header.fields_toolbar\"}\n {$value}\n{/loop} Before displaying the link list (after paging): {loop=\"$plugin_start_zone\"}\n {$value}\n{/loop} For every links (icons): {loop=\"$value.link_plugin\"}\n {$value}\n{/loop} Before end paging: {loop=\"$plugin_end_zone\"}\n {$value}\n{/loop} linklist.paging.html After the \"private only\" icon: {loop=\"$action_plugin\"}\n {$value}\n{/loop} editlink.html After tags field: {loop=\"$edit_link_plugin\"}\n {$value}\n{/loop} tools.html After the last tool: {loop=\"$tools_plugin\"}\n {$value}\n{/loop} picwall.html Top:
feed.atom.xml and feed.rss.xml : In headers tags section: {loop=\"$feed_plugins_header\"}\n {$value}\n{/loop} After each entry: {loop=\"$value.feed_plugins\"}\n {$value}\n{/loop}",
- "title": "List of placeholders"
- },
- {
- "location": "/Release-Shaarli/",
- "text": "See \nGit - Maintaining a project - Tagging your \nreleases\n.\n\n\nPrerequisites\n\n\nThis guide assumes that you have:\n- a GPG key matching your GitHub authentication credentials\n - i.e., the email address identified by the GPG key is the same as the one in your \n~/.gitconfig\n \n- a GitHub fork of Shaarli\n- a local clone of your Shaarli fork, with the following remotes:\n - \norigin\n pointing to your GitHub fork\n - \nupstream\n pointing to the main Shaarli repository\n- maintainer permissions on the main Shaarli repository, to:\n - push the signed tag\n - create a new release\n- \nComposer\n needs to be installed\n- The \nvenv\n Python 3 module needs to be installed for HTML documentation generation.\n\n\nGitHub release draft and \nCHANGELOG.md\n\n\nSee http://keepachangelog.com/en/0.3.0/ for changelog formatting.\n\n\nGitHub release draft\n\n\nGitHub allows drafting the release note for the upcoming release, from the \nReleases\n page. This way, the release note can be drafted while contributions are merged to \nmaster\n.\n\n\nCHANGELOG.md\n\n\nThis file should contain the same information as the release note draft for the upcoming version.\n\n\nUpdate it to:\n- add new entries (additions, fixes, etc.)\n- mark the current version as released by setting its date and link\n- add a new section for the future unreleased version\n\n\n$ cd /path/to/shaarli\n\n$ nano CHANGELOG.md\n\n[...]\n## vA.B.C - UNRELEASED\nTBA\n\n## [vX.Y.Z](https://github.com/shaarli/Shaarli/releases/tag/vX.Y.Z) - YYYY-MM-DD\n[...]\n\n\n\n\nIncrement the version code, updated docs, create and push a signed tag\n\n\nGenerate documentation\n\n\n$ cd /path/to/shaarli\n\n# create a new branch\n$ git fetch upstream\n$ git checkout upstream/master -b v0.5.0\n\n# rebuild the HTML documentation from Markdown\n$ make htmlpages\n\n# commit the changes\n$ git add doc\n$ git commit -s -m \"Generate documentation for v0.5.0\"\n\n# push the commit on your GitHub fork\n$ git push origin v0.5.0\n\n\n\n\nCreate and merge a Pull Request\n\n\nThis one is pretty straightforward ;-)\n\n\nBump Shaarli version to v0.x branch\n\n\n$ git checkout master\n$ git fetch upstream\n$ git pull upstream master\n\n# IF the branch doesn't exists\n$ git checkout -b v0.5\n# OR if the branch already exists\n$ git checkout v0.5\n$ git rebase upstream/master\n\n# Bump shaarli version from dev to 0.5.0, **without the `v`**\n$ vim shaarli_version.php\n$ git add shaarli_version\n$ git commit -s -m \"Bump Shaarli version to v0.5.0\"\n$ git push upstream v0.5\n\n\n\n\nCreate and push a signed tag\n\n\n# update your local copy\n$ git checkout v0.5\n$ git fetch upstream\n$ git pull upstream v0.5\n\n# create a signed tag\n$ git tag -s -m \"Release v0.5.0\" v0.5.0\n\n# push it to \"upstream\"\n$ git push --tags upstream\n\n\n\n\nVerify a signed tag\n\n\nv0.5.0\n is the first GPG-signed tag pushed on the Community Shaarli.\n\n\nLet's have a look at its signature!\n\n\n$ cd /path/to/shaarli\n$ git fetch upstream\n\n# get the SHA1 reference of the tag\n$ git show-ref tags/v0.5.0\nf7762cf803f03f5caf4b8078359a63783d0090c1 refs/tags/v0.5.0\n\n# verify the tag signature information\n$ git verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1\ngpg: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F\ngpg: Good signature from \"VirtualTam \" [ultimate]\n\n\n\n\nPublish the GitHub release\n\n\nUpdate release badges\n\n\nUpdate \nREADME.md\n so version badges display and point to the newly released Shaarli version(s), in the \nmaster\n branch.\n\n\nCreate a GitHub release from a Git tag\n\n\nFrom the previously drafted release:\n- edit the release notes (if needed)\n- specify the appropriate Git tag\n- publish the release\n- profit!\n\n\nGenerate and upload all-in-one release archives\n\n\nUsers with a shared hosting may have:\n- no SSH access\n- no possibility to install PHP packages or server extensions\n- no possibility to run scripts\n\n\nTo ease Shaarli installations, it is possible to generate and upload additional release archives,\nthat will contain Shaarli code plus all required third-party libraries.\n\n\nFrom the \nv0.5\n branch:\n\n\n$ make release_archive\n\n\n\n\nThis will create the following archives:\n- \nshaarli-vX.Y.Z-full.tar\n\n- \nshaarli-vX.Y.Z-full.zip\n\n\nThe archives need to be manually uploaded on the previously created GitHub release.\n\n\nUpdate \nstable\n and \nlatest\n branches\n\n\n$ git checkout latest\n# latest release\n$ git merge v0.5.0\n# fix eventual conflicts\n$ make test\n$ git push upstream latest\n$ git checkout stable\n# latest previous major\n$ git merge v0.4.5 \n# fix eventual conflicts\n$ make test\n$ git push upstream stable",
- "title": "Release Shaarli"
- },
- {
- "location": "/Release-Shaarli/#prerequisites",
- "text": "This guide assumes that you have:\n- a GPG key matching your GitHub authentication credentials\n - i.e., the email address identified by the GPG key is the same as the one in your ~/.gitconfig \n- a GitHub fork of Shaarli\n- a local clone of your Shaarli fork, with the following remotes:\n - origin pointing to your GitHub fork\n - upstream pointing to the main Shaarli repository\n- maintainer permissions on the main Shaarli repository, to:\n - push the signed tag\n - create a new release\n- Composer needs to be installed\n- The venv Python 3 module needs to be installed for HTML documentation generation.",
- "title": "Prerequisites"
- },
- {
- "location": "/Release-Shaarli/#github-release-draft-and-changelogmd",
- "text": "See http://keepachangelog.com/en/0.3.0/ for changelog formatting.",
- "title": "GitHub release draft and CHANGELOG.md"
- },
- {
- "location": "/Release-Shaarli/#github-release-draft",
- "text": "GitHub allows drafting the release note for the upcoming release, from the Releases page. This way, the release note can be drafted while contributions are merged to master .",
- "title": "GitHub release draft"
- },
- {
- "location": "/Release-Shaarli/#changelogmd",
- "text": "This file should contain the same information as the release note draft for the upcoming version. Update it to:\n- add new entries (additions, fixes, etc.)\n- mark the current version as released by setting its date and link\n- add a new section for the future unreleased version $ cd /path/to/shaarli\n\n$ nano CHANGELOG.md\n\n[...]\n## vA.B.C - UNRELEASED\nTBA\n\n## [vX.Y.Z](https://github.com/shaarli/Shaarli/releases/tag/vX.Y.Z) - YYYY-MM-DD\n[...]",
- "title": "CHANGELOG.md"
- },
- {
- "location": "/Release-Shaarli/#increment-the-version-code-updated-docs-create-and-push-a-signed-tag",
- "text": "",
- "title": "Increment the version code, updated docs, create and push a signed tag"
- },
- {
- "location": "/Release-Shaarli/#generate-documentation",
- "text": "$ cd /path/to/shaarli\n\n# create a new branch\n$ git fetch upstream\n$ git checkout upstream/master -b v0.5.0\n\n# rebuild the HTML documentation from Markdown\n$ make htmlpages\n\n# commit the changes\n$ git add doc\n$ git commit -s -m \"Generate documentation for v0.5.0\"\n\n# push the commit on your GitHub fork\n$ git push origin v0.5.0",
- "title": "Generate documentation"
- },
- {
- "location": "/Release-Shaarli/#create-and-merge-a-pull-request",
- "text": "This one is pretty straightforward ;-)",
- "title": "Create and merge a Pull Request"
- },
- {
- "location": "/Release-Shaarli/#bump-shaarli-version-to-v0x-branch",
- "text": "$ git checkout master\n$ git fetch upstream\n$ git pull upstream master\n\n# IF the branch doesn't exists\n$ git checkout -b v0.5\n# OR if the branch already exists\n$ git checkout v0.5\n$ git rebase upstream/master\n\n# Bump shaarli version from dev to 0.5.0, **without the `v`**\n$ vim shaarli_version.php\n$ git add shaarli_version\n$ git commit -s -m \"Bump Shaarli version to v0.5.0\"\n$ git push upstream v0.5",
- "title": "Bump Shaarli version to v0.x branch"
- },
- {
- "location": "/Release-Shaarli/#create-and-push-a-signed-tag",
- "text": "# update your local copy\n$ git checkout v0.5\n$ git fetch upstream\n$ git pull upstream v0.5\n\n# create a signed tag\n$ git tag -s -m \"Release v0.5.0\" v0.5.0\n\n# push it to \"upstream\"\n$ git push --tags upstream",
- "title": "Create and push a signed tag"
- },
- {
- "location": "/Release-Shaarli/#verify-a-signed-tag",
- "text": "v0.5.0 is the first GPG-signed tag pushed on the Community Shaarli. Let's have a look at its signature! $ cd /path/to/shaarli\n$ git fetch upstream\n\n# get the SHA1 reference of the tag\n$ git show-ref tags/v0.5.0\nf7762cf803f03f5caf4b8078359a63783d0090c1 refs/tags/v0.5.0\n\n# verify the tag signature information\n$ git verify-tag f7762cf803f03f5caf4b8078359a63783d0090c1\ngpg: Signature made Thu 30 Jul 2015 11:46:34 CEST using RSA key ID 4100DF6F\ngpg: Good signature from \"VirtualTam \" [ultimate]",
- "title": "Verify a signed tag"
- },
- {
- "location": "/Release-Shaarli/#publish-the-github-release",
- "text": "",
- "title": "Publish the GitHub release"
- },
- {
- "location": "/Release-Shaarli/#update-release-badges",
- "text": "Update README.md so version badges display and point to the newly released Shaarli version(s), in the master branch.",
- "title": "Update release badges"
- },
- {
- "location": "/Release-Shaarli/#create-a-github-release-from-a-git-tag",
- "text": "From the previously drafted release:\n- edit the release notes (if needed)\n- specify the appropriate Git tag\n- publish the release\n- profit!",
- "title": "Create a GitHub release from a Git tag"
- },
- {
- "location": "/Release-Shaarli/#generate-and-upload-all-in-one-release-archives",
- "text": "Users with a shared hosting may have:\n- no SSH access\n- no possibility to install PHP packages or server extensions\n- no possibility to run scripts To ease Shaarli installations, it is possible to generate and upload additional release archives,\nthat will contain Shaarli code plus all required third-party libraries. From the v0.5 branch: $ make release_archive This will create the following archives:\n- shaarli-vX.Y.Z-full.tar \n- shaarli-vX.Y.Z-full.zip The archives need to be manually uploaded on the previously created GitHub release.",
- "title": "Generate and upload all-in-one release archives"
- },
- {
- "location": "/Release-Shaarli/#update-stable-and-latest-branches",
- "text": "$ git checkout latest\n# latest release\n$ git merge v0.5.0\n# fix eventual conflicts\n$ make test\n$ git push upstream latest\n$ git checkout stable\n# latest previous major\n$ git merge v0.4.5 \n# fix eventual conflicts\n$ make test\n$ git push upstream stable",
- "title": "Update stable and latest branches"
- },
- {
- "location": "/Versioning-and-Branches/",
- "text": "WORK IN PROGRESS\n\n\nIt'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.\n\n\nmaster\n branch\n\n\nThe \nmaster\n branch is the development branch. Any new change MUST go through this branch using Pull Requests.\n\n\nRemarks:\n\n\n\n\nThis branch shouldn't be used for production as it isn't necessary stable.\n\n\n3rd party aren't required to be compatible with the latest changes.\n\n\nOfficial plugins, themes and libraries (contained within Shaarli organization repos) must be compatible with the master branch.\n\n\nThe version in this branch is always \ndev\n.\n\n\n\n\nv0.x\n branch\n\n\nThis \nv0.x\n branch, points to the latest \nv0.x.y\n release.\n\n\nExplanation:\n\n\nWhen 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.\n\n\nIn this case, the issue is fixed in the \nmaster\n branch, and the fix is backported the to the \nv0.x\n branch. Then a new release is made from the \nv0.x\n branch.\n\n\nThis workflow allow us to fix any major bug detected, without having to release bleeding edge feature too soon.\n\n\nlatest\n branch\n\n\nThis branch point the latest release. It recommended to use it to get the latest tested changes.\n\n\nstable\n branch\n\n\nThe \nstable\n branch doesn't contain any major bug, and is one major digit version behind the latest release.\n\n\nFor example, the current latest release is \nv0.8.3\n, the stable branch is an alias to the latest \nv0.7.x\n release. When the \nv0.9.0\n version will be released, the stable will move to the latest \nv0.8.x\n release.\n\n\nRemarks:\n\n\n\n\nShaarli release pace isn't fast, and the stable branch might be a few months behind the latest release.\n\n\n\n\nReleases\n\n\nReleases are always made from the latest \nv0.x\n branch.\n\n\nNote that for every release, we manually generate a tarball which contains all Shaarli dependencies, making Shaarli's installation only one step.\n\n\nAdvices on 3rd party git repos workflow\n\n\nVersioning\n\n\nAny 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 \nchangelog\n (\nDraft\n means not released yet) and the commit log (like \ntpl\n folder\n for themes)). You can either:\n\n\n\n\nuse the Shaarli version number, with your repo version. For example, if Shaarli \nv0.8.3\n is released, publish a \nv0.8.3-1\n release, where \nv0.8.3\n states Shaarli compatibility and \n-1\n is your own version digit for the current Shaarli version.\n\n\nuse your own versioning scheme, and state Shaarli compatibility in the release description.\n\n\n\n\nUsing this, any user will be able to pick the release matching his own Shaarli version.\n\n\nMajor bugfix backport releases\n\n\nTo be able to support backported fixes, it recommended to use our workflow:\n\n\n# In master, fix the major bug\ngit commit -m \"Katastrophe\"\ngit push origin master\n# Get your commit hash\ngit log --format=\"%H\" -n 1\n# Create a new branch from your latest release, let's say v0.8.2-1 (the tag name)\ngit checkout -b katastrophe v0.8.2-1\n# Backport the fix commit to your brand new branch\ngit cherry-pick \ngit push origin katastrophe\n# Then you just have to make a new release from the `katastrophe` branch tagged `v0.8.3-1`",
- "title": "Versioning and Branches"
- },
- {
- "location": "/Versioning-and-Branches/#master-branch",
- "text": "The master branch is the development branch. Any new change MUST go through this branch using Pull Requests. Remarks: This branch shouldn't be used for production as it isn't necessary stable. 3rd party aren't required to be compatible with the latest changes. Official plugins, themes and libraries (contained within Shaarli organization repos) must be compatible with the master branch. The version in this branch is always dev .",
- "title": "master branch"
- },
- {
- "location": "/Versioning-and-Branches/#v0x-branch",
- "text": "This v0.x branch, points to the latest v0.x.y release. Explanation: 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. In this case, the issue is fixed in the master branch, and the fix is backported the to the v0.x branch. Then a new release is made from the v0.x branch. This workflow allow us to fix any major bug detected, without having to release bleeding edge feature too soon.",
- "title": "v0.x branch"
- },
- {
- "location": "/Versioning-and-Branches/#latest-branch",
- "text": "This branch point the latest release. It recommended to use it to get the latest tested changes.",
- "title": "latest branch"
- },
- {
- "location": "/Versioning-and-Branches/#stable-branch",
- "text": "The stable branch doesn't contain any major bug, and is one major digit version behind the latest release. For example, the current latest release is v0.8.3 , the stable branch is an alias to the latest v0.7.x release. When the v0.9.0 version will be released, the stable will move to the latest v0.8.x release. Remarks: Shaarli release pace isn't fast, and the stable branch might be a few months behind the latest release.",
- "title": "stable branch"
- },
- {
- "location": "/Versioning-and-Branches/#releases",
- "text": "Releases are always made from the latest v0.x branch. Note that for every release, we manually generate a tarball which contains all Shaarli dependencies, making Shaarli's installation only one step.",
- "title": "Releases"
- },
- {
- "location": "/Versioning-and-Branches/#advices-on-3rd-party-git-repos-workflow",
- "text": "",
- "title": "Advices on 3rd party git repos workflow"
- },
- {
- "location": "/Versioning-and-Branches/#versioning",
- "text": "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 changelog ( Draft means not released yet) and the commit log (like tpl folder for themes)). You can either: 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. use your own versioning scheme, and state Shaarli compatibility in the release description. Using this, any user will be able to pick the release matching his own Shaarli version.",
- "title": "Versioning"
- },
- {
- "location": "/Versioning-and-Branches/#major-bugfix-backport-releases",
- "text": "To be able to support backported fixes, it recommended to use our workflow: # In master, fix the major bug\ngit commit -m \"Katastrophe\"\ngit push origin master\n# Get your commit hash\ngit log --format=\"%H\" -n 1\n# Create a new branch from your latest release, let's say v0.8.2-1 (the tag name)\ngit checkout -b katastrophe v0.8.2-1\n# Backport the fix commit to your brand new branch\ngit cherry-pick \ngit push origin katastrophe\n# Then you just have to make a new release from the `katastrophe` branch tagged `v0.8.3-1`",
- "title": "Major bugfix backport releases"
- },
- {
- "location": "/Security/",
- "text": "Client browser\n\n\n\n\nShaarli relies on \nHTTP_REFERER\n for some functions (like redirects and clicking on tags). If you have disabled or masqueraded \nHTTP_REFERER\n in your browser, some features of Shaarli may not work\n\n\n\n\nPHP\n\n\n\n\nmagic_quotes\n 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 \nmagic_quotes\n on, so you should not be bothered even on crappy hosts.\n\n\n\n\nServer and sessions\n\n\n\n\nDirectories are protected using \n.htaccess\n files\n\n\nForms are protected against XSRF (Cross-site requests forgery):\n\n\nForms which act on data (save,delete\u2026) contain a token generated by the server.\n\n\nAny posted form which does not contain a valid token is rejected.\n\n\nAny token can only be used once.\n\n\nTokens are attached to the session and cannot be reused in another session.\n\n\nSessions automatically expire after 60 minutes.\n\n\nSessions are protected against hijacking: the session ID cannot be used from a different IP address.\n\n\n\n\nShaarli datastore and configuration\n\n\n\n\nThe 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.\n\n\nLinks are stored as an associative array which is serialized, compressed (with deflate), base64-encoded and saved as a comment in a \n.php\n file.\n\n\nEven if the server does not support \n.htaccess\n files, the data file will still not be readable by URL.\n\n\nThe database looks like this:\n\n\n\n\n\n\n\n\n\n\n\nSmall hashes are used to make a link to an entry in Shaarli. They are unique. In fact, the date of the items (eg. \n20110923_150523\n) is hashed with CRC32, then converted to base64 and some characters are replaced. They are always 6 characters longs and use only \nA-Z a-z 0-9 - _\n and \n@\n.",
- "title": "Security"
- },
- {
- "location": "/Security/#client-browser",
- "text": "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",
- "title": "Client browser"
- },
- {
- "location": "/Security/#php",
- "text": "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.",
- "title": "PHP"
- },
- {
- "location": "/Security/#server-and-sessions",
- "text": "Directories are protected using .htaccess files Forms are protected against XSRF (Cross-site requests forgery): Forms which act on data (save,delete\u2026) contain a token generated by the server. Any posted form which does not contain a valid token is rejected. Any token can only be used once. Tokens are attached to the session and cannot be reused in another session. Sessions automatically expire after 60 minutes. Sessions are protected against hijacking: the session ID cannot be used from a different IP address.",
- "title": "Server and sessions"
- },
- {
- "location": "/Security/#shaarli-datastore-and-configuration",
- "text": "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. Links are stored as an associative array which is serialized, compressed (with deflate), base64-encoded and saved as a comment in a .php file. Even if the server does not support .htaccess files, the data file will still not be readable by URL. The database looks like this: 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 @ .",
- "title": "Shaarli datastore and configuration"
- },
- {
- "location": "/Static-analysis/",
- "text": "WIP\n\n\nThis topic is currently being discussed here:\n- \nFix coding style (static analysis)\n (#95)\n- \nContinuous Integration tools & features\n (#130)\n\n\nUsage\n\n\nStatic analysis tools can be installed with Composer, and used through Shaarli's \nMakefile\n.\n\n\nFor an overview of the available features, see:\n- \nCode quality: Makefile to run static code checkers\n (#124)\n- \nRun PHPCS against different coding standards\n (#276)",
- "title": "Static analysis"
- },
- {
- "location": "/Static-analysis/#wip",
- "text": "This topic is currently being discussed here:\n- Fix coding style (static analysis) (#95)\n- Continuous Integration tools & features (#130)",
- "title": "WIP"
- },
- {
- "location": "/Static-analysis/#usage",
- "text": "Static analysis tools can be installed with Composer, and used through Shaarli's Makefile . For an overview of the available features, see:\n- Code quality: Makefile to run static code checkers (#124)\n- Run PHPCS against different coding standards (#276)",
- "title": "Usage"
- },
- {
- "location": "/Theming/",
- "text": "Foreword\n\n\nThere are two ways of customizing how Shaarli looks:\n\n\n\n\nby using a custom CSS to override Shaarli's CSS\n\n\nby using a full theme that provides its own RainTPL templates, CSS and Javascript resources\n\n\n\n\nCustom CSS\n\n\nShaarli's appearance can be modified by adding CSS rules to:\n- Shaarli < \nv0.9.0\n: \ninc/user.css\n\n- Shaarli >= \nv0.9.0\n: \ndata/user.css\n\n\nThis file allows overriding rules defined in the template CSS files (only add changed rules), or define a whole new theme.\n\n\nNote\n: Do not edit \ntpl/default/css/shaarli.css\n! Your changes would be overridden when updating Shaarli.\n\n\nSee also \nDownload CSS styles from an OPML list\n\n\nThemes\n\n\nWARNING - This feature is currently being worked on and will be improved in the next releases. Experimental.\n\n\nInstallation:\n- find a theme you'd like to install\n- copy or clone the theme folder under \ntpl/\n\n- enable the theme:\n - Shaarli < \nv0.9.0\n: edit \ndata/config.json.php\n and set the value of \nraintpl_tpl\n to the new theme name:\n \n\"raintpl_tpl\": \"tpl\\/my-template\\/\"\n\n - Shaarli >= \nv0.9.0\n: select the theme through the \nTools\n page\n\n\nCommunity CSS & themes\n\n\nCustom CSS\n\n\n\n\nmrjovanovic/serious-theme-shaarli\n - A serious theme for Shaarli\n\n\nshaarli/shaarli-themes\n\n\n\n\nThemes\n\n\n\n\nAkibaTech/Shaarli Superhero Theme\n - A template/theme for Shaarli\n\n\nalexisju/albinomouse-template\n - A full template for Shaarli\n\n\nArthurHoaro/shaarli-launch\n - Customizable Shaarli theme\n\n\ndhoko/ShaarliTemplate\n - A template/theme for Shaarli\n\n\nkalvn/shaarli-blocks\n - A template/theme for Shaarli\n\n\nkalvn/Shaarli-Material\n - A theme (template) based on Google's Material Design for Shaarli, the superfast delicious clone\n\n\nManufacturaInd/shaarli-2004licious-theme\n - A template/theme as a humble homage to the early looks of the del.icio.us site\n\n\n\n\nShaarli forks\n\n\n\n\nmisterair/Limonade\n - A fork of (legacy) Shaarli with a new template\n\n\nvivienhaese/shaarlitheme\n - A Shaarli fork meant to be run in an openshift instance\n\n\n\n\nExample installation: AlbinoMouse theme\n\n\nWith the following configuration:\n- Apache 2 / PHP 5.6\n- user sites are enabled, e.g. \n/home/user/public_html/somedir\n is served as \nhttp://localhost/~user/somedir\n\n- \nhttp\n is the name of the Apache user\n\n\n$ cd ~/public_html\n\n# clone repositories\n$ git clone https://github.com/shaarli/Shaarli.git shaarli\n$ pushd shaarli/tpl\n$ git clone https://github.com/alexisju/albinomouse-template.git\n$ popd\n\n# set access rights for Apache\n$ chgrp -R http shaarli\n$ chmod g+rwx shaarli shaarli/cache shaarli/data shaarli/pagecache shaarli/tmp\n\n\n\n\nGet config written:\n- go to the freshly installed site\n- fill the install form\n- log in to Shaarli\n\n\nEdit Shaarli's \nconfiguration|Shaarli configuration\n:\n\n\n# the file should be owned by Apache, thus not writeable => sudo\n$ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php",
- "title": "Theming"
- },
- {
- "location": "/Theming/#foreword",
- "text": "There are two ways of customizing how Shaarli looks: by using a custom CSS to override Shaarli's CSS by using a full theme that provides its own RainTPL templates, CSS and Javascript resources",
- "title": "Foreword"
- },
- {
- "location": "/Theming/#custom-css",
- "text": "Shaarli's appearance can be modified by adding CSS rules to:\n- Shaarli < v0.9.0 : inc/user.css \n- Shaarli >= v0.9.0 : data/user.css This file allows overriding rules defined in the template CSS files (only add changed rules), or define a whole new theme. Note : Do not edit tpl/default/css/shaarli.css ! Your changes would be overridden when updating Shaarli. See also Download CSS styles from an OPML list",
- "title": "Custom CSS"
- },
- {
- "location": "/Theming/#themes",
- "text": "WARNING - This feature is currently being worked on and will be improved in the next releases. Experimental. Installation:\n- find a theme you'd like to install\n- copy or clone the theme folder under tpl/ \n- enable the theme:\n - Shaarli < v0.9.0 : edit data/config.json.php and set the value of raintpl_tpl to the new theme name:\n \"raintpl_tpl\": \"tpl\\/my-template\\/\" \n - Shaarli >= v0.9.0 : select the theme through the Tools page",
- "title": "Themes"
- },
- {
- "location": "/Theming/#community-css-themes",
- "text": "",
- "title": "Community CSS & themes"
- },
- {
- "location": "/Theming/#custom-css_1",
- "text": "mrjovanovic/serious-theme-shaarli - A serious theme for Shaarli shaarli/shaarli-themes",
- "title": "Custom CSS"
- },
- {
- "location": "/Theming/#themes_1",
- "text": "AkibaTech/Shaarli Superhero Theme - A template/theme for Shaarli alexisju/albinomouse-template - A full template for Shaarli ArthurHoaro/shaarli-launch - Customizable Shaarli theme dhoko/ShaarliTemplate - A template/theme for Shaarli kalvn/shaarli-blocks - A template/theme for Shaarli kalvn/Shaarli-Material - A theme (template) based on Google's Material Design for Shaarli, the superfast delicious clone ManufacturaInd/shaarli-2004licious-theme - A template/theme as a humble homage to the early looks of the del.icio.us site",
- "title": "Themes"
- },
- {
- "location": "/Theming/#shaarli-forks",
- "text": "misterair/Limonade - A fork of (legacy) Shaarli with a new template vivienhaese/shaarlitheme - A Shaarli fork meant to be run in an openshift instance",
- "title": "Shaarli forks"
- },
- {
- "location": "/Theming/#example-installation-albinomouse-theme",
- "text": "With the following configuration:\n- Apache 2 / PHP 5.6\n- user sites are enabled, e.g. /home/user/public_html/somedir is served as http://localhost/~user/somedir \n- http is the name of the Apache user $ cd ~/public_html\n\n# clone repositories\n$ git clone https://github.com/shaarli/Shaarli.git shaarli\n$ pushd shaarli/tpl\n$ git clone https://github.com/alexisju/albinomouse-template.git\n$ popd\n\n# set access rights for Apache\n$ chgrp -R http shaarli\n$ chmod g+rwx shaarli shaarli/cache shaarli/data shaarli/pagecache shaarli/tmp Get config written:\n- go to the freshly installed site\n- fill the install form\n- log in to Shaarli Edit Shaarli's configuration|Shaarli configuration : # the file should be owned by Apache, thus not writeable => sudo\n$ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php",
- "title": "Example installation: AlbinoMouse theme"
- },
- {
- "location": "/Unit-tests/",
- "text": "Setup your environment for tests\n\n\nThe framework used is \nPHPUnit\n; it can be installed with \nComposer\n, which is a dependency management tool.\n\n\nRegarding Composer, you can either use:\n\n a system-wide version, e.g. installed through your distro's package manager\n\n a local version, downloadable \nhere\n\n\nSample usage\n\n\n# system-wide version\n$ composer install\n$ composer update\n\n# local version\n$ php composer.phar self-update\n$ php composer.phar install\n$ php composer.phar update\n\n\n\n\nInstall Shaarli dev dependencies\n\n\n$ cd /path/to/shaarli\n$ composer update\n\n\n\n\nInstall and enable Xdebug to generate PHPUnit coverage reports\n\n\nFor Debian-based distros:\n\n\n$ aptitude install php5-xdebug\n\n\n\n\nFor ArchLinux:\n\n\n$ pacman -S xdebug\n\n\n\n\nThen add the following line to \n/etc/php/php.ini\n:\n\n\nzend_extension=xdebug.so\n\n\n\n\nRun unit tests\n\n\nSuccessful test suite:\n\n\n$ make test\n\n-------\nPHPUNIT\n-------\nPHPUnit 4.6.9 by Sebastian Bergmann and contributors.\n\nConfiguration read from /home/virtualtam/public_html/shaarli/phpunit.xml\n\n....................................\n\nTime: 759 ms, Memory: 8.25Mb\n\nOK (36 tests, 65 assertions)\n\n\n\n\nTest suite with failures and errors:\n\n\n$ make test\n-------\nPHPUNIT\n-------\nPHPUnit 4.6.9 by Sebastian Bergmann and contributors.\n\nConfiguration read from /home/virtualtam/public_html/shaarli/phpunit.xml\n\nE..FF...............................\n\nTime: 802 ms, Memory: 8.25Mb\n\nThere was 1 error:\n\n1) LinkDBTest::testConstructLoggedIn\nMissing argument 2 for LinkDB::__construct(), called in /home/virtualtam/public_html/shaarli/tests/Link\\\nDBTest.php on line 79 and defined\n\n/home/virtualtam/public_html/shaarli/application/LinkDB.php:58\n/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:79\n\n--\n\nThere were 2 failures:\n\n1) LinkDBTest::testCheckDBNew\nFailed asserting that two strings are equal.\n--- Expected\n+++ Actual\n@@ @@\n-'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'\n+'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'\n\n/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:121\n\n2) LinkDBTest::testCheckDBLoad\nFailed asserting that two strings are equal.\n--- Expected\n+++ Actual\n@@ @@\n-'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'\n+'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'\n\n/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:133\n\nFAILURES!\nTests: 36, Assertions: 63, Errors: 1, Failures: 2.\n\n\n\n\nTest results and coverage\n\n\nBy default, PHPUnit will run all suitable tests found under the \ntests\n directory.\n\n\nEach test has 3 possible outcomes:\n\n \n.\n - success\n\n \nF\n - failure: the test was run but its results are invalid\n * the code does not behave as expected\n * dependencies to external elements: globals, session, cache...\n* \nE\n - error: something went wrong and the tested code has crashed\n * typos in the code, or in the test code\n * dependencies to missing external elements\n\n\nIf Xdebug has been installed and activated, two coverage reports will be generated:\n\n a summary in the console\n\n a detailed HTML report with metrics for tested code\n * to open it in a web browser: \nfirefox coverage/index.html &\n\n\nExecuting specific tests\n\n\nAdd a \n@group\n annotation in a test class or method comment:\n\n\n/**\n * Netscape bookmark import\n * @group WIP\n */\nclass BookmarkImportTest extends PHPUnit_Framework_TestCase\n{\n [...]\n}\n\n\n\n\nTo run all tests annotated with \n@group WIP\n:\n\n\n$ vendor/bin/phpunit --group WIP tests/",
- "title": "Unit tests"
- },
- {
- "location": "/Unit-tests/#setup-your-environment-for-tests",
- "text": "The framework used is PHPUnit ; it can be installed with Composer , which is a dependency management tool. Regarding Composer, you can either use: a system-wide version, e.g. installed through your distro's package manager a local version, downloadable here",
- "title": "Setup your environment for tests"
- },
- {
- "location": "/Unit-tests/#sample-usage",
- "text": "# system-wide version\n$ composer install\n$ composer update\n\n# local version\n$ php composer.phar self-update\n$ php composer.phar install\n$ php composer.phar update",
- "title": "Sample usage"
- },
- {
- "location": "/Unit-tests/#install-shaarli-dev-dependencies",
- "text": "$ cd /path/to/shaarli\n$ composer update",
- "title": "Install Shaarli dev dependencies"
- },
- {
- "location": "/Unit-tests/#install-and-enable-xdebug-to-generate-phpunit-coverage-reports",
- "text": "For Debian-based distros: $ aptitude install php5-xdebug For ArchLinux: $ pacman -S xdebug Then add the following line to /etc/php/php.ini : zend_extension=xdebug.so",
- "title": "Install and enable Xdebug to generate PHPUnit coverage reports"
- },
- {
- "location": "/Unit-tests/#run-unit-tests",
- "text": "Successful test suite: $ make test\n\n-------\nPHPUNIT\n-------\nPHPUnit 4.6.9 by Sebastian Bergmann and contributors.\n\nConfiguration read from /home/virtualtam/public_html/shaarli/phpunit.xml\n\n....................................\n\nTime: 759 ms, Memory: 8.25Mb\n\nOK (36 tests, 65 assertions) Test suite with failures and errors: $ make test\n-------\nPHPUNIT\n-------\nPHPUnit 4.6.9 by Sebastian Bergmann and contributors.\n\nConfiguration read from /home/virtualtam/public_html/shaarli/phpunit.xml\n\nE..FF...............................\n\nTime: 802 ms, Memory: 8.25Mb\n\nThere was 1 error:\n\n1) LinkDBTest::testConstructLoggedIn\nMissing argument 2 for LinkDB::__construct(), called in /home/virtualtam/public_html/shaarli/tests/Link\\\nDBTest.php on line 79 and defined\n\n/home/virtualtam/public_html/shaarli/application/LinkDB.php:58\n/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:79\n\n--\n\nThere were 2 failures:\n\n1) LinkDBTest::testCheckDBNew\nFailed asserting that two strings are equal.\n--- Expected\n+++ Actual\n@@ @@\n-'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'\n+'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'\n\n/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:121\n\n2) LinkDBTest::testCheckDBLoad\nFailed asserting that two strings are equal.\n--- Expected\n+++ Actual\n@@ @@\n-'e3edea8ea7bb50be4bcb404df53fbb4546a7156e'\n+'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834'\n\n/home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:133\n\nFAILURES!\nTests: 36, Assertions: 63, Errors: 1, Failures: 2.",
- "title": "Run unit tests"
- },
- {
- "location": "/Unit-tests/#test-results-and-coverage",
- "text": "By default, PHPUnit will run all suitable tests found under the tests directory. Each test has 3 possible outcomes: . - success F - failure: the test was run but its results are invalid\n * the code does not behave as expected\n * dependencies to external elements: globals, session, cache...\n* E - error: something went wrong and the tested code has crashed\n * typos in the code, or in the test code\n * dependencies to missing external elements If Xdebug has been installed and activated, two coverage reports will be generated: a summary in the console a detailed HTML report with metrics for tested code\n * to open it in a web browser: firefox coverage/index.html &",
- "title": "Test results and coverage"
- },
- {
- "location": "/Unit-tests/#executing-specific-tests",
- "text": "Add a @group annotation in a test class or method comment: /**\n * Netscape bookmark import\n * @group WIP\n */\nclass BookmarkImportTest extends PHPUnit_Framework_TestCase\n{\n [...]\n} To run all tests annotated with @group WIP : $ vendor/bin/phpunit --group WIP tests/",
- "title": "Executing specific tests"
- },
- {
- "location": "/FAQ/",
- "text": "Why did you create Shaarli ?\n\n\nI 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\u2026 oh\u2026 \ntheir Firefox addon sends to Diigo every single URL you visit\n (Don't believe me ? Use \nTamper Data\n and open any page).\n\n\nEnough 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.\n\n\nWhy use Shaarli and not Delicious/Diigo ?\n\n\nWith Shaarli:\n\n\n\n\nThe data is yours: It's hosted on your server.\n\n\nNever fear of having your data locked-in.\n\n\nNever fear to have your data sold to third party.\n\n\nYour private links are not hosted on a third party server.\n\n\nYou are not tracked by browser addons (like Diigo does)\n\n\nYou can change the look and feel of the pages if you want.\n\n\nYou can change the behaviour of the program.\n\n\nIt's magnitude faster than most bookmarking services.\n\n\n\n\nWhat does Shaarli mean?\n\n\nShaarli is for shaaring your links.\n\n\nMy Shaarli is broken!\n\n\nFirst of all, ensure that both the \nweb server\n and \nShaarli\n are correctly configured, and that your installation is \nsupported\n.\n\n\nIf everything looks right but the issue(s) remain(s), please:\n- take a look at the \ntroubleshooting\n section\n- come \nchat with us\n on Gitter, we'll be happy to help ;-)\n- browse active \nissues\n and \nPull Requests\n\n - if you find one that is related to the issue, feel free to comment and provide additional details (host/Shaarli setup)\n - else, \nopen a new issue\n, and provide information about the problem:\n - \nwhat happens?\n - display glitches, invalid data, security flaws...\n - \nwhat is your configuration?\n - OS, server version, activated extensions, web browser...\n - \nis it reproducible?\n\n\nWhy not use a real database? Files are slow!\n\n\nDoes browsing \nthis page\n feel slow? Try browsing older pages, too.\n\n\nIt'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?\n\n\nThe 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.",
- "title": "FAQ"
- },
- {
- "location": "/FAQ/#why-did-you-create-shaarli",
- "text": "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\u2026 oh\u2026 their Firefox addon sends to Diigo every single URL you visit (Don't believe me ? Use Tamper Data and open any page). 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.",
- "title": "Why did you create Shaarli ?"
- },
- {
- "location": "/FAQ/#why-use-shaarli-and-not-deliciousdiigo",
- "text": "With Shaarli: The data is yours: It's hosted on your server. Never fear of having your data locked-in. Never fear to have your data sold to third party. Your private links are not hosted on a third party server. You are not tracked by browser addons (like Diigo does) You can change the look and feel of the pages if you want. You can change the behaviour of the program. It's magnitude faster than most bookmarking services.",
- "title": "Why use Shaarli and not Delicious/Diigo ?"
- },
- {
- "location": "/FAQ/#what-does-shaarli-mean",
- "text": "Shaarli is for shaaring your links.",
- "title": "What does Shaarli mean?"
- },
- {
- "location": "/FAQ/#my-shaarli-is-broken",
- "text": "First of all, ensure that both the web server and Shaarli are correctly configured, and that your installation is supported . If everything looks right but the issue(s) remain(s), please:\n- take a look at the troubleshooting section\n- come chat with us on Gitter, we'll be happy to help ;-)\n- browse active issues and Pull Requests \n - if you find one that is related to the issue, feel free to comment and provide additional details (host/Shaarli setup)\n - else, open a new issue , and provide information about the problem:\n - what happens? - display glitches, invalid data, security flaws...\n - what is your configuration? - OS, server version, activated extensions, web browser...\n - is it reproducible?",
- "title": "My Shaarli is broken!"
- },
- {
- "location": "/FAQ/#why-not-use-a-real-database-files-are-slow",
- "text": "Does browsing this page feel slow? Try browsing older pages, too. 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? 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.",
- "title": "Why not use a real database? Files are slow!"
- },
- {
- "location": "/Community-&-Related-software/",
- "text": "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.\n\n\nTODO: contact repos owners to see if they'd like to standardize their work with the community fork.\n\n\nCommunity\n\n\n\n\nLiens en vrac de sebsauvage\n - the original Shaarli\n\n\nA large list of Shaarlis\n\n\nA list of working Shaarli aggregators\n\n\nA list of some known Shaarlis\n\n\nAdieu Delicious, Diigo et StumbleUpon. Salut Shaarli ! - sebsauvage.net\n (fr) \n16/09/2011 - the original post about Shaarli\n\n\nOriginal ideas/fixme/TODO page\n\n\nOriginal discussion page\n (fr)\n\n\nOriginal revisions history\n\n\nShaarli.fr/my\n - Unofficial, unsupported (old fork) hosted Shaarlis provider, courtesy of \nDMeloni\n\n\n\n\nArticles and social media discussions\n\n\n\n\n2016-09-22 - Hacker News - https://news.ycombinator.com/item?id=12552176\n\n\n2015-08-15 - Reddit - \nQuestion about migrating from WordPress to Shaarli.\n\n\n2015-06-22 - Hacker News - https://news.ycombinator.com/item?id=9755366\n\n\n2015-05-12 - Reddit - \nshaarli - Self hosted Bookmarking / Delicious (PHP, MySQL)\n\n\n\n\nThird party plugins\n\n\n\n\nautosave\n by \n@kalvn\n: Automatically saves data when editing a link to avoid any loss in case of crash or unexpected shutdown.\n\n\nCode Coloration\n by \n@ArthurHoaro\n: client side code syntax highlighter.\n\n\nDisqus\n by \n@kalvn\n: Adds Disqus comment system to your Shaarli.\n\n\nemojione\n by \n@NerosTie\n: Add colorful emojis to your Shaarli.\n\n\ngoogle analytics\n by \n@ericjuden\n: Adds Google Analytics tracking support\n\n\nlaunch\n - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli.\n\n\nrelated\n by \n@ilesinge\n - Show related links based on the number of identical tags.\n\n\nsocial\n by \n@alexisju\n: share links to social networks.\n\n\nshaarli2twitter\n by \n@ArthurHoaro\n - Automatically tweet your shared links from Shaarli\n\n\n\n\nThemes\n\n\nSee \nTheming\n for the list of community-contributed themes, and an installation guide.\n\n\nServer apps\n\n\n\n\nshaarchiver\n - Archive your Shaarli bookmarks and their content\n\n\nshaarli-river\n - An aggregator for shaarlis with many features \n\n\nShaarlo\n - An aggregator for shaarlis with many features (a very popular running instance among french shaarliers: \nshaarli.fr\n)\n\n\nShaarlimages\n - An image-oriented aggregator for Shaarlis\n\n\nmknexen/shaarli-api\n - A REST API for Shaarli\n\n\nSelf dead link\n - Detect dead links on shaarli. This version use the database of shaarli. \nAnother version\n, can be used for other shaarli instances (but is more resource consuming).\n\n\nBookmark Archiver\n - Save an archived copy of all websites starred using browser bookmarks/Shaarli/Delicious/Instapaper/Unmark.it/Pocket/Pinboard. Outputs browseable html. \n\n\n\n\nMobile Apps\n\n\n\n\nShaarliOS\n iOS share extension - see \n#308\n for some promo codes,\n\n\nShaarli for Android\n - Android application that adds Shaarli as a sharing provider\n\n\nShaarlier for Android\n - Android application to simply add links directly into your Shaarli\n\n\n\n\nIntegration with other platforms\n\n\n\n\ntt-rss-shaarli\n - \nTiny-Tiny RSS\n plugin that adds support for sharing articles with Shaarli\n\n\noctopress-shaarli\n - Octopress plugin to retrieve Shaarli links on the sidebar\n\n\nScuttle to Shaarli\n - Import bookmarks from Scuttle\n\n\n\n\nAlternatives to Shaarli\n\n\nSee the \nbookmarks & link sharing\n section on \nawesome-selfhosted\n.",
- "title": "Community & Related software"
- },
- {
- "location": "/Community-&-Related-software/#community",
- "text": "Liens en vrac de sebsauvage - the original Shaarli A large list of Shaarlis A list of working Shaarli aggregators A list of some known Shaarlis Adieu Delicious, Diigo et StumbleUpon. Salut Shaarli ! - sebsauvage.net (fr) 16/09/2011 - the original post about Shaarli Original ideas/fixme/TODO page Original discussion page (fr) Original revisions history Shaarli.fr/my - Unofficial, unsupported (old fork) hosted Shaarlis provider, courtesy of DMeloni",
- "title": "Community"
- },
- {
- "location": "/Community-&-Related-software/#articles-and-social-media-discussions",
- "text": "2016-09-22 - Hacker News - https://news.ycombinator.com/item?id=12552176 2015-08-15 - Reddit - Question about migrating from WordPress to Shaarli. 2015-06-22 - Hacker News - https://news.ycombinator.com/item?id=9755366 2015-05-12 - Reddit - shaarli - Self hosted Bookmarking / Delicious (PHP, MySQL)",
- "title": "Articles and social media discussions"
- },
- {
- "location": "/Community-&-Related-software/#third-party-plugins",
- "text": "autosave by @kalvn : Automatically saves data when editing a link to avoid any loss in case of crash or unexpected shutdown. Code Coloration by @ArthurHoaro : client side code syntax highlighter. Disqus by @kalvn : Adds Disqus comment system to your Shaarli. emojione by @NerosTie : Add colorful emojis to your Shaarli. google analytics by @ericjuden : Adds Google Analytics tracking support launch - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli. related by @ilesinge - Show related links based on the number of identical tags. social by @alexisju : share links to social networks. shaarli2twitter by @ArthurHoaro - Automatically tweet your shared links from Shaarli",
- "title": "Third party plugins"
- },
- {
- "location": "/Community-&-Related-software/#themes",
- "text": "See Theming for the list of community-contributed themes, and an installation guide.",
- "title": "Themes"
- },
- {
- "location": "/Community-&-Related-software/#server-apps",
- "text": "shaarchiver - Archive your Shaarli bookmarks and their content shaarli-river - An aggregator for shaarlis with many features Shaarlo - An aggregator for shaarlis with many features (a very popular running instance among french shaarliers: shaarli.fr ) Shaarlimages - An image-oriented aggregator for Shaarlis mknexen/shaarli-api - A REST API for Shaarli Self dead link - Detect dead links on shaarli. This version use the database of shaarli. Another version , can be used for other shaarli instances (but is more resource consuming). Bookmark Archiver - Save an archived copy of all websites starred using browser bookmarks/Shaarli/Delicious/Instapaper/Unmark.it/Pocket/Pinboard. Outputs browseable html.",
- "title": "Server apps"
- },
- {
- "location": "/Community-&-Related-software/#mobile-apps",
- "text": "ShaarliOS iOS share extension - see #308 for some promo codes, Shaarli for Android - Android application that adds Shaarli as a sharing provider Shaarlier for Android - Android application to simply add links directly into your Shaarli",
- "title": "Mobile Apps"
- },
- {
- "location": "/Community-&-Related-software/#integration-with-other-platforms",
- "text": "tt-rss-shaarli - Tiny-Tiny RSS plugin that adds support for sharing articles with Shaarli octopress-shaarli - Octopress plugin to retrieve Shaarli links on the sidebar Scuttle to Shaarli - Import bookmarks from Scuttle",
- "title": "Integration with other platforms"
- },
- {
- "location": "/Community-&-Related-software/#alternatives-to-shaarli",
- "text": "See the bookmarks & link sharing section on awesome-selfhosted .",
- "title": "Alternatives to Shaarli"
- }
- ]
-}
\ No newline at end of file
diff --git a/doc/html/search.html b/doc/html/search.html
deleted file mode 100644
index cf6e46b9..00000000
--- a/doc/html/search.html
+++ /dev/null
@@ -1,312 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- Shaarli Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/doc/html/sitemap.xml b/doc/html/sitemap.xml
deleted file mode 100644
index 945e92e6..00000000
--- a/doc/html/sitemap.xml
+++ /dev/null
@@ -1,248 +0,0 @@
-
-
-
-
-
- /
- 2017-07-29
- daily
-
-
-
-
-
-
- /Download-and-Installation/
- 2017-07-29
- daily
-
-
-
- /Upgrade-and-migration/
- 2017-07-29
- daily
-
-
-
- /Server-requirements/
- 2017-07-29
- daily
-
-
-
- /Server-configuration/
- 2017-07-29
- daily
-
-
-
- /Server-security/
- 2017-07-29
- daily
-
-
-
- /Shaarli-configuration/
- 2017-07-29
- daily
-
-
-
- /Plugins/
- 2017-07-29
- daily
-
-
-
-
-
-
-
- /docker/docker-101/
- 2017-07-29
- daily
-
-
-
- /docker/shaarli-images/
- 2017-07-29
- daily
-
-
-
- /docker/reverse-proxy-configuration/
- 2017-07-29
- daily
-
-
-
- /docker/resources/
- 2017-07-29
- daily
-
-
-
-
-
-
-
- /Features/
- 2017-07-29
- daily
-
-
-
- /Bookmarklet/
- 2017-07-29
- daily
-
-
-
- /Browsing-and-searching/
- 2017-07-29
- daily
-
-
-
- /Firefox-share/
- 2017-07-29
- daily
-
-
-
- /RSS-feeds/
- 2017-07-29
- daily
-
-
-
- /REST-API/
- 2017-07-29
- daily
-
-
-
-
-
-
-
- /Backup,-restore,-import-and-export/
- 2017-07-29
- daily
-
-
-
- /Various-hacks/
- 2017-07-29
- daily
-
-
-
-
-
-
- /Troubleshooting/
- 2017-07-29
- daily
-
-
-
-
-
-
- /Development-guidelines/
- 2017-07-29
- daily
-
-
-
- /Continuous-integration-tools/
- 2017-07-29
- daily
-
-
-
- /GnuPG-signature/
- 2017-07-29
- daily
-
-
-
- /Coding-guidelines/
- 2017-07-29
- daily
-
-
-
- /Directory-structure/
- 2017-07-29
- daily
-
-
-
- /3rd-party-libraries/
- 2017-07-29
- daily
-
-
-
- /Plugin-System/
- 2017-07-29
- daily
-
-
-
- /Release-Shaarli/
- 2017-07-29
- daily
-
-
-
- /Versioning-and-Branches/
- 2017-07-29
- daily
-
-
-
- /Security/
- 2017-07-29
- daily
-
-
-
- /Static-analysis/
- 2017-07-29
- daily
-
-
-
- /Theming/
- 2017-07-29
- daily
-
-
-
- /Unit-tests/
- 2017-07-29
- daily
-
-
-
-
-
-
-
- /FAQ/
- 2017-07-29
- daily
-
-
-
- /Community-&-Related-software/
- 2017-07-29
- daily
-
-
-
-
-
\ No newline at end of file
--
cgit v1.2.3
From fcd900f7ce54904851f2c1513458101876e6efcd Mon Sep 17 00:00:00 2001
From: VirtualTam
Date: Tue, 1 Aug 2017 19:01:11 +0200
Subject: documentation: remove uneeded resources
Relates to https://github.com/shaarli/Shaarli/issues/312
Relates to https://github.com/shaarli/Shaarli/pull/772
Signed-off-by: VirtualTam
---
doc/md/_Footer.md | 1 -
doc/md/config.json | 6 -
doc/md/github-markdown.css | 287 ---------------------------------------------
3 files changed, 294 deletions(-)
delete mode 100644 doc/md/_Footer.md
delete mode 100644 doc/md/config.json
delete mode 100644 doc/md/github-markdown.css
(limited to 'doc')
diff --git a/doc/md/_Footer.md b/doc/md/_Footer.md
deleted file mode 100644
index 648b1298..00000000
--- a/doc/md/_Footer.md
+++ /dev/null
@@ -1 +0,0 @@
-_Shaarli, the personal, minimalist, super-fast, database-free bookmarking service_
\ No newline at end of file
diff --git a/doc/md/config.json b/doc/md/config.json
deleted file mode 100644
index cc4de307..00000000
--- a/doc/md/config.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "useSideMenu": true,
- "lineBreaks": "gfm",
- "additionalFooterText": "",
- "title": "Shaarli documentation"
-}
\ No newline at end of file
diff --git a/doc/md/github-markdown.css b/doc/md/github-markdown.css
deleted file mode 100644
index 581350ae..00000000
--- a/doc/md/github-markdown.css
+++ /dev/null
@@ -1,287 +0,0 @@
-#local-sidebar {
- width: 230px;
- float: right;
- position: relative;
- z-index: 4;
- background-color: #fff;
- border: 1px solid #e2e2e2;
- border-radius: 3px;
-}
-
-body {
- font-family: Helvetica, arial, sans-serif;
- font-size: 14px;
- line-height: 1.6;
- padding-top: 10px;
- padding-bottom: 10px;
- background-color: white;
- padding: 10px 20%; }
-
-body > *:first-child {
- margin-top: 0 !important; }
-body > *:last-child {
- margin-bottom: 0 !important; }
-
-a {
- color: #4183C4; }
-a.absent {
- color: #cc0000; }
-a.anchor {
- display: block;
- padding-left: 30px;
- margin-left: -30px;
- cursor: pointer;
- position: absolute;
- top: 0;
- left: 0;
- bottom: 0; }
-
-h1, h2, h3, h4, h5, h6 {
- margin: 20px 0 10px;
- padding: 0;
- font-weight: bold;
- -webkit-font-smoothing: antialiased;
- cursor: text;
- position: relative; }
-
-h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor {
- background: url("../../images/modules/styleguide/para.png") no-repeat 10px center;
- text-decoration: none; }
-
-h1 tt, h1 code {
- font-size: inherit; }
-
-h2 tt, h2 code {
- font-size: inherit; }
-
-h3 tt, h3 code {
- font-size: inherit; }
-
-h4 tt, h4 code {
- font-size: inherit; }
-
-h5 tt, h5 code {
- font-size: inherit; }
-
-h6 tt, h6 code {
- font-size: inherit; }
-
-h1 {
- font-size: 28px;
- color: black; }
-
-h2 {
- font-size: 24px;
- border-bottom: 1px solid #cccccc;
- color: black; }
-
-h3 {
- font-size: 18px; }
-
-h4 {
- font-size: 16px; }
-
-h5 {
- font-size: 14px; }
-
-h6 {
- color: #777777;
- font-size: 14px; }
-
-p, blockquote, ol, dl, table, pre {
- margin: 15px 0; }
-
-hr {
- background: transparent url("../../images/modules/pulls/dirty-shade.png") repeat-x 0 0;
- border: 0 none;
- color: #cccccc;
- height: 4px;
- padding: 0; }
-
-body > h2:first-child {
- margin-top: 0;
- padding-top: 0; }
-body > h1:first-child {
- margin-top: 0;
- padding-top: 0; }
- body > h1:first-child + h2 {
- margin-top: 0;
- padding-top: 0; }
-body > h3:first-child, body > h4:first-child, body > h5:first-child, body > h6:first-child {
- margin-top: 0;
- padding-top: 0; }
-
-a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {
- margin-top: 0;
- padding-top: 0; }
-
-h1 p, h2 p, h3 p, h4 p, h5 p, h6 p {
- margin-top: 0; }
-
-li p.first {
- display: inline-block; }
-
-ul, ol {
- padding-left: 30px; }
-
-ul :first-child, ol :first-child {
- margin-top: 0; }
-
-ul :last-child, ol :last-child {
- margin-bottom: 0; }
-
-dl {
- padding: 0; }
- dl dt {
- font-size: 14px;
- font-weight: bold;
- font-style: italic;
- padding: 0;
- margin: 15px 0 5px; }
- dl dt:first-child {
- padding: 0; }
- dl dt > :first-child {
- margin-top: 0; }
- dl dt > :last-child {
- margin-bottom: 0; }
- dl dd {
- margin: 0 0 15px;
- padding: 0 15px; }
- dl dd > :first-child {
- margin-top: 0; }
- dl dd > :last-child {
- margin-bottom: 0; }
-
-blockquote {
- border-left: 4px solid #dddddd;
- padding: 0 15px;
- color: #777777; }
- blockquote > :first-child {
- margin-top: 0; }
- blockquote > :last-child {
- margin-bottom: 0; }
-
-table {
- padding: 0; }
- table tr {
- border-top: 1px solid #cccccc;
- background-color: white;
- margin: 0;
- padding: 0; }
- table tr:nth-child(2n) {
- background-color: #f8f8f8; }
- table tr th {
- font-weight: bold;
- border: 1px solid #cccccc;
- text-align: left;
- margin: 0;
- padding: 6px 13px; }
- table tr td {
- border: 1px solid #cccccc;
- text-align: left;
- margin: 0;
- padding: 6px 13px; }
- table tr th :first-child, table tr td :first-child {
- margin-top: 0; }
- table tr th :last-child, table tr td :last-child {
- margin-bottom: 0; }
-
-img {
- max-width: 100%; }
-
-span.frame {
- display: block;
- overflow: hidden; }
- span.frame > span {
- border: 1px solid #dddddd;
- display: block;
- float: left;
- overflow: hidden;
- margin: 13px 0 0;
- padding: 7px;
- width: auto; }
- span.frame span img {
- display: block;
- float: left; }
- span.frame span span {
- clear: both;
- color: #333333;
- display: block;
- padding: 5px 0 0; }
-span.align-center {
- display: block;
- overflow: hidden;
- clear: both; }
- span.align-center > span {
- display: block;
- overflow: hidden;
- margin: 13px auto 0;
- text-align: center; }
- span.align-center span img {
- margin: 0 auto;
- text-align: center; }
-span.align-right {
- display: block;
- overflow: hidden;
- clear: both; }
- span.align-right > span {
- display: block;
- overflow: hidden;
- margin: 13px 0 0;
- text-align: right; }
- span.align-right span img {
- margin: 0;
- text-align: right; }
-span.float-left {
- display: block;
- margin-right: 13px;
- overflow: hidden;
- float: left; }
- span.float-left span {
- margin: 13px 0 0; }
-span.float-right {
- display: block;
- margin-left: 13px;
- overflow: hidden;
- float: right; }
- span.float-right > span {
- display: block;
- overflow: hidden;
- margin: 13px auto 0;
- text-align: right; }
-
-code, tt {
- margin: 0 2px;
- padding: 0 5px;
- white-space: nowrap;
- border: 1px solid #eaeaea;
- background-color: #f8f8f8;
- border-radius: 3px; }
-
-pre code {
- margin: 0;
- padding: 0;
- white-space: pre;
- border: none;
- background: transparent; }
-
-.highlight pre {
- background-color: #f8f8f8;
- border: 1px solid #cccccc;
- font-size: 13px;
- line-height: 19px;
- overflow: auto;
- padding: 6px 10px;
- border-radius: 3px; }
-
-pre {
- background-color: #f8f8f8;
- border: 1px solid #cccccc;
- font-size: 13px;
- line-height: 19px;
- overflow: auto;
- padding: 6px 10px;
- border-radius: 3px; }
- pre code, pre tt {
- background-color: transparent;
- border: none; }
--
cgit v1.2.3
From 43ad7c8e825057747ccf02049050b323878952a7 Mon Sep 17 00:00:00 2001
From: VirtualTam
Date: Sat, 5 Aug 2017 11:56:24 +0200
Subject: documentation: fix rendering and internal references
This is mainly cleanup after switching from Github-flavoured Markdown
rendered by Github Pages, to standard Markdown rendered by MkDocs.
Changed:
- rephrase some section titles
Fixed:
- list rendering (items, sub-items))
- code rendering
- quotes
- dead links
Removed:
- extraneous navigational elements
Signed-off-by: VirtualTam
---
doc/md/Backup,-restore,-import-and-export.md | 29 +++--
doc/md/Bookmarklet.md | 29 +++--
doc/md/Coding-guidelines.md | 1 +
doc/md/Community-&-Related-software.md | 18 +--
doc/md/Continuous-integration-tools.md | 4 +
doc/md/Development-guidelines.md | 1 +
doc/md/Download-and-Installation.md | 33 +++---
doc/md/FAQ.md | 19 ++--
doc/md/Features.md | 39 +++----
doc/md/Firefox-share.md | 18 +--
doc/md/GnuPG-signature.md | 8 +-
doc/md/Plugin-System.md | 160 +++++++++++++--------------
doc/md/Plugins.md | 6 +-
doc/md/REST-API.md | 8 +-
doc/md/RSS-feeds.md | 2 +
doc/md/Release-Shaarli.md | 6 +-
doc/md/Security.md | 31 +++---
doc/md/Server-configuration.md | 42 ++++---
doc/md/Server-requirements.md | 12 +-
doc/md/Server-security.md | 5 +-
doc/md/Shaarli-configuration.md | 82 +++++++-------
doc/md/Static-analysis.md | 2 +
doc/md/Theming.md | 5 +-
doc/md/Troubleshooting.md | 63 ++++++-----
doc/md/Unit-tests.md | 27 +++--
doc/md/Upgrade-and-migration.md | 17 +--
doc/md/Various-hacks.md | 16 +--
doc/md/Versioning-and-Branches.md | 10 +-
doc/md/index.md | 3 +-
29 files changed, 373 insertions(+), 323 deletions(-)
(limited to 'doc')
diff --git a/doc/md/Backup,-restore,-import-and-export.md b/doc/md/Backup,-restore,-import-and-export.md
index d3252226..89724857 100644
--- a/doc/md/Backup,-restore,-import-and-export.md
+++ b/doc/md/Backup,-restore,-import-and-export.md
@@ -1,11 +1,3 @@
-
- * [Backup and restore the datastore file](#backup-and-restore-the-datastore-file)
- * [Export links as...](#export-links-as)
- * [Import links from...](#import-links-from)
- * [Import Shaarli links to Firefox](#import-shaarli-links-to-firefox)
-
-----------------------
-
## Backup and restore the datastore file
Backup the file `data/datastore.php` (by FTP or SSH). Restore by putting the file back in place.
@@ -18,12 +10,14 @@ rsync -avzP my.server.com:/var/www/shaarli/data/datastore.php datastore-$(date +
## Export links as...
To export links as an HTML file, under _Tools > Export_, choose:
+
- _Export all_ to export both public and private links
- _Export public_ to export public links only
- _Export private_ to export private links only
Restore by using the `Import` feature.
-* This can be done using the [shaarchiver](https://github.com/nodiscc/shaarchiver) tool.
+
+- This can be done using the [shaarchiver](https://github.com/nodiscc/shaarchiver) tool.
Example command:
```bash
@@ -46,18 +40,21 @@ To correctly import the tags from a [SemanticScuttle](http://semanticscuttle.sou
### Scuttle
-Shaarli 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.
+Shaarli cannot import data directly from [Scuttle](https://github.com/scronide/scuttle).
+
+However, you can use the third-party [scuttle-to-shaarli](https://github.com/q2apro/scuttle-to-shaarli)
+tool to export the Scuttle database to the Netscape HTML format compatible with the Shaarli importer.
## Import Shaarli links to Firefox
- * Export your Shaarli links as described above.
- * For compatibility reasons, check `Prepend note permalinks with this Shaarli instance's URL (useful to import bookmarks in a web browser)`
- * In Firefox, open the bookmark manager (not the sidebar! `Bookmarks menu > Show all bookmarks` or `Ctrl+Shift+B`)
- * Select `Import and Backup > Import bookmarks in HTML format`
+- Export your Shaarli links as described above.
+ - For compatibility reasons, check `Prepend note permalinks with this Shaarli instance's URL (useful to import bookmarks in a web browser)`
+- In Firefox, open the bookmark manager (not the sidebar! `Bookmarks menu > Show all bookmarks` or `Ctrl+Shift+B`)
+- Select `Import and Backup > Import bookmarks in HTML format`
Your 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.
You may be interested in these Firefox addons to manage links imported from Shaarli
- * [Bookmark Deduplicator](https://addons.mozilla.org/en-US/firefox/addon/bookmark-deduplicator/) - provides an easy way to deduplicate your bookmarks
- * [TagSieve](https://addons.mozilla.org/en-US/firefox/addon/tagsieve/) - browse your bookmarks by their tags
+- [Bookmark Deduplicator](https://addons.mozilla.org/en-US/firefox/addon/bookmark-deduplicator/) - provides an easy way to deduplicate your bookmarks
+- [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
index 265ced44..e53e3261 100644
--- a/doc/md/Bookmarklet.md
+++ b/doc/md/Bookmarklet.md
@@ -1,23 +1,23 @@
-### Add the sharing button (_bookmarklet_) to your browser
+## Add the sharing button (_bookmarklet_) to your browser
- * Open your Shaarli and `Login`
- * Click the `Tools` button in the top bar
- * Drag the **`✚Shaare link` button**, and drop it to your browser's bookmarks bar.
+- Open your Shaarli and `Login`
+- Click the `Tools` button in the top bar
+- Drag the **`✚Shaare link` button**, and drop it to your browser's bookmarks bar.
_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._

-### Share links using the _bookmarklet_
+## Share links using the _bookmarklet_
- * When you are visiting a webpage you would like to share with Shaarli, click the _bookmarklet_ you just added.
- * A window opens.
- * You can freely edit title, description, tags... to find it later using the text search or tag filtering.
- * You will be able to edit this link later using the  edit button.
- * You can also check the “Private” box so that the link is saved but only visible to you.
- * Click `Save`.**Voilà! Your link is now shared.**
+- When you are visiting a webpage you would like to share with Shaarli, click the _bookmarklet_ you just added.
+- A window opens.
+ - You can freely edit title, description, tags... to find it later using the text search or tag filtering.
+ - You will be able to edit this link later using the  edit button.
+ - You can also check the “Private” box so that the link is saved but only visible to you.
+- Click `Save`.**Voilà! Your link is now shared.**
-### Troubleshooting: The bookmarklet doesn't work with a few website (e.g. Github.com)
+## Troubleshooting: The bookmarklet doesn't work with a few websites (e.g. Github.com)
Websites which enforce Content Security Policy (CSP), such as github.com, disallow usage of bookmarklets. Unfortunatly, there is nothing Shaarli can do about it.
@@ -25,6 +25,5 @@ See [#196](https://github.com/shaarli/Shaarli#196).
There is an open bug for both Firefox and Chromium:
- * https://bugzilla.mozilla.org/show_bug.cgi?id=866522
- * https://code.google.com/p/chromium/issues/detail?id=233903
-
+- https://bugzilla.mozilla.org/show_bug.cgi?id=866522
+- https://code.google.com/p/chromium/issues/detail?id=233903
diff --git a/doc/md/Coding-guidelines.md b/doc/md/Coding-guidelines.md
index da47c498..5d1e2531 100644
--- a/doc/md/Coding-guidelines.md
+++ b/doc/md/Coding-guidelines.md
@@ -1,5 +1,6 @@
## WIP
This topic is currently being discussed here:
+
- [Fix coding style (static analysis)](https://github.com/shaarli/Shaarli/issues/95) (#95)
- [Continuous Integration tools & features](https://github.com/shaarli/Shaarli/issues/130) (#130)
diff --git a/doc/md/Community-&-Related-software.md b/doc/md/Community-&-Related-software.md
index b8b7cccd..13b07b6f 100644
--- a/doc/md/Community-&-Related-software.md
+++ b/doc/md/Community-&-Related-software.md
@@ -22,15 +22,15 @@ _TODO: contact repos owners to see if they'd like to standardize their work with
### Third party plugins
- * [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.
- * [Code Coloration](https://github.com/ArthurHoaro/code-coloration) by [@ArthurHoaro](https://github.com/ArthurHoaro): client side code syntax highlighter.
- * [Disqus](https://github.com/kalvn/shaarli-plugin-disqus) by [@kalvn](https://github.com/kalvn): Adds Disqus comment system to your Shaarli.
- * [emojione](https://github.com/NerosTie/emojione) by [@NerosTie](https://github.com/NerosTie): Add colorful emojis to your Shaarli.
- * [google analytics](https://github.com/ericjuden/Shaarli-Google-Analytics-Plugin) by [@ericjuden](http://github.com/ericjuden): Adds Google Analytics tracking support
- * [launch](https://github.com/ArthurHoaro/launch-plugin) - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli.
- * [related](https://github.com/ilesinge/shaarli-related) by [@ilesinge](https://github.com/ilesinge) - Show related links based on the number of identical tags.
- * [social](https://github.com/alexisju/social) by [@alexisju](https://github.com/alexisju): share links to social networks.
- * [shaarli2twitter](https://github.com/ArthurHoaro/shaarli2twitter) by [@ArthurHoaro](https://github.com/ArthurHoaro) - Automatically tweet your shared links from Shaarli
+- [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.
+- [Code Coloration](https://github.com/ArthurHoaro/code-coloration) by [@ArthurHoaro](https://github.com/ArthurHoaro): client side code syntax highlighter.
+- [Disqus](https://github.com/kalvn/shaarli-plugin-disqus) by [@kalvn](https://github.com/kalvn): Adds Disqus comment system to your Shaarli.
+- [emojione](https://github.com/NerosTie/emojione) by [@NerosTie](https://github.com/NerosTie): Add colorful emojis to your Shaarli.
+- [google analytics](https://github.com/ericjuden/Shaarli-Google-Analytics-Plugin) by [@ericjuden](http://github.com/ericjuden): Adds Google Analytics tracking support
+- [launch](https://github.com/ArthurHoaro/launch-plugin) - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli.
+- [related](https://github.com/ilesinge/shaarli-related) by [@ilesinge](https://github.com/ilesinge) - Show related links based on the number of identical tags.
+- [social](https://github.com/alexisju/social) by [@alexisju](https://github.com/alexisju): share links to social networks.
+- [shaarli2twitter](https://github.com/ArthurHoaro/shaarli2twitter) by [@ArthurHoaro](https://github.com/ArthurHoaro) - Automatically tweet your shared links from Shaarli
### Themes
diff --git a/doc/md/Continuous-integration-tools.md b/doc/md/Continuous-integration-tools.md
index 849257f7..4bd7a0ba 100644
--- a/doc/md/Continuous-integration-tools.md
+++ b/doc/md/Continuous-integration-tools.md
@@ -1,22 +1,26 @@
## Local development
A [`Makefile`](https://github.com/shaarli/Shaarli/blob/master/Makefile) is available to perform project-related operations:
+
- Documentation - generate a local HTML copy of the GitHub wiki
- [Static analysis](Static analysis) - check that the code is compliant to PHP conventions
- [Unit tests](Unit tests) - ensure there are no regressions introduced by new commits
## Automatic builds
[Travis CI](http://docs.travis-ci.com/) is a Continuous Integration build server, that runs a build:
+
- each time a commit is merged to the mainline (`master` branch)
- each time a Pull Request is submitted or updated
A build is composed of several jobs: one for each supported PHP version (see [Server requirements](Server requirements)).
Each build job:
+
- updates Composer
- installs 3rd-party test dependencies with Composer
- runs [Unit tests](Unit tests)
After all jobs have finished, Travis returns the results to GitHub:
+
- a status icon represents the result for the `master` branch: [](https://travis-ci.org/shaarli/Shaarli)
- Pull Requests are updated with the Travis result
- Green: all tests have passed
diff --git a/doc/md/Development-guidelines.md b/doc/md/Development-guidelines.md
index 3a248767..532ec2e4 100644
--- a/doc/md/Development-guidelines.md
+++ b/doc/md/Development-guidelines.md
@@ -1,6 +1,7 @@
## Development guidelines
Please have a look at the following pages:
+
- [Contributing to Shaarli](https://github.com/shaarli/Shaarli/tree/master/CONTRIBUTING.md)
- [Static analysis](Static analysis) - patches should try to stick to the [PHP Standard Recommendations](http://www.php-fig.org/psr/) (PSR), especially:
- [PSR-1](http://www.php-fig.org/psr/psr-1/) - Basic Coding Standard
diff --git a/doc/md/Download-and-Installation.md b/doc/md/Download-and-Installation.md
index 7880aef4..cdc503a8 100644
--- a/doc/md/Download-and-Installation.md
+++ b/doc/md/Download-and-Installation.md
@@ -1,8 +1,16 @@
-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 [server](Server-requirements) is properly [configured](Server-configuration).
+To install Shaarli, simply place the files in a directory under your webserver's
+Document Root (or directly at the document root).
+
+Also, please make sure your server meets the [requirements](Server-requirements)
+and is properly [configured](Server-configuration).
Several releases are available:
---------------------------------------------------------
+- by downloading full release archives including all dependencies
+- by downloading Github archives
+- by cloning the Git repository
+
+---
## Latest release (recommended)
### Download as an archive
@@ -20,19 +28,16 @@ $ unzip shaarli-v0.8.4-full.zip
$ mv Shaarli /path/to/shaarli/
```
-| ! |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).|
-|-----|--------------------------|
+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).|
### Using git
```
-mkdir -p /path/to/shaarli && cd /path/to/shaarli/
-git clone -b v0.8 https://github.com/shaarli/Shaarli.git .
-composer install --no-dev
+$ mkdir -p /path/to/shaarli && cd /path/to/shaarli/
+$ git clone -b v0.8 https://github.com/shaarli/Shaarli.git .
+$ composer install --no-dev --prefer-dist
```
---------------------------------------------------------
-
## Stable version
The stable version has been experienced by Shaarli users, and will receive security updates.
@@ -63,11 +68,9 @@ $ mv Shaarli-stable /path/to/shaarli/
$ git clone https://github.com/shaarli/Shaarli.git -b stable /path/to/shaarli/
# install/update third-party dependencies
$ cd /path/to/shaarli/
-$ composer install --no-dev
+$ composer install --no-dev --prefer-dist
```
---------------------------------------------------------
-
## Development version (mainline)
_Use at your own risk!_
@@ -79,11 +82,9 @@ To get the latest changes from the `master` branch:
$ git clone https://github.com/shaarli/Shaarli.git -b master /path/to/shaarli/
# install/update third-party dependencies
$ cd /path/to/shaarli
-$ composer install --no-dev
+$ composer install --no-dev --prefer-dist
```
---------------------------------------------------------
-
## Finish Installation
Once Shaarli is downloaded and files have been placed at the correct location, open it this location your favorite browser.
@@ -92,8 +93,6 @@ Once Shaarli is downloaded and files have been placed at the correct location, o
Setup your Shaarli installation, and it's ready to use!
---------------------------------------------------------
-
## Updating Shaarli
See [Upgrade and Migration](Upgrade-and-migration)
diff --git a/doc/md/FAQ.md b/doc/md/FAQ.md
index 151dcef5..77faf117 100644
--- a/doc/md/FAQ.md
+++ b/doc/md/FAQ.md
@@ -8,23 +8,24 @@ Enough is enough. Saving simple links should not be a complicated heavy thing. I
With Shaarli:
-* The data is yours: It's hosted on your server.
-* Never fear of having your data locked-in.
-* Never fear to have your data sold to third party.
-* Your private links are not hosted on a third party server.
-* You are not tracked by browser addons (like Diigo does)
-* You can change the look and feel of the pages if you want.
-* You can change the behaviour of the program.
-* It's magnitude faster than most bookmarking services.
+- The data is yours: It's hosted on your server.
+- Never fear of having your data locked-in.
+- Never fear to have your data sold to third party.
+- Your private links are not hosted on a third party server.
+- You are not tracked by browser addons (like Diigo does)
+- You can change the look and feel of the pages if you want.
+- You can change the behaviour of the program.
+- It's magnitude faster than most bookmarking services.
### What does Shaarli mean?
-Shaarli is for shaaring your links.
+Shaarli stands for _shaaring_ your _links_.
### My Shaarli is broken!
First 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).
If everything looks right but the issue(s) remain(s), please:
+
- take a look at the [troubleshooting](Troubleshooting) section
- come [chat with us](https://gitter.im/shaarli/Shaarli) on Gitter, we'll be happy to help ;-)
- browse active [issues](https://github.com/shaarli/Shaarli/issues) and [Pull Requests](https://github.com/shaarli/Shaarli/pulls)
diff --git a/doc/md/Features.md b/doc/md/Features.md
index 116b1c9c..eef88d03 100644
--- a/doc/md/Features.md
+++ b/doc/md/Features.md
@@ -1,24 +1,25 @@
### Main features
Shaarli is intended:
- * to share, comment and save interesting links and news
- * to bookmark useful/frequent personal links (as private links) and share them between computers
- * as a minimal blog/microblog/writing platform (no character limit)
- * as a read-it-later list (for example items tagged `readlater`)
- * to draft and save articles/ideas
- * to keep code snippets
- * to keep notes and documentation
- * as a shared clipboard between machines
- * as a todo list
- * to store playlists (e.g. with the `music` or `video` tags)
- * to keep extracts/comments from webpages that may disappear
- * to keep track of ongoing discussions (for example items tagged `discussion`)
- * [to feed RSS aggregators](http://shaarli.chassegnouf.net/?9Efeiw) (planets) with specific tags
- * to feed other social networks, blogs... using RSS feeds and external services (dlvr.it, ifttt.com ...)
+
+- to share, comment and save interesting links and news
+- to bookmark useful/frequent personal links (as private links) and share them between computers
+- as a minimal blog/microblog/writing platform (no character limit)
+- as a read-it-later list (for example items tagged `readlater`)
+- to draft and save articles/ideas
+- to keep code snippets
+- to keep notes and documentation
+- as a shared clipboard between machines
+- as a todo list
+- to store playlists (e.g. with the `music` or `video` tags)
+- to keep extracts/comments from webpages that may disappear
+- to keep track of ongoing discussions (for example items tagged `discussion`)
+- [to feed RSS aggregators](http://shaarli.chassegnouf.net/?9Efeiw) (planets) with specific tags
+- to feed other social networks, blogs... using RSS feeds and external services (dlvr.it, ifttt.com ...)
### Using Shaarli as a blog, notepad, pastebin...
- * Go to your Shaarli setup and log in
- * Click the `Add Link` button
- * To share text only, do not enter any URL in the corresponding input field and click `Add Link`
- * Pick a title and enter your article, or note, in the description field; add a few tags; optionally check `Private` then click `Save`
- * Voilà! Your article is now published (privately if you selected that option) and accessible using its permalink.
+- Go to your Shaarli setup and log in
+- Click the `Add Link` button
+- To share text only, do not enter any URL in the corresponding input field and click `Add Link`
+- Pick a title and enter your article, or note, in the description field; add a few tags; optionally check `Private` then click `Save`
+- 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
index 595b9400..878884a4 100644
--- a/doc/md/Firefox-share.md
+++ b/doc/md/Firefox-share.md
@@ -1,15 +1,17 @@
### Add Shaarli as a sharing service to Firefox
- * Open your Shaarli and `Login`
- * Click the `Tools` button in the top bar
- * Click the `✚Add to Firefox social` button and accept the activation.
+- Open your Shaarli and `Login`
+- Click the `Tools` button in the top bar
+- Click the `✚Add to Firefox social` button and accept the activation.
### Sharing links using Firefox share
- * Add the sharing service as described above
- * When you are visiting a webpage you would like to share with Shaarli, click the Firefox _Share_ button [images/firefoxshare.png](images/firefoxshare.png)
- * You can edit your link before and after saving, just like the bookmarklet above.
+- Add the sharing service as described above
+- When you are visiting a webpage you would like to share with Shaarli,
+ click the Firefox _Share_ button [images/firefoxshare.png](images/firefoxshare.png)
+- You can edit your link before and after saving, just like the bookmarklet above.
-| | 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. |
-|------|-------------------------------------------------------------------------------|
+_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._
diff --git a/doc/md/GnuPG-signature.md b/doc/md/GnuPG-signature.md
index 62a17d33..d1fc10a5 100644
--- a/doc/md/GnuPG-signature.md
+++ b/doc/md/GnuPG-signature.md
@@ -1,10 +1,11 @@
## Introduction
### PGP and GPG
-[Gnu Privacy Guard](https://gnupg.org/) (GnuPG) is an Open Source implementation of the [Pretty Good
-Privacy](https://en.wikipedia.org/wiki/Pretty_Good_Privacy#OpenPGP) (OpenPGP) specification. Its main purposes are digital authentication,
-signature and encryption.
+[Gnu Privacy Guard](https://gnupg.org/) (GnuPG) is an Open Source implementation of the
+[Pretty Good Privacy](https://en.wikipedia.org/wiki/Pretty_Good_Privacy#OpenPGP)
+(OpenPGP) specification. Its main purposes are digital authentication, signature and encryption.
It is often used by the [FLOSS](https://en.wikipedia.org/wiki/Free_and_open-source_software) community to verify:
+
- Linux package signatures: Debian [SecureApt](https://wiki.debian.org/SecureApt), ArchLinux [Master
Keys](https://www.archlinux.org/master-keys/)
- [SCM](https://en.wikipedia.org/wiki/Revision_control) releases & maintainer identity
@@ -15,6 +16,7 @@ To quote Phil Pennock (the author of the [SKS](https://bitbucket.org/skskeyserve
> 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.
Trust 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:
+
- [The Keysigning party HOWTO](http://www.cryptnet.net/fdp/crypto/keysigning_party/en/keysigning_party.html)
- [Web of trust](https://en.wikipedia.org/wiki/Web_of_trust)
diff --git a/doc/md/Plugin-System.md b/doc/md/Plugin-System.md
index d55ffe7e..30f0ae74 100644
--- a/doc/md/Plugin-System.md
+++ b/doc/md/Plugin-System.md
@@ -1,6 +1,8 @@
-[**I am a developer.** Developer API.](#developer-api)
+[**I am a developer: ** Developer API](#developer-api)
-[**I am a template designer.** Guide for template designer.](#guide-for-template-designer)
+[**I am a template designer: ** Guide for template designers](#guide-for-template-designer)
+
+---
## Developer API
@@ -8,9 +10,9 @@
The plugin system let you:
- * insert content into specific places across templates.
- * alter data before templates rendering.
- * alter data before saving new links.
+- insert content into specific places across templates.
+- alter data before templates rendering.
+- alter data before saving new links.
### How can I create a plugin for Shaarli?
@@ -47,8 +49,8 @@ hook__($data, $conf)
Parameters:
- - data: see [$data section](https://github.com/shaarli/Shaarli/wiki/Plugin-System#plugins-data)
- - conf: the `ConfigManager` instance.
+- data: see [$data section](https://github.com/shaarli/Shaarli/wiki/Plugin-System#plugins-data)
+- conf: the `ConfigManager` instance.
For exemple, if my plugin want to add data to the header, this function is needed:
@@ -106,9 +108,9 @@ Every plugin needs a `.meta` file, which is in fact an `.ini` file
Each file contain two keys:
- * `description`: plugin description
- * `parameters`: user parameter names, separated by a `;`.
- * `parameter.`: add a text description the specified parameter.
+- `description`: plugin description
+- `parameters`: user parameter names, separated by a `;`.
+- `parameter.`: add a text description the specified parameter.
> Note: In PHP, `parse_ini_file()` seems to want strings to be between by quotes `"` in the ini file.
@@ -148,8 +150,8 @@ Allow plugin to add content in page headers.
`$data` is an array containing:
- * `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.).
- * `_LOGGEDIN_`: true if user is logged in, false otherwise.
+- `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.).
+- `_LOGGEDIN_`: true if user is logged in, false otherwise.
##### Template placeholders
@@ -157,11 +159,11 @@ Items can be displayed in templates by adding an entry in `$data[''
List of placeholders:
- * `buttons_toolbar`: after the list of buttons in the header.
+- `buttons_toolbar`: after the list of buttons in the header.

- * `fields_toolbar`: after search fields in the header.
+- `fields_toolbar`: after search fields in the header.
> Note: This will only be called in linklist.
@@ -177,8 +179,8 @@ Allow plugin to include their own CSS files.
`$data` is an array containing:
- * `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.).
- * `_LOGGEDIN_`: true if user is logged in, false otherwise.
+- `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.).
+- `_LOGGEDIN_`: true if user is logged in, false otherwise.
##### Template placeholders
@@ -186,7 +188,7 @@ Items can be displayed in templates by adding an entry in `$data[''
List of placeholders:
- * `css_files`: called after loading default CSS.
+- `css_files`: called after loading default CSS.
> Note: only add the path of the CSS file. E.g: `plugins/demo_plugin/custom_demo.css`.
@@ -200,8 +202,8 @@ Allow plugin to add content in page footer and include their own JS files.
`$data` is an array containing:
- * `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.).
- * `_LOGGEDIN_`: true if user is logged in, false otherwise.
+- `_PAGE_`: current target page (eg: `linklist`, `picwall`, etc.).
+- `_LOGGEDIN_`: true if user is logged in, false otherwise.
##### Template placeholders
@@ -209,12 +211,12 @@ Items can be displayed in templates by adding an entry in `$data[''
List of placeholders:
- * `text`: called after the end of the footer text.
- * `endofpage`: called at the end of the page.
+- `text`: called after the end of the footer text.
+- `endofpage`: called at the end of the page.

- * `js_files`: called at the end of the page, to include custom JS scripts.
+- `js_files`: called at the end of the page, to include custom JS scripts.
> Note: only add the path of the JS file. E.g: `plugins/demo_plugin/custom_demo.js`.
@@ -228,8 +230,8 @@ It allows to add content at the begining and end of the page, after every link d
`$data` is an array containing:
- * `_LOGGEDIN_`: true if user is logged in, false otherwise.
- * All templates data, including links.
+- `_LOGGEDIN_`: true if user is logged in, false otherwise.
+- All templates data, including links.
##### Template placeholders
@@ -237,19 +239,19 @@ Items can be displayed in templates by adding an entry in `$data[''
List of placeholders:
- * `action_plugin`: next to the button "private only" at the top and bottom of the page.
+- `action_plugin`: next to the button "private only" at the top and bottom of the page.

- * `link_plugin`: for every link, between permalink and link URL.
+- `link_plugin`: for every link, between permalink and link URL.

- * `plugin_start_zone`: before displaying the template content.
+- `plugin_start_zone`: before displaying the template content.

- * `plugin_end_zone`: after displaying the template content.
+- `plugin_end_zone`: after displaying the template content.

@@ -263,7 +265,7 @@ Allow to add fields in the form, or display elements.
`$data` is an array containing:
- * All templates data.
+- All templates data.
##### Template placeholders
@@ -271,7 +273,7 @@ Items can be displayed in templates by adding an entry in `$data[''
List of placeholders:
- * `edit_link_plugin`: after tags field.
+- `edit_link_plugin`: after tags field.

@@ -285,7 +287,7 @@ Allow to add content at the end of the page.
`$data` is an array containing:
- * All templates data.
+- All templates data.
##### Template placeholders
@@ -293,7 +295,7 @@ Items can be displayed in templates by adding an entry in `$data[''
List of placeholders:
- * `tools_plugin`: at the end of the page.
+- `tools_plugin`: at the end of the page.

@@ -307,8 +309,8 @@ Allow to add content at the top and bottom of the page.
`$data` is an array containing:
- * `_LOGGEDIN_`: true if user is logged in, false otherwise.
- * All templates data.
+- `_LOGGEDIN_`: true if user is logged in, false otherwise.
+- All templates data.
##### Template placeholders
@@ -316,9 +318,8 @@ Items can be displayed in templates by adding an entry in `$data[''
List of placeholders:
- * `plugin_start_zone`: before displaying the template content.
-
- * `plugin_end_zone`: after displaying the template content.
+- `plugin_start_zone`: before displaying the template content.
+- `plugin_end_zone`: after displaying the template content.

@@ -332,8 +333,8 @@ Allow to add content at the top and bottom of the page.
`$data` is an array containing:
- * `_LOGGEDIN_`: true if user is logged in, false otherwise.
- * All templates data.
+- `_LOGGEDIN_`: true if user is logged in, false otherwise.
+- All templates data.
##### Template placeholders
@@ -341,13 +342,12 @@ Items can be displayed in templates by adding an entry in `$data[''
List of placeholders:
- * `plugin_start_zone`: before displaying the template content.
-
- * `plugin_end_zone`: after displaying the template content.
+- `plugin_start_zone`: before displaying the template content.
+- `plugin_end_zone`: after displaying the template content.
For each tag, the following placeholder can be used:
- * `tag_plugin`: after each tag
+- `tag_plugin`: after each tag

@@ -362,8 +362,8 @@ Allow to add content at the top and bottom of the page.
`$data` is an array containing:
- * `_LOGGEDIN_`: true if user is logged in, false otherwise.
- * All templates data.
+- `_LOGGEDIN_`: true if user is logged in, false otherwise.
+- All templates data.
##### Template placeholders
@@ -371,13 +371,12 @@ Items can be displayed in templates by adding an entry in `$data[''
List of placeholders:
- * `plugin_start_zone`: before displaying the template content.
-
- * `plugin_end_zone`: after displaying the template content.
+- `plugin_start_zone`: before displaying the template content.
+- `plugin_end_zone`: after displaying the template content.
For each tag, the following placeholder can be used:
- * `tag_plugin`: after each tag
+- `tag_plugin`: after each tag
#### render_daily
@@ -389,8 +388,8 @@ Allow to add content at the top and bottom of the page, the bottom of each link
`$data` is an array containing:
- * `_LOGGEDIN_`: true if user is logged in, false otherwise.
- * All templates data, including links.
+- `_LOGGEDIN_`: true if user is logged in, false otherwise.
+- All templates data, including links.
##### Template placeholders
@@ -398,13 +397,12 @@ Items can be displayed in templates by adding an entry in `$data[''
List of placeholders:
- * `link_plugin`: used at bottom of each link.
+- `link_plugin`: used at bottom of each link.

- * `plugin_start_zone`: before displaying the template content.
-
- * `plugin_end_zone`: after displaying the template content.
+- `plugin_start_zone`: before displaying the template content.
+- `plugin_end_zone`: after displaying the template content.
#### render_feed
@@ -416,9 +414,9 @@ Allow to add tags in the feed, either in the header or for each items. Items (li
`$data` is an array containing:
- * `_LOGGEDIN_`: true if user is logged in, false otherwise.
- * `_PAGE_`: containing either `rss` or `atom`.
- * All templates data, including links.
+- `_LOGGEDIN_`: true if user is logged in, false otherwise.
+- `_PAGE_`: containing either `rss` or `atom`.
+- All templates data, including links.
##### Template placeholders
@@ -426,11 +424,11 @@ Tags can be added in feeds by adding an entry in `$data['']` array.
List of placeholders:
- * `feed_plugins_header`: used as a header tag in the feed.
+- `feed_plugins_header`: used as a header tag in the feed.
For each links:
- * `feed_plugins`: additional tag for every link entry.
+- `feed_plugins`: additional tag for every link entry.
#### save_link
@@ -442,15 +440,15 @@ Allow to alter the link being saved in the datastore.
`$data` is an array containing the link being saved:
- * id
- * title
- * url
- * shorturl
- * description
- * private
- * tags
- * created
- * updated
+- id
+- title
+- url
+- shorturl
+- description
+- private
+- tags
+- created
+- updated
#### delete_link
@@ -463,15 +461,15 @@ Allow to execute any action before the link is actually removed from the datasto
`$data` is an array containing the link being saved:
- * id
- * title
- * url
- * shorturl
- * description
- * private
- * tags
- * created
- * updated
+- id
+- title
+- url
+- shorturl
+- description
+- private
+- tags
+- created
+- updated
## Guide for template designer
@@ -485,9 +483,9 @@ Use the default one as an example.
Aside from classic RainTPL loops, plugins order is handle by JavaScript. You can just include `plugin_admin.js`, only if:
- * you're using a table.
- * you call orderUp() and orderUp() onclick on arrows.
- * you add data-line and data-order to your rows.
+- you're using a table.
+- you call orderUp() and orderUp() onclick on arrows.
+- you add data-line and data-order to your rows.
Otherwise, you can use your own JS as long as this field is send by the form:
diff --git a/doc/md/Plugins.md b/doc/md/Plugins.md
index b52b8090..7d40637f 100644
--- a/doc/md/Plugins.md
+++ b/doc/md/Plugins.md
@@ -4,9 +4,9 @@ There is a bunch of plugins shipped with Shaarli, where there is nothing to do t
If you want to install a third party plugin:
- * Download it.
- * Put it in the `plugins` directory in Shaarli's installation folder.
- * Make sure you put it correctly:
+- Download it.
+- Put it in the `plugins` directory in Shaarli's installation folder.
+- Make sure you put it correctly:
```
| index.php
diff --git a/doc/md/REST-API.md b/doc/md/REST-API.md
index 8f3f7303..f872744e 100644
--- a/doc/md/REST-API.md
+++ b/doc/md/REST-API.md
@@ -10,10 +10,10 @@ This token has to be included as an HTTP header called `Authentication: Bearer <
JWT resources :
- * [jwt.io](https://jwt.io) (including a list of client per language).
- * RFC : https://tools.ietf.org/html/rfc7519
- * https://float-middle.com/json-web-tokens-jwt-vs-sessions/
- * HackerNews thread: https://news.ycombinator.com/item?id=11929267
+- [jwt.io](https://jwt.io) (including a list of client per language).
+- RFC : https://tools.ietf.org/html/rfc7519
+- https://float-middle.com/json-web-tokens-jwt-vs-sessions/
+- HackerNews thread: https://news.ycombinator.com/item?id=11929267
### Shaarli JWT Token
diff --git a/doc/md/RSS-feeds.md b/doc/md/RSS-feeds.md
index 9d718172..d943218e 100644
--- a/doc/md/RSS-feeds.md
+++ b/doc/md/RSS-feeds.md
@@ -3,6 +3,7 @@
Feeds are available in ATOM with `?do=atom` and RSS with `do=RSS`.
Options:
+
- You can use `permalinks` in the feed URL to get permalink to Shaares instead of direct link to shaared URL.
- E.G. `https://my.shaarli.domain/?do=atom&permalinks`.
- 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.
@@ -14,6 +15,7 @@ Options:
It 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**.
For example, if you want to subscribe only to links tagged `photography`:
+
- Go to the desired Shaarli instance.
- Search for the `photography` tag in the _Filter by tag_ box. Links tagged `photography` are displayed.
- Click on the `RSS Feed` button.
diff --git a/doc/md/Release-Shaarli.md b/doc/md/Release-Shaarli.md
index 0e445272..bb2b3b5c 100644
--- a/doc/md/Release-Shaarli.md
+++ b/doc/md/Release-Shaarli.md
@@ -3,6 +3,7 @@ releases](http://git-scm.com/book/en/v2/Distributed-Git-Maintaining-a-Project#Ta
## Prerequisites
This guide assumes that you have:
+
- a GPG key matching your GitHub authentication credentials
- i.e., the email address identified by the GPG key is the same as the one in your `~/.gitconfig`
- a GitHub fork of Shaarli
@@ -43,7 +44,7 @@ TBA
```
-## Increment the version code, updated docs, create and push a signed tag
+## Increment the version code, update docs, create and push a signed tag
### Generate documentation
```bash
$ cd /path/to/shaarli
@@ -125,6 +126,7 @@ Update `README.md` so version badges display and point to the newly released Sha
### Create a GitHub release from a Git tag
From the previously drafted release:
+
- edit the release notes (if needed)
- specify the appropriate Git tag
- publish the release
@@ -132,6 +134,7 @@ From the previously drafted release:
### Generate and upload all-in-one release archives
Users with a shared hosting may have:
+
- no SSH access
- no possibility to install PHP packages or server extensions
- no possibility to run scripts
@@ -146,6 +149,7 @@ $ make release_archive
```
This will create the following archives:
+
- `shaarli-vX.Y.Z-full.tar`
- `shaarli-vX.Y.Z-full.zip`
diff --git a/doc/md/Security.md b/doc/md/Security.md
index aec37fa0..36f629af 100644
--- a/doc/md/Security.md
+++ b/doc/md/Security.md
@@ -1,27 +1,28 @@
## Client browser
-* 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
+- 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
## PHP
-* `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.
+- `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.
## Server and sessions
-* Directories are protected using `.htaccess` files
-* Forms are protected against XSRF (Cross-site requests forgery):
- * Forms which act on data (save,delete…) contain a token generated by the server.
- * Any posted form which does not contain a valid token is rejected.
- * Any token can only be used once.
- * Tokens are attached to the session and cannot be reused in another session.
-* Sessions automatically expire after 60 minutes.
-* Sessions are protected against hijacking: the session ID cannot be used from a different IP address.
+- Directories are protected using `.htaccess` files
+- Forms are protected against XSRF (Cross-site requests forgery):
+ - Forms which act on data (save,delete…) contain a token generated by the server.
+ - Any posted form which does not contain a valid token is rejected.
+ - Any token can only be used once.
+ - Tokens are attached to the session and cannot be reused in another session.
+- Sessions automatically expire after 60 minutes.
+- Sessions are protected against hijacking: the session ID cannot be used from a different IP address.
## Shaarli datastore and configuration
-* 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.
-* Links are stored as an associative array which is serialized, compressed (with deflate), base64-encoded and saved as a comment in a `.php` file.
-* Even if the server does not support `.htaccess` files, the data file will still not be readable by URL.
-* The database looks like this:
+- 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.
+- Links are stored as an associative array which is serialized, compressed (with deflate), base64-encoded and saved as a comment in a `.php` file.
+- Even if the server does not support `.htaccess` files, the data file will still not be readable by URL.
+- The database looks like this:
+
```php
```
-* 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 `@`.
+- 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/md/Server-configuration.md b/doc/md/Server-configuration.md
index 23fdbc8b..25dd49fe 100644
--- a/doc/md/Server-configuration.md
+++ b/doc/md/Server-configuration.md
@@ -5,23 +5,26 @@
## Prerequisites
### Shaarli
-* Shaarli is installed in a directory readable/writeable by the user
-* the correct read/write permissions have been granted to the web server _user and/or group_
-* for HTTPS / SSL:
- * a key pair (public, private) and a certificate have been generated
- * the appropriate server SSL extension is installed and active
+- Shaarli is installed in a directory readable/writeable by the user
+- the correct read/write permissions have been granted to the web server _user and/or group_
+- for HTTPS / SSL:
+ - a key pair (public, private) and a certificate have been generated
+ - the appropriate server SSL extension is installed and active
### HTTPS, TLS and self-signed certificates
Related guides:
-* [How to Create Self-Signed SSL Certificates with OpenSSL](http://www.xenocafe.com/tutorials/linux/centos/openssl/self_signed_certificates/index.php)
-* [How do I create my own Certificate Authority?](https://workaround.org/certificate-authority)
-* 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`
+
+- [How to Create Self-Signed SSL Certificates with OpenSSL](http://www.xenocafe.com/tutorials/linux/centos/openssl/self_signed_certificates/index.php)
+- [How do I create my own Certificate Authority?](https://workaround.org/certificate-authority)
+- 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`
### Proxies
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:
-- `X-Forwarded-Proto`;
-- `X-Forwarded-Host`;
-- `X-Forwarded-For`.
+
+- `X-Forwarded-Proto`
+- `X-Forwarded-Host`
+- `X-Forwarded-For`
See also [proxy-related](https://github.com/shaarli/Shaarli/issues?utf8=%E2%9C%93&q=label%3Aproxy+) issues.
@@ -37,8 +40,9 @@ See also [proxy-related](https://github.com/shaarli/Shaarli/issues?utf8=%E2%9C%9
This configuration will log both Apache and PHP errors, which may prove useful to identify server configuration errors.
See:
-* [Apache/PHP - error log per VirtualHost](http://stackoverflow.com/q/176) (StackOverflow)
-* [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/)
+
+- [Apache/PHP - error log per VirtualHost](http://stackoverflow.com/q/176) (StackOverflow)
+- [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/)
```apache
@@ -116,34 +120,41 @@ Apache module `mod_rewrite` **must** be enabled to use the REST API. URL rewriti
Nginx 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.
Required packages:
+
- [nginx](http://nginx.org)
- [php-fpm](http://php-fpm.org) - PHP FastCGI Process Manager
Official documentation:
+
- [Beginner's guide](http://nginx.org/en/docs/beginners_guide.html)
- [ngx_http_fastcgi_module](http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html)
- [Pitfalls](http://wiki.nginx.org/Pitfalls)
Community resources:
+
- [Server-side TLS (Nginx)](https://wiki.mozilla.org/Security/Server_Side_TLS#Nginx) (Mozilla)
- [PHP configuration examples](http://kbeezie.com/nginx-configuration-examples/) (Karl Blessing)
### Common setup
Once Nginx and PHP-FPM are installed, we need to ensure:
+
- Nginx and PHP-FPM are running using the _same user and group_
- both these user and group have
- `read` permissions for Shaarli resources
- `execute` permissions for Shaarli directories _AND_ their parent directories
On a production server:
+
- `user:group` will likely be `http:http`, `www:www` or `www-data:www-data`
- files will be located under `/var/www`, `/var/http` or `/usr/share/nginx`
On a development server:
+
- files may be located in a user's home directory
- in this case, make sure both Nginx and PHP-FPM are running as the local user/group!
For all following configuration examples, this user/group pair will be used:
+
- `user:group = john:users`,
which corresponds to the following service configuration:
@@ -237,6 +248,7 @@ http {
### Modular
The previous setup is sufficient for development purposes, but has several major caveats:
+
- every content that does not match the PHP rule will be sent to client browsers:
- dotfiles - in our case, `.htaccess`
- temporary files, e.g. Vim or Emacs files: `index.php~`
@@ -342,7 +354,9 @@ http {
```
### Redirect HTTP to HTTPS
-Assuming 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.
+Assuming 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.
```nginx
# /etc/nginx/nginx.conf
diff --git a/doc/md/Server-requirements.md b/doc/md/Server-requirements.md
index b6bbd66a..bec08e49 100644
--- a/doc/md/Server-requirements.md
+++ b/doc/md/Server-requirements.md
@@ -10,12 +10,12 @@
### Supported versions
Version | Status | Shaarli compatibility
:---:|:---:|:---:
-7.1 | Supported (v0.9.x) | :white_check_mark:
-7.0 | Supported | :white_check_mark:
-5.6 | Supported | :white_check_mark:
-5.5 | EOL: 2016-07-10 | :white_check_mark:
-5.4 | EOL: 2015-09-14 | :white_check_mark: (up to Shaarli 0.8.x)
-5.3 | EOL: 2014-08-14 | :white_check_mark: (up to Shaarli 0.8.x)
+7.1 | Supported (v0.9.x) | Yes
+7.0 | Supported | Yes
+5.6 | Supported | Yes
+5.5 | EOL: 2016-07-10 | Yes
+5.4 | EOL: 2015-09-14 | Yes (up to Shaarli 0.8.x)
+5.3 | EOL: 2014-08-14 | Yes (up to Shaarli 0.8.x)
See also:
- [Travis configuration](https://github.com/shaarli/Shaarli/blob/master/.travis.yml)
diff --git a/doc/md/Server-security.md b/doc/md/Server-security.md
index 8df36f46..700084e2 100644
--- a/doc/md/Server-security.md
+++ b/doc/md/Server-security.md
@@ -1,5 +1,6 @@
## php.ini
PHP settings are defined in:
+
- a main configuration file, usually found under `/etc/php5/php.ini`; some distributions provide different configuration environments, e.g.
- `/etc/php5/php.ini` - used when running console scripts
- `/etc/php5/apache2/php.ini` - used when a client requests PHP resources from Apache
@@ -30,6 +31,7 @@ Additional .ini files parsed: /etc/php/conf.d/xdebug.ini
## fail2ban
`fail2ban` is an intrusion prevention framework that reads server (Apache, SSH, etc.) and uses `iptables` profiles to block brute-force attempts:
+
- [Official website](http://www.fail2ban.org/wiki/index.php/Main_Page)
- [Source code](https://github.com/fail2ban/fail2ban)
@@ -68,6 +70,7 @@ Disallow: /
```
See:
-- http://www.robotstxt.org/
+
+- http://www.robotstxt.org
- http://www.robotstxt.org/robotstxt.html
- http://www.robotstxt.org/meta.html
diff --git a/doc/md/Shaarli-configuration.md b/doc/md/Shaarli-configuration.md
index 0c605459..188a3c09 100644
--- a/doc/md/Shaarli-configuration.md
+++ b/doc/md/Shaarli-configuration.md
@@ -42,70 +42,70 @@ See also [Plugin System](Plugin-System.html).
### Credentials
-> You shouldn't edit those.
+_These settings should not be edited_
-**login**: Login username.
-**hash**: Generated password hash.
-**salt**: Password salt.
+- **login**: Login username.
+- **hash**: Generated password hash.
+- **salt**: Password salt.
### General
-**title**: Shaarli's instance title.
-**header_link**: Link to the homepage.
-**links_per_page**: Number of shaares displayed per page.
-**timezone**: See [the list of supported timezones](http://php.net/manual/en/timezones.php).
-**enabled_plugins**: List of enabled plugins.
+- **title**: Shaarli's instance title.
+- **header_link**: Link to the homepage.
+- **links_per_page**: Number of shaares displayed per page.
+- **timezone**: See [the list of supported timezones](http://php.net/manual/en/timezones.php).
+- **enabled_plugins**: List of enabled plugins.
### Security
-**session_protection_disabled**: Disable session cookie hijacking protection (not recommended).
-It might be useful if your IP adress often changes.
-**ban_after**: Failed login attempts before being IP banned.
-**ban_duration**: IP ban duration in seconds.
-**open_shaarli**: Anyone can add a new link while logged out if enabled.
-**trusted_proxies**: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy.
-**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"]`).
+- **session_protection_disabled**: Disable session cookie hijacking protection (not recommended).
+ It might be useful if your IP adress often changes.
+- **ban_after**: Failed login attempts before being IP banned.
+- **ban_duration**: IP ban duration in seconds.
+- **open_shaarli**: Anyone can add a new link while logged out if enabled.
+- **trusted_proxies**: List of trusted IP which won't be banned after failed login attemps. Useful if Shaarli is behind a reverse proxy.
+- **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"]`).
### Resources
-**data_dir**: Data directory.
-**datastore**: Shaarli's links database file path.
-**history**: Shaarli's operation history file path.
-**updates**: File path for the ran updates file.
-**log**: Log file path.
-**update_check**: Last update check file path.
-**raintpl_tpl**: Templates directory.
-**raintpl_tmp**: Template engine cache directory.
-**thumbnails_cache**: Thumbnails cache directory.
-**page_cache**: Shaarli's internal cache directory.
-**ban_file**: Banned IP file path.
+- **data_dir**: Data directory.
+- **datastore**: Shaarli's links database file path.
+- **history**: Shaarli's operation history file path.
+- **updates**: File path for the ran updates file.
+- **log**: Log file path.
+- **update_check**: Last update check file path.
+- **raintpl_tpl**: Templates directory.
+- **raintpl_tmp**: Template engine cache directory.
+- **thumbnails_cache**: Thumbnails cache directory.
+- **page_cache**: Shaarli's internal cache directory.
+- **ban_file**: Banned IP file path.
### Updates
-**check_updates**: Enable or disable update check to the git repository.
-**check_updates_branch**: Git branch used to check updates (e.g. `stable` or `master`).
-**check_updates_interval**: Look for new version every N seconds (default: every day).
+- **check_updates**: Enable or disable update check to the git repository.
+- **check_updates_branch**: Git branch used to check updates (e.g. `stable` or `master`).
+- **check_updates_interval**: Look for new version every N seconds (default: every day).
### Privacy
-**default_private_links**: Check the private checkbox by default for every new link.
-**hide_public_links**: All links are hidden while logged out.
-**hide_timestamps**: Timestamps are hidden.
+- **default_private_links**: Check the private checkbox by default for every new link.
+- **hide_public_links**: All links are hidden while logged out.
+- **hide_timestamps**: Timestamps are hidden.
### Feed
-**rss_permalinks**: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL.
-**show_atom**: Display ATOM feed button.
+- **rss_permalinks**: Enable this to redirect RSS links to Shaarli's permalinks instead of shaared URL.
+- **show_atom**: Display ATOM feed button.
### Thumbnail
-**enable_thumbnails**: Enable or disable thumbnail display.
-**enable_localcache**: Enable or disable local cache.
+- **enable_thumbnails**: Enable or disable thumbnail display.
+- **enable_localcache**: Enable or disable local cache.
### Redirector
-**url**: Redirector URL, such as `anonym.to`.
-**encode_url**: Enable this if the redirector needs encoded URL to work properly.
+- **url**: Redirector URL, such as `anonym.to`.
+- **encode_url**: Enable this if the redirector needs encoded URL to work properly.
## Configuration file example
@@ -211,7 +211,7 @@ It might be useful if your IP adress often changes.
## Additional configuration
-The playvideos plugin may require that you adapt your server's
+The `playvideos` plugin may require that you adapt your server's
[Content Security Policy](https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md#troubleshooting)
-configuration to work properly.[](.html)
+configuration to work properly.
diff --git a/doc/md/Static-analysis.md b/doc/md/Static-analysis.md
index ee4f5978..29d98362 100644
--- a/doc/md/Static-analysis.md
+++ b/doc/md/Static-analysis.md
@@ -1,5 +1,6 @@
## WIP
This topic is currently being discussed here:
+
- [Fix coding style (static analysis)](https://github.com/shaarli/Shaarli/issues/95) (#95)
- [Continuous Integration tools & features](https://github.com/shaarli/Shaarli/issues/130) (#130)
@@ -7,5 +8,6 @@ This topic is currently being discussed here:
Static analysis tools can be installed with Composer, and used through Shaarli's [Makefile](https://github.com/shaarli/Shaarli/blob/master/Makefile).
For an overview of the available features, see:
+
- [Code quality: Makefile to run static code checkers](https://github.com/shaarli/Shaarli/pull/124) (#124)
- [Run PHPCS against different coding standards](https://github.com/shaarli/Shaarli/pull/276) (#276)
diff --git a/doc/md/Theming.md b/doc/md/Theming.md
index d72c2ffd..61a100d1 100644
--- a/doc/md/Theming.md
+++ b/doc/md/Theming.md
@@ -8,6 +8,7 @@ There are two ways of customizing how Shaarli looks:
## Custom CSS
Shaarli's appearance can be modified by adding CSS rules to:
+
- Shaarli < `v0.9.0`: `inc/user.css`
- Shaarli >= `v0.9.0`: `data/user.css`
@@ -22,6 +23,7 @@ See also [Download CSS styles from an OPML list](Download CSS styles from an OPM
_WARNING - This feature is currently being worked on and will be improved in the next releases. Experimental._
Installation:
+
- find a theme you'd like to install
- copy or clone the theme folder under `tpl/`
- enable the theme:
@@ -54,6 +56,7 @@ Installation:
## Example installation: AlbinoMouse theme
With the following configuration:
+
- Apache 2 / PHP 5.6
- user sites are enabled, e.g. `/home/user/public_html/somedir` is served as `http://localhost/~user/somedir`
- `http` is the name of the Apache user
@@ -77,7 +80,7 @@ Get config written:
- fill the install form
- log in to Shaarli
-Edit Shaarli's [configuration|Shaarli configuration](configuration|Shaarli configuration):
+Edit Shaarli's [configuration](Shaarli-configuration):
```bash
# the file should be owned by Apache, thus not writeable => sudo
$ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php
diff --git a/doc/md/Troubleshooting.md b/doc/md/Troubleshooting.md
index 13005526..b2d86d40 100644
--- a/doc/md/Troubleshooting.md
+++ b/doc/md/Troubleshooting.md
@@ -7,6 +7,7 @@
Depending on its configuration and installed plugins, the browser may remove or alter (spoof) HTTP referers, thus preventing Shaarli from properly redirecting between pages.
See:
+
- [HTTP referer](https://en.wikipedia.org/wiki/HTTP_referer) (Wikipedia)
- [Improve online privacy by controlling referrer information](http://www.ghacks.net/2015/01/22/improve-online-privacy-by-controlling-referrer-information/)
- [Better security, privacy and anonymity in Firefox](http://b.agilob.net/better-security-privacy-and-anonymity-in-firefox/)
@@ -16,29 +17,35 @@ See:
HTTP settings are available by browsing `about:config`, here are the available settings and their values.
`network.http.sendRefererHeader` - determines when to send the Referer HTTP header
-- 0: Never send the referring URL
+
+- `0`: Never send the referring URL
- not recommended, may break some sites
-- 1: Send only on clicked links
-- 2 (default): Send for links and images
+- `1`: Send only on clicked links
+- `2` (default): Send for links and images
`network.http.referer.XOriginPolicy` - Cross-domain origin policy
-- 0 (default): Always send
-- 1: Send if base domains match
-- 2: Send if hosts match
+
+- `0` (default): Always send
+- `1`: Send if base domains match
+- `2`: Send if hosts match
`network.http.referer.spoofSource` - Referer spoofing (~faking)
-- false (default): real referer
-- true: spoof referer (use target URI as referer)
- - known to break some functionality in Shaarli
+
+- `false` (default): real referer
+- `true`: spoof referer (use target URI as referer)
+ - known to break some functionality in Shaarli
`network.http.referer.trimmingPolicy` - trim the URI not to send a full Referer
-- 0 (default): send full URI
-- 1: scheme+host+port+path
-- 2: scheme+host+port
+
+- `0`: (default): send full URI
+- `1`: scheme+host+port+path
+- `2`: scheme+host+port
### Firefox, localhost and redirections
-`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.
+`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.
To solve this, assign a local domain to your host, e.g.
```
@@ -73,17 +80,20 @@ Search for `failed` in this file to look for unauthorized login attempts.
### Old PHP versions
- * 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:
+On **free.fr**: free.fr now supports 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:
-```ini
+```xml
php56 1
```
- * 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`
- * 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).
- * 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:
+- 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`
+- 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).
+- 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:
```php
//list($status,$headers,$data) = getHTTP($url,4); // Short timeout to keep the application responsive.
@@ -91,8 +101,8 @@ php56 1
//if (strpos($status,'200 OK')) $title=html_extract_title($data);
```
- * On hosts which forbid outgoing HTTP requests (such as free.fr), some thumbnails will not work.
- * 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`
+- On hosts which forbid outgoing HTTP requests (such as free.fr), some thumbnails will not work.
+- 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`
### Dates are not properly formatted
@@ -102,17 +112,16 @@ Shaarli tries to sniff the language of the browser (using HTTP_ACCEPT_LANGUAGE h
On **CentOS**/RedHat derivatives, you may need to install the `php-mbstring` package.
-
### My session expires! I can't stay logged in
This can be caused by several things:
-* 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.
-* 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 !)
-* 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).
-* Some browser addons may interfer with HTTP headers (ipfuck/ipflood/GreaseMonkey…). Try disabling those.
-* You may be using OperaTurbo or OperaMini, which use their own proxies which may change from time to time.
-* If you have another application on the same webserver where Shaarli is installed, these application may forcefully expire php sessions.
+- 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.
+- 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 !)
+- 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).
+- Some browser addons may interfer with HTTP headers (ipfuck/ipflood/GreaseMonkey…). Try disabling those.
+- You may be using OperaTurbo or OperaMini, which use their own proxies which may change from time to time.
+- If you have another application on the same webserver where Shaarli is installed, these application may forcefully expire php sessions.
## Sessions do not seem to work correctly on your server
diff --git a/doc/md/Unit-tests.md b/doc/md/Unit-tests.md
index 19838721..d200634f 100644
--- a/doc/md/Unit-tests.md
+++ b/doc/md/Unit-tests.md
@@ -3,8 +3,9 @@
The framework used is [PHPUnit](https://phpunit.de/); it can be installed with [Composer](https://getcomposer.org/), which is a dependency management tool.
Regarding Composer, you can either use:
-* a system-wide version, e.g. installed through your distro's package manager
-* a local version, downloadable [here](https://getcomposer.org/download/)
+
+- a system-wide version, e.g. installed through your distro's package manager
+- a local version, downloadable [here](https://getcomposer.org/download/)
#### Sample usage
@@ -118,18 +119,20 @@ Tests: 36, Assertions: 63, Errors: 1, Failures: 2.
By default, PHPUnit will run all suitable tests found under the `tests` directory.
Each test has 3 possible outcomes:
-* `.` - success
-* `F` - failure: the test was run but its results are invalid
- * the code does not behave as expected
- * dependencies to external elements: globals, session, cache...
-* `E` - error: something went wrong and the tested code has crashed
- * typos in the code, or in the test code
- * dependencies to missing external elements
+
+- `.` - success
+- `F` - failure: the test was run but its results are invalid
+ - the code does not behave as expected
+ - dependencies to external elements: globals, session, cache...
+- `E` - error: something went wrong and the tested code has crashed
+ - typos in the code, or in the test code
+ - dependencies to missing external elements
If Xdebug has been installed and activated, two coverage reports will be generated:
-* a summary in the console
-* a detailed HTML report with metrics for tested code
- * to open it in a web browser: `firefox coverage/index.html &`
+
+- a summary in the console
+- a detailed HTML report with metrics for tested code
+ - to open it in a web browser: `firefox coverage/index.html &`
### Executing specific tests
diff --git a/doc/md/Upgrade-and-migration.md b/doc/md/Upgrade-and-migration.md
index 2002a4e2..b3a08764 100644
--- a/doc/md/Upgrade-and-migration.md
+++ b/doc/md/Upgrade-and-migration.md
@@ -8,6 +8,7 @@ The current version is present in the `version.php` file.
### Backup your data
Shaarli stores all user data under the `data` directory:
+
- `data/config.php` - main configuration file
- `data/datastore.php` - bookmarked links
- `data/ipbans.php` - banned IP addresses
@@ -16,6 +17,7 @@ Shaarli stores all user data under the `data` directory:
See [Shaarli configuration](Shaarli configuration) for more information about Shaarli resources.
It is recommended to backup this repository _before_ starting updating/upgrading Shaarli:
+
- users with SSH access: copy or archive the directory to a temporary location
- users with FTP access: download a local copy of your Shaarli installation using your favourite client
@@ -75,6 +77,7 @@ Updating dependencies
If 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.
The following guide assumes that:
+
- 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)
- the default remote is named `origin` and points to Sebsauvage's repository
- the current branch is `master`
@@ -174,7 +177,7 @@ After migrating, access your fresh Shaarli installation from a web browser; the
## Troubleshooting
-If the solutions provided here doesn't work, please open an issue specifying which version you're upgrading from and to.
+If the solutions provided here don't work, please open an issue specifying which version you're upgrading from and to.
### You must specify an integer as a key
@@ -185,10 +188,10 @@ Take a look at `data/updates.txt` content.
Try to delete it and refresh your page while being logged in.
-#### `updates.txt` doesn't exists or doesn't contain `updateMethodDatastoreIds`
+#### `updates.txt` doesn't exist or doesn't contain `updateMethodDatastoreIds`
- 1. Create `data/updates.txt` if it doesn't exist.
- 2. Paste this string in the update file `;updateMethodRenameDashTags;`
- 3. Login to Shaarli.
- 4. Delete the update file.
- 5. Refresh.
+1. Create `data/updates.txt` if it doesn't exist
+2. Paste this string in the update file `;updateMethodRenameDashTags;`
+3. Login to Shaarli
+4. Delete the update file
+5. Refresh
diff --git a/doc/md/Various-hacks.md b/doc/md/Various-hacks.md
index a4ae81f4..0074ae9f 100644
--- a/doc/md/Various-hacks.md
+++ b/doc/md/Various-hacks.md
@@ -19,15 +19,15 @@ php -r 'print(json_encode(unserialize(gzinflate(base64_decode(preg_replace("!.*/
### Changing the timestamp for a shaare
-* Look for `` in `tpl/editlink.tpl` (line 14)
-* Replace `type="hidden"` with `type="text"` from this line
-* A new date/time field becomes available in the edit/new link dialog.
-* You can set the timestamp manually by entering it in the format `YYYMMDD_HHMMS`.
+- Look for `` in `tpl/editlink.tpl` (line 14)
+- Replace `type="hidden"` with `type="text"` from this line
+- A new date/time field becomes available in the edit/new link dialog.
+- You can set the timestamp manually by entering it in the format `YYYMMDD_HHMMS`.
### See also
- * [Add a new custom field to shaares (example patch)](https://gist.github.com/nodiscc/8b0194921f059d7b9ad89a581ecd482c)
- * [Download CSS styles for shaarlis listed in an opml file](https://gist.github.com/nodiscc/dede231c92cab22c3ad2cc24d5035012)
- * [Copy an existing Shaarli installation over SSH, and serve it locally](https://gist.github.com/nodiscc/ed161c66e5b028b5299b0a3733d01c77)
- * [Create multiple Shaarli instances, generate an HTML index of them](https://gist.github.com/nodiscc/52e711cda3bc47717c16065231cf6b20)
\ No newline at end of file
+- [Add a new custom field to shaares (example patch)](https://gist.github.com/nodiscc/8b0194921f059d7b9ad89a581ecd482c)
+- [Download CSS styles for shaarlis listed in an opml file](https://gist.github.com/nodiscc/dede231c92cab22c3ad2cc24d5035012)
+- [Copy an existing Shaarli installation over SSH, and serve it locally](https://gist.github.com/nodiscc/ed161c66e5b028b5299b0a3733d01c77)
+- [Create multiple Shaarli instances, generate an HTML index of them](https://gist.github.com/nodiscc/52e711cda3bc47717c16065231cf6b20)
diff --git a/doc/md/Versioning-and-Branches.md b/doc/md/Versioning-and-Branches.md
index e1d998e0..7097ca0a 100644
--- a/doc/md/Versioning-and-Branches.md
+++ b/doc/md/Versioning-and-Branches.md
@@ -8,10 +8,10 @@ The `master` branch is the development branch. Any new change MUST go through th
Remarks:
- * This branch shouldn't be used for production as it isn't necessary stable.
- * 3rd party aren't required to be compatible with the latest changes.
- * Official plugins, themes and libraries (contained within Shaarli organization repos) must be compatible with the master branch.
- * The version in this branch is always `dev`.
+- This branch shouldn't be used for production as it isn't necessary stable.
+- 3rd party aren't required to be compatible with the latest changes.
+- Official plugins, themes and libraries (contained within Shaarli organization repos) must be compatible with the master branch.
+- The version in this branch is always `dev`.
## `v0.x` branch
@@ -37,7 +37,7 @@ For example, the current latest release is `v0.8.3`, the stable branch is an ali
Remarks:
- * Shaarli release pace isn't fast, and the stable branch might be a few months behind the latest release.
+- Shaarli release pace isn't fast, and the stable branch might be a few months behind the latest release.
## Releases
diff --git a/doc/md/index.md b/doc/md/index.md
index 1106334b..b10e3cf4 100644
--- a/doc/md/index.md
+++ b/doc/md/index.md
@@ -80,7 +80,8 @@ See the [API documentation](http://shaarli.github.io/api-documentation/).
### Other usages
Though Shaarli is primarily a bookmarking application, it can serve other purposes
-(see [usage examples](https://github.com/shaarli/Shaarli/wiki#usage-examples)):
+(see [Features](Features)):
+
- micro-blogging
- pastebin
- online notepad
--
cgit v1.2.3
From 28439d63b8bb3b0ffea0a5b99e7c3c1e041c00eb Mon Sep 17 00:00:00 2001
From: VirtualTam
Date: Sat, 5 Aug 2017 12:05:10 +0200
Subject: documentation: remove duplicate "Coding guidelines" page
The information is already present under "Static analysis"
Signed-off-by: VirtualTam
---
doc/md/Coding-guidelines.md | 6 ------
1 file changed, 6 deletions(-)
delete mode 100644 doc/md/Coding-guidelines.md
(limited to 'doc')
diff --git a/doc/md/Coding-guidelines.md b/doc/md/Coding-guidelines.md
deleted file mode 100644
index 5d1e2531..00000000
--- a/doc/md/Coding-guidelines.md
+++ /dev/null
@@ -1,6 +0,0 @@
-## WIP
-
-This topic is currently being discussed here:
-
-- [Fix coding style (static analysis)](https://github.com/shaarli/Shaarli/issues/95) (#95)
-- [Continuous Integration tools & features](https://github.com/shaarli/Shaarli/issues/130) (#130)
--
cgit v1.2.3
From 7f876cf62babd0c1512f9004f4bcad2dcb551b5b Mon Sep 17 00:00:00 2001
From: VirtualTam
Date: Sat, 5 Aug 2017 12:08:09 +0200
Subject: documentation: update release download and usage information
Signed-off-by: VirtualTam
---
doc/md/Download-and-Installation.md | 8 ++++----
doc/md/Theming.md | 2 --
2 files changed, 4 insertions(+), 6 deletions(-)
(limited to 'doc')
diff --git a/doc/md/Download-and-Installation.md b/doc/md/Download-and-Installation.md
index cdc503a8..135f0633 100644
--- a/doc/md/Download-and-Installation.md
+++ b/doc/md/Download-and-Installation.md
@@ -18,13 +18,13 @@ Get the latest released version from the [releases](https://github.com/shaarli/S
**Download our *shaarli-full* archive** to include dependencies.
-The current latest released version is `v0.8.4`
+The current latest released version is `v0.9.0`
Or in command lines:
```bash
-$ wget https://github.com/shaarli/Shaarli/releases/download/v0.8.4/shaarli-v0.8.4-full.zip
-$ unzip shaarli-v0.8.4-full.zip
+$ wget https://github.com/shaarli/Shaarli/releases/download/v0.9.0/shaarli-v0.9.0-full.zip
+$ unzip shaarli-v0.9.0-full.zip
$ mv Shaarli /path/to/shaarli/
```
@@ -34,7 +34,7 @@ In most cases, download Shaarli from the [releases](https://github.com/shaarli/S
```
$ mkdir -p /path/to/shaarli && cd /path/to/shaarli/
-$ git clone -b v0.8 https://github.com/shaarli/Shaarli.git .
+$ git clone -b v0.9 https://github.com/shaarli/Shaarli.git .
$ composer install --no-dev --prefer-dist
```
diff --git a/doc/md/Theming.md b/doc/md/Theming.md
index 61a100d1..bd400776 100644
--- a/doc/md/Theming.md
+++ b/doc/md/Theming.md
@@ -20,8 +20,6 @@ See also [Download CSS styles from an OPML list](Download CSS styles from an OPM
## Themes
-_WARNING - This feature is currently being worked on and will be improved in the next releases. Experimental._
-
Installation:
- find a theme you'd like to install
--
cgit v1.2.3
From e62486dd6a76fc77f062b81c861eb3ee807b1682 Mon Sep 17 00:00:00 2001
From: VirtualTam
Date: Sat, 5 Aug 2017 14:15:59 +0200
Subject: documentation: rewrite the REST API PHP client example
Closes https://github.com/shaarli/Shaarli/issues/905
Relates to https://github.com/shaarli/Shaarli/pull/751
See https://shaarli.github.io/api-documentation/
Signed-off-by: VirtualTam
---
doc/md/REST-API.md | 57 +++++++++++++++++++++++++++++++++++-------------------
1 file changed, 37 insertions(+), 20 deletions(-)
(limited to 'doc')
diff --git a/doc/md/REST-API.md b/doc/md/REST-API.md
index f872744e..ad407749 100644
--- a/doc/md/REST-API.md
+++ b/doc/md/REST-API.md
@@ -68,37 +68,54 @@ $signature = hash_hmac('sha512', $content, $secret);
```
-### Complete example
+### Complete examples
-#### PHP
+### PHP
+
+This example uses the [PHP cURL](http://php.net/manual/en/book.curl.php) library.
```php
+ `ewogICAgICAgICJ0eXAiOiAiSldUIiwKICAgICAgICAiYWxnIjogIkhTNTEyIgogICAgfQ==.ewogICAgICAgICJpYXQiOiAxNDY4NjY3MDQ3CiAgICB9.1d2c54fa947daf594fdbf7591796195652c8bc63bffad7f6a6db2a41c313f495a542cbfb595acade79e83f3810d709b4251d7b940bbc10b531a6e6134af63a68`
+function getInfo($baseUrl, $secret) {
+ $token = generateToken($secret);
+ $endpoint = rtrim($baseUrl, '/') . '/api/v1/info';
-```php
-$options = [
- 'http' => [
- 'method' => 'GET',
- 'jwt' => $token,
- ],
-];
-$context = stream_context_create($options);
-file_get_contents($apiEndpoint, false, $context);
+ $headers = [
+ 'Content-Type: text/plain; charset=UTF-8',
+ 'Authorization: Bearer ' . $token,
+ ];
+
+ $ch = curl_init($endpoint);
+ curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+ curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
+ curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
+
+ $result = curl_exec($ch);
+ curl_close($ch);
+
+ return $result;
+}
+
+var_dump(getInfo($baseUrl, $secret));
```
--
cgit v1.2.3
From 61f63d1086b2181ef92976338e593414199d1275 Mon Sep 17 00:00:00 2001
From: VirtualTam
Date: Sat, 5 Aug 2017 14:30:43 +0200
Subject: documentation: add links to example REST API clients
Signed-off-by: VirtualTam
---
doc/md/REST-API.md | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
(limited to 'doc')
diff --git a/doc/md/REST-API.md b/doc/md/REST-API.md
index ad407749..f3f0b17a 100644
--- a/doc/md/REST-API.md
+++ b/doc/md/REST-API.md
@@ -68,7 +68,12 @@ $signature = hash_hmac('sha512', $content, $secret);
```
-### Complete examples
+## Clients and examples
+### Android, Java, Kotlin
+
+- [Android client example with Kotlin](https://gitlab.com/snippets/1665808)
+ by [Braincoke](https://github.com/Braincoke)
+
### PHP
@@ -119,3 +124,11 @@ function getInfo($baseUrl, $secret) {
var_dump(getInfo($baseUrl, $secret));
```
+
+
+### Python
+
+See the reference API client:
+
+- [Documentation](http://python-shaarli-client.readthedocs.io/en/latest/) on ReadTheDocs
+- [python-shaarli-client](https://github.com/shaarli/python-shaarli-client) on Github
--
cgit v1.2.3
From 23daed648c94022098794e17fee54b3627b29275 Mon Sep 17 00:00:00 2001
From: VirtualTam
Date: Sat, 5 Aug 2017 14:33:07 +0200
Subject: documentation: remove obsolete doc release instructions
Signed-off-by: VirtualTam
---
doc/md/Release-Shaarli.md | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
(limited to 'doc')
diff --git a/doc/md/Release-Shaarli.md b/doc/md/Release-Shaarli.md
index bb2b3b5c..8ff0a080 100644
--- a/doc/md/Release-Shaarli.md
+++ b/doc/md/Release-Shaarli.md
@@ -45,31 +45,12 @@ TBA
## Increment the version code, update docs, create and push a signed tag
-### Generate documentation
-```bash
-$ cd /path/to/shaarli
-
-# create a new branch
-$ git fetch upstream
-$ git checkout upstream/master -b v0.5.0
-
-# rebuild the HTML documentation from Markdown
-$ make htmlpages
-
-# commit the changes
-$ git add doc
-$ git commit -s -m "Generate documentation for v0.5.0"
-
-# push the commit on your GitHub fork
-$ git push origin v0.5.0
-```
-
### Create and merge a Pull Request
This one is pretty straightforward ;-)
### Bump Shaarli version to v0.x branch
-```
+```bash
$ git checkout master
$ git fetch upstream
$ git pull upstream master
--
cgit v1.2.3
From f320efd689f17737ccbdef46cdc430d9e637b807 Mon Sep 17 00:00:00 2001
From: VirtualTam
Date: Sat, 5 Aug 2017 14:46:05 +0200
Subject: documentation: elaborate on REST API server & client prerequisites
Relates to https://github.com/shaarli/Shaarli/issues/903
Relates to https://github.com/shaarli/Shaarli/issues/905
Signed-off-by: VirtualTam
---
doc/md/REST-API.md | 22 ++++++++++++++++++----
doc/md/Server-requirements.md | 1 +
2 files changed, 19 insertions(+), 4 deletions(-)
(limited to 'doc')
diff --git a/doc/md/REST-API.md b/doc/md/REST-API.md
index f3f0b17a..0b8aba8a 100644
--- a/doc/md/REST-API.md
+++ b/doc/md/REST-API.md
@@ -1,6 +1,18 @@
-## Usage
+## Usage and Prerequisites
-See the [REST API documentation](http://shaarli.github.io/api-documentation/).
+See the [REST API documentation](http://shaarli.github.io/api-documentation/)
+for a list of available endpoints and parameters.
+
+Please ensure that your server meets the [requirements](Server-requirements)
+and is properly [configured](Server-configuration):
+
+- URL rewriting is enabled (see specific Apache and Nginx sections)
+- the server's timezone is properly defined
+- the server's clock is synchronized with
+ [NTP](https://en.wikipedia.org/wiki/Network_Time_Protocol)
+
+The host where the API client is invoked should also be synchronized with NTP,
+see [token expiration](#payload).
## Authentication
@@ -43,9 +55,11 @@ ewogICAgICAgICJ0eXAiOiAiSldUIiwKICAgICAgICAiYWxnIjogIkhTNTEyIgogICAgfQ==
#### Payload
-**Validity duration**
+**Token expiration**
-To 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.
+To avoid infinite token validity, JWT tokens must include their creation date
+in UNIX timestamp format (timezone independent - UTC) under the key `iat` (issued at).
+This token will be valid during **9 minutes**.
```json
{
diff --git a/doc/md/Server-requirements.md b/doc/md/Server-requirements.md
index bec08e49..707af762 100644
--- a/doc/md/Server-requirements.md
+++ b/doc/md/Server-requirements.md
@@ -18,6 +18,7 @@ Version | Status | Shaarli compatibility
5.3 | EOL: 2014-08-14 | Yes (up to Shaarli 0.8.x)
See also:
+
- [Travis configuration](https://github.com/shaarli/Shaarli/blob/master/.travis.yml)
### Dependency management
--
cgit v1.2.3
From 57c628e195f0072867829220d2373ef15f23bc7c Mon Sep 17 00:00:00 2001
From: VirtualTam
Date: Tue, 8 Aug 2017 22:02:50 +0200
Subject: documentation: update 3rd-party resources
Relates to https://github.com/shaarli/Shaarli/issues/915
Signed-off-by: VirtualTam
---
doc/md/Community-&-Related-software.md | 43 ++++++++++++++++++++--------------
doc/md/REST-API.md | 5 ++++
2 files changed, 30 insertions(+), 18 deletions(-)
(limited to 'doc')
diff --git a/doc/md/Community-&-Related-software.md b/doc/md/Community-&-Related-software.md
index 13b07b6f..8edbeefa 100644
--- a/doc/md/Community-&-Related-software.md
+++ b/doc/md/Community-&-Related-software.md
@@ -1,6 +1,5 @@
-_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._
-
-_TODO: contact repos owners to see if they'd like to standardize their work with the community fork._
+_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._
## Community
- [Liens en vrac de sebsauvage](http://sebsauvage.net/links/) - the original Shaarli
@@ -13,15 +12,19 @@ _TODO: contact repos owners to see if they'd like to standardize their work with
- [Original revisions history](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:history)
- [Shaarli.fr/my](https://www.shaarli.fr/my.php) - Unofficial, unsupported (old fork) hosted Shaarlis provider, courtesy of [DMeloni](https://github.com/DMeloni)
+
### Articles and social media discussions
- 2016-09-22 - Hacker News - https://news.ycombinator.com/item?id=12552176
- 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/)
- 2015-06-22 - Hacker News - https://news.ycombinator.com/item?id=9755366
- 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/)
-### Third party plugins
+
+### REST API clients
+See [REST API](REST-API) for a list of official and community clients.
+### Third party plugins
- [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.
- [Code Coloration](https://github.com/ArthurHoaro/code-coloration) by [@ArthurHoaro](https://github.com/ArthurHoaro): client side code syntax highlighter.
- [Disqus](https://github.com/kalvn/shaarli-plugin-disqus) by [@kalvn](https://github.com/kalvn): Adds Disqus comment system to your Shaarli.
@@ -33,28 +36,32 @@ _TODO: contact repos owners to see if they'd like to standardize their work with
- [shaarli2twitter](https://github.com/ArthurHoaro/shaarli2twitter) by [@ArthurHoaro](https://github.com/ArthurHoaro) - Automatically tweet your shared links from Shaarli
-### Themes
-See [Theming](Theming) for the list of community-contributed themes, and an installation guide.
+### Third-party themes
+See [Theming](Theming) for a list of community-contributed themes, and an installation guide.
+
+
+## Integration with other platforms
+- [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
+- [octopress-shaarli](https://github.com/ahmet2mir/octopress-shaarli) - Octopress plugin to retrieve Shaarli links on the sidebar
+- [Scuttle to Shaarli](https://github.com/q2apro/scuttle-to-shaarli) - Import bookmarks from Scuttle
+
+
+### Mobile Apps
+- [ShaarliOS](https://github.com/mro/ShaarliOS) iOS share extension - see [#308](https://github.com/shaarli/Shaarli/issues/308#issuecomment-184592070) for some promo codes,
+- [Shaarli for Android](http://sebsauvage.net/links/?ZAyDzg) - Android application that adds Shaarli as a sharing provider
+- [Shaarlier for Android](https://github.com/dimtion/Shaarlier) - Android application to simply add links directly into your Shaarli
+
### Server apps
- [shaarchiver](https://github.com/nodiscc/shaarchiver) - Archive your Shaarli bookmarks and their content
- [shaarli-river](https://github.com/mknexen/shaarli-river) - An aggregator for shaarlis with many features
-- [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/))
+- [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/))
- [Shaarlimages](https://github.com/BoboTiG/shaarlimages) - An image-oriented aggregator for Shaarlis
- [mknexen/shaarli-api](https://github.com/mknexen/shaarli-api) - A REST API for Shaarli
- [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).
- [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.
-### Mobile Apps
-- [ShaarliOS](https://github.com/mro/ShaarliOS) iOS share extension - see [#308](https://github.com/shaarli/Shaarli/issues/308#issuecomment-184592070) for some promo codes,
-- [Shaarli for Android](http://sebsauvage.net/links/?ZAyDzg) - Android application that adds Shaarli as a sharing provider
-- [Shaarlier for Android](https://github.com/dimtion/Shaarlier) - Android application to simply add links directly into your Shaarli
-
-## Integration with other platforms
-- [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
-- [octopress-shaarli](https://github.com/ahmet2mir/octopress-shaarli) - Octopress plugin to retrieve Shaarli links on the sidebar
-- [Scuttle to Shaarli](https://github.com/q2apro/scuttle-to-shaarli) - Import bookmarks from Scuttle
## Alternatives to Shaarli
-
-See the [bookmarks & link sharing](https://github.com/Kickball/awesome-selfhosted/#bookmarks--link-sharing) section on [awesome-selfhosted](https://github.com/Kickball/awesome-selfhosted/).
+See the [bookmarks & link sharing](https://github.com/Kickball/awesome-selfhosted/#bookmarks--link-sharing)
+section on [awesome-selfhosted](https://github.com/Kickball/awesome-selfhosted/).
diff --git a/doc/md/REST-API.md b/doc/md/REST-API.md
index 0b8aba8a..68a83c00 100644
--- a/doc/md/REST-API.md
+++ b/doc/md/REST-API.md
@@ -88,6 +88,11 @@ $signature = hash_hmac('sha512', $content, $secret);
- [Android client example with Kotlin](https://gitlab.com/snippets/1665808)
by [Braincoke](https://github.com/Braincoke)
+### Javascript, NodeJS
+
+- [shaarli-client](https://www.npmjs.com/package/shaarli-client)
+ ([source code](https://github.com/laBecasse/shaarli-client))
+ by [laBecasse](https://github.com/laBecasse)
### PHP
--
cgit v1.2.3
From 92ccaea4706b39e3cf5d9763f8d6e8dcc906d803 Mon Sep 17 00:00:00 2001
From: VirtualTam
Date: Wed, 23 Aug 2017 00:57:50 +0200
Subject: documentation: fix list formatting
Signed-off-by: VirtualTam
---
doc/md/Release-Shaarli.md | 1 +
1 file changed, 1 insertion(+)
(limited to 'doc')
diff --git a/doc/md/Release-Shaarli.md b/doc/md/Release-Shaarli.md
index 8ff0a080..974a7438 100644
--- a/doc/md/Release-Shaarli.md
+++ b/doc/md/Release-Shaarli.md
@@ -26,6 +26,7 @@ GitHub allows drafting the release note for the upcoming release, from the [Rele
This file should contain the same information as the release note draft for the upcoming version.
Update it to:
+
- add new entries (additions, fixes, etc.)
- mark the current version as released by setting its date and link
- add a new section for the future unreleased version
--
cgit v1.2.3