many many many Varia's websites, work in progress: https://many.vvvvvvaria.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
mb@mb 04c2824180 adding the 2 submodules again 7 years ago
..
Readme.md adding the 2 submodules again 7 years ago
__init__.py adding the 2 submodules again 7 years ago
read_more_link.py adding the 2 submodules again 7 years ago
requirements.txt adding the 2 submodules again 7 years ago

Readme.md

Read More Link

Author: Vuong Nguyen (http://vuongnguyen.com)

This plugin inserts an inline "read more" or "continue" link into the last html element of the object summary.

For more information, please visit: http://vuongnguyen.com/creating-inline-read-more-link-python-pelican-lxml.html

Requirements

lxml - for parsing html elements

Settings

# This settings indicates that you want to create summary at a certain length
SUMMARY_MAX_LENGTH = 50

# This indicates what goes inside the read more link
READ_MORE_LINK = None (ex: '<span>continue</span>')

# This is the format of the read more link
READ_MORE_LINK_FORMAT = '<a class="read-more" href="/{url}">{text}</a>'