2013-02-20 01:06:32 -05:00
|
|
|
# General Use
|
|
|
|
|
2014-09-12 16:21:50 -04:00
|
|
|
* To enable a plugin, add its name and settings to your
|
|
|
|
[.coleslawrc][config_file]. Plugin settings are described
|
|
|
|
below. Note that some plugins require additional setup.
|
2013-02-20 01:06:32 -05:00
|
|
|
|
2014-06-04 11:22:47 -04:00
|
|
|
* Available plugins are listed below with usage descriptions and
|
|
|
|
config examples.
|
2013-02-20 01:06:32 -05:00
|
|
|
|
|
|
|
## Analytics via Google
|
|
|
|
|
2014-06-04 11:22:47 -04:00
|
|
|
**Description**: Provides traffic analysis through
|
|
|
|
[Google Analytics](http://www.google.com/analytics/).
|
2013-02-20 01:06:32 -05:00
|
|
|
|
2014-05-02 16:31:23 -04:00
|
|
|
**Example**: `(analytics :tracking-code "google-provided-unique-id")`
|
2013-02-20 01:06:32 -05:00
|
|
|
|
2017-07-31 16:54:54 +02:00
|
|
|
## Analytics via Piwik
|
|
|
|
|
|
|
|
**Description**: Provides traffic analysis through
|
|
|
|
[Piwik](https://www.piwik.org).
|
|
|
|
|
2017-08-03 21:44:39 +02:00
|
|
|
**Example**: `(piwik :piwik-url "piwik.example.com" :piwik-site "example-site")`
|
2017-07-31 16:54:54 +02:00
|
|
|
|
2016-09-20 19:20:40 +02:00
|
|
|
## CL-WHO
|
|
|
|
|
|
|
|
**Description**: Allows the user to write posts cl-who markup. Just create a
|
|
|
|
post with `format: cl-who` and the plugin will do the rest.
|
|
|
|
|
|
|
|
**Example**: (cl-who)
|
|
|
|
|
2013-02-20 01:06:32 -05:00
|
|
|
## Comments via Disqus
|
|
|
|
|
2014-06-04 11:22:47 -04:00
|
|
|
**Description**: Provides comment support through
|
|
|
|
[Disqus](http://www.disqus.com/).
|
2013-02-20 01:06:32 -05:00
|
|
|
|
2014-05-02 16:31:23 -04:00
|
|
|
**Example**: `(disqus :shortname "disqus-provided-unique-id")`
|
2013-02-20 01:06:32 -05:00
|
|
|
|
2016-10-27 12:37:51 +02:00
|
|
|
## Comments via isso
|
|
|
|
|
|
|
|
**Description**: Provides comment support through
|
|
|
|
[isso](https://posativ.org/isso/).
|
|
|
|
|
|
|
|
**Example**: `(isso :isso-url "your-isso-url")`
|
|
|
|
|
2014-11-22 23:06:53 -05:00
|
|
|
## HTML5 Gifs via Gfycat
|
|
|
|
|
|
|
|
**Description**: Provides support for embedding [gfycat](http://gfycat.com/) gifs.
|
2014-11-25 22:39:54 -05:00
|
|
|
Any content tagged 'gfycat' containing an IMG element of the form
|
|
|
|
`<img class="gfyitem" data-id="your-gfy-slug" />` will embed the
|
|
|
|
corresponding gfy.
|
2014-11-22 23:06:53 -05:00
|
|
|
|
|
|
|
**Example**: `(gfycat)`
|
|
|
|
|
2013-04-21 12:13:03 -04:00
|
|
|
## Hosting via Github Pages
|
|
|
|
|
2014-06-04 11:22:47 -04:00
|
|
|
**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.
|
2013-04-21 12:13:03 -04:00
|
|
|
|
2014-05-02 16:31:23 -04:00
|
|
|
**Example**: `(gh-pages :cname t)`
|
2013-04-21 12:13:03 -04:00
|
|
|
|
2014-06-04 11:22:47 -04:00
|
|
|
## Incremental Builds
|
|
|
|
|
|
|
|
**Description**: Primarily a performance enhancement. Caches the
|
|
|
|
content database between builds with
|
|
|
|
[cl-store][http://common-lisp.net/project/cl-store/] to avoid
|
|
|
|
parsing the whole git repo every time. May become default
|
|
|
|
functionality instead of a plugin at some point. Substantially
|
|
|
|
reduces runtime for medium to large sites.
|
|
|
|
|
|
|
|
**Example**: `(incremental)`
|
|
|
|
|
2014-09-12 16:21:50 -04:00
|
|
|
**Setup**: You must run the `examples/dump_db.sh` script to
|
|
|
|
generate a database dump for your site before enabling the
|
|
|
|
incremental plugin.
|
2014-06-04 11:40:14 -04:00
|
|
|
|
2013-02-20 01:06:32 -05:00
|
|
|
## LaTeX via Mathjax
|
|
|
|
|
2014-06-04 11:22:47 -04:00
|
|
|
**Description**: Provides LaTeX support through
|
|
|
|
[Mathjax](http://www.mathjax.org/) for posts tagged with "math" and
|
|
|
|
indexes containing such posts. Any text enclosed in $$ will be
|
|
|
|
rendered, for example, ```$$ \lambda \scriptstyle{f}. (\lambda
|
|
|
|
x. (\scriptstyle{f} (x x)) \lambda x. (\scriptstyle{f} (x x)))
|
|
|
|
$$```.
|
2013-02-20 01:06:32 -05:00
|
|
|
|
|
|
|
**Example**: ```(mathjax)```
|
|
|
|
|
2014-05-02 16:31:23 -04:00
|
|
|
**Options**:
|
2013-04-03 18:27:30 +02:00
|
|
|
|
2014-06-04 11:22:47 -04:00
|
|
|
- `:force`, when non-nil, will force the inclusion of MathJax on all
|
|
|
|
posts. Default value is `nil`.
|
2013-04-03 18:27:30 +02:00
|
|
|
|
2014-06-04 11:22:47 -04:00
|
|
|
- `:location` specifies the location of the `MathJax.js` file. The
|
2017-04-10 17:26:10 +02:00
|
|
|
default value is `"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js"`.
|
2014-06-04 11:22:47 -04:00
|
|
|
This is useful if you have a local copy of MathJax and want to use that
|
|
|
|
version.
|
2013-04-03 18:27:30 +02:00
|
|
|
|
2014-06-04 11:22:47 -04:00
|
|
|
- `:preset` allows the specification of the config parameter of
|
|
|
|
`MathJax.js`. The default value is `"TeX-AMS-MML_HTMLorMML"`.
|
2013-04-03 18:27:30 +02:00
|
|
|
|
2014-06-04 11:22:47 -04:00
|
|
|
- `:config` is used as supplementary inline configuration to the
|
|
|
|
`MathJax.Hub.Config ({ ... });`. It is unused by default.
|
2013-04-03 20:05:04 +02:00
|
|
|
|
2019-08-31 11:13:05 +02:00
|
|
|
## Markless
|
|
|
|
|
|
|
|
**Description**: [Markless](https://shirakumo.github.io/markless) is a
|
|
|
|
new document markup standard. To use it in your posts, create the
|
2019-09-28 17:25:10 +02:00
|
|
|
posts with `format: markless`. The output is generated using
|
2019-08-31 11:13:05 +02:00
|
|
|
[cl-markless-plump](https://shirakumo.github.io/cl-markless/cl-markless-plump/),
|
|
|
|
meaning any syntax extensions that work with it should also be
|
|
|
|
available in Coleslaw.
|
|
|
|
|
|
|
|
**Example**: `(mess)`
|
|
|
|
|
2013-02-20 01:06:32 -05:00
|
|
|
## ReStructuredText
|
|
|
|
|
2014-06-04 11:22:47 -04:00
|
|
|
**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.
|
2013-02-20 01:06:32 -05:00
|
|
|
|
2014-05-02 16:31:23 -04:00
|
|
|
**Example**: `(rst)`
|
2013-02-20 01:06:32 -05:00
|
|
|
|
|
|
|
## S3 Hosting
|
|
|
|
|
2014-06-04 11:22:47 -04:00
|
|
|
**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).
|
2013-02-20 01:06:32 -05:00
|
|
|
|
2014-06-04 11:22:47 -04:00
|
|
|
**Example**: `(s3 :auth-file "/home/redline/.aws_creds" :bucket
|
|
|
|
"blog.redlinernotes.com")`
|
2013-02-20 01:06:32 -05:00
|
|
|
|
2013-04-28 10:11:38 -04:00
|
|
|
## Sitemap generator
|
2013-02-20 01:06:32 -05:00
|
|
|
|
2014-06-04 11:22:47 -04:00
|
|
|
**Description**: This plugin generates a sitemap.xml under the page
|
|
|
|
root, which is useful if you want google to crawl your site.
|
2013-02-20 01:06:32 -05:00
|
|
|
|
2014-05-02 16:31:23 -04:00
|
|
|
**Example**: `(sitemap)`
|
|
|
|
|
|
|
|
## Static Pages
|
|
|
|
|
2014-06-04 11:22:47 -04:00
|
|
|
**Description**: This plugin allows you to add `.page` files to your
|
|
|
|
repo, that will be rendered to static pages at a designated URL.
|
2014-05-02 16:31:23 -04:00
|
|
|
|
|
|
|
**Example**: `(static-pages)`
|
2013-04-27 02:40:53 +08:00
|
|
|
|
2014-05-08 00:43:43 -05:00
|
|
|
## Twitter
|
|
|
|
|
2014-06-04 11:22:47 -04:00
|
|
|
**Description**: This plugin tweets every time a new post is added to
|
|
|
|
your repo. See Setup for an example of how to get your access token
|
|
|
|
& secret.
|
2014-05-08 00:43:43 -05:00
|
|
|
|
2014-06-04 11:22:47 -04:00
|
|
|
**Example**: `(twitter :api-key "<api-key>"
|
|
|
|
:api-secret "<api-secret>"
|
|
|
|
:access-token "<access-token>"
|
|
|
|
:access-secret "<access-secret>")`
|
2014-05-08 00:43:43 -05:00
|
|
|
|
|
|
|
**Setup**:
|
|
|
|
- Create a new [twitter app](https://apps.twitter.com/). Take note of the api key & secret.
|
|
|
|
|
|
|
|
- In the repl do the following:
|
|
|
|
```lisp
|
|
|
|
;; Load Chirp
|
|
|
|
(ql:quickload :chirp)
|
|
|
|
|
|
|
|
;; Use the api key & secret to get a URL where a pin code will be handled to you.
|
|
|
|
(chirp:initiate-authentication
|
2014-06-04 11:22:47 -04:00
|
|
|
:api-key "D1pMCK17gI10bQ6orBPS0w"
|
|
|
|
:api-secret "BfkvKNRRMoBPkEtDYAAOPW4s2G9U8Z7u3KAf0dBUA")
|
2014-05-08 00:43:43 -05:00
|
|
|
;; => "https://api.twitter.com/oauth/authorize?oauth_token=cJIw9MJM5HEtQqZKahkj1cPn3m3kMb0BYEp6qhaRxfk"
|
|
|
|
|
|
|
|
;; Exchange the pin code for an access token and and access secret. Take note
|
|
|
|
;; of them.
|
|
|
|
CL-USER> (chirp:complete-authentication "4173325")
|
|
|
|
;; => "18403733-bXtuum6qbab1O23ltUcwIk2w9NS3RusUFiuum4D3w"
|
|
|
|
;; "zDFsFSaLerRz9PEXqhfB0h0FNfUIDgbEe59NIHpRWQbWk"
|
|
|
|
|
2014-06-04 11:22:47 -04:00
|
|
|
;; Finally verify the credentials
|
2014-05-08 00:43:43 -05:00
|
|
|
(chirp:account/verify-credentials)
|
|
|
|
#<CHIRP-OBJECTS:USER PuercoPop #18405433>
|
|
|
|
```
|
2014-06-04 11:22:47 -04:00
|
|
|
|
2014-09-23 11:47:46 -04:00
|
|
|
## Twitter Summary Cards
|
|
|
|
|
|
|
|
**Description**: Add Summary Card metadata to blog posts
|
|
|
|
to enhance twitter links to that content.
|
|
|
|
|
|
|
|
**Example**: `(twitter-summary-card :twitter-handle "@redline6561")
|
|
|
|
|
2014-09-12 16:21:50 -04:00
|
|
|
## Versioned Deploys
|
|
|
|
|
|
|
|
**Description**: Originally, this was Coleslaw's only deploy behavior.
|
|
|
|
Instead of deploying directly to `:deploy-dir`, creates `.curr` and
|
|
|
|
`.prev` symlinks in the *deploy-dir*, which point to timestamped
|
|
|
|
directories of the last two deploys of the site. Deploys prior to the
|
|
|
|
last two are automatically cleaned up.
|
|
|
|
|
|
|
|
**Example**: `(versioned)`
|
|
|
|
|
2014-06-04 11:22:47 -04:00
|
|
|
## Wordpress Importer
|
|
|
|
|
|
|
|
**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.
|
|
|
|
|
|
|
|
**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/example.coleslawrc
|
2016-10-27 16:48:07 -05:00
|
|
|
|
|
|
|
|
|
|
|
## Markdown Embeding youtube Youtube
|
|
|
|
|
|
|
|
**Description**: Embed youtube videos in markdown using the shorthand syntax
|
|
|
|
`!yt[<video-id>(|options*)*]`. Options can be *width*, *height* or any of the
|
|
|
|
[player parameters](https://developers.google.com/youtube/player_parameters).
|
|
|
|
|
|
|
|
For example `!yt[oeul8fTG9dM|width=480,allowfullscreen]`.
|
|
|
|
|
|
|
|
**Example**: `(3bmd-youtube)`
|
2017-03-30 14:48:20 +02:00
|
|
|
|
|
|
|
## Code Highlighting via Pygments
|
|
|
|
|
|
|
|
**Description**: Provides code highlighting with [Pygments](http://pygments.org/)
|
|
|
|
instead of [colorize](http://www.cliki.net/colorize). Pygments supports over
|
|
|
|
300 languages and text formats. Look at
|
|
|
|
[3bmd](https://github.com/3b/3bmd/blob/master/README.md) for more info.
|
|
|
|
|
|
|
|
**Example**: `(pygments)`
|