The path is converted to forward slash before further processed
The executables for sass and compass are configurable, that's because
on a Windows installation they are named sass.bat and compass.bat
The default is still the Unix version.
By default, when using markdown files, Cryogen will look for
`resources/templates/md/pages/*.md`. This commits allows Cryogen to fall back to
`resources/templates/pages/*.md` in the case that it can't find any files in the
former directory. It works similarly for posts and Asciidoc files.
Since we're looking specifically for `*.md` for Markdown files and `*.asc` for
Ascii files, this is an opportunity to eliminate redundancy.
This is a follow-up to PR #46. It replaces the 300ms loop with a file
watcher. Hawk is a wrapper around java.nio.file.WatchService coming with
proper OS X support.
Now rebuilds should be instantaneous.
The blog that I'm moving to cryogen currently groups the posts by year instead of by year/month. This change makes the grouping configurable while defaulting to the current behavior of year/month grouping on posts.
When `clean-urls?` is set in config, emit pages as subdirectories
`prefix/root/page-name/index.html` instead of
`prefix/root/page-name.html`. Links in emitted HTML then point to
`prefix/root/page-name/`. When `clean-urls?` not set, behaves as
before.
Refactor most URI generation into a new `page-uri` function.
`page-uri` replaces most calls* to `path`, all calls to `post-uri`
and all calls to the old `page-uri`.
Introduce function `create-file-recursive`. Function creates
file parent if not exists.
Introduce function `write-html`. When `clean-urls?` is set, spits
emitted HTML into subdirectories as described above; otherwise
behaves like `create-file`. Replaces most* calls to `create-file`
Calls `create-file` or `create-file-recursive`.
* Exceptions made for sitemap XML and RSS feed XML pages
`content-with-more-marker` returns a HTML string when the `content`
conteins more marker ("<!--more-->").
In many case, HTML tags in `content` is balanced.
ex.
------------------------------
<div id='post'>
<div class='post-content'>
this post has more marker
<!--more-->
and more content.
</div>
</div>
------------------------------
But original code breaks the balance.
------------------------------
<div id='post'>
<div class='post-content'>
this post has more marker
------------------------------
Afer this patch applied, `tagsoup` read above text and `hiccup`
re-render to HTML text with correct balanced tags.
------------------------------
<div id='post'>
<div class='post-content'>
this post has more marker
</div></div>
------------------------------