Before only the config was looked at to determine whether to include
the js minified of not, now look at the html as well. This makes it
more convenient to set up all klipse stuff once in config.edn without
having to manually specify which js to include.
Tagsoup depends on an old version of clojure.data.xml, which doesn't
compile with clojure 1.9.0-alpha12. Enlive seems more actively
maintained and used.
Navmap will allow nested navigation for pages. To
* add a page to navmap, you've to add `{:navmap? true}` to pages meta.
* define navigation hierarchy you can use directory-structure (first
level will be in /pages/nav1.md, second level will be in
/pages/nav1/nav11.md)
* use navmap, you can
* access navmap-pages (sequence of pages) in your template, same as
you've used navbar-pages and
* access navigation childs as :navmap-children in specific pages (eg.
nav1 will contain a sequence of one page representing nav11).
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.
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>
------------------------------