diff options
author | nodiscc <nodiscc@gmail.com> | 2017-01-26 18:52:54 +0100 |
---|---|---|
committer | nodiscc <nodiscc@gmail.com> | 2017-06-18 00:19:49 +0200 |
commit | 53ed6d7d1e678d7486337ce67a2f17b30bac21ac (patch) | |
tree | f8bef0164a70bd03d2b9781951c01bdd018f1842 /doc/md/Theming.md | |
parent | d5d22a6d07917865c44148ad76f43c65a929a890 (diff) | |
download | Shaarli-53ed6d7d1e678d7486337ce67a2f17b30bac21ac.tar.gz Shaarli-53ed6d7d1e678d7486337ce67a2f17b30bac21ac.tar.zst Shaarli-53ed6d7d1e678d7486337ce67a2f17b30bac21ac.zip |
Generate HTML documentation using MkDocs (WIP)
MkDocs is a static site generator geared towards building project documentation.
Documentation source files are written in Markdown, and configured with a single YAML file.
* http://www.mkdocs.org/
* http://www.mkdocs.org/user-guide/configuration/
Ref. #312
* remove pandoc-generated HTML documentation
* move markdown doc to doc/md/,
* mkdocs.yml:
* generate HTML doc in doc/html
* add pages TOC/ordering
* use index.md as index page
* Makefile: remove execute permissions from generated files
* Makefile: rewrite htmlpages GFM to markdown conversion using sed:
awk expression aslo matched '][' which causes invalid output on complex links with images or code blocks
* Add mkdocs.yml to .gitattributes, exclude this file from release archives
* Makefile: rename: htmldoc -> doc_html target
* run make doc: pull latest markdown documentation from wiki
* run make htmlpages: update html documentation
Diffstat (limited to 'doc/md/Theming.md')
-rw-r--r-- | doc/md/Theming.md | 84 |
1 files changed, 84 insertions, 0 deletions
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 @@ | |||
1 | ## Foreword | ||
2 | |||
3 | There are two ways of customizing how Shaarli looks: | ||
4 | |||
5 | 1. by using a custom CSS to override Shaarli's CSS | ||
6 | 2. by using a full theme that provides its own RainTPL templates, CSS and Javascript resources | ||
7 | |||
8 | ## Custom CSS | ||
9 | |||
10 | Shaarli's appearance can be modified by adding CSS rules to: | ||
11 | - Shaarli < `v0.9.0`: `inc/user.css` | ||
12 | - Shaarli >= `v0.9.0`: `data/user.css` | ||
13 | |||
14 | This file allows overriding rules defined in the template CSS files (only add changed rules), or define a whole new theme. | ||
15 | |||
16 | **Note**: Do not edit `tpl/default/css/shaarli.css`! Your changes would be overridden when updating Shaarli. | ||
17 | |||
18 | See also [[Download CSS styles from an OPML list]] | ||
19 | |||
20 | ## Themes | ||
21 | |||
22 | _WARNING - This feature is currently being worked on and will be improved in the next releases. Experimental._ | ||
23 | |||
24 | Installation: | ||
25 | - find a theme you'd like to install | ||
26 | - copy or clone the theme folder under `tpl/<a_sweet_theme>` | ||
27 | - enable the theme: | ||
28 | - Shaarli < `v0.9.0`: edit `data/config.json.php` and set the value of `raintpl_tpl` to the new theme name: | ||
29 | `"raintpl_tpl": "tpl\/my-template\/"` | ||
30 | - Shaarli >= `v0.9.0`: select the theme through the _Tools_ page | ||
31 | |||
32 | ## Community CSS & themes | ||
33 | |||
34 | ### Custom CSS | ||
35 | |||
36 | - [mrjovanovic/serious-theme-shaarli](https://github.com/mrjovanovic/serious-theme-shaarli) - A serious theme for Shaarli | ||
37 | - [shaarli/shaarli-themes](https://github.com/shaarli/shaarli-themes) | ||
38 | |||
39 | ### Themes | ||
40 | |||
41 | - [AkibaTech/Shaarli Superhero Theme](https://github.com/AkibaTech/Shaarli---SuperHero-Theme) - A template/theme for Shaarli | ||
42 | - [alexisju/albinomouse-template](https://github.com/alexisju/albinomouse-template) - A full template for Shaarli | ||
43 | - [ArthurHoaro/shaarli-launch](https://github.com/ArthurHoaro/shaarli-launch) - Customizable Shaarli theme | ||
44 | - [dhoko/ShaarliTemplate](https://github.com/dhoko/ShaarliTemplate) - A template/theme for Shaarli | ||
45 | - [kalvn/shaarli-blocks](https://github.com/kalvn/shaarli-blocks) - A template/theme for Shaarli | ||
46 | - [kalvn/Shaarli-Material](https://github.com/kalvn/Shaarli-Material) - A theme (template) based on Google's Material Design for Shaarli, the superfast delicious clone | ||
47 | - [ManufacturaInd/shaarli-2004licious-theme](https://github.com/ManufacturaInd/shaarli-2004licious-theme) - A template/theme as a humble homage to the early looks of the del.icio.us site | ||
48 | |||
49 | ### Shaarli forks | ||
50 | |||
51 | - [misterair/Limonade](https://github.com/misterair/limonade) - A fork of (legacy) Shaarli with a new template | ||
52 | - [vivienhaese/shaarlitheme](https://github.com/vivienhaese/shaarlitheme) - A Shaarli fork meant to be run in an openshift instance | ||
53 | |||
54 | ## Example installation: AlbinoMouse theme | ||
55 | |||
56 | With the following configuration: | ||
57 | - Apache 2 / PHP 5.6 | ||
58 | - user sites are enabled, e.g. `/home/user/public_html/somedir` is served as `http://localhost/~user/somedir` | ||
59 | - `http` is the name of the Apache user | ||
60 | |||
61 | ```bash | ||
62 | $ cd ~/public_html | ||
63 | |||
64 | # clone repositories | ||
65 | $ git clone https://github.com/shaarli/Shaarli.git shaarli | ||
66 | $ pushd shaarli/tpl | ||
67 | $ git clone https://github.com/alexisju/albinomouse-template.git | ||
68 | $ popd | ||
69 | |||
70 | # set access rights for Apache | ||
71 | $ chgrp -R http shaarli | ||
72 | $ chmod g+rwx shaarli shaarli/cache shaarli/data shaarli/pagecache shaarli/tmp | ||
73 | ``` | ||
74 | |||
75 | Get config written: | ||
76 | - go to the freshly installed site | ||
77 | - fill the install form | ||
78 | - log in to Shaarli | ||
79 | |||
80 | Edit Shaarli's [[configuration|Shaarli configuration]]: | ||
81 | ```bash | ||
82 | # the file should be owned by Apache, thus not writeable => sudo | ||
83 | $ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php | ||
84 | ``` | ||