Updates to the Plugin docs.

This commit is contained in:
Brit Butler 2014-05-02 16:31:23 -04:00
parent 96d85c8e69
commit 43bad78452
2 changed files with 37 additions and 25 deletions

View file

@ -32,8 +32,8 @@
method. The method takes `text` and `format` arguments and is
[EQL-specialized](http://www.gigamonkeys.com/book/object-reorientation-generic-functions.html#defmethod)
on the format. Format should be a keyword matching the file
extension (or pathname-type) of the markup format. (eg. `:rst` for
ReStructuredText)
extension (or `pathname-type`) of the markup format.
(eg. `:rst` for ReStructuredText)
* **New hosting options**, for example the
[Amazon S3 plugin](http://github.com/redline6561/coleslaw/blob/master/plugins/s3.lisp),
@ -43,14 +43,15 @@
getting its deploy location with `(deploy-dir *config*)` a number of
interesting options become possible.
* **New content types**, for example a bookmark-like content type such
as ["shouts"](http://paste.lisp.org/display/134453). This has not
yet been attempted as a plugin but should be possible without much
difficulty.
* **New content types**, for example the
[static page content type](http://github.com/redline6561/coleslaw/blob/master/plugins/static-pages.lisp),
can be created by definining a subclass of CONTENT along with a
template, and `render`, `page-url`, and `publish` methods.
The PAGE content type cheats a bit by reusing the existing POST template.
* **New service integrations**, for example crossposting to
twitter/facebook/tumblr/livejournal/etc, should also be possible by
adding an :after hook to the deploy method as with
hosting. Alternately, an :after hook on the
[`render`](http://redlinernotes.com/docs/coleslaw.html#render_func)
method might be used.
hosting but this is dependent on knowing which posts are new
which should become possible before 1.0. See the incremental compilation
notes in the hacking docs for further details.

View file

@ -1,6 +1,7 @@
# General Use
* Add a list with the plugin name and settings to the ```:plugins``` section of your [.coleslawrc](http://github.com/redline6561/coleslaw/blob/master/examples/single-site.coleslawrc). Plugin settings are described below.
* Add a list with the plugin name and settings to the ```:plugins```
section of your [.coleslawrc][config_file]. Plugin settings are described below.
* Available plugins are listed below with usage descriptions and config examples.
@ -8,19 +9,19 @@
**Description**: Provides traffic analysis through [Google Analytics](http://www.google.com/analytics/).
**Example**: ```(analytics :tracking-code "google-provided-unique-id")```
**Example**: `(analytics :tracking-code "google-provided-unique-id")`
## Comments via Disqus
**Description**: Provides comment support through [Disqus](http://www.disqus.com/).
**Example**: ```(disqus :shortname "disqus-provided-unique-id")```
**Example**: `(disqus :shortname "disqus-provided-unique-id")`
## Hosting via Github Pages
**Description**: Allows hosting with CNAMEs via [github-pages](http://pages.github.com/). Parses the host from the `:domain` section of your config by default. Pass in a string to override.
**Example**: ```(gh-pages :cname t)```
**Example**: `(gh-pages :cname t)`
## LaTeX via Mathjax
@ -28,36 +29,46 @@
**Example**: ```(mathjax)```
### Options
**Options**:
`:force`, when non-nil, will force the inclusion of MathJax on all posts. Default value is `nil`.
- `:force`, when non-nil, will force the inclusion of MathJax on all posts. Default value is `nil`.
`:location` specifies the location of the `MathJax.js` file. The default value is `"http://cdn.mathjax.org/mathjax/latest/MathJax.js"`. This is useful if you have a local copy of MathJax and want to use that version.
- `:location` specifies the location of the `MathJax.js` file. The default value is `"http://cdn.mathjax.org/mathjax/latest/MathJax.js"`. This is useful if you have a local copy of MathJax and want to use that version.
`:preset` allows the specification of the config parameter of `MathJax.js`. The default value is `"TeX-AMS-MML_HTMLorMML"`.
- `:preset` allows the specification of the config parameter of `MathJax.js`. The default value is `"TeX-AMS-MML_HTMLorMML"`.
`:config` is used as supplementary inline configuration to the `MathJax.Hub.Config ({ ... });`. It is unused by default.
- `:config` is used as supplementary inline configuration to the `MathJax.Hub.Config ({ ... });`. It is unused by default.
## ReStructuredText
**Description**: Some people really like [ReStructuredText](http://docutils.sourceforge.net/rst.html). Who knows why? But it only took one method to add, so yeah! Just create a post with ```format: rst``` and the plugin will do the rest.
**Description**: Some people really like [ReStructuredText](http://docutils.sourceforge.net/rst.html). Who knows why? But it only took one method to add, so yeah! Just create a post with `format: rst` and the plugin will do the rest.
**Example**: ```(rst)```
**Example**: `(rst)`
## S3 Hosting
**Description**: Allows hosting your blog entirely via [Amazon S3](http://aws.amazon.com/s3/). It is suggested you closely follow the relevant [AWS guide](http://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html) to get the DNS setup correctly. Your ```:auth-file``` should match that described in the [ZS3 docs](http://www.xach.com/lisp/zs3/#file-credentials).
**Description**: Allows hosting your blog entirely via [Amazon S3](http://aws.amazon.com/s3/). It is suggested you closely follow the relevant [AWS guide](http://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html) to get the DNS setup correctly. Your `:auth-file` should match that described in the [ZS3 docs](http://www.xach.com/lisp/zs3/#file-credentials).
**Example**: ```(s3 :auth-file "/home/redline/.aws_creds" :bucket "blog.redlinernotes.com")```
**Example**: `(s3 :auth-file "/home/redline/.aws_creds" :bucket "blog.redlinernotes.com")`
## Sitemap generator
**Description**: This plugin generates a sitemap.xml under the page root, which is useful if you want google to crawl your site.
**Example**: ```(sitemap)```
**Example**: `(sitemap)`
## Static Pages
**Description**: This plugin allows you to add `.page` files to your repo, that will be rendered to static pages at a designated URL.
**Example**: `(static-pages)`
## Wordpress Importer
**Description**: Import blog posts from Wordpress using their export tool. Blog entries will be read from the XML and converted into .post files. Afterwards the XML file will be deleted to prevent reimporting. Optionally an ```:output``` argument may be supplied to the plugin. If provided, it should be a directory in which to store the .post files. Otherwise, the value of ```:repo``` in your .coleslawrc will be used.
**NOTE**: This plugin really should be rewritten to act as a standalone script. It is designed for one time use and using it through a site config is pretty silly.
**Example**: ```(import :filepath "/home/redline/redlinernotes-export.timestamp.xml" :output "/home/redlinernotes/blog/")```
**Description**: Import blog posts from Wordpress using their export tool. Blog entries will be read from the XML and converted into .post files. Afterwards the XML file will be deleted to prevent reimporting. Optionally an `:output` argument may be supplied to the plugin. If provided, it should be a directory in which to store the .post files. Otherwise, the value of `:repo` in your .coleslawrc will be used.
**Example**: `(import :filepath "/home/redline/redlinernotes-export.timestamp.xml" :output "/home/redlinernotes/blog/")`
[config_file]: http://github.com/redline6561/coleslaw/blob/master/examples/single-site.coleslawrc