Rename render-content to render-text for clarity. Retroactively add to 0.9.3.
This commit is contained in:
parent
af23e1bfbb
commit
5e9a256a91
6 changed files with 8 additions and 7 deletions
1
NEWS.md
1
NEWS.md
|
@ -1,6 +1,7 @@
|
|||
## Changes for 0.9.3 (2013-04-16):
|
||||
|
||||
* **INCOMPATIBLE CHANGE**: `page-path` and the `blog` config class are no longer exported.
|
||||
* **INCOMPATIBLE CHANGE**: `render-content` has been renamed `render-text` for clarity.
|
||||
* New Docs: [A Hacker's Guide to Coleslaw](hacking_guide) and [Themes](theming_guide)!
|
||||
* A new theme *readable* based on bootswatch readable, courtesy of @rmoritz!
|
||||
* Posts may have an author to support multi-user blogs courtesy of @tychoish.
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
* **New markup formats**, for example the
|
||||
[ReStructuredText plugin](http://github.com/redline6561/coleslaw/blob/master/plugins/rst.lisp),
|
||||
can be created by definining an appropriate `render-content`
|
||||
can be created by definining an appropriate `render-text`
|
||||
method. The method takes `text` and `format` arguments and is
|
||||
[EQL-specialized](http://www.gigamonkeys.com/book/object-reorientation-generic-functions.html#defmethod)
|
||||
on the format. Format should be a keyword matching the file
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
(defpackage :coleslaw-rst
|
||||
(:use :cl)
|
||||
(:import-from :coleslaw #:render-content)
|
||||
(:import-from :coleslaw #:render-text)
|
||||
(:import-from :docutils #:read-rst #:write-part #:register-settings-spec
|
||||
#:visit-node #:write-document)
|
||||
(:import-from :docutils.writer.html #:html-writer #:write-part)
|
||||
|
@ -11,7 +11,7 @@
|
|||
|
||||
(in-package :coleslaw-rst)
|
||||
|
||||
(defmethod render-content (text (format (eql :rst)))
|
||||
(defmethod render-text (text (format (eql :rst)))
|
||||
(register-settings-spec '((:generator nil)
|
||||
(:datestamp nil)))
|
||||
(with-output-to-string (str)
|
||||
|
|
|
@ -58,8 +58,8 @@
|
|||
(content (construct content-type (read-content file))))
|
||||
(write-page "tmp.html" (render-page content)))))
|
||||
|
||||
(defgeneric render-content (text format)
|
||||
(:documentation "Compile TEXT from the given FORMAT to HTML for display.")
|
||||
(defgeneric render-text (text format)
|
||||
(:documentation "Render TEXT of the given FORMAT to HTML for display.")
|
||||
(:method (text (format (eql :html)))
|
||||
text)
|
||||
(:method (text (format (eql :md)))
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#:content
|
||||
#:post
|
||||
#:index
|
||||
#:render-content
|
||||
#:render-text
|
||||
#:add-injection
|
||||
;; The Document Protocol
|
||||
#:add-document
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
(text content-text)) object
|
||||
(setf (content-slug object) (slugify title)
|
||||
format (make-keyword (string-upcase format))
|
||||
text (render-content text format)
|
||||
text (render-text text format)
|
||||
author (or author (author *config*)))))
|
||||
|
||||
(defmethod render ((object post) &key prev next)
|
||||
|
|
Loading…
Add table
Reference in a new issue