Microdata semantic markups support for Pelican Blog Generator
Project description
Microdata plugin for Pelican
Microdata semantic markups support for Pelican static blog generator.
Installation
Install the plugin via pip:
~$ pip install pelican-microdata
Or via easy_install:
~$ easy_install pelican-microdata
Usage
To load the plugin, you have to add it in your settings file.
PLUGINS = (
'microdata',
)
Once loaded you have access to microdata rst directives.
Directives
Microdata plugin provides two directives:
itemscope, a block directive allowing to declare an itemscope block:
.. itemscope:: <Schema type> :tag: element type (default: div) :itemprop: optionnal itemprop attribute :compact: optionnal Nested contentitemprop, an inline directive/role allowing to annotate some text with an itemprop attribute.
:itemprop:`Displayed text <itemprop name>` :itemprop:`Displayed text <itemprop name:http://some.url/>`
Example
This reStructuredText document:
.. itemscope: Person
:tag: p
My name is :itemprop:`Bob Smith <name>`
but people call me :itemprop:`Smithy <nickanme>`.
Here is my home page:
:itemprop:`www.exemple.com <url:http://www.example.com>`
I live in Albuquerque, NM and work as an :itemprop:`engineer <title>`
at :itemprop:`ACME Corp <affiliation>`.
will result in:
<p itemscope itemtype="http://data-vocabulary.org/Person">
My name is <span itemprop="name">Bob Smith</span>
but people call me <span itemprop="nickname">Smithy</span>.
Here is my home page:
<a href="http://www.example.com" itemprop="url">www.example.com</a>
I live in Albuquerque, NM and work as an <span itemprop="title">engineer</span>
at <span itemprop="affiliation">ACME Corp</span>.
</p>
Changelog
0.2 (2013-06-21)
Start working on Python 3 compatibility
Added compact option to ItemScope block
Consider nested <p> tags as compact
0.1 (2013-03-25)
Initial implementation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pelican-microdata-0.2.tar.gz.
File metadata
- Download URL: pelican-microdata-0.2.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6f8c51c017b70fbea10625aa9160dee15c9e4b4b915625546d251eed3e21935
|
|
| MD5 |
17758219339b7ee5728b7f72d019b8dc
|
|
| BLAKE2b-256 |
b212840bd4c81235d1d5e364bbb4cfaa94f0e5c079378c25f9659cd2f2313a88
|