From 6902485c12d3a50c1ff8dd399d05b5a80b7373c5 Mon Sep 17 00:00:00 2001 From: FELD Boris Date: Tue, 22 Feb 2011 11:35:06 +0100 Subject: [PATCH] Add some docs for skribit integration. --- docs/settings.rst | 55 +++++++++++++++++++++++++++++++++++++++++++++++ docs/themes.rst | 15 +++++++++++++ 2 files changed, 70 insertions(+) diff --git a/docs/settings.rst b/docs/settings.rst index 35a13ef6..15f62d47 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -69,6 +69,15 @@ Setting name what it does ? descending order, default is alphabetically) `SITEURL` base URL of your website. `SITENAME` Your site name, +`SKRIBIT_TYPE` The type of skribit widget (TAB or WIDGET, default + TAB). +`SKRIBIT_TAB_COLOR` Tab color (#XXXXXX, default #333333). +`SKRIBIT_TAB_HORIZ` Tab Distance from Left (% or distance, default Null). +`SKRIBIT_TAB_VERT` Tab Distance from Top (% or distance, default 20%). +`SKRIBIT_TAB_PLACEMENT` Tab placement (Top, Bottom, Left or Right, default + LEFT). +`SKRIBIT_TAB_SITENAME` Tab identifier (See Skribit part below). +`SKRIBIT_WIDGET_ID` Widget identifier (See Skribit part below). `STATIC_PATHS` The static paths you want to have accessible on the output path "static". By default, pelican will copy the 'images' folder to the output folder. @@ -84,6 +93,52 @@ Setting name what it does ? `WITH_PAGINATION` Activate pagination. Default is False. ======================== ======================================================= +Skribit +======= + +Skribit has two ways to display suggestions : as a sidebar widget or as a +suggestions tab. You can choose one of the display by setting the SKRIBIT_TYPE +in your config. + +Sidebar widget +-------------- + +The settings for sidebar widget is : + + * SKRIBIT_WIDGET_ID + +All the customizations are done in the skribit web interface. + +To retrieve your identifier from the code snippet, you can use this python code:: + + import re + regex = re.compile('.*http://assets.skribit.com/javascripts/SkribitWidget.\ + js\?renderTo=writeSkribitHere&blog=(.*)&.*') + snippet = '''SNIPPET CONTENT''' + snippet = snippet.replace('\n', '') + identifier = regex.match(snippet).groups()[0] + +Suggestion tab +-------------- + +The setting for suggestion tab are : + + * SKRIBIT_TAB_COLOR + * SKRIBIT_TAB_DISTANCE_HORIZ + * SKRIBIT_TAB_DISTANCE_VERT + * SKRIBIT_TAB_PLACEMENT + * SKRIBIT_TAB_SITENAME + +These settings are used for customization. + +To retrieve your sitename from the code snippet, you can use this python code:: + + import re + regex = re.compile('.*http://skribit.com/lightbox/(.*)\',.*') + snippet = '''SNIPPET CONTENT''' + snippet = snippet.replace('\n', '') + identifier = regex.match(snippet).groups()[0] + Themes ====== diff --git a/docs/themes.rst b/docs/themes.rst index 833b7f82..9f8b8765 100644 --- a/docs/themes.rst +++ b/docs/themes.rst @@ -148,3 +148,18 @@ dates_page The current page of articles, ordered by date, ascending page_name 'tag/`tag_name`'. Useful for pagination links. =================== =================================================== + +Include skribit script +====================== + +In order to support skribit scripts in your themes, you must following these +actions : + + * Copy `skribit_tab_script.html` and `skribit_widget_script.html` in your + templates directory. + * Add {% include 'skribit_tab_script.html' %} in your part in order to + support suggestions tab. + * Add {% include 'skribit_widget_script.html' %} where you want in order to + support sidebar widget. + +You can take a look at notmyidea default theme for working example.