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

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 ...@@ -8,6 +8,5 @@ auto-save-list
# Output files # Output files
output/ output/
system-index.txt system-index.txt
content/newsbox.html
*.dx64fsl *.dx64fsl
*.fasl *.fasl
...@@ -21,7 +21,7 @@ depends-on: ...@@ -21,7 +21,7 @@ depends-on:
<div id="clnet-news"> <div id="clnet-news">
<h2><a href="/news">Latest Common-Lisp.net news</a></h2> <h2><a href="/news">Latest Common-Lisp.net news</a></h2>
{{> newsbox}} {{{newsbox}}}
</div> </div>
<p><a href="/news" style="font-size: 80%">Read more...</a></p> <p><a href="/news" style="font-size: 80%">Read more...</a></p>
......
...@@ -95,11 +95,8 @@ ...@@ -95,11 +95,8 @@
(content (funcall (pop next-processors) content context next-processors))) (content (funcall (pop next-processors) content context next-processors)))
(when (and (string= (pathname-name page-path) "news") (when (and (string= (pathname-name page-path) "news")
(string= (pathname-type page-path) "md")) (string= (pathname-type page-path) "md"))
(with-open-file (f (merge-pathnames "newsbox.html" *PAGES-DIR*) (let ((newsbox (generate-news-box-content content)))
:direction :output (push (cons :newsbox newsbox) *global-context*)))
:if-does-not-exist :create
:if-exists :supersede)
(write-string (generate-news-box-content content) f)))
content)) content))
(defun shallow-copy-object (original) (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