mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Add some docs for skribit integration.
This commit is contained in:
parent
b2be5638f8
commit
6902485c12
2 changed files with 70 additions and 0 deletions
|
|
@ -69,6 +69,15 @@ Setting name what it does ?
|
||||||
descending order, default is alphabetically)
|
descending order, default is alphabetically)
|
||||||
`SITEURL` base URL of your website.
|
`SITEURL` base URL of your website.
|
||||||
`SITENAME` Your site name,
|
`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
|
`STATIC_PATHS` The static paths you want to have accessible on the
|
||||||
output path "static". By default, pelican will copy
|
output path "static". By default, pelican will copy
|
||||||
the 'images' folder to the output folder.
|
the 'images' folder to the output folder.
|
||||||
|
|
@ -84,6 +93,52 @@ Setting name what it does ?
|
||||||
`WITH_PAGINATION` Activate pagination. Default is False.
|
`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
|
Themes
|
||||||
======
|
======
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -148,3 +148,18 @@ dates_page The current page of articles, ordered by date,
|
||||||
ascending
|
ascending
|
||||||
page_name 'tag/`tag_name`'. Useful for pagination links.
|
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 <head> 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.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue