View on GitHub

SublimePelican

A plugin for Pelican integration to Sublime Text.

Download this project as a .zip file Download this project as a tar.gz file

SublimePelican: Pelican integration to Sublime Text

SublimePelican is a Sublime Text plugin that makes writing Pelican articles easier and faster.

The plugin prepares metadata fields for you, with the ability to fill in current date, to generate slug, and to list categories and tags you've used. More features to be added.

Installation

Installation with Package Control

The easiest way to install SublimePelican is via Will Bond's Sublime Package Control. Package Control automatically updates SublimePelican to the latest version for you.

  1. If you haven't installed Sublime Package Control, follow the steps here: http://wbond.net/sublime_packages/package_control/installation
  2. Open Sublime Text and bring up the Command Palette (OS X: Command+Shift+P; Linux/Windows: Control+Shift+P).
  3. Select "Package Control: Install Package", and wait for Package Control to fetch the package list.
  4. When the list appears in the quick panel, type Pelican to select Pelican.

Installation without Git

  1. Download the latest source from GitHub.
  2. Copy the sublime-pelican-master folder to your Sublime Text Packages directory.
  3. Rename the sublime-pelican-master folder to Pelican.

If you're not sure where your Sublime Text Packages directory is, open Sublime Text and select menu item Preference > Browse Packages...

Installation with Git

Clone this repository into your Sublime Text Packages directory:

git clone https://github.com/jsliang/sublime-pelican.git
mv sublime-pelican Pelican

which is equivalent to:

git clone https://github.com/jsliang/sublime-pelican.git Pelican

If you're not sure where your Sublime Text Packages directory is, open Sublime Text and select menu item Preference > Browse Packages...

Usage

Access commands from Command Palette

  1. After installation, bring up the Command Palette (OS X: Command+Shift+P; Linux/Windows: Control+Shift+P).
  2. Type Pelican in Command Palette to view a list of available commands.

Access commands from Context Menu

Right click on a file being edit, and access the commands under the SublimePelican item.

SublimePelican Commands

Settings

For the latest information on what SublimePelican settings are available, select the menu item Preferences > Package Settings > SublimePelican > Settings - Default.

DO NOT edit the settings in "Settings - Default" as changes will be lost when SublimePelican is updated. Instead, customize your settings in Preferences > Package Settings > SublimePelican > Settings - User.

Smart metadata fields generation

Slug generation

Customizable metadata template

{
    // Metadata template for Markdown articles
    "md":
        [
            "Title: %(title)s",
            "Slug: %(slug)s",
            "Date: %(date)s",
            "Tags: %(tags)s",
            "Category: %(category)s",
            "Author: %(author)s",
            "Lang: %(lang)s",
            "Summary: %(summary)s"
        ],

    // Metadata template for reStructuredText articles
    "rst":
        [
            ":title: %(title)s",
            ":slug: %(slug)s",
            ":date: %(date)s",
            ":tags: %(tags)s",
            ":category: %(category)s",
            ":author: %(author)s",
            ":lang: %(lang)s",
            ":summary: %(summary)s"
        ]
}

File Path Filter for Pelican Articles

To prevent automatic slug generation from annoyly affecting other Markdown/reStrcturedText files that are not Pelican articles, SublimePelican processes only the Markdown/reStructuredText files under the INPUTDIR configured in your Pelican Makefile.

Comments and Bug Reports

If you have any comments, or if you find any bugs, feel free to post them in issues.

Thanks

License

SublimePelican is licensed under the MIT license.

Copyright (c) 2013, Jui-Shan Liang <jenny@jsliang.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Comments

comments powered by Disqus