Commit graph

11 commits

Author SHA1 Message Date
jem
8ecdb8c3c6 create dirs from md works 2019-12-20 15:55:53 +01:00
e9d1c1e194 refactored navbar-model out of compiler & introduced new :navbar-model
parameter to config
2017-02-08 19:22:15 +01:00
d36acf2316 Merge branch 'master' into master 2017-02-08 09:13:45 +01:00
Carmen La
dec80185e5 A big ol' cleanup 2017-01-16 02:37:19 -05:00
Aleksander Madland Stapnes
dbd5caaf1f Replace tagsoup dependency with enlive
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.
2017-01-15 05:30:25 -03:00
1ea38c5b84 respect :page-index order for navmap 2017-01-05 17:10:07 +01:00
b6b8ebfa22 undo project renaming 2017-01-04 09:41:18 +01:00
3c415f48e0 Added navmap feature.
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).
2017-01-04 09:36:50 +01:00
Arsene Rei
272d688010 Add test for no directories 2016-05-27 11:53:14 -04:00
Arsene Rei
f383661e5e Fallback to resources/templates/{pages,posts}
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.
2016-05-27 11:52:41 -04:00
ponkore
556fe84ef8 content-with-more-marker returns with correct tags
`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>
------------------------------
2016-01-11 21:30:21 +09:00