# HG changeset patch # User Ludovic Chabant # Date 1445492899 25200 # Node ID dcaa41b39c23b29b5042467bf5c7b1b3a6505b17 # Parent 2a70f537337d1c04e610813765f80be88cbbf874 docs: Add more nice graphics. diff -r 2a70f537337d -r dcaa41b39c23 docs/assets/css/wikked.less --- a/docs/assets/css/wikked.less Thu Oct 15 23:39:17 2015 -0700 +++ b/docs/assets/css/wikked.less Wed Oct 21 22:48:19 2015 -0700 @@ -23,15 +23,18 @@ } // Quotes with a nice icon. +@blockquote-img-width: 72px + 20px; +@blockquote-img-height: 100px + 20px; + blockquote { padding: 1em; margin: 1em 0; - min-height: 220px; + min-height: @blockquote-img-height; color: lighten(@color-gray-dark, 3%); background: darken(@color-gray-light, 5%); p { - margin-left: 170px; // width/height of the "toto" image: 145x200 + margin-left: @blockquote-img-width; // width/height of the "toto" image: 72x100 } p:first-child::before { content: " "; @@ -40,10 +43,10 @@ background-position: left center; display: block; float: left; - margin-left: -170px; + margin-left: -@blockquote-img-width; margin-top: -1em; - width: 150px; - height: 220px; + width: @blockquote-img-width; + height: @blockquote-img-height; } } @@ -99,6 +102,16 @@ } } +.wiki-docs header.header-img { + img { margin: 1em; float: right; } + h1 { float: left; } + &::after { + content: " "; + display: block; + clear: both; + } +} + @media screen and (min-width: 48em) { // Visible menu by default on big screens. .wrapper.wiki-docs { diff -r 2a70f537337d -r dcaa41b39c23 docs/assets/img/dead_witch.png Binary file docs/assets/img/dead_witch.png has changed diff -r 2a70f537337d -r dcaa41b39c23 docs/assets/img/melting.png Binary file docs/assets/img/melting.png has changed diff -r 2a70f537337d -r dcaa41b39c23 docs/assets/img/monkey.png Binary file docs/assets/img/monkey.png has changed diff -r 2a70f537337d -r dcaa41b39c23 docs/assets/img/soldier_monkey.png Binary file docs/assets/img/soldier_monkey.png has changed diff -r 2a70f537337d -r dcaa41b39c23 docs/assets/img/toto.png Binary file docs/assets/img/toto.png has changed diff -r 2a70f537337d -r dcaa41b39c23 docs/assets/img/witch.png Binary file docs/assets/img/witch.png has changed diff -r 2a70f537337d -r dcaa41b39c23 docs/assets/img/wizard.png Binary file docs/assets/img/wizard.png has changed diff -r 2a70f537337d -r dcaa41b39c23 docs/pages/00__index.md --- a/docs/pages/00__index.md Thu Oct 15 23:39:17 2015 -0700 +++ b/docs/pages/00__index.md Wed Oct 21 22:48:19 2015 -0700 @@ -1,6 +1,7 @@ --- title: Wikked icon: home +header_img: dead_witch.png --- **Wikked** is a [wiki][] engine that stores its data in plain text files using diff -r 2a70f537337d -r dcaa41b39c23 docs/pages/01_installation.md --- a/docs/pages/01_installation.md Thu Oct 15 23:39:17 2015 -0700 +++ b/docs/pages/01_installation.md Wed Oct 21 22:48:19 2015 -0700 @@ -1,6 +1,7 @@ --- title: Installation icon: cloud-download +header_img: monkey.png --- ## From the package index diff -r 2a70f537337d -r dcaa41b39c23 docs/pages/02_overview.md --- a/docs/pages/02_overview.md Thu Oct 15 23:39:17 2015 -0700 +++ b/docs/pages/02_overview.md Wed Oct 21 22:48:19 2015 -0700 @@ -1,6 +1,7 @@ --- title: Overview icon: book +header_img: witch.png --- Wikked's data is entirely stored in text files on disk. All you ever need, or diff -r 2a70f537337d -r dcaa41b39c23 docs/pages/03_configuration.md --- a/docs/pages/03_configuration.md Thu Oct 15 23:39:17 2015 -0700 +++ b/docs/pages/03_configuration.md Wed Oct 21 22:48:19 2015 -0700 @@ -1,6 +1,7 @@ --- title: Configuration icon: cog +header_img: soldier_monkey.png --- Wikked can be configured with a few files: diff -r 2a70f537337d -r dcaa41b39c23 docs/pages/04_syntax.md --- a/docs/pages/04_syntax.md Thu Oct 15 23:39:17 2015 -0700 +++ b/docs/pages/04_syntax.md Wed Oct 21 22:48:19 2015 -0700 @@ -1,6 +1,7 @@ --- title: Syntax icon: pencil +header_img: melting.png --- ## Formatting diff -r 2a70f537337d -r dcaa41b39c23 docs/pages/05_deployment.md --- a/docs/pages/05_deployment.md Thu Oct 15 23:39:17 2015 -0700 +++ b/docs/pages/05_deployment.md Wed Oct 21 22:48:19 2015 -0700 @@ -1,6 +1,7 @@ --- title: Deployment icon: server +header_img: wizard.png --- Wikked runs by default with an "easy" configuration, _i.e._ something that will @@ -27,12 +28,12 @@ [flaskdeploy]: http://flask.pocoo.org/docs/deploying/ -## Apache and WSGI +## Public facing wiki -A simple way to run Wikked on a production server is to use [Apache][] with -[`mod_wsgi`][wsgi]. For a proper introduction to the matter, you can see -[Flask's documentation on the subject][flask_wsgi]. Otherwise, you can probably -reuse the following examples. +A simple way to run Wikked on a production server (_i.e._ a server accessible +from the internet) is to use [Apache][] with [`mod_wsgi`][wsgi]. For a proper +introduction to the matter, you can see [Flask's documentation on the +subject][flask_wsgi]. Otherwise, you can probably reuse the following examples. [apache]: https://httpd.apache.org/ [wsgi]: http://code.google.com/p/modwsgi/ @@ -83,18 +84,23 @@ > `/path/to/your/wiki/venv/lib/python/site-packages/wikked/static`. -## Background updates +## Advanced configurations + +### Background updates -The second thing to do is to enable background wiki updates. Good news: they're -already enabled if you used the `get_wsgi_app` function from the previous -section (you can disable it by passing `async_update=False` if you really need -to). +By default, when you edit a page, Wikked will invalidate any page with a query +in it. That page will be re-computed the next time you visit it. But this may +not work very well if you have a lot of queries. As an alternative, Wikked can +run background updates. + +First you enable background updates in the `get_wsgi_app` function from the previous +section. You just need to pass `async_update=True`. > If you want to use background updates locally, you can do `wk runserver > --usetasks`. -However, you'll still need to run a separate process that, well, runs those -updates in the background. To do this: +Now, you'll need to run a separate process that, well, runs those updates in the +background. To do this: cd /path/to/my/wiki wk runtasks @@ -106,9 +112,7 @@ [celerysqlite]: http://docs.celeryproject.org/en/latest/getting-started/brokers/sqlalchemy.html -## Backend options - -**This is for advanced use only** +### Backend options If you want to use a different storage than SQLite, set the `database_url` setting in your `wikirc` to an [SQLAlchemy-supported database URL][SQLAlchemy]. diff -r 2a70f537337d -r dcaa41b39c23 docs/templates/default.html --- a/docs/templates/default.html Thu Oct 15 23:39:17 2015 -0700 +++ b/docs/templates/default.html Wed Oct 21 22:48:19 2015 -0700 @@ -23,9 +23,14 @@
{% block header %} {% if page.header_bg %} -
+

{{page.title}}

+ {% elif page.header_img %} +
+

{{ page.title }}

+ +
{% else %}

{{ page.title }}