Add some usage notes.
[pelican-mode.git] / README.md
1 pelican-mode is an Emacs minor mode for editing pages and posts in
2 [Pelican][] sites.
3
4 It's intended to be used alongside [markdown-mode][] or [rst-mode][].
5 It also assumes you've set up Pelican with `pelican-quickstart` or
6 something like it. In particular it assumes:
7
8 * The existence of `pelicanconf.py` and `Makefile` in some ancestor
9 directory.
10 * The first component of the path (e.g. `content`) after that
11 ancestor is irrelevant.
12 * If the next component is `pages`, that indicates a static page
13 rather than a dated post.
14
15
16 ## Quick Guide
17
18 To enable by default on all text files in a Pelican site:
19
20 (require 'pelican-mode)
21 (pelican-global-mode)
22
23 Or, register `pelican-mode` or `pelican-mode-enable-if-site`
24 as hook functions for more direct control.
25
26 * `C-c P f` - Set a metadata field (title, category, etc.)
27 * `C-c P h` - Generate HTML output for a site (equivalent to `make html`)
28 * `C-c P n` - Insert a post or page header
29 * `C-c P p` - Remove draft status from a post (i.e. publish it)
30 * `C-c P t` - Update the date field in a post/page header
31 * `C-c P u` - Upload a site using rsync (equivalent to `make rsync_upload`)
32
33
34 ## Troubleshooting
35
36 If the commands which invoke `make` can find the Makefile but can't
37 find `pelican`, your `exec-path` may not be set right. Try out
38 [exec-path-from-shell][].
39
40
41 ## License
42
43 This program is free software; you can redistribute it and/or modify
44 it under the terms of the GNU General Public License as published by
45 the Free Software Foundation, either version 3 of the License, or (at
46 your option) any later version.
47
48 [Pelican]: http://getpelican.com/
49 [markdown-mode]: http://jblevins.org/projects/markdown-mode/
50 [rst-mode]: http://docutils.sourceforge.net/docs/user/emacs.html
51 [exec-path-from-shell]: https://github.com/purcell/exec-path-from-shell