pelican-delicious

Easily embed delicious bookmarks in your Pelican articles.


License
BSD-3-Clause
Install
pip install pelican-delicious==0.0.1

Documentation

Pelican Delicious bookmarks

Travis CI - Continuous Integration Coveralls - code coverage Crate - Download Crate - Pypi version Requires - Requirements Status Waffle - workflow

Pelican Delicious Bookmarks is a library to make it easy to add your Delicious bookmarks in your Pelican blogs.

Installation

To install pelican-delicious, simply:

$ pip install pelican-delicious

or :

$ git clone

Then add a bit of code to your blog configuration:

PLUGIN_PATHS = [
    '/<path>/pelican-plugins',
    '/<path>/pelican-delicious',
    # '...']

PLUGINS = [
    # '...',
    'pelican_delicious']

Usage

In your articles, just add lines to your posts that look like:

[delicious:tags=tag1 tage2]

This will tell the plugin to insert links withs tag1 and tag2 into your post. The resulting HTML will look like:

<div class ="delicious">
    <dl>
        <dt>Title</dt>
        <dd>The Title of the link</dd>

        <dt>Description</dt>
        <dd>The Description</dd>

        <dt>URL</dt>
        <dd><a href="http://www.example.com"/></dd>
    </dl>
</div>

Settings

Create the file pelican-creds.py with your credentials :

DELICIOUS_USERNAME = 'Your Delicious username'
DELICIOUS_PASSWORD = 'Your Delicious password'

Import this config in your pelicanconf.py :

import pelican-delicious
from pelican-delicious import *

You can also modify the default template:

DELICIOUS_TEMPLATE = """
     <div class="delicious">
    {% for bookmark in bookmarks %}
        <dl>
            <dt>Title</dt>
            <dd>{{ bookmark.title }}</dd>
            {% if bookmark.description %}
            <dt>Description</dt>
            <dd>{{ bookmark.description }}</dd>
            {% endif %}
            <dt>URL</dt>
            <dd><a href="{{ bookmark.url }}"/></dd>
        </dl>
    {% endfor %}
    </div>"""

Don't forget to add pelican-creds.py to your .gitignore!

License

Uses the BEER-WARE license.