summaryrefslogtreecommitdiff
path: root/publish.el
diff options
context:
space:
mode:
Diffstat (limited to 'publish.el')
-rw-r--r--publish.el83
1 files changed, 83 insertions, 0 deletions
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)