From 2bd647207a5e2624e1c2183c258a6900f57c9a78 Mon Sep 17 00:00:00 2001 From: Brit Butler Date: Fri, 29 Aug 2014 12:36:52 -0400 Subject: [PATCH] Some 0.9.6 preparations. --- NEWS.md | 21 +++++++++++++++++++ docs/hacking.md | 25 +++++++++++++++++++---- examples/example.coleslawrc | 9 ++++---- plugins/{git-hook.lisp => versioned.lisp} | 4 ++-- 4 files changed, 49 insertions(+), 10 deletions(-) rename plugins/{git-hook.lisp => versioned.lisp} (91%) diff --git a/NEWS.md b/NEWS.md index aa0b152..d1e6886 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,24 @@ +## Changes for 0.9.6 (2014-09-07): + +* **SITE-BREAKING CHANGE**: Coleslaw now defaults to a "basic" deploy + instead of the previous symlinked, timestamped deploy strategy. + To retain the previous behavior, add `(versioned)` to your config's + `:plugins` list. +* **SITE-BREAKING CHANGE**: Custom themes will be broken by a change + to URL handling. Previously, we were hand-constructed URLs in the + templates. All site objects now store their URL in an instance slot. + In general, hrefs should be of the form `href="{$config.domain}/{$obj.url}"> ...`. + Additionally, `{$month}` should become `{$month.name}`. + Correspondingly, changes to `:routing` would previously break links in + the templates but now work seamlessly. +* The config `:repo` option is now deprecated as its value has become + a required argument to `coleslaw:main`. The value passed to `main` + will override the config value going forward. +* Improved handling of directories and error-reporting when they + don't exist is available thanks to @PuercoPop. +* The templates are now HTML5 valid thanks to @Ferada. +* Fixed a bug where RSS/Atom tag feeds were being published multiple times. + ## Changes for 0.9.5 (2014-06-13): * A plugin for Incremental builds, cutting runtime for generating diff --git a/docs/hacking.md b/docs/hacking.md index 401ae40..9d31492 100644 --- a/docs/hacking.md +++ b/docs/hacking.md @@ -219,13 +219,24 @@ PAGE, a content type for static page support, is available as a plugin. ## Areas for Improvement +### TODO for 0.9.6 + +* Serious updates to README and themes.md. Skim hacking.md but it's probably okay. +* A real test suite with Stefil that at *least* tests: + * `read-content` + * `load-config` + * Content Discovery + * Theme Compilation + * Content Publishing + * Common Plugins including Injections +* Merge @PuercoPop's twitter summary cards plugin in some form. +* Make read-content/load-content more robust. Improving template debugging will be part of 0.9.7. +* Some minor scripting conveniences with cl-launch? (Scaffold a post/page, Enable incremental, Build, etc). + ### Assorted Cleanups * Try to get tag-index urls out of the tags. Post templates use them. * Profile/memoize find-all calls in **INDEX** `render` method. -* Lots of docs updates for next release. At a minimum, we have broken - custom themes. Config/plugin changes are definitely necessary too. - Note that the `:repo` config option is ignored now/sourced from `main`. ### Real Error Handling @@ -237,7 +248,7 @@ at best, especially for anyone not coming from the lisp world. We need to start handling errors and reporting errors in ways that are useful to the user. Example errors users have encountered: -1. Loading of Content. If `read-content` fails to parse a file, we +1. Loading of Content. If `read-content` fails to parse a file, wen should tell the user what file failed and why. We also should probably enforce more constraints about metadata. E.g. Empty metadata is not allowed/meaningful. Trailing space after separator, etc. @@ -279,6 +290,11 @@ some assertions and error out at plugin load time if they fail should be doable. I might not be able to [make illegal states unrepresentable][misu], but I can sure as hell make them harder to construct than they are now. +@PuercoPop has suggested looking into how [wookie does plugins][wookie]. +It's much more heavyweight but might be worth looking into. If we go that +route, the plugin support code will be almost half the coleslaw core. +Weigh the tradeoffs carefully. + ### New Content Type: Shouts! I've also toyed with the idea of a content type called a SHOUT, which @@ -319,3 +335,4 @@ Unfortunately, this does not solve: [asdf3]: https://github.com/fare/asdf3-2013 [qpq]: https://github.com/sellout/quid-pro-quo [misu]: https://blogs.janestreet.com/effective-ml-revisited/ +[wookie]: https://github.com/orthecreedence/wookie/blob/master/plugin.lisp#L181 diff --git a/examples/example.coleslawrc b/examples/example.coleslawrc index fb18145..6a3691a 100644 --- a/examples/example.coleslawrc +++ b/examples/example.coleslawrc @@ -4,11 +4,12 @@ :feeds ("lisp") :plugins ((analytics :tracking-code "foo") (disqus :shortname "my-site-name") - ; (git-hook) ;; *Remove comment to enable git push deploys. - ; (incremental) ;; *Remove comment enable incremental builds. + ; (incremental) ;; *Remove comment to enable incremental builds. (mathjax) (sitemap) - (static-pages)) + (static-pages) + ; (versioned) ;; *Remove comment to enable symlinked, timestamped deploys. + ) :routing ((:post "posts/~a") (:tag-index "tag/~a") (:month-index "date/~a") @@ -24,4 +25,4 @@ :title "Improved Means for Achieving Deteriorated Ends" :theme "hyde") -;; * Prerequisites described in plugin docs. \ No newline at end of file +;; * Prerequisites described in plugin docs. diff --git a/plugins/git-hook.lisp b/plugins/versioned.lisp similarity index 91% rename from plugins/git-hook.lisp rename to plugins/versioned.lisp index a27d6d4..cbd781f 100644 --- a/plugins/git-hook.lisp +++ b/plugins/versioned.lisp @@ -1,4 +1,4 @@ -(defpackage :coleslaw-git-hook +(defpackage :coleslaw-versioned (:use :cl) (:import-from :coleslaw #:*config* #:deploy-dir @@ -6,7 +6,7 @@ #:run-program #:update-symlink)) -(in-package :coleslaw-git-hook) +(in-package :coleslaw-versioned) (defmethod coleslaw:deploy (staging) (let* ((dest (deploy-dir *config*))