Commit 361f8ee2 authored by Erik Huelsmann's avatar Erik Huelsmann
Browse files

Stop writing the newsbox to disk (but use global context instead)

Note that the only remaining intermediate result being written
to the 'input directory' content/, is the newsbox.html file
due to it being a mustache partial.
This commit 'publishes' the content to the global context instead
and at the same time converts index.html to use a variable
expansion. Thereby the need to write newsbox.html to disk has
now been removed and so is the actual process.
parent 4df7db00
......@@ -8,6 +8,5 @@ auto-save-list
# Output files
......@@ -21,7 +21,7 @@ depends-on:
<div id="clnet-news">
<h2><a href="/news">Latest news</a></h2>
{{> newsbox}}
<p><a href="/news" style="font-size: 80%">Read more...</a></p>
......@@ -95,11 +95,8 @@
(content (funcall (pop next-processors) content context next-processors)))
(when (and (string= (pathname-name page-path) "news")
(string= (pathname-type page-path) "md"))
(with-open-file (f (merge-pathnames "newsbox.html" *PAGES-DIR*)
:direction :output
:if-does-not-exist :create
:if-exists :supersede)
(write-string (generate-news-box-content content) f)))
(let ((newsbox (generate-news-box-content content)))
(push (cons :newsbox newsbox) *global-context*)))
(defun shallow-copy-object (original)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment