From ba4e78346aac1843890c1a889807b8e60bdf9419 Mon Sep 17 00:00:00 2001 From: Philipp Geyer Date: Sat, 22 Jan 2022 14:12:35 +0000 Subject: Some work on my website - should be looking half decent finally, and have some content --- publish.el | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 publish.el (limited to 'publish.el') diff --git a/publish.el b/publish.el new file mode 100644 index 0000000..e0741da --- /dev/null +++ b/publish.el @@ -0,0 +1,83 @@ +(require 'package) +(package-initialize) + +(require 'weblorg) + +(weblorg-site + :name "Philipp Geyer" + :base-url "https://philippgeyer.co.uk" + :theme nil + :author "Philipp Geyer") + +;; landing page +(weblorg-route + :name "index" + :input-pattern "pages/intro.org" + :template "page.html" + :output "output/index.html" + :url "/" + :site (weblorg-site + :base-url "https://philippgeyer.co.uk")) + +;; route for rendering each post +(weblorg-route + :name "posts" + :input-pattern "posts/*.org" + :template "post.html" + :output "output/posts/{{ slug }}.html" + :url "/posts/{{ slug }}.html" + :site (weblorg-site + :base-url "https://philippgeyer.co.uk")) + +;; route for rendering the index page of the blog +(weblorg-route + :name "blog" + :input-pattern "posts/*.org" + :input-aggregate #'weblorg-input-aggregate-all-desc + :template "blog.html" + :output "output/blog.html" + :url "/blog.html" + :site (weblorg-site + :base-url "https://philippgeyer.co.uk")) + +;; route for rendering each page +(weblorg-route + :name "pages" + :input-pattern "pages/*.org" + :template "page.html" + :output "output/{{ slug }}.html" + :url "/{{ slug }}.html" + :site (weblorg-site + :base-url "https://philippgeyer.co.uk")) + +;; route for rendering the index page of articles +(weblorg-route + :name "articles" + :input-pattern "pages/*.org" + :input-aggregate #'weblorg-input-aggregate-all-desc + :template "articles.html" + :output "output/articles.html" + :url "/articles.html" + :site (weblorg-site + :base-url "https://philippgeyer.co.uk")) + :input-aggregate #'weblorg-input-aggregate-all-desc + +(weblorg-route + :name "cv" + :input-pattern "cv/*.org" + :template "page.html" + :output "output/cv/{{ slug }}.html" + :url "/cv/{{slug }}.html" + :site (weblorg-site + :base-url "https://philippgeyer.co.uk")) + +;; route for static assets that also copies files to output directory +(weblorg-copy-static + :output "static/{{ file }}" + :url "/static/{{ file }}" + :site (weblorg-site + :base-url "https://philippgeyer.co.uk")) + +(setq debug-on-error t) + +(weblorg-export) -- cgit v1.2.3-70-g09d2