diff options
Diffstat (limited to 'doc/md')
-rw-r--r-- | doc/md/Backup,-restore,-import-and-export.md | 4 | ||||
-rw-r--r-- | doc/md/Bookmarklet.md | 2 | ||||
-rw-r--r-- | doc/md/Browsing-and-searching.md | 20 | ||||
-rw-r--r-- | doc/md/Community-&-Related-software.md | 49 | ||||
-rw-r--r-- | doc/md/Download-and-Installation.md | 54 | ||||
-rw-r--r-- | doc/md/Features.md | 25 | ||||
-rw-r--r-- | doc/md/Firefox-share.md | 3 | ||||
-rw-r--r-- | doc/md/Server-requirements.md | 3 | ||||
-rw-r--r-- | doc/md/Shaarli-configuration.md | 22 | ||||
-rw-r--r-- | doc/md/Translations.md | 152 | ||||
-rw-r--r-- | doc/md/Unit-tests.md | 10 | ||||
-rw-r--r-- | doc/md/Upgrade-and-migration.md | 27 | ||||
-rw-r--r-- | doc/md/docker/docker-101.md | 78 | ||||
-rw-r--r-- | doc/md/docker/reverse-proxy-configuration.md | 116 | ||||
-rw-r--r-- | doc/md/docker/shaarli-images.md | 28 | ||||
-rw-r--r-- | doc/md/images/install-shaarli.png | bin | 0 -> 44376 bytes | |||
-rw-r--r-- | doc/md/images/poedit-1.jpg | bin | 0 -> 72956 bytes | |||
-rw-r--r-- | doc/md/index.md | 32 |
18 files changed, 537 insertions, 88 deletions
diff --git a/doc/md/Backup,-restore,-import-and-export.md b/doc/md/Backup,-restore,-import-and-export.md index 89724857..bb790074 100644 --- a/doc/md/Backup,-restore,-import-and-export.md +++ b/doc/md/Backup,-restore,-import-and-export.md | |||
@@ -45,6 +45,10 @@ Shaarli cannot import data directly from [Scuttle](https://github.com/scronide/s | |||
45 | However, you can use the third-party [scuttle-to-shaarli](https://github.com/q2apro/scuttle-to-shaarli) | 45 | However, you can use the third-party [scuttle-to-shaarli](https://github.com/q2apro/scuttle-to-shaarli) |
46 | tool to export the Scuttle database to the Netscape HTML format compatible with the Shaarli importer. | 46 | tool to export the Scuttle database to the Netscape HTML format compatible with the Shaarli importer. |
47 | 47 | ||
48 | ### Refind | ||
49 | |||
50 | You can use the third-party tool [Derefind](https://github.com/ShawnPConroy/Derefind) to convert refind.com bookmark exports to a format that can be imported into Shaarli. | ||
51 | |||
48 | ## Import Shaarli links to Firefox | 52 | ## Import Shaarli links to Firefox |
49 | 53 | ||
50 | - Export your Shaarli links as described above. | 54 | - Export your Shaarli links as described above. |
diff --git a/doc/md/Bookmarklet.md b/doc/md/Bookmarklet.md index e53e3261..c899e3cf 100644 --- a/doc/md/Bookmarklet.md +++ b/doc/md/Bookmarklet.md | |||
@@ -21,7 +21,7 @@ _This bookmarklet button is compatible with Firefox, Opera, Chrome and Safari. U | |||
21 | 21 | ||
22 | Websites which enforce Content Security Policy (CSP), such as github.com, disallow usage of bookmarklets. Unfortunatly, there is nothing Shaarli can do about it. | 22 | Websites which enforce Content Security Policy (CSP), such as github.com, disallow usage of bookmarklets. Unfortunatly, there is nothing Shaarli can do about it. |
23 | 23 | ||
24 | See [#196](https://github.com/shaarli/Shaarli#196). | 24 | See [#196](https://github.com/shaarli/Shaarli/issues/196). |
25 | 25 | ||
26 | There is an open bug for both Firefox and Chromium: | 26 | There is an open bug for both Firefox and Chromium: |
27 | 27 | ||
diff --git a/doc/md/Browsing-and-searching.md b/doc/md/Browsing-and-searching.md index 35707482..16c69855 100644 --- a/doc/md/Browsing-and-searching.md +++ b/doc/md/Browsing-and-searching.md | |||
@@ -14,10 +14,24 @@ Use the `Filter by tags` field to restrict displayed links to entries tagged wit | |||
14 | 14 | ||
15 | **Hidden tags:** Tags starting with a dot `.` (example `.secret`) are private. They can only be seen and searched when logged in. | 15 | **Hidden tags:** Tags starting with a dot `.` (example `.secret`) are private. They can only be seen and searched when logged in. |
16 | 16 | ||
17 | Alternatively you can use the `Tag cloud` to discover all tags and click on any of them to display related links. | 17 | ### Tag cloud |
18 | 18 | ||
19 | To search for links that are not tagged, enter `""` in the tag search field. | 19 | The `Tag cloud` page diplays a "cloud" view of all tags in your Shaarli. |
20 | |||
21 | * The most frequently used tags are displayed with a bigger font size. | ||
22 | * When sorting by `Most used` or `Alphabetical`, tags are displayed as a _list_, along with counters and edit/delete buttons for each tag. | ||
23 | * Clicking on any tag will display a list of all Shaares matching this tag. | ||
24 | * Clicking on the counter next to a tag `example`, will filter the tag cloud to only display tags found in Shaares tagged `example`. Repeat this any number of times to further filter the tag cloud. Click `List all links with those tags` to display Shaares matching your current tag filter. | ||
20 | 25 | ||
21 | ## Filtering RSS feeds/Picture wall | 26 | ## Filtering RSS feeds/Picture wall |
22 | 27 | ||
23 | RSS feeds can also be restricted to only return items matching a text/tag search: see [RSS feeds](RSS feeds). | 28 | RSS feeds can also be restricted to only return items matching a text/tag search: see [RSS feeds](RSS-feeds). |
29 | |||
30 | ## Filter buttons | ||
31 | |||
32 | Filter buttons can be found at the top left of the link list. They allow you to apply different filters to the list: | ||
33 | |||
34 | * **Private links:** When this toggle button is enabled, only shaares set to `private` will be shown. | ||
35 | * **Untagged links:** When the this toggle button is enabled (top left of the link list), only shaares _without any tags_ will be shown in the link list. | ||
36 | |||
37 | Filter buttons are only available when logged in. | ||
diff --git a/doc/md/Community-&-Related-software.md b/doc/md/Community-&-Related-software.md index 8edbeefa..207153b6 100644 --- a/doc/md/Community-&-Related-software.md +++ b/doc/md/Community-&-Related-software.md | |||
@@ -1,23 +1,7 @@ | |||
1 | _Unofficial but related work on Shaarli. If you maintain one of these, | 1 | _Unofficial but related work on Shaarli. If you maintain one of these, |
2 | please get in touch with us to help us find a way to adapt your work to our fork._ | 2 | please get in touch with us to help us find a way to adapt your work to our fork._ |
3 | 3 | ||
4 | ## Community | 4 | ## Related software |
5 | - [Liens en vrac de sebsauvage](http://sebsauvage.net/links/) - the original Shaarli | ||
6 | - [A large list of Shaarlis](http://porneia.free.fr/pub/links/ou-est-shaarli.html) | ||
7 | - [A list of working Shaarli aggregators](https://raw.githubusercontent.com/Oros42/find_shaarlis/master/annuaires.json) | ||
8 | - [A list of some known Shaarlis](https://github.com/Oros42/shaarlis_list) | ||
9 | - [Adieu Delicious, Diigo et StumbleUpon. Salut Shaarli ! - sebsauvage.net](http://sebsauvage.net/rhaa/index.php?2011/09/16/09/29/58-adieu-delicious-diigo-et-stumbleupon-salut-shaarli-) (fr) _16/09/2011 - the original post about Shaarli_ | ||
10 | - [Original ideas/fixme/TODO page](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:ideas) | ||
11 | - [Original discussion page](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:discussion) (fr) | ||
12 | - [Original revisions history](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:history) | ||
13 | - [Shaarli.fr/my](https://www.shaarli.fr/my.php) - Unofficial, unsupported (old fork) hosted Shaarlis provider, courtesy of [DMeloni](https://github.com/DMeloni) | ||
14 | |||
15 | |||
16 | ### Articles and social media discussions | ||
17 | - 2016-09-22 - Hacker News - https://news.ycombinator.com/item?id=12552176 | ||
18 | - 2015-08-15 - Reddit - [Question about migrating from WordPress to Shaarli.](https://www.reddit.com/r/selfhosted/comments/3h3zwh/question_about_migrating_from_wordpress_to_shaarli/) | ||
19 | - 2015-06-22 - Hacker News - https://news.ycombinator.com/item?id=9755366 | ||
20 | - 2015-05-12 - Reddit - [shaarli - Self hosted Bookmarking / Delicious (PHP, MySQL)](https://www.reddit.com/r/selfhosted/comments/35pkkc/shaarli_self_hosted_bookmarking_delicious_php/) | ||
21 | 5 | ||
22 | 6 | ||
23 | ### REST API clients | 7 | ### REST API clients |
@@ -29,28 +13,34 @@ See [REST API](REST-API) for a list of official and community clients. | |||
29 | - [Code Coloration](https://github.com/ArthurHoaro/code-coloration) by [@ArthurHoaro](https://github.com/ArthurHoaro): client side code syntax highlighter. | 13 | - [Code Coloration](https://github.com/ArthurHoaro/code-coloration) by [@ArthurHoaro](https://github.com/ArthurHoaro): client side code syntax highlighter. |
30 | - [Disqus](https://github.com/kalvn/shaarli-plugin-disqus) by [@kalvn](https://github.com/kalvn): Adds Disqus comment system to your Shaarli. | 14 | - [Disqus](https://github.com/kalvn/shaarli-plugin-disqus) by [@kalvn](https://github.com/kalvn): Adds Disqus comment system to your Shaarli. |
31 | - [emojione](https://github.com/NerosTie/emojione) by [@NerosTie](https://github.com/NerosTie): Add colorful emojis to your Shaarli. | 15 | - [emojione](https://github.com/NerosTie/emojione) by [@NerosTie](https://github.com/NerosTie): Add colorful emojis to your Shaarli. |
16 | - [twemoji](https://github.com/NerosTie/twemoji) by [@NerosTie](https://github.com/NerosTie): Add colorful emojis to your Shaarli (Twemoji version) | ||
32 | - [google analytics](https://github.com/ericjuden/Shaarli-Google-Analytics-Plugin) by [@ericjuden](http://github.com/ericjuden): Adds Google Analytics tracking support | 17 | - [google analytics](https://github.com/ericjuden/Shaarli-Google-Analytics-Plugin) by [@ericjuden](http://github.com/ericjuden): Adds Google Analytics tracking support |
33 | - [launch](https://github.com/ArthurHoaro/launch-plugin) - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli. | 18 | - [launch](https://github.com/ArthurHoaro/launch-plugin) - Launch Plugin is a plugin designed to enhance and customize Launch Theme for Shaarli. |
19 | - [markdown-toolbar](https://github.com/immanuelfodor/shaarli-markdown-toolbar) by [@immanuelfodor](https://github.com/immanuelfodor) - Easily insert markdown syntax into the Description field when editing a link. | ||
34 | - [related](https://github.com/ilesinge/shaarli-related) by [@ilesinge](https://github.com/ilesinge) - Show related links based on the number of identical tags. | 20 | - [related](https://github.com/ilesinge/shaarli-related) by [@ilesinge](https://github.com/ilesinge) - Show related links based on the number of identical tags. |
35 | - [social](https://github.com/alexisju/social) by [@alexisju](https://github.com/alexisju): share links to social networks. | 21 | - [social](https://github.com/alexisju/social) by [@alexisju](https://github.com/alexisju): share links to social networks. |
36 | - [shaarli2twitter](https://github.com/ArthurHoaro/shaarli2twitter) by [@ArthurHoaro](https://github.com/ArthurHoaro) - Automatically tweet your shared links from Shaarli | 22 | - [shaarli2twitter](https://github.com/ArthurHoaro/shaarli2twitter) by [@ArthurHoaro](https://github.com/ArthurHoaro) - Automatically tweet your shared links from Shaarli |
23 | - [shaarli2mastodon](https://github.com/kalvn/shaarli2mastodon) by [@kalvn](https://github.com/kalvn) - This Shaarli plugin allows you to automatically publish links you post on your Mastodon timeline. | ||
24 | - [shaarli-descriptor](https://github.com/immanuelfodor/shaarli-descriptor) by [@immanuelfodor](https://github.com/immanuelfodor) - Customize the default height/number of rows of the Description field when editing a link. | ||
37 | 25 | ||
38 | 26 | ||
39 | ### Third-party themes | 27 | ### Third-party themes |
40 | See [Theming](Theming) for a list of community-contributed themes, and an installation guide. | 28 | See [Theming](Theming) for a list of community-contributed themes, and an installation guide. |
41 | 29 | ||
42 | 30 | ||
43 | ## Integration with other platforms | 31 | ### Integration with other platforms |
44 | - [tt-rss-shaarli](https://github.com/jcsaaddupuy/tt-rss-shaarli) - [Tiny-Tiny RSS](http://tt-rss.org/) plugin that adds support for sharing articles with Shaarli | 32 | - [tt-rss-shaarli](https://github.com/jcsaaddupuy/tt-rss-shaarli) - [Tiny-Tiny RSS](http://tt-rss.org/) plugin that adds support for sharing articles with Shaarli |
45 | - [octopress-shaarli](https://github.com/ahmet2mir/octopress-shaarli) - Octopress plugin to retrieve Shaarli links on the sidebar | 33 | - [octopress-shaarli](https://github.com/ahmet2mir/octopress-shaarli) - Octopress plugin to retrieve Shaarli links on the sidebar |
46 | - [Scuttle to Shaarli](https://github.com/q2apro/scuttle-to-shaarli) - Import bookmarks from Scuttle | 34 | - [Scuttle to Shaarli](https://github.com/q2apro/scuttle-to-shaarli) - Import bookmarks from Scuttle |
47 | 35 | ||
48 | 36 | ||
49 | ### Mobile Apps | 37 | ### Mobile Apps |
50 | - [ShaarliOS](https://github.com/mro/ShaarliOS) iOS share extension - see [#308](https://github.com/shaarli/Shaarli/issues/308#issuecomment-184592070) for some promo codes, | 38 | - [ShaarliOS](https://github.com/mro/ShaarliOS) - Apple iOS share extension. |
51 | - [Shaarli for Android](http://sebsauvage.net/links/?ZAyDzg) - Android application that adds Shaarli as a sharing provider | 39 | - [Shaarli for Android](http://sebsauvage.net/links/?ZAyDzg) - Android application that adds Shaarli as a sharing provider |
52 | - [Shaarlier for Android](https://github.com/dimtion/Shaarlier) - Android application to simply add links directly into your Shaarli | 40 | - [Shaarlier for Android](https://github.com/dimtion/Shaarlier) - Android application to simply add links directly into your Shaarli |
53 | 41 | ||
42 | ### Browser addons | ||
43 | * [Shaarli Web Extension](https://github.com/ikipatang/shaarli-web-extension) - toolbar button to share your current tab with Shaarli. | ||
54 | 44 | ||
55 | ### Server apps | 45 | ### Server apps |
56 | - [shaarchiver](https://github.com/nodiscc/shaarchiver) - Archive your Shaarli bookmarks and their content | 46 | - [shaarchiver](https://github.com/nodiscc/shaarchiver) - Archive your Shaarli bookmarks and their content |
@@ -61,7 +51,22 @@ See [Theming](Theming) for a list of community-contributed themes, and an instal | |||
61 | - [Self dead link](https://github.com/qwertygc/shaarli-dev-code/blob/master/self-dead-link.php) - Detect dead links on shaarli. This version use the database of shaarli. [Another version](https://github.com/qwertygc/shaarli-dev-code/blob/master/dead-link.php), can be used for other shaarli instances (but is more resource consuming). | 51 | - [Self dead link](https://github.com/qwertygc/shaarli-dev-code/blob/master/self-dead-link.php) - Detect dead links on shaarli. This version use the database of shaarli. [Another version](https://github.com/qwertygc/shaarli-dev-code/blob/master/dead-link.php), can be used for other shaarli instances (but is more resource consuming). |
62 | - [Bookmark Archiver](https://github.com/pirate/bookmark-archiver) - Save an archived copy of all websites starred using browser bookmarks/Shaarli/Delicious/Instapaper/Unmark.it/Pocket/Pinboard. Outputs browseable html. | 52 | - [Bookmark Archiver](https://github.com/pirate/bookmark-archiver) - Save an archived copy of all websites starred using browser bookmarks/Shaarli/Delicious/Instapaper/Unmark.it/Pocket/Pinboard. Outputs browseable html. |
63 | 53 | ||
64 | |||
65 | ## Alternatives to Shaarli | 54 | ## Alternatives to Shaarli |
66 | See the [bookmarks & link sharing](https://github.com/Kickball/awesome-selfhosted/#bookmarks--link-sharing) | 55 | See [awesome-selfhosted: bookmarks & link sharing](https://github.com/Kickball/awesome-selfhosted/#bookmarks--link-sharing). |
67 | section on [awesome-selfhosted](https://github.com/Kickball/awesome-selfhosted/). | 56 | |
57 | ## Community | ||
58 | - [Liens en vrac de sebsauvage](http://sebsauvage.net/links/) - the original Shaarli | ||
59 | - [A large list of Shaarlis](http://porneia.free.fr/pub/links/ou-est-shaarli.html) | ||
60 | - [A list of working Shaarli aggregators](https://raw.githubusercontent.com/Oros42/find_shaarlis/master/annuaires.json) | ||
61 | - [A list of some known Shaarlis](https://github.com/Oros42/shaarlis_list) | ||
62 | - [Adieu Delicious, Diigo et StumbleUpon. Salut Shaarli ! - sebsauvage.net](http://sebsauvage.net/rhaa/index.php?2011/09/16/09/29/58-adieu-delicious-diigo-et-stumbleupon-salut-shaarli-) (fr) _16/09/2011 - the original post about Shaarli_ | ||
63 | - [Original ideas/fixme/TODO page](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:ideas) | ||
64 | - [Original discussion page](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:discussion) (fr) | ||
65 | - [Original revisions history](http://sebsauvage.net/wiki/doku.php?id=php:shaarli:history) | ||
66 | - [Shaarli.fr/my](https://www.shaarli.fr/my.php) - Unofficial, unsupported (old fork) hosted Shaarlis provider, courtesy of [DMeloni](https://github.com/DMeloni) | ||
67 | |||
68 | ### Articles and social media discussions | ||
69 | - 2016-09-22 - Hacker News - https://news.ycombinator.com/item?id=12552176 | ||
70 | - 2015-08-15 - Reddit - [Question about migrating from WordPress to Shaarli.](https://www.reddit.com/r/selfhosted/comments/3h3zwh/question_about_migrating_from_wordpress_to_shaarli/) | ||
71 | - 2015-06-22 - Hacker News - https://news.ycombinator.com/item?id=9755366 | ||
72 | - 2015-05-12 - Reddit - [shaarli - Self hosted Bookmarking / Delicious (PHP, MySQL)](https://www.reddit.com/r/selfhosted/comments/35pkkc/shaarli_self_hosted_bookmarking_delicious_php/) | ||
diff --git a/doc/md/Download-and-Installation.md b/doc/md/Download-and-Installation.md index e5e929ef..0fdbd27d 100644 --- a/doc/md/Download-and-Installation.md +++ b/doc/md/Download-and-Installation.md | |||
@@ -4,44 +4,57 @@ Document Root (or directly at the document root). | |||
4 | Also, please make sure your server meets the [requirements](Server-requirements) | 4 | Also, please make sure your server meets the [requirements](Server-requirements) |
5 | and is properly [configured](Server-configuration). | 5 | and is properly [configured](Server-configuration). |
6 | 6 | ||
7 | Several releases are available: | 7 | Multiple releases branches are available: |
8 | |||
9 | - latest (last release) | ||
10 | - stable (previous major release) | ||
11 | - master (development) | ||
12 | |||
13 | Using one of the following methods: | ||
8 | 14 | ||
9 | - by downloading full release archives including all dependencies | 15 | - by downloading full release archives including all dependencies |
10 | - by downloading Github archives | 16 | - by downloading Github archives |
11 | - by cloning the Git repository | 17 | - by cloning the Git repository |
18 | - using Docker: [see the documentation](docker/shaarli-images.md) | ||
12 | 19 | ||
13 | --- | 20 | -------------------------------------------------------------------------------- |
14 | 21 | ||
15 | ## Latest release (recommended) | 22 | ## Latest release (recommended) |
16 | ### Download as an archive | ||
17 | Get the latest released version from the [releases](https://github.com/shaarli/Shaarli/releases) page. | ||
18 | 23 | ||
19 | **Download our *shaarli-full* archive** to include dependencies. | 24 | ### Download as an archive |
20 | 25 | ||
21 | The current latest released version is `v0.9.1` | 26 | In most cases, you should download the latest Shaarli release from the [releases](https://github.com/shaarli/Shaarli/releases) page. **Download our *shaarli-full* archive** to include dependencies. |
22 | 27 | ||
23 | Or in command lines: | 28 | The current latest released version is `v0.9.3` |
24 | 29 | ||
25 | ```bash | 30 | ```bash |
26 | $ wget https://github.com/shaarli/Shaarli/releases/download/v0.9.1/shaarli-v0.9.1-full.zip | 31 | $ wget https://github.com/shaarli/Shaarli/releases/download/v0.9.3/shaarli-v0.9.3-full.zip |
27 | $ unzip shaarli-v0.9.1-full.zip | 32 | $ unzip shaarli-v0.9.3-full.zip |
28 | $ mv Shaarli /path/to/shaarli/ | 33 | $ mv Shaarli /path/to/shaarli/ |
29 | ``` | 34 | ``` |
30 | 35 | ||
31 | 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).| | ||
32 | |||
33 | ### Using git | 36 | ### Using git |
34 | 37 | ||
38 | Cloning using `git` or downloading Github branches as zip files requires additional steps: | ||
39 | |||
40 | * Install [Composer](Unit-tests.md#install_composer) to manage Shaarli dependencies. | ||
41 | * Install [python3-virtualenv](https://pypi.python.org/pypi/virtualenv) to build the local HTML documentation. | ||
42 | |||
35 | ``` | 43 | ``` |
36 | $ mkdir -p /path/to/shaarli && cd /path/to/shaarli/ | 44 | $ mkdir -p /path/to/shaarli && cd /path/to/shaarli/ |
37 | $ git clone -b v0.9 https://github.com/shaarli/Shaarli.git . | 45 | $ git clone -b latest https://github.com/shaarli/Shaarli.git . |
38 | $ composer install --no-dev --prefer-dist | 46 | $ composer install --no-dev --prefer-dist |
47 | $ make translate | ||
48 | $ make htmldoc | ||
39 | ``` | 49 | ``` |
40 | 50 | ||
51 | -------------------------------------------------------------------------------- | ||
52 | |||
41 | ## Stable version | 53 | ## Stable version |
42 | 54 | ||
43 | The stable version has been experienced by Shaarli users, and will receive security updates. | 55 | The stable version has been experienced by Shaarli users, and will receive security updates. |
44 | 56 | ||
57 | |||
45 | ### Download as an archive | 58 | ### Download as an archive |
46 | 59 | ||
47 | As a .zip archive: | 60 | As a .zip archive: |
@@ -60,9 +73,9 @@ $ tar xvf stable.tar.gz | |||
60 | $ mv Shaarli-stable /path/to/shaarli/ | 73 | $ mv Shaarli-stable /path/to/shaarli/ |
61 | ``` | 74 | ``` |
62 | 75 | ||
63 | ### Clone with Git | 76 | ### Using git |
64 | 77 | ||
65 | [Composer](https://getcomposer.org/) is required to build a functional Shaarli installation when pulling from git. | 78 | Install [Composer](Unit-tests.md#install_composer) to manage Shaarli dependencies. |
66 | 79 | ||
67 | ```bash | 80 | ```bash |
68 | $ git clone https://github.com/shaarli/Shaarli.git -b stable /path/to/shaarli/ | 81 | $ git clone https://github.com/shaarli/Shaarli.git -b stable /path/to/shaarli/ |
@@ -71,25 +84,34 @@ $ cd /path/to/shaarli/ | |||
71 | $ composer install --no-dev --prefer-dist | 84 | $ composer install --no-dev --prefer-dist |
72 | ``` | 85 | ``` |
73 | 86 | ||
87 | |||
88 | -------------------------------------------------------------------------------- | ||
89 | |||
74 | ## Development version (mainline) | 90 | ## Development version (mainline) |
75 | 91 | ||
76 | _Use at your own risk!_ | 92 | _Use at your own risk!_ |
77 | 93 | ||
94 | Install [Composer](Unit-tests.md#install_composer) to manage Shaarli dependencies. | ||
95 | |||
78 | To get the latest changes from the `master` branch: | 96 | To get the latest changes from the `master` branch: |
79 | 97 | ||
80 | ```bash | 98 | ```bash |
81 | # clone the repository | 99 | # clone the repository |
82 | $ git clone https://github.com/shaarli/Shaarli.git -b master /path/to/shaarli/ | 100 | $ git clone https://github.com/shaarli/Shaarli.git -b master /path/to/shaarli/ |
83 | # install/update third-party dependencies | 101 | # install/update third-party dependencies |
84 | $ cd /path/to/shaarli | 102 | $ cd /path/to/shaarli |
85 | $ composer install --no-dev --prefer-dist | 103 | $ composer install --no-dev --prefer-dist |
104 | $ make translate | ||
105 | $ make htmldoc | ||
86 | ``` | 106 | ``` |
87 | 107 | ||
108 | ------------------------------------------------------------------------------- | ||
109 | |||
88 | ## Finish Installation | 110 | ## Finish Installation |
89 | 111 | ||
90 | Once Shaarli is downloaded and files have been placed at the correct location, open it this location your favorite browser. | 112 | Once Shaarli is downloaded and files have been placed at the correct location, open it this location your favorite browser. |
91 | 113 | ||
92 | ![install screenshot](http://i.imgur.com/wuMpDSN.png) | 114 | ![install screenshot](images/install-shaarli.png) |
93 | 115 | ||
94 | Setup your Shaarli installation, and it's ready to use! | 116 | Setup your Shaarli installation, and it's ready to use! |
95 | 117 | ||
diff --git a/doc/md/Features.md b/doc/md/Features.md deleted file mode 100644 index eef88d03..00000000 --- a/doc/md/Features.md +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | ### Main features | ||
2 | Shaarli is intended: | ||
3 | |||
4 | - to share, comment and save interesting links and news | ||
5 | - to bookmark useful/frequent personal links (as private links) and share them between computers | ||
6 | - as a minimal blog/microblog/writing platform (no character limit) | ||
7 | - as a read-it-later list (for example items tagged `readlater`) | ||
8 | - to draft and save articles/ideas | ||
9 | - to keep code snippets | ||
10 | - to keep notes and documentation | ||
11 | - as a shared clipboard between machines | ||
12 | - as a todo list | ||
13 | - to store playlists (e.g. with the `music` or `video` tags) | ||
14 | - to keep extracts/comments from webpages that may disappear | ||
15 | - to keep track of ongoing discussions (for example items tagged `discussion`) | ||
16 | - [to feed RSS aggregators](http://shaarli.chassegnouf.net/?9Efeiw) (planets) with specific tags | ||
17 | - to feed other social networks, blogs... using RSS feeds and external services (dlvr.it, ifttt.com ...) | ||
18 | |||
19 | ### Using Shaarli as a blog, notepad, pastebin... | ||
20 | |||
21 | - Go to your Shaarli setup and log in | ||
22 | - Click the `Add Link` button | ||
23 | - To share text only, do not enter any URL in the corresponding input field and click `Add Link` | ||
24 | - Pick a title and enter your article, or note, in the description field; add a few tags; optionally check `Private` then click `Save` | ||
25 | - VoilĂ ! Your article is now published (privately if you selected that option) and accessible using its permalink. | ||
diff --git a/doc/md/Firefox-share.md b/doc/md/Firefox-share.md index 878884a4..9a46b185 100644 --- a/doc/md/Firefox-share.md +++ b/doc/md/Firefox-share.md | |||
@@ -1,3 +1,6 @@ | |||
1 | | Note | Firefox Share is no longer available for Firefox 57 and later versions. | | ||
2 | |---------|---------| | ||
3 | |||
1 | ### Add Shaarli as a sharing service to Firefox | 4 | ### Add Shaarli as a sharing service to Firefox |
2 | 5 | ||
3 | - Open your Shaarli and `Login` | 6 | - Open your Shaarli and `Login` |
diff --git a/doc/md/Server-requirements.md b/doc/md/Server-requirements.md index 707af762..2dc442df 100644 --- a/doc/md/Server-requirements.md +++ b/doc/md/Server-requirements.md | |||
@@ -35,7 +35,8 @@ Library | Required? | Usage | |||
35 | Extension | Required? | Usage | 35 | Extension | Required? | Usage |
36 | ---|:---:|--- | 36 | ---|:---:|--- |
37 | [`openssl`](http://php.net/manual/en/book.openssl.php) | All | OpenSSL, HTTPS | 37 | [`openssl`](http://php.net/manual/en/book.openssl.php) | All | OpenSSL, HTTPS |
38 | [`php-mbstring`](http://php.net/manual/en/book.mbstring.php) | CentOS, Fedora, RHEL, Windows | multibyte (Unicode) string support | 38 | [`php-mbstring`](http://php.net/manual/en/book.mbstring.php) | CentOS, Fedora, RHEL, Windows, some hosting providers | multibyte (Unicode) string support |
39 | [`php-gd`](http://php.net/manual/en/book.image.php) | optional | thumbnail resizing | 39 | [`php-gd`](http://php.net/manual/en/book.image.php) | optional | thumbnail resizing |
40 | [`php-intl`](http://php.net/manual/en/book.intl.php) | optional | localized text sorting (e.g. `e->è->f`) | 40 | [`php-intl`](http://php.net/manual/en/book.intl.php) | optional | localized text sorting (e.g. `e->è->f`) |
41 | [`php-curl`](http://php.net/manual/en/book.curl.php) | optional | using cURL for fetching webpages and thumbnails in a more robust way | 41 | [`php-curl`](http://php.net/manual/en/book.curl.php) | optional | using cURL for fetching webpages and thumbnails in a more robust way |
42 | [`php-gettext`](http://php.net/manual/en/book.gettext.php) | optional | Use the translation system in gettext mode (faster) | ||
diff --git a/doc/md/Shaarli-configuration.md b/doc/md/Shaarli-configuration.md index 37486414..920c7e27 100644 --- a/doc/md/Shaarli-configuration.md +++ b/doc/md/Shaarli-configuration.md | |||
@@ -55,6 +55,7 @@ _These settings should not be edited_ | |||
55 | - **links_per_page**: Number of shaares displayed per page. | 55 | - **links_per_page**: Number of shaares displayed per page. |
56 | - **timezone**: See [the list of supported timezones](http://php.net/manual/en/timezones.php). | 56 | - **timezone**: See [the list of supported timezones](http://php.net/manual/en/timezones.php). |
57 | - **enabled_plugins**: List of enabled plugins. | 57 | - **enabled_plugins**: List of enabled plugins. |
58 | - **default_note_title**: Default title of a new note. | ||
58 | 59 | ||
59 | ### Security | 60 | ### Security |
60 | 61 | ||
@@ -80,6 +81,20 @@ _These settings should not be edited_ | |||
80 | - **page_cache**: Shaarli's internal cache directory. | 81 | - **page_cache**: Shaarli's internal cache directory. |
81 | - **ban_file**: Banned IP file path. | 82 | - **ban_file**: Banned IP file path. |
82 | 83 | ||
84 | ### Translation | ||
85 | |||
86 | - **language**: translation language (also see [Translations](Translations)) | ||
87 | - **auto** (default): The translation language is chosen from the browser locale. | ||
88 | It means that the language can be different for 2 different visitors depending on their locale. | ||
89 | - **en**: Use the English translation. | ||
90 | - **fr**: Use the French translation. | ||
91 | - **mode**: | ||
92 | - **auto** or **php** (default): Use the PHP implementation of gettext (slower) | ||
93 | - **gettext**: Use PHP builtin gettext extension | ||
94 | (faster, but requires `php-gettext` to be installed and to reload the web server on update) | ||
95 | - **extension**: Translation extensions for custom themes or plugins. | ||
96 | Must be an associative array: `translation domain => translation path`. | ||
97 | |||
83 | ### Updates | 98 | ### Updates |
84 | 99 | ||
85 | - **check_updates**: Enable or disable update check to the git repository. | 100 | - **check_updates**: Enable or disable update check to the git repository. |
@@ -210,6 +225,13 @@ _These settings should not be edited_ | |||
210 | "plugins": { | 225 | "plugins": { |
211 | "WALLABAG_URL": "http://demo.wallabag.org", | 226 | "WALLABAG_URL": "http://demo.wallabag.org", |
212 | "WALLABAG_VERSION": "1" | 227 | "WALLABAG_VERSION": "1" |
228 | }, | ||
229 | "translation": { | ||
230 | "language": "fr", | ||
231 | "mode": "php", | ||
232 | "extensions": { | ||
233 | "demo": "plugins/demo_plugin/languages/" | ||
234 | } | ||
213 | } | 235 | } |
214 | } ?> | 236 | } ?> |
215 | ``` | 237 | ``` |
diff --git a/doc/md/Translations.md b/doc/md/Translations.md new file mode 100644 index 00000000..54a36655 --- /dev/null +++ b/doc/md/Translations.md | |||
@@ -0,0 +1,152 @@ | |||
1 | ## Translations | ||
2 | |||
3 | Shaarli supports [gettext](https://www.gnu.org/software/gettext/manual/gettext.html) translations | ||
4 | since `>= v0.9.2`. | ||
5 | |||
6 | Note that only the `default` theme supports translations. | ||
7 | |||
8 | ### Contributing | ||
9 | |||
10 | We encourage the community to contribute to Shaarli's translation either by improving existing | ||
11 | translations or submitting a new language. | ||
12 | |||
13 | Contributing to the translation does not require development skill. | ||
14 | |||
15 | Please submit a pull request with the `.po` file updated/created. Note that the compiled file (`.mo`) | ||
16 | is not stored on the repository, and is generated during the release process. | ||
17 | |||
18 | ### How to | ||
19 | |||
20 | First, install [Poedit](https://poedit.net/) tool. | ||
21 | |||
22 | Poedit will extract strings to translate from the PHP source code. | ||
23 | |||
24 | **Important**: due to the usage of a template engine, it's important to generate PHP cache files to extract | ||
25 | every translatable string. | ||
26 | |||
27 | You can either use [this script](https://gist.github.com/ArthurHoaro/5d0323f758ab2401ef444a53f54e9a07) (recommended) | ||
28 | or visit every template page in your browser to generate cache files, while logged in. | ||
29 | |||
30 | Here is a list : | ||
31 | |||
32 | ``` | ||
33 | http://<replace_domain>/ | ||
34 | http://<replace_domain>/?nonope | ||
35 | http://<replace_domain>/?do=addlink | ||
36 | http://<replace_domain>/?do=changepasswd | ||
37 | http://<replace_domain>/?do=changetag | ||
38 | http://<replace_domain>/?do=configure | ||
39 | http://<replace_domain>/?do=tools | ||
40 | http://<replace_domain>/?do=daily | ||
41 | http://<replace_domain>/?post | ||
42 | http://<replace_domain>/?do=export | ||
43 | http://<replace_domain>/?do=import | ||
44 | http://<replace_domain>/?do=login | ||
45 | http://<replace_domain>/?do=picwall | ||
46 | http://<replace_domain>/?do=pluginadmin | ||
47 | http://<replace_domain>/?do=tagcloud | ||
48 | http://<replace_domain>/?do=taglist | ||
49 | ``` | ||
50 | |||
51 | #### Improve existing translation | ||
52 | |||
53 | In Poedit, click on "Edit a Translation", and from Shaarli's directory open | ||
54 | `inc/languages/<lang>/LC_MESSAGES/shaarli.po`. | ||
55 | |||
56 | The existing list of translatable strings should have been loaded, then click on the "Update" button. | ||
57 | |||
58 | You can start editing the translation. | ||
59 | |||
60 | ![poedit-screenshot](images/poedit-1.jpg) | ||
61 | |||
62 | Save when you're done, then you can submit a pull request containing the updated `shaarli.po`. | ||
63 | |||
64 | #### Add a new language | ||
65 | |||
66 | Open Poedit and select "Create New Translation", then from Shaarli's directory open | ||
67 | `inc/languages/<lang>/LC_MESSAGES/shaarli.po`. | ||
68 | |||
69 | Then select the language you want to create. | ||
70 | |||
71 | Click on `File > Save as...`, and save your file in `<shaarli directory>/inc/language/<new language>/LC_MESSAGES/shaarli.po`. | ||
72 | `<new language>` here should be the language code respecting the [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-2) | ||
73 | format in lowercase (e.g. `de` for German). | ||
74 | |||
75 | Then click on the "Update" button, and you can start to translate every available string. | ||
76 | |||
77 | Save when you're done, then you can submit a pull request containing the new `shaarli.po`. | ||
78 | |||
79 | ### Extend Shaarli's translation | ||
80 | |||
81 | If you're writing a custom theme, or a non official plugin, you might want to use the translation system, | ||
82 | but you won't be able to able to override Shaarli's translation. | ||
83 | |||
84 | However, you can add your own translation domain which extends the main translation list. | ||
85 | |||
86 | > Note that you can find a live example of translation extension in the `demo_plugin`. | ||
87 | |||
88 | First, create your translation files tree directory: | ||
89 | |||
90 | ``` | ||
91 | <your_module>/languages/<ISO 3166-1 alpha-2 language code>/LC_MESSAGES/ | ||
92 | ``` | ||
93 | |||
94 | Your `.po` files must be named like your domain. E.g. if your translation domain is `my_theme`, then your file will be | ||
95 | `my_theme.po`. | ||
96 | |||
97 | Users have to register your extension in their configuration with the parameter | ||
98 | `translation.extensions.<domain>: <translation files path>`. | ||
99 | |||
100 | Example: | ||
101 | |||
102 | ```php | ||
103 | if (! $conf->exists('translation.extensions.my_theme')) { | ||
104 | $conf->set('translation.extensions.my_theme', '<your_module>/languages/'); | ||
105 | $conf->write(true); | ||
106 | } | ||
107 | ``` | ||
108 | |||
109 | > Note that the page needs to be reloaded after the registration. | ||
110 | |||
111 | It is then recommended to create a custom translation function which will call the `t()` function with your domain. | ||
112 | For example : | ||
113 | |||
114 | ```php | ||
115 | function my_theme_t($text, $nText = '', $nb = 1) | ||
116 | { | ||
117 | return t($text, $nText, $nb, 'my_theme'); // the last parameter is your translation domain. | ||
118 | } | ||
119 | ``` | ||
120 | |||
121 | All strings which can be translated should be processed through your function: | ||
122 | |||
123 | ```php | ||
124 | my_theme_t('Comment'); | ||
125 | my_theme_t('Comment', 'Comments', 2); | ||
126 | ``` | ||
127 | |||
128 | Or in templates: | ||
129 | |||
130 | ```php | ||
131 | {'Comment'|my_theme_t} | ||
132 | {function="my_theme_t('Comment', 'Comments', 2)"} | ||
133 | ``` | ||
134 | |||
135 | > Note than in template, you need to visit your page at least once to generate a cache file. | ||
136 | |||
137 | When you're done, open Poedit and load translation strings from sources: | ||
138 | |||
139 | 1. `File > New` | ||
140 | 2. Choose your language | ||
141 | 3. Save your `PO` file in `<your_module>/languages/<language code>/LC_MESSAGES/my_theme.po`. | ||
142 | 4. Go to `Catalog > Properties...` | ||
143 | 5. Fill the `Translation Properties` tab | ||
144 | 6. Add your source path in the `Sources Paths` tab | ||
145 | 7. In the `Sources Keywords` tab uncheck "Also use default keywords" and add the following lines: | ||
146 | |||
147 | ``` | ||
148 | my_theme_t | ||
149 | my_theme_t:1,2 | ||
150 | ``` | ||
151 | |||
152 | Click on the "Update" button and you're free to start your translations! | ||
diff --git a/doc/md/Unit-tests.md b/doc/md/Unit-tests.md index d200634f..f6030d5c 100644 --- a/doc/md/Unit-tests.md +++ b/doc/md/Unit-tests.md | |||
@@ -2,12 +2,12 @@ | |||
2 | 2 | ||
3 | The framework used is [PHPUnit](https://phpunit.de/); it can be installed with [Composer](https://getcomposer.org/), which is a dependency management tool. | 3 | The framework used is [PHPUnit](https://phpunit.de/); it can be installed with [Composer](https://getcomposer.org/), which is a dependency management tool. |
4 | 4 | ||
5 | Regarding Composer, you can either use: | 5 | ### Install composer |
6 | 6 | ||
7 | - a system-wide version, e.g. installed through your distro's package manager | 7 | You can either use: |
8 | - a local version, downloadable [here](https://getcomposer.org/download/) | ||
9 | 8 | ||
10 | #### Sample usage | 9 | - a system-wide version, e.g. installed through your distro's package manager |
10 | - a local version, downloadable [here](https://getcomposer.org/download/). | ||
11 | 11 | ||
12 | ```bash | 12 | ```bash |
13 | # system-wide version | 13 | # system-wide version |
@@ -29,6 +29,8 @@ $ composer update | |||
29 | 29 | ||
30 | #### Install and enable Xdebug to generate PHPUnit coverage reports | 30 | #### Install and enable Xdebug to generate PHPUnit coverage reports |
31 | 31 | ||
32 | See http://xdebug.org/docs/install | ||
33 | |||
32 | For Debian-based distros: | 34 | For Debian-based distros: |
33 | ```bash | 35 | ```bash |
34 | $ aptitude install php5-xdebug | 36 | $ aptitude install php5-xdebug |
diff --git a/doc/md/Upgrade-and-migration.md b/doc/md/Upgrade-and-migration.md index b3a08764..1dc07339 100644 --- a/doc/md/Upgrade-and-migration.md +++ b/doc/md/Upgrade-and-migration.md | |||
@@ -14,7 +14,7 @@ Shaarli stores all user data under the `data` directory: | |||
14 | - `data/ipbans.php` - banned IP addresses | 14 | - `data/ipbans.php` - banned IP addresses |
15 | - `data/updates.txt` - contains all automatic update to the configuration and datastore files already run | 15 | - `data/updates.txt` - contains all automatic update to the configuration and datastore files already run |
16 | 16 | ||
17 | See [Shaarli configuration](Shaarli configuration) for more information about Shaarli resources. | 17 | See [Shaarli configuration](Shaarli-configuration) for more information about Shaarli resources. |
18 | 18 | ||
19 | It is recommended to backup this repository _before_ starting updating/upgrading Shaarli: | 19 | It is recommended to backup this repository _before_ starting updating/upgrading Shaarli: |
20 | 20 | ||
@@ -27,7 +27,7 @@ As all user data is kept under `data`, this is the only directory you need to wo | |||
27 | 27 | ||
28 | - backup the `data` directory | 28 | - backup the `data` directory |
29 | - install or update Shaarli: | 29 | - install or update Shaarli: |
30 | - fresh installation - see [Download and installation](Download and installation) | 30 | - fresh installation - see [Download and installation](Download-and-installation) |
31 | - update - see the following sections | 31 | - update - see the following sections |
32 | - check or restore the `data` directory | 32 | - check or restore the `data` directory |
33 | 33 | ||
@@ -35,10 +35,13 @@ As all user data is kept under `data`, this is the only directory you need to wo | |||
35 | 35 | ||
36 | All tagged revisions can be downloaded as tarballs or ZIP archives from the [releases](https://github.com/shaarli/Shaarli/releases) page. | 36 | All tagged revisions can be downloaded as tarballs or ZIP archives from the [releases](https://github.com/shaarli/Shaarli/releases) page. |
37 | 37 | ||
38 | 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. | 38 | 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. |
39 | 39 | ||
40 | 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! | 40 | 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! |
41 | 41 | ||
42 | If you use translations in gettext mode - meaning you manually changed the default mode -, | ||
43 | reload your web server. | ||
44 | |||
42 | 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). | 45 | 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). |
43 | 46 | ||
44 | ## Upgrading with Git | 47 | ## Upgrading with Git |
@@ -72,6 +75,14 @@ Updating dependencies | |||
72 | Downloading: 100% | 75 | Downloading: 100% |
73 | ``` | 76 | ``` |
74 | 77 | ||
78 | Shaarli >= `v0.9.2` supports translations: | ||
79 | |||
80 | ```bash | ||
81 | $ make translate | ||
82 | ``` | ||
83 | |||
84 | If you use translations in gettext mode, reload your web server. | ||
85 | |||
75 | ### Migrating and upgrading from Sebsauvage's repository | 86 | ### Migrating and upgrading from Sebsauvage's repository |
76 | 87 | ||
77 | 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. | 88 | 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. |
@@ -151,6 +162,14 @@ Updating dependencies | |||
151 | Downloading: 100% | 162 | Downloading: 100% |
152 | ``` | 163 | ``` |
153 | 164 | ||
165 | Shaarli >= `v0.9.2` supports translations: | ||
166 | |||
167 | ```bash | ||
168 | $ make translate | ||
169 | ``` | ||
170 | |||
171 | If you use translations in gettext mode, reload your web server. | ||
172 | |||
154 | Optionally, you can delete information related to the legacy version: | 173 | Optionally, you can delete information related to the legacy version: |
155 | 174 | ||
156 | ```bash | 175 | ```bash |
@@ -173,7 +192,7 @@ Total 3317 (delta 2050), reused 3301 (delta 2034)to | |||
173 | 192 | ||
174 | #### Step 3: configuration | 193 | #### Step 3: configuration |
175 | 194 | ||
176 | 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). | 195 | 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). |
177 | 196 | ||
178 | ## Troubleshooting | 197 | ## Troubleshooting |
179 | 198 | ||
diff --git a/doc/md/docker/docker-101.md b/doc/md/docker/docker-101.md index b02dd149..a9c00b85 100644 --- a/doc/md/docker/docker-101.md +++ b/doc/md/docker/docker-101.md | |||
@@ -60,3 +60,81 @@ wheezy: Pulling from debian | |||
60 | Digest: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe | 60 | Digest: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe |
61 | Status: Downloaded newer image for debian:wheezy | 61 | Status: Downloaded newer image for debian:wheezy |
62 | ``` | 62 | ``` |
63 | |||
64 | Docker re-uses layers already downloaded. In other words if you have images based on Alpine or some Ubuntu version for example, those can share disk space. | ||
65 | |||
66 | ### Start a container | ||
67 | A container is an instance created from an image, that can be run and that keeps running until its main process exits. Or until the user stops the container. | ||
68 | |||
69 | The simplest way to start a container from image is ``docker run``. It also pulls the image for you if it is not locally available. For more advanced use, refer to ``docker create``. | ||
70 | |||
71 | Stopped containers are not destroyed, unless you specify ``--rm``. To view all created, running and stopped containers, enter: | ||
72 | ```bash | ||
73 | $ docker ps -a | ||
74 | ``` | ||
75 | |||
76 | Some containers may be designed or configured to be restarted, others are not. Also remember both network ports and volumes of a container are created on start, and not editable later. | ||
77 | |||
78 | ### Access a running container | ||
79 | A running container is accessible using ``docker exec``, or ``docker copy``. You can use ``exec`` to start a root shell in the Shaarli container: | ||
80 | ```bash | ||
81 | $ docker exec -ti <container-name-or-id> bash | ||
82 | ``` | ||
83 | Note the names and ID's of containers are listed in ``docker ps``. You can even type only one or two letters of the ID, given they are unique. | ||
84 | |||
85 | Access can also be through one or more network ports, or disk volumes. Both are specified on and fixed on ``docker create`` or ``run``. | ||
86 | |||
87 | You can view the console output of the main container process too: | ||
88 | ```bash | ||
89 | $ docker logs -f <container-name-or-id> | ||
90 | ``` | ||
91 | |||
92 | ### Docker disk use | ||
93 | Trying out different images can fill some gigabytes of disk quickly. Besides images, the docker volumes usually take up most disk space. | ||
94 | |||
95 | If you care only about trying out docker and not about what is running or saved, the following commands should help you out quickly if you run low on disk space: | ||
96 | |||
97 | ```bash | ||
98 | $ docker rmi -f $(docker images -aq) # remove or mark all images for disposal | ||
99 | $ docker volume rm $(docker volume ls -q) # remove all volumes | ||
100 | ``` | ||
101 | |||
102 | ### Systemd config | ||
103 | Systemd is the process manager of choice on Debian-based distributions. Once you have a ``docker`` service installed, you can use the following steps to set up Shaarli to run on system start. | ||
104 | |||
105 | ```bash | ||
106 | systemctl enable /etc/systemd/system/docker.shaarli.service | ||
107 | systemctl start docker.shaarli | ||
108 | systemctl status docker.* | ||
109 | journalctl -f # inspect system log if needed | ||
110 | ``` | ||
111 | |||
112 | You will need sudo or a root terminal to perform some or all of the steps above. Here are the contents for the service file: | ||
113 | ``` | ||
114 | [Unit] | ||
115 | Description=Shaarli Bookmark Manager Container | ||
116 | After=docker.service | ||
117 | Requires=docker.service | ||
118 | |||
119 | |||
120 | [Service] | ||
121 | Restart=always | ||
122 | |||
123 | # Put any environment you want in an included file, like $host- or $domainname in this example | ||
124 | EnvironmentFile=/etc/sysconfig/box-environment | ||
125 | |||
126 | # It's just an example.. | ||
127 | ExecStart=/usr/bin/docker run \ | ||
128 | -p 28010:80 \ | ||
129 | --name ${hostname}-shaarli \ | ||
130 | --hostname shaarli.${domainname} \ | ||
131 | -v /srv/docker-volumes-local/shaarli-data:/var/www/shaarli/data:rw \ | ||
132 | -v /etc/localtime:/etc/localtime:ro \ | ||
133 | shaarli/shaarli:latest | ||
134 | |||
135 | ExecStop=/usr/bin/docker rm -f ${hostname}-shaarli | ||
136 | |||
137 | |||
138 | [Install] | ||
139 | WantedBy=multi-user.target | ||
140 | ``` | ||
diff --git a/doc/md/docker/reverse-proxy-configuration.md b/doc/md/docker/reverse-proxy-configuration.md index 91ffecff..6066140e 100644 --- a/doc/md/docker/reverse-proxy-configuration.md +++ b/doc/md/docker/reverse-proxy-configuration.md | |||
@@ -1,6 +1,120 @@ | |||
1 | ## Foreword | ||
2 | |||
3 | This guide assumes that: | ||
4 | |||
5 | - Shaarli runs in a Docker container | ||
6 | - The host's `10080` port is mapped to the container's `80` port | ||
7 | - Shaarli's Fully Qualified Domain Name (FQDN) is `shaarli.domain.tld` | ||
8 | - HTTP traffic is redirected to HTTPS | ||
9 | |||
10 | ## Apache | ||
11 | |||
12 | - [Apache 2.4 documentation](https://httpd.apache.org/docs/2.4/) | ||
13 | - [mod_proxy](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html) | ||
14 | - [Reverse Proxy Request Headers](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#x-headers) | ||
15 | |||
16 | The following HTTP headers are set by using the `ProxyPass` directive: | ||
17 | |||
18 | - `X-Forwarded-For` | ||
19 | - `X-Forwarded-Host` | ||
20 | - `X-Forwarded-Server` | ||
21 | |||
22 | ```apache | ||
23 | <VirtualHost *:80> | ||
24 | ServerName shaarli.domain.tld | ||
25 | Redirect permanent / https://shaarli.domain.tld | ||
26 | </VirtualHost> | ||
27 | |||
28 | <VirtualHost *:443> | ||
29 | ServerName shaarli.domain.tld | ||
30 | |||
31 | SSLEngine on | ||
32 | SSLCertificateFile /path/to/cert | ||
33 | SSLCertificateKeyFile /path/to/certkey | ||
34 | |||
35 | LogLevel warn | ||
36 | ErrorLog /var/log/apache2/shaarli-error.log | ||
37 | CustomLog /var/log/apache2/shaarli-access.log combined | ||
38 | |||
39 | RequestHeader set X-Forwarded-Proto "https" | ||
40 | |||
41 | ProxyPass / http://127.0.0.1:10080/ | ||
42 | ProxyPassReverse / http://127.0.0.1:10080/ | ||
43 | </VirtualHost> | ||
44 | ``` | ||
1 | 45 | ||
2 | TODO, see https://github.com/shaarli/Shaarli/issues/888 | ||
3 | 46 | ||
4 | ## HAProxy | 47 | ## HAProxy |
5 | 48 | ||
49 | - [HAProxy documentation](https://cbonte.github.io/haproxy-dconv/) | ||
50 | |||
51 | ```conf | ||
52 | global | ||
53 | [...] | ||
54 | |||
55 | defaults | ||
56 | [...] | ||
57 | |||
58 | frontend http-in | ||
59 | bind :80 | ||
60 | redirect scheme https code 301 if !{ ssl_fc } | ||
61 | |||
62 | bind :443 ssl crt /path/to/cert.pem | ||
63 | |||
64 | default_backend shaarli | ||
65 | |||
66 | |||
67 | backend shaarli | ||
68 | mode http | ||
69 | option http-server-close | ||
70 | option forwardfor | ||
71 | reqadd X-Forwarded-Proto: https | ||
72 | |||
73 | server shaarli1 127.0.0.1:10080 | ||
74 | ``` | ||
75 | |||
76 | |||
6 | ## Nginx | 77 | ## Nginx |
78 | |||
79 | - [Nginx documentation](https://nginx.org/en/docs/) | ||
80 | |||
81 | ```nginx | ||
82 | http { | ||
83 | [...] | ||
84 | |||
85 | index index.html index.php; | ||
86 | |||
87 | root /home/john/web; | ||
88 | access_log /var/log/nginx/access.log; | ||
89 | error_log /var/log/nginx/error.log; | ||
90 | |||
91 | server { | ||
92 | listen 80; | ||
93 | server_name shaarli.domain.tld; | ||
94 | return 301 https://shaarli.domain.tld$request_uri; | ||
95 | } | ||
96 | |||
97 | server { | ||
98 | listen 443 ssl http2; | ||
99 | server_name shaarli.domain.tld; | ||
100 | |||
101 | ssl_certificate /path/to/cert | ||
102 | ssl_certificate_key /path/to/certkey | ||
103 | |||
104 | location / { | ||
105 | proxy_set_header X-Real-IP $remote_addr; | ||
106 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
107 | proxy_set_header X-Forwarded-Proto $scheme; | ||
108 | proxy_set_header X-Forwarded-Host $host; | ||
109 | |||
110 | proxy_pass http://localhost:10080/; | ||
111 | proxy_set_header Host $host; | ||
112 | proxy_connect_timeout 30s; | ||
113 | proxy_read_timeout 120s; | ||
114 | |||
115 | access_log /var/log/nginx/shaarli.access.log; | ||
116 | error_log /var/log/nginx/shaarli.error.log; | ||
117 | } | ||
118 | } | ||
119 | } | ||
120 | ``` | ||
diff --git a/doc/md/docker/shaarli-images.md b/doc/md/docker/shaarli-images.md index 6d108d21..12f7b5d1 100644 --- a/doc/md/docker/shaarli-images.md +++ b/doc/md/docker/shaarli-images.md | |||
@@ -1,3 +1,6 @@ | |||
1 | A brief guide on getting starting using docker is given in [Docker 101](docker-101.md). | ||
2 | To learn more about user data and how to keep it across versions, please see [Upgrade and Migration](../Upgrade-and-migration.md). | ||
3 | |||
1 | ## Get and run a Shaarli image | 4 | ## Get and run a Shaarli image |
2 | 5 | ||
3 | ### DockerHub repository | 6 | ### DockerHub repository |
@@ -5,14 +8,24 @@ The images can be found in the [`shaarli/shaarli`](https://hub.docker.com/r/shaa | |||
5 | repository. | 8 | repository. |
6 | 9 | ||
7 | ### Available image tags | 10 | ### Available image tags |
8 | - `latest`: master branch (tarball release) | 11 | - `latest`: latest branch (tarball release) |
12 | - `master`: master branch (tarball release) | ||
9 | - `stable`: stable branch (tarball release) | 13 | - `stable`: stable branch (tarball release) |
10 | 14 | ||
11 | All images rely on: | 15 | The `latest` and `master` images rely on: |
16 | |||
17 | - [Alpine Linux](https://www.alpinelinux.org/) | ||
18 | - [PHP7-FPM](http://php-fpm.org/) | ||
19 | - [Nginx](http://nginx.org/) | ||
20 | |||
21 | The `stable` image relies on: | ||
22 | |||
12 | - [Debian 8 Jessie](https://hub.docker.com/_/debian/) | 23 | - [Debian 8 Jessie](https://hub.docker.com/_/debian/) |
13 | - [PHP5-FPM](http://php-fpm.org/) | 24 | - [PHP5-FPM](http://php-fpm.org/) |
14 | - [Nginx](http://nginx.org/) | 25 | - [Nginx](http://nginx.org/) |
15 | 26 | ||
27 | Additional [Dockerfiles](https://github.com/shaarli/Shaarli/tree/master/docker) are provided for the `arm32v7` platform, relying on [Linuxserver.io Alpine armhf images](https://hub.docker.com/r/lsiobase/alpine.armhf/). These images must be built using [`docker build`](https://docs.docker.com/engine/reference/commandline/build/) on an `arm32v7` machine or using an emulator such as [qemu](https://resin.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/). | ||
28 | |||
16 | ### Download from DockerHub | 29 | ### Download from DockerHub |
17 | ```bash | 30 | ```bash |
18 | $ docker pull shaarli/shaarli | 31 | $ docker pull shaarli/shaarli |
@@ -69,3 +82,14 @@ backstabbing_galileo | |||
69 | $ docker ps -a | 82 | $ docker ps -a |
70 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | 83 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
71 | ``` | 84 | ``` |
85 | |||
86 | ### Automatic builds | ||
87 | |||
88 | Docker users can start a personal instance from an [autobuild image](https://hub.docker.com/r/shaarli/shaarli/). For example to start a temporary Shaarli at ``localhost:8000``, and keep session data (config, storage): | ||
89 | ``` | ||
90 | MY_SHAARLI_VOLUME=$(cd /path/to/shaarli/data/ && pwd -P) | ||
91 | docker run -ti --rm \ | ||
92 | -p 8000:80 \ | ||
93 | -v $MY_SHAARLI_VOLUME:/var/www/shaarli/data \ | ||
94 | shaarli/shaarli | ||
95 | ``` | ||
diff --git a/doc/md/images/install-shaarli.png b/doc/md/images/install-shaarli.png new file mode 100644 index 00000000..7ae33816 --- /dev/null +++ b/doc/md/images/install-shaarli.png | |||
Binary files differ | |||
diff --git a/doc/md/images/poedit-1.jpg b/doc/md/images/poedit-1.jpg new file mode 100644 index 00000000..673ae6d6 --- /dev/null +++ b/doc/md/images/poedit-1.jpg | |||
Binary files differ | |||
diff --git a/doc/md/index.md b/doc/md/index.md index 24ada6c7..e77b4d3a 100644 --- a/doc/md/index.md +++ b/doc/md/index.md | |||
@@ -22,9 +22,25 @@ It runs the latest development version of Shaarli and is updated/reset daily. | |||
22 | 22 | ||
23 | Login: `demo`; Password: `demo` | 23 | Login: `demo`; Password: `demo` |
24 | 24 | ||
25 | |||
26 | ## Features | 25 | ## Features |
27 | 26 | ||
27 | Shaarli can be used: | ||
28 | |||
29 | - to share, comment and save interesting links and news. | ||
30 | - to bookmark useful/frequent personal links (as private links) and share them between computers. | ||
31 | - as a minimal blog/microblog/writing platform (no character limit). | ||
32 | - as a read-it-later list (for example items tagged `readlater`). | ||
33 | - to draft and save articles/posts/ideas. | ||
34 | - to keep code snippets. | ||
35 | - to keep notes and documentation. | ||
36 | - as a shared clipboard/notepad/pastebin between machines. | ||
37 | - as a todo list. | ||
38 | - to store playlists (e.g. with the `music` or `video` tags). | ||
39 | - to keep extracts/comments from webpages that may disappear. | ||
40 | - to keep track of ongoing discussions (for example items tagged `discussion`). | ||
41 | - [to feed RSS aggregators](http://shaarli.chassegnouf.net/?9Efeiw) (planets) with specific tags. | ||
42 | - to feed other social networks, blogs... using RSS feeds and external services (dlvr.it, ifttt.com ...). | ||
43 | |||
28 | ### Interface | 44 | ### Interface |
29 | - minimalist design (simple is beautiful) | 45 | - minimalist design (simple is beautiful) |
30 | - FAST | 46 | - FAST |
@@ -78,14 +94,12 @@ Easily extensible by any client using the REST API exposed by Shaarli. | |||
78 | 94 | ||
79 | See the [API documentation](http://shaarli.github.io/api-documentation/). | 95 | See the [API documentation](http://shaarli.github.io/api-documentation/). |
80 | 96 | ||
81 | ### Other usages | 97 | ### Using Shaarli as a blog, notepad, pastebin... |
82 | Though Shaarli is primarily a bookmarking application, it can serve other purposes | 98 | - Go to your Shaarli setup and log in |
83 | (see [Features](Features)): | 99 | - Click the `Add Link` button |
84 | 100 | - To share text only, do not enter any URL in the corresponding input field and click `Add Link` | |
85 | - micro-blogging | 101 | - Pick a title and enter your article, or note, in the description field; add a few tags; optionally check `Private` then click `Save` |
86 | - pastebin | 102 | - VoilĂ ! Your article is now published (privately if you selected that option) and accessible using its permalink. |
87 | - online notepad | ||
88 | - snippet archive | ||
89 | 103 | ||
90 | ## About | 104 | ## About |
91 | ### Shaarli community fork | 105 | ### Shaarli community fork |