X-Git-Url: https://git.korewanetadesu.com/?p=pelican-mode.git;a=blobdiff_plain;f=README.md;h=65c21d4a86b4b064a79a4976aec8c1df782d0ec2;hp=8b365cb8e7042e9ea5eec08aa9c1c8a150158b4c;hb=209ad24318e1f28675da430aa10ef3467694b9ac;hpb=3315a18243301484682db5648146579430001772 diff --git a/README.md b/README.md index 8b365cb..65c21d4 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ -pelican-mode is an Emacs minor mode for editing pages and posts in +pelican-mode is an Emacs minor mode for editing articles and pages in [Pelican][] sites. -It's intended to be used alongside [markdown-mode][] or [rst-mode][]. -It also assumes you've set up Pelican with `pelican-quickstart` or -something like it. In particular it assumes: +It's intended to be used alongside a major mode for the Pelican +document. Currently supported formats are Markdown, reStructuredText, +AsciiDoc, and Org. It also assumes you've set up Pelican with +`pelican-quickstart` or something like it. In particular it expects: * The existence of `pelicanconf.py` and `Makefile` in some ancestor directory. @@ -11,21 +12,37 @@ something like it. In particular it assumes: ancestor is irrelevant. * If the next component is `pages`, that indicates a static page rather than a dated post. - -It also enforces some parts of my preferred Pelican configuration: - * Categories are never provided (you can have one if you want, but - the default interactive commands don't provide one). - * Tags are always provided. - * Slugs are explicit, and include nested subdirectories. ## Quick Guide -* `C-c P n` - Insert a post or page header -* `C-c P p` - Remove draft status from a post (i.e. publish it) -* `C-c P t` - Update the date field in a post/page header -* `C-c P h` - Generate HTML output for a site (equivalent to `make html`) -* `C-c P u` - Upload a site using rsync (equivalent to `make rsync_upload`) +To enable by default on all text files in a Pelican site: + +``` emacs-lisp +(require 'pelican-mode) +(pelican-global-mode) +``` + + +Or with `use-package` and deferred loading: + +``` emacs-lisp +(use-package pelican-mode + :demand :after (:any org rst markdown-mode adoc-mode) + :config + (pelican-global-mode)) +``` + +Or, register `pelican-mode` or `pelican-mode-enable-if-site` +as hook functions for more direct control. + +* `C-c = d` - Update the document’s date +* `C-c = f` - Set a metadata field (title, category, etc.) +* `C-c = h` - Generate HTML output for a site (equivalent to `make html`) +* `C-c = n` - Insert a post or page header +* `C-c = p` - Remove draft status from a post (i.e. publish it) +* `C-c = u` - Upload a site using rsync (equivalent to `make rsync_upload`) + ## Troubleshooting @@ -33,6 +50,7 @@ If the commands which invoke `make` can find the Makefile but can't find `pelican`, your `exec-path` may not be set right. Try out [exec-path-from-shell][]. + ## License This program is free software; you can redistribute it and/or modify