Skip to content

Pelican blogging framework port of Stuart Colville's titlecase (based on original titlecase.pl by John Gruber of www.daringfireball.net)

Notifications You must be signed in to change notification settings

jrarseneau/pelican-titlecase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TitleCase Plugin for Pelican

Implemention of Python titlecase for the Pelican static blogging system.

Titlecase.pl was originally created by John Gruber from Daring Fireball

What it does

This plugin / jinja filter will convert any text into "Title Case" format. It doesn't simply uppercase each letter of a word, but instead contains logic for proper formatting, when to uppercase, articles, URL's. For more information, refer to the Daring Fireball article on Title Case.

An example (an article title)

Pre-Title Case:

Apple profit falls 22% but beats gloomy expectations

Post-Title Case:

Apple Profit Falls 22% but Beats Gloomy Expectations

Installation

  1. Clone this repository into where you normally keep your pelican plugins

  2. Install the required pip module (titlecase): pip install -r requirements.txt

  3. Modify your pelicanconf.py file, and update the PLUGINS setting to include pelican-titlecase:

    PLUGINS = ["pelican-titlecase"]

Usage

Anywhere in your theme's templates, invoke the filter as follows:

`{{ article.title | titlecase }}` 

This will titlecase all your article titles

About

Pelican blogging framework port of Stuart Colville's titlecase (based on original titlecase.pl by John Gruber of www.daringfireball.net)

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages