269 Commits (14cab1246f4c2bb28a74e0071a0b793fb9abc771)

Author SHA1 Message Date
jem 1b025378ee added last todos 5 years ago
jem 1cd962375c fixed delete-resource 5 years ago
jem c4c295f2e3 use new io 5 years ago
jem edc93f6857 html/404 should reside in root 5 years ago
jem cdf7dbef6e removed debug prints 5 years ago
jem ef171bbd2c fix basepath problem 5 years ago
jem 1bdb53d4e3 add ! for side-effect-full functions 5 years ago
jem fe5b94c61c delete recursive works 5 years ago
jem bb53615ed5 wip 5 years ago
Jan Krebs 5ad40301bf "mob next [ci-skip]" 5 years ago
jem c7006a8477 wip 5 years ago
jem 025b5c16a7 Merge remote-tracking branch 'origin/mob-session' into mob-session2 5 years ago
Jan Krebs ea3f626283 "mob next [ci-skip]" 5 years ago
jem 549bf8275d wip 5 years ago
lukas 88cf7dd3df fixed target-path 5 years ago
mattis 0d7521d87f wip 5 years ago
Lukas Schondorff b49ebe6186
renamed copy-dir 5 years ago
jem 4d467957ee wip 5 years ago
jem 636bfc6f41 Merge remote-tracking branch 'origin/mob-session' into mob-session2 5 years ago
mattis 5566ccecc2 wip 5 years ago
Jan Krebs 0a9ee92a27 Remove unnecessary function 5 years ago
Jan Krebs b782c7feca Tail recursion works 5 years ago
jem 9dc30ef71c wip 5 years ago
Jan Krebs 64a3b1d62c Fix symbol-not-found and Nullpointer-Exception 5 years ago
jem 3300dce8ae "Mob Session DONE [ci-skip]" 5 years ago
jem 34f723a55c "Mob Session DONE [ci-skip]" 5 years ago
Jan Krebs 91c6812243 "mob next [ci-skip]" 5 years ago
Jan Krebs ed46ed1e0e Attemt at tail end recursion 5 years ago
Jan Krebs 1c7720bdbf "mob next [ci-skip]" 5 years ago
jem e29c246e3b "Mob Session DONE [ci-skip]" 5 years ago
Jan Krebs 6f2a28df22 "mob next [ci-skip]" 5 years ago
jem 8b0ac5e800 "Mob Session DONE [ci-skip]" 5 years ago
Jan Krebs bbfc535c3b "mob next [ci-skip]" 5 years ago
jem 0204170811 "Mob Session DONE [ci-skip]" 5 years ago
jem 1c9c4f3e60 "Mob Session DONE [ci-skip]" 5 years ago
Jan Krebs 3182421a5e "mob next [ci-skip]" 5 years ago
jem c1594a035e "Mob Session DONE [ci-skip]" 5 years ago
Jan Krebs c19498abbb "mob next [ci-skip]" 5 years ago
jem 90935bab43 "Mob Session DONE [ci-skip]" 5 years ago
jem 965ceda614 test now is fine 5 years ago
jem 999b041925 test copy-from-classpath first 5 years ago
jem 843e0eaaec compile works again 5 years ago
Michael Jerger 805e369bb8 fixed not recognized :page-root-uri configuration 7 years ago
Michael Jerger e8d7069598 compile hierarchic pages 7 years ago
Michael Jerger 6cf7b1a72b renamed config to page-model 7 years ago
Michael Jerger 593766a603 refactoring: replace navbar-pages & sidebar-pages by pages 7 years ago
Michael Jerger da84c946c9 reflect refactoring page-model -> navbar-mode 7 years ago
Michael Jerger d772f95990 refactored name of configuration parameter. 7 years ago
Michael Jerger a7f5f3a7b1 made sidebar-pages flat again.
There is no way to ensure a sidebar-only hierarchy without tree gaps. So
filtering a flat sequence would work much better.
7 years ago
Michael Jerger b781b8b9bb renamed navpage-model to page-model 7 years ago
Michael Jerger f758b5744d tested in real live -works now 7 years ago
Michael Jerger 4f9ac917ae added hierarchic sidbar-pages & refactored namesspace. 8 years ago
Michael Jerger d8f86e0414 fixed read-config 8 years ago
Michael Jerger 439ae6fba8 all things implemented - probably works 8 years ago
Michael Jerger e9d1c1e194 refactored navbar-model out of compiler & introduced new :navbar-model
parameter to config
8 years ago
Michael Jerger 2e6723d2fa readded missing debug? configuration 8 years ago
M.Jerger d36acf2316 Merge branch 'master' into master 8 years ago
Aleksander Madland Stapnes 60c4ec0054 Add nohighlight to klipsified code blocks. 8 years ago
Aleksander Madland Stapnes 70c95b41d8 Look at the content as well as the config to infer clojure eval
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.
8 years ago
Aleksander Madland Stapnes f7f02f7433 Change confusing local names. cfg -> settings 8 years ago
Aleksander Madland Stapnes c5d995b262 Add some docstrings 8 years ago
Aleksander Madland Stapnes ac52785b19 Automatic klipse integration 8 years ago
Carmen La 84a933bdcf Fix dest-sass/sass-dest key
Issue #85
8 years ago
Carmen La f0cc7353c1 Pass both page/post params to the index template 8 years ago
Carmen La 6ba76bc7f5 Fix a regression 8 years ago
Carmen La 9cd5016537 Don't create prev/next links pointing to :home? pages
- Also include more metadata in page.prev and page.next params
- And some general code cleanup
8 years ago
Aleksander Madland Stapnes 1cfb2b17df Remove crouton dep because enlive does the same thing
Almost the same thing; it doesn't insert missing html, head and body
tags, but in this case we only care about the stuff in the body.
8 years ago
Carmen La dec80185e5 A big ol' cleanup 8 years ago
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.
8 years ago
Aleksander Madland Stapnes 9c7c935d66 Style pedantry: Remove trailing whitespace.
My emacs did it...
8 years ago
Michael Jerger 1ea38c5b84 respect :page-index order for navmap 8 years ago
Michael Jerger 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).
8 years ago
Michael Jerger 78e4a6d067 fixed navbar-pages bug 8 years ago
Scot Brown 6d28af459f Fix symbol not found exception in compile-assets function 8 years ago
Michael Jerger 773ee269b9 add some more debug options 8 years ago
Michael Jerger e796a5adc5 added debug switch & improved home vs. preview handling 8 years ago
Michael Jerger 60b395e047 added ability to select one page as home-page (add :home? true as meta)
instead of newest post.
8 years ago
Carmen La e3d2d3f433 Fix npe 8 years ago
Carmen La fb0dc9e1d4 Merge pull request #77 from SVMBrown/master
conditionally drop any posts with dates set in the future
8 years ago
Torsten Uhlmann 998fc077e8 Provided fixes make cryogen work on Windows.
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.
8 years ago
Scot Brown 1a75abb0e4 conditionally drop any posts with dates set in the future 8 years ago
Ben Swift c9828f6cc3 nicer pretty-printing of "compiling sass" 8 years ago
Ben Swift a66f8df5e4 in compile-sass-file!, sh doesn't like nil arg when no compass 8 years ago
Ben Swift fc1d1d725c bugfix for compass-installed?
catch the (previously uncaught) exception when there isn't a `compass`
binary on the `$PATH`, return `false` instead
8 years ago
Shigeaki Matsumura 9858723403 fix toc entry for title which has a link 8 years ago
Shigeaki Matsumura 510c33c23d support sub directories in pages and posts 8 years ago
Carmen La 52457c7b64 Add `:today` key to params for compiling posts 8 years ago
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.
8 years ago
Carmen La 3e7d43b212 update dependencies/version 8 years ago
Jan Stępień 0d1149a9c2 Use Hawk in cryogen-core.watcher
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.
8 years ago
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.
8 years ago
Tom L 0c4156f43f Add servlet context to tags, archives rendering. 8 years ago
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
9 years ago
Tomasz Biernacki c84b550f92 Add multiple authors filtering support 9 years ago
Tomasz Biernacki e5395a362a Add author and (short) description for RSS 9 years ago
Sean 852b431d71 Add home to index params when previews are enabled 9 years ago
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>
------------------------------
9 years ago
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.
9 years ago
Carmen La 839ed5c469 Remove unnecesasry tag-root key 9 years ago
Carmen La 1abc4c6137 Fix bug with rewrite-href function 9 years ago
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
9 years ago
Yogthos 5b13b3b761 added :draft? key to allow creation of draft posts that won't be published 9 years ago
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. 9 years ago
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. 9 years ago
Carmen La 1063704f4f Swap order of _list-types and list-type in toc.clj 9 years ago
Carmen La 30b3503abc add '.html' ending to prev/next links in preview pages 9 years ago
Carmen La 21e3c0e75f Add ".html" ending to preview pages.
cryogen-project/cryogen#92
9 years ago
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.. 9 years ago
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 9 years ago
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.
9 years ago
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.*
9 years ago
Jan Stępień c557fa8478 Simplify load-plugins with enumeration-seq 9 years ago
Jan Stępień 1a7c48731a Simplify create-previews with map 9 years ago
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.
9 years ago
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.
9 years ago
Marko Kocic 8e5b3a9fee Fix type hint cast 9 years ago
Marko Kocic f4888b26d9 Clear reflection warnings 9 years ago
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.
9 years ago
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.
9 years ago
Carmen La 837f855726 Merge branch 'post-date' of https://github.com/powernoodle/cryogen-core into powernoodle-post-date 9 years ago
Kirill Kondratenko 71bb80cf49 Use the default locale for the instance of the JVM
instead of the hardcoded "en" locale
9 years ago
Brendon Walsh e710f08679 Optional :date key can be provided in metadata 9 years ago
Carmen La 64a9830f6d Only make the "prev" link in the second page when the second page actually exists 9 years ago
Carmen La d6941823fd Added option for post preview pages rather than a single index page. Issue #28 9 years ago
Carmen La 7153e9d522 Added page with all tags - for issue #31 9 years ago
InDevLand 82d3a5677f fixed compile-pages now use :layout 9 years ago
Carmen La e7636e7586 Fixed pubDate not showing up in filtered rss feeds 9 years ago
lacarmen 4511536cc9 Cleanup + fixes for config based themes 9 years ago
Albert Lai 2119ed52aa merge posts image fix 9 years ago
Albert Lai 7c443a8b5c add experimental theme support 9 years ago
Albert Lai bc62c8a790 fix issue #24 image handling in Post is generally broken 9 years ago
Yogthos e0d3676196 added an error check for parsing the config.edn 9 years ago
Eric Somdahl 6b45fdc35a Modification to allow the generated rss xml to pass xsd validation.
1) Removed the <author> tag from each <item>.  The presence of this tag is ok here but the xsd requires that the content include a valid email address, not just the name string coming from the site config (Forms that pass validation are "test@xyz.com" or "test@xyz.com (Test McTester)" ).  And who would want to advertise their real email like that?  :)
2) Removed the <author> tag from the <channel>.  <author> isn't a valid child element of a channel.  There is a child element called <webMaster> that is a close analogue but it also requires content as above.
9 years ago
William Roe c52d3d1aa6 Pass all config to templates
This allows people to use any parameter from their config as well as the
params that were already being used.
9 years ago
William Roe 5587cc88ef Run SASS relative to sass/
This is so that SASS/Compass can find images and other assets
9 years ago
William Roe 52244956aa Option maps are easier to use when calling functions
... with more than a couple of parameters.
9 years ago
William Roe 0c7743e605 Ensure sass errors printed visably in red
Also include the standard output as it frequently includes crucial
information in narrowing down where errors lie in SASS files
9 years ago
William Roe 7595cbcf70 Include --compass when it is available 9 years ago
Stefan Pfeiffer, DL1ELY f74c05711b Fix overly eager replacement of file extensions in uris
As the filename extensions given by the render plugins are also used as
regex for replacing them with .html to generate URIs, the dot in front of
the extension was interpreted as an arbitrary character for the regex.
Also, it matched in the middle of a string. Now dots get quoted and a $
added to only match at the end of the filename.

Fix #16
10 years ago
Stefan Pfeiffer, DL1ELY a73e2f664e Fix garbled UTF-8 characters in TOC generation
Fixes #13
10 years ago
lacarmen 9de65df523 Added :content key to grouped tags in order to fix filtered rss generation 10 years ago
Yogthos fee46ddf54 updated to use init function to load plugins 10 years ago
Yogthos 96502bd517 updated to use parser modules 10 years ago
Adam Tankanow 8ff3f19362 find-assets handles get-resource returning nilern
- this can/will happen if a user doesn't have a resource root directory,
  e.g. if the resources/templates/asc/posts directory doesn't exist.
10 years ago
Adam Tankanow cb18e5734d Merge branch 'master' into add-asciidoc-support
Conflicts:
	project.clj
10 years ago
Adam Tankanow 5609772cd3 Add docstring and support for creating links for header id attributes
- this method will now look for both of the following references, this
  commit adds support for (2)

(1) <h1><a name="href">Reference Text</a></h1>
and
(2) <h1 id="href">Reference Text</h1>
10 years ago
Adam Tankanow b3bad2e279 add docstring to get-headings function 10 years ago
Adam Tankanow eda815a5ae remove asciidoc options/attributes and add rewrite-href post processing 10 years ago
Adam Tankanow 1cff8eadf2 refactor rewrite-hrefs into 2 functions
- (1) can be reused by the asciidoc processing, it simply does the text
  replace
- (2) is a transformer using (1) for use in markdown.core
10 years ago
Adam Tankanow 21d825d0cd fix spacing in markdown method 10 years ago