Commit graph

166 commits

Author SHA1 Message Date
Carmen La
42d4a9098c Merge pull request #65 from dhable/master
Make archive grouping configurable
2016-03-08 22:24:42 -05:00
Dan Hable
683bcad292 Make archive grouping configurable
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.
2016-03-08 20:22:20 -06:00
Carmen La
36656de029 Update dependencies 2016-03-08 15:39:24 -05:00
Carmen La
a1e783d44f Merge pull request #64 from cqsd/clean-urls
Implement clean URLs feature 
Issue #89 in cryogen-project/cryogen
2016-02-21 02:04:56 -05:00
Tom L
0c4156f43f Add servlet context to tags, archives rendering. 2016-02-15 20:31:40 -06:00
Tom L
c18c3d60f2 Implement clean URLs feature (Issue #89)
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
2016-02-11 20:04:56 -06:00
Carmen La
b3bdba2804 Bump up version 2016-02-09 22:34:50 -05:00
Carmen La
2635126ca3 Merge pull request #63 from tomasz-biernacki/authors
Add multiple authors filtering support
2016-02-09 22:34:05 -05:00
Tomasz Biernacki
c84b550f92 Add multiple authors filtering support 2016-02-10 03:13:06 +01:00
Carmen La
394ff37643 Bump up version 2016-02-09 15:01:18 -05:00
Carmen La
4989fc04d7 Merge pull request #62 from tomasz-biernacki/rss-auth-desc
Add author and (short) description for RSS
2016-02-08 22:47:31 -05:00
Tomasz Biernacki
e5395a362a Add author and (short) description for RSS 2016-02-09 03:01:10 +01:00
Yogthos
e1a03943c4 bumped up dependency 2016-02-05 19:07:20 -05:00
Dmitri Sotnikov
c0a3084d39 bumped up dependencies and version 2016-02-04 15:40:48 -05:00
Carmen La
a0cf654453 Bump up version 2016-02-04 11:31:48 -05:00
Carmen La
69385c1f22 Merge pull request #61 from seanirby/patch-1
Add home to index params when previews are enabled
2016-02-04 11:24:18 -05:00
Sean
852b431d71 Add home to index params when previews are enabled 2016-02-04 04:07:17 -08:00
Dmitri Sotnikov
1fb621e6ed Update project.clj 2016-01-11 10:09:44 -05:00
Dmitri Sotnikov
8ab65e0297 Merge pull request #60 from ponkore/better-support-for-preview
content-with-more-marker returns with correct html closing tags
2016-01-11 10:09:33 -05: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
Yogthos
13c445ff17 bumped up dependencies, version 2016-01-10 10:23:27 -05:00
Dmitri Sotnikov
a95b58bd00 Merge pull request #59 from ponkore/rewrite-hrefs-fix
Fix #58
2016-01-10 10:22:20 -05:00
ponkore
792833facb rewrite-hrefs bug fix (when :blog-prefix is blank)
When :blog-prefix in `config.edn` is set nil or "",
rewrite-hrefs should return `text` itself.
2016-01-10 23:40:19 +09:00
Carmen La
839ed5c469 Remove unnecesasry tag-root key 2016-01-08 20:44:07 -05:00
Carmen La
1abc4c6137 Fix bug with rewrite-href function 2016-01-08 18:51:40 -05:00
Carmen La
bcd841d3df bump up version and dependencies 2016-01-08 17:53:37 -05:00
Carmen La
7040e1d573 Merge pull request #56 from sbondaryev/feature/custom-uri
Blog/Page/Post/Tag uri customisation
2016-01-08 17:45:10 -05:00
Sergiy BONDARYEV
eea999e1d7 add Blog/Page/Post/Tag uri customisation
add :tag-root-uri :page-root-uri :post-root-uri parsing

replace {entity}-root with {entity}-root-uri parameters to set uri

fix root-path call

fix root-path function params order
(worked erlier because of keyword<->map transposition)

fix keyword :{entity}-root-uri to :{entity}-root transformation

misprint: congig -> config

add function to compose file path

add create-file function

add function to compose a path

handle empty blog-path using path function

fix filename for preview
2016-01-08 22:59:10 +01:00
Yogthos
5b13b3b761 added :draft? key to allow creation of draft posts that won't be published 2015-12-17 14:36:09 -05:00
Carmen La
2eb469ee3f Merge pull request #55 from Artiavis/fixing-generate-toc-true
Add regression for the old style of using {:toc true}
2015-11-09 21:35:55 -05:00
Jeff Rabinowitz
e34ea8c989 Fixed a regression under which the old style of using :toc true would throw an exception because the tag was not properly cast to a :ul or :ol tag. Added unit testing for all cases. 2015-11-08 20:35:04 -05:00
Carmen La
6d50af6a7a Merge pull request #51 from Artiavis/zipper-toc
Use Zippers to Build TOC Data Structure and add unit tests
Fixes cryogen-project/cryogen#62
2015-11-01 19:52:07 -05:00
Jeff Rabinowitz
365df0e680 Reimplemented TOC logic using zippers to ensure state is always internally valid. Also added unit testing to provide a regression testing suite. This should fix issue #19. 2015-11-01 19:34:06 -05:00
Carmen La
da1fa73f8c bump up dependencies and version number 2015-10-31 14:51:19 -04:00
Carmen La
1063704f4f Swap order of _list-types and list-type in toc.clj 2015-10-31 14:50:51 -04:00
Carmen La
30b3503abc add '.html' ending to prev/next links in preview pages 2015-10-31 14:50:03 -04:00
Carmen La
21e3c0e75f Add ".html" ending to preview pages.
cryogen-project/cryogen#92
2015-10-31 13:54:37 -04:00
Carmen La
91a924a147 Merge pull request #50 from Artiavis/fix-toc-bug
fixed bug with threading macro in wrong order
2015-10-27 23:01:49 -04:00
Jeff Rabinowitz
61e93a3480 fixed bug with threading macro in wrong order. fixed bug with where space not present between tag and class for top level ul/ol.. 2015-10-27 22:58:22 -04:00
Carmen La
f9fb1195a0 Merge pull request #49 from Artiavis/master
Submitting a feature request for the :toc to support both ordered and…
2015-10-25 19:27:20 -04:00
Jeff Rabinowitz
482700a311 Submitting a feature request for the :toc to support both ordered and unordered lists by expanding the vocabulary of the existing :toc directive to include :ul and :ol 2015-10-25 19:14:43 -04:00
Dmitri Sotnikov
b96a872654 Merge pull request #47 from jstepien/pmap
Parallelize read-posts with pmap
2015-09-23 16:11:26 -04:00
Jan Stępień
2a95e477de Parallelize read-posts with pmap
This makes each markup implementation process posts in parallel.

In case of a simple test blog with 4 markdown pages mean compilation
time was reduced from 395 to 330ms. In the experiment I used OpenJDK 8
running `lein ring server` on a 4 core CPU.
2015-09-23 21:46:11 +02:00
Dmitri Sotnikov
2df8fdec31 Update project.clj 2015-09-23 08:13:37 -04:00
Carmen La
e6ee1012d8 Merge pull request #45 from jstepien/md5
require pandect.algo.md5 instead of pandect.core
2015-09-21 09:51:37 -04:00
Jan Stępień
aa7ac4d98c require pandect.algo.md5 instead of pandect.core
This makes compilation of cryogen-core.watcher faster by reducing the
number of its dependencies. Now it depends just on pandect.algo.md5
instead of all pandect.algo.*
2015-09-21 15:23:13 +02:00
Dmitri Sotnikov
ca18cdf916 Merge pull request #44 from jstepien/enumeration-seq
Simplify load-plugins with enumeration-seq
2015-09-20 17:55:32 -04:00
Jan Stępień
c557fa8478 Simplify load-plugins with enumeration-seq 2015-09-20 22:52:51 +02:00
Dmitri Sotnikov
9500f2185d Merge pull request #43 from jstepien/previews
Previews
2015-09-18 17:02:46 -04:00
Jan Stępień
1a7c48731a Simplify create-previews with map 2015-09-18 22:22:40 +02:00