Commit daa0c060 authored by Erik Huelsmann's avatar Erik Huelsmann

Build FAQ content as well as tutorial

Or really, build all subdirectories (including future subdirectory content)
parent c127473a
Pipeline #561 passed with stage
in 7 seconds
......@@ -16,7 +16,7 @@ title: Frequently asked questions
<p>
GitLab supports sending an e-mail upon pushing
commits by project members. In order to use the functionality,
please follow the steps outlined in <a href="/faq/emailonpush/"
please follow the steps outlined in <a href="/faq/emailonpush"
>our configuration guide</a>.
</p>
</section>
......
......@@ -20,15 +20,15 @@
(defun populate-pages ()
"Each page is an alist containing info to be sent to the template via the context."
(mapcar (lambda (p)
(list (cons :content (file-namestring p))
(list (cons :content (enough-namestring p *pages-dir*))
(cons :title (file-namestring p))))
;;
;; At this point there could be duplicate, i.e. a .html and a .lisp file.
;;
(append
(directory (make-pathname :defaults *PAGES-DIR* :name :wild :type "html"))
(directory (make-pathname :defaults *PAGES-DIR* :name :wild :type "md"))
(directory (make-pathname :defaults *PAGES-DIR* :name :wild :type "lisp")))))
(directory (merge-pathnames #P"**/*.html" *pages-dir*))
(directory (merge-pathnames #P"**/*.md" *pages-dir*))
(directory (merge-pathnames #P"**/*.lisp" *pages-dir*)))))
(defun page-content (page) (rest (assoc :content page)))
......
......@@ -48,6 +48,7 @@
(defun render-page (page template-path)
(let ((page-path (make-path *PAGES-DIR* page t))
(output-path (make-path *OUTPUT-DIR* page t)))
(ensure-directories-exist output-path)
(multiple-value-bind
(header content)
(split-content-from-header page-path)
......
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