2012-08-26 14:48:23 -04:00
# coleslaw
2019-10-27 12:48:49 -04:00
[](https://travis-ci.org/kingcons/coleslaw)
2015-09-02 13:57:21 -05:00
[](http://quickdocs.org/coleslaw/)
2015-09-02 13:41:39 -05:00
2012-09-20 18:33:29 -04:00
< img src = "https://raw.github.com/redline6561/coleslaw/master/themes/hyde/css/logo_medium.jpg" alt = "coleslaw logo" align = "right" / >
2011-04-16 15:45:37 -04:00
2012-08-29 14:58:49 -04:00
> [Czeslaw Milosz](http://blog.redlinernotes.com/tag/milosz.html) was the writer-in-residence at UNC c. 1992.
> I used to see him all the time at the Hardback Cafe, always sitting at a two-top
> drinking coffee, reading, writing, eating chips and salsa. I remember a gentleness
> behind the enormous bushy eyebrows and that we called him Coleslaw. - anon
2014-06-13 10:52:23 -04:00
Coleslaw is Flexible Lisp Blogware similar to [Frog ](https://github.com/greghendershott/frog ), [Jekyll ](http://jekyllrb.com/ ), or [Hakyll ](http://jaspervdj.be/hakyll/ ).
2014-12-08 15:23:09 -05:00
2019-07-13 09:15:58 -07:00
Have questions?
- IRC in ** #coleslaw ** on Freenode!
- Subscribe to the mailing list [**coleslaw@common-lisp.net** ](https://mailman.common-lisp.net/listinfo/coleslaw ).
2012-08-29 14:58:49 -04:00
2019-10-20 13:31:30 -04:00
See the [wiki ](https://github.com/redline6561/coleslaw/wiki/Example-sites ) for a list of coleslaw-powered blogs.
2017-11-11 23:20:56 +09:00
2019-10-26 12:09:11 -04:00
Coleslaw should run on any conforming Common Lisp implementations but
testing is primarily done on [SBCL ](http://www.sbcl.org/ ) and [CCL ](http://ccl.clozure.com/ ).
2012-08-29 14:58:49 -04:00
## Features
2014-09-05 16:08:49 -04:00
2012-08-19 00:29:44 -04:00
* Git for storage
2017-11-11 23:18:35 +09:00
* RSS/Atom feeds
2019-10-27 12:40:45 -04:00
* Themes
* A [Plugin API ](docs/plugin-api.md ) and [**plugins** ](docs/plugin-use.md ) for...
2017-11-11 23:18:35 +09:00
| plugins | plugins | plugins |
|--------------------------------------------------------|----------------------------------------------|-------------------------------------------------------|
| Sitemap generation | Incremental builds | Analytics via Google or [Piwik ](http://www.piwik.org ) |
| Comments via [Disqus ](http://disqus.com/ ) | Comments via [isso ](http://posativ.org/isso ) | Hosting via [Amazon S3 ](http://aws.amazon.com/s3/ ) |
| Hosting via [Github Pages ](https://pages.github.com/ ) | Embedding [gfycats ](http://gfycat.com/ ) | [Tweeting ](http://twitter.com/ ) about new posts |
| [Mathjax ](http://mathjax.org/ ) | Posts in ReStructured Text | [Wordpress ](http://wordpress.org/ ) import |
| [Pygments ](http://pygments.org/ ) | [colorize ](http://www.cliki.net/colorize ) | |
2013-01-31 00:23:50 -05:00
2019-10-26 12:10:31 -04:00
## Installation/Tutorial
<!-- Don't let the first user select from multiple choises -->
Step 1: Install this library.
With [Roswell ](https://roswell.github.io/ ),
2019-10-27 14:28:05 -04:00
```
2019-10-26 12:10:31 -04:00
$ ros install coleslaw
$ export PATH="$HOME/.roswell/bin:$PATH" # If you haven't done this before
or
2019-10-27 14:28:05 -04:00
CL-USER> (ql:quickload :coleslaw-cli)
2019-10-26 12:10:31 -04:00
```
Step 2: Initialize your blog repository.
2019-10-27 14:28:05 -04:00
```
2019-10-26 12:10:31 -04:00
$ mkdir yourblog ; cd yourblog
$ git init
2019-10-27 14:28:05 -04:00
$ coleslaw setup # or
CL-USER> (coleslaw-cli:setup)
2019-10-26 12:10:31 -04:00
```
2019-10-27 14:28:05 -04:00
`coleslaw setup` / `(coleslaw-cli:setup)` will generate a `.coleslawrc` file in
the current directory, which contains the configuration of the static website.
2019-10-26 12:10:31 -04:00
Step 3: Write a post file in the current directory.
The file should contain a certain metadata, so use the `coleslaw new` command,
which instantiates a correct file for you.
2019-10-27 14:28:05 -04:00
```
2019-10-26 12:10:31 -04:00
$ coleslaw new
Created a post 2017-11-06.post .
2019-10-27 14:28:05 -04:00
# or
CL-USER> (coleslaw-cli:new "post")
Created a post 2017-11-06.post .
2019-10-26 12:10:31 -04:00
```
Step 4: Generate the site from those post files.
2019-10-27 14:28:05 -04:00
The result goes to the *staging directory* specified in the `.coleslawrc` file.
The staging directory is `/tmp/coleslaw/` by default.
2019-10-26 12:10:31 -04:00
```
2019-10-27 14:28:05 -04:00
$ coleslaw # or
$ coleslaw generate # or
$ coleslaw stage # or
CL-USER> (coleslaw-cli:generate) ; or
CL-USER> (coleslaw-cli:stage) ; --- these are all aliases
2019-10-26 12:10:31 -04:00
```
2019-10-27 14:28:05 -04:00
Step 5: You can launch a web server to check the result on a browser.
(Running a webserver sometimes has a benefit over just opening an html file,
e.g. the relative links behaves differently on a file:/// protocol)
2019-10-26 12:10:31 -04:00
```
2019-10-27 14:28:05 -04:00
$ coleslaw preview # or
CL-USER> (coleslaw-cli:preview)
2019-10-26 12:10:31 -04:00
```
Step 6: and watch the file system to automatically regenerate the site!
2019-10-27 14:28:05 -04:00
```
2019-10-26 12:10:31 -04:00
$ coleslaw watch # or even better,
2019-10-27 14:28:05 -04:00
$ coleslaw watch-preview # or, on REPL,
CL-USER> (coleslaw-cli:watch) ;; watch-preview does not work on REPL right now
2019-10-26 12:10:31 -04:00
```
2019-10-27 14:28:05 -04:00
Step 7: When you think your article is publishable, run
```
$ coleslaw deploy # or
CL-USER> (coleslaw-cli:deploy)
2019-10-26 12:10:31 -04:00
```
2019-10-27 14:28:05 -04:00
To move the contents in the staging dir to the deploy dir.
By default, this deploy command uses `rsync` to sync the directories,
where the deploy dir could be a remote directory on the server which is running your website.
By using a plugin, you can customize this behavior e.g. running the deploy on gh-pages.
2019-10-27 12:40:45 -04:00
For further customization, e.g. adding a new plugin, developing a new plugin, changing the deploy option, or creating a new theme,
see the [config docs ](docs ).
2014-09-05 16:08:49 -04:00
2019-10-27 12:40:45 -04:00
We provide three default themes: hyde, the default, and readable (based on
2014-09-05 16:08:49 -04:00
[bootswatch readable ](http://bootswatch.com/readable/ )).
2017-11-11 23:20:11 +09:00
A core goal of *coleslaw* is to be both pleasant to read and easy to
hack on and extend. If you want to understand the internals and bend
*coleslaw* to do new and interesting things, I strongly encourage you
to read the [Hacker's Guide to Coleslaw][hackers]. You'll find some
current **TODO** items towards the bottom.
2019-10-27 12:40:45 -04:00
[hackers]: docs/hacking.md