Commit graph

342 commits

Author SHA1 Message Date
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
Jan Stępień
f6a7d17213 Don't invoke select-keys on post in create-preview
This allows preview templates to access all of post's metadata.
2015-09-18 22:22:13 +02:00
Carmen La
933d213d15 Merge pull request #42 from jstepien/find-more-with-indexof
create-preview: simplify the more marker lookup
2015-09-17 12:05:26 -04:00
Jan Stępień
1b4306c3a3 create-preview: simplify the more marker lookup
This commit replaces a regular expression lookup with a simple
String/indexOf substring search.

It addresses pathological cases in which re-find took several
seconds to process contents of a blog post. An example of such
a case was a post with 16kB of nested HTML tags in a single line.
2015-09-17 17:13:45 +02:00
Carmen La
e4a56d2140 Merge pull request #41 from markokocic/no-reflection
Fix type hint cast
2015-09-15 18:12:51 -04:00
Marko Kocic
8e5b3a9fee Fix type hint cast 2015-09-15 18:24:51 +02:00
Dmitri Sotnikov
7c3cf47db4 Merge pull request #39 from markokocic/no-reflection
Clear reflection warnings
2015-09-14 08:46:31 -04:00
Marko Kocic
f4888b26d9 Clear reflection warnings 2015-09-14 12:06:35 +02:00
Carmen La
85ede46a9e Merge pull request #37 from ClashTheBunny/podcasts
Add enclosure tag to facilitate Podcasting with Cryogen
2015-09-03 22:43:54 -04:00
Randall Mason
03cfabcbb9 Add enclosure tag to facilitate Podcasting with Cryogen
Add an enclosure tag to a post's metadata to let a podcast client
to deliver your audio content.  It should look like this:

:enclosure [{:url "<full-url>"}]

Without the brackets, you end up with NullPointerExceptions, so
make sure you have that.

The URL should be the full location of where the audio file is
hosted (not relative), so for example:

:enclosure [{:url "http://www.example.com/01_episode_IV.mp3"}]

I created a bunch of markdown files with just the enclosure and
info about the audiobook with the following bash snippet:

find -L books -type f -iname "*mp3" | sort | while read mp3; do name=$(basename $mp3 .mp3); book=$(basename "$(dirname $mp3)"); echo "{:title \"$name\"\n:layout :post\n:tags [\"audiobooks\" \"$book\"]\n:enclosure [{:url \"http://clashthebunny.mason.ch/blog/$mp3\"}]}\n $book - $name\n==================" > md/posts/"$(date "+%Y-$name").md"; done

Each book was in it's own subdirectory of books:
books/Dracula/1-01-Chapter1_part01.mp3
books/Dracula/1-02-Chapter1_part02.mp3
books/Dracula/2-01-Chapter2_part01.mp3

Note that the above script requires the prefix of the episode to
be "date-like".  It should be fairly easy to work out a way to get
your podcast up and running.

Add the book names to your rss-filters array, e.g.:
["Dracula" "Pride & Prejudice"]

Most podcasting clients support authentication, so just password
protect those directories and you should be good to go, even
if you are hosting copyrighted content.
2015-09-03 11:27:55 -05:00
Carmen La
e1aa1d737f Merge pull request #36 from ciwchris/patch-1
Add active-page key to config map
2015-08-17 21:46:46 -04:00
Chris
8eb0e9ff29 Add active-page key to config map
For certain pages a key with a boolean value is added to the config map which can then be used in templates to determine if it is the page being rendered. Not all pages have this key and boolean value. Instead of adding additional keys for every page a new generic key, 'active-page', has been added and its value is the page name, ex: 'home', 'archives', 'tags', etc. The default value is 'home'. This key can then be used in any template to check the page which is currently being rendered.
2015-08-17 07:30:23 -07:00
lacarmen
42faca4b82 Bump up clojars version 2015-08-06 21:01:59 -04:00
Dmitri Sotnikov
1e354379e1 bumped up clj-rss 2015-08-06 16:15:44 -04:00
Carmen La
1afc36ecbc Update selmer dependency 2015-08-06 13:39:13 -04:00
Carmen La
2af155820e Merge branch 'powernoodle-post-date' 2015-08-06 13:38:15 -04:00
Carmen La
837f855726 Merge branch 'post-date' of https://github.com/powernoodle/cryogen-core into powernoodle-post-date 2015-08-06 13:37:50 -04:00
Dmitri Sotnikov
67d0151de8 Merge pull request #34 from cybem/default-locale
Use the default locale for the instance of the JVM
2015-08-05 17:37:00 -04:00
Kirill Kondratenko
71bb80cf49 Use the default locale for the instance of the JVM
instead of the hardcoded "en" locale
2015-08-06 00:27:54 +03:00
Brendon Walsh
e710f08679 Optional :date key can be provided in metadata 2015-07-29 11:50:00 -04:00
Carmen La
85ea98f0ff bumped up dependencies 2015-07-19 10:48:51 -04:00
Carmen La
64a9830f6d Only make the "prev" link in the second page when the second page actually exists 2015-07-08 16:55:31 -04:00
Carmen La
d6941823fd Added option for post preview pages rather than a single index page. Issue #28 2015-07-08 16:34:39 -04:00
Carmen La
7153e9d522 Added page with all tags - for issue #31 2015-07-08 12:15:11 -04:00
Carmen La
2264af82df Merge pull request #30 from InDevLand/master
`compile-pages` method now uses the page's :layout
2015-07-06 09:23:03 -04:00