Skip to main content

Easily embed delicious bookmarks in your Pelican articles.

Project description

https://travis-ci.org/2xyo/pelican-delicious.png?branch=master https://coveralls.io/repos/2xyo/pelican-delicious/badge.png?branch=master

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

Then add a bit of code to your blog configuration:

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 Titile 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pelican-delicious-0.0.1.tar.gz (3.9 kB view details)

Uploaded Source

File details

Details for the file pelican-delicious-0.0.1.tar.gz.

File metadata

File hashes

Hashes for pelican-delicious-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f51848edc6fb6f1e06e68ddd96d6a5a125ecb00123731b11f45eeb0b4dcef73a
MD5 5f3a617fc4f015eaa9436c947805d2aa
BLAKE2b-256 5beeb87c17683211d258e15fa0488b0d6fb96caf75b12bc5dbea6356d55bc64f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page