summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorMarek Paśnikowski <marek@marekpasnikowski.pl>2024-01-20 12:10:46 +0100
committerMarek Paśnikowski <marek@marekpasnikowski.pl>2024-01-20 12:10:46 +0100
commitc2a68bc233da4b42c75cb41f8fdcb652b944d2c1 (patch)
tree12cece297d0830160ba4742a87f1c416e0ef7bd4 /www
parent1082237832d5ccabb770711bd9fe6602e537f012 (diff)
Annotate sections of the publishing code
Divide the file into sections representing different abstraction layers of the package.
Diffstat (limited to 'www')
-rw-r--r--www/build-site.el8
-rw-r--r--www/www.org8
2 files changed, 16 insertions, 0 deletions
diff --git a/www/build-site.el b/www/build-site.el
index d9c0f62..f2e8b7d 100644
--- a/www/build-site.el
+++ b/www/build-site.el
@@ -1,5 +1,7 @@
;; -*- lexical-binding: t; -*-
+;;; The Object Prototype
+
( defun publication-object ( )
( let ( ( object-projects ( list ) )
( org-publish-project-alist ( list ) )
@@ -23,6 +25,8 @@
( print success-report )
( ) ) ) ) )
+;;; The Object Interface
+
( defun object-compose ( publication-instance )
( plist-get publication-instance :object-compose ) )
@@ -32,6 +36,10 @@
( defun object-report ( publication-instance )
( plist-get publication-instance :object-report ) )
+;;; The User Logic
+
+;;; The User Interface
+
( defun publish ( publication-instance &rest project-data )
( let ( ( data-projects ( plist-get project-data :data-projects ) ) )
( funcall ( object-get-projects publication-instance ) data-projects )
diff --git a/www/www.org b/www/www.org
index a6de898..638afb8 100644
--- a/www/www.org
+++ b/www/www.org
@@ -80,6 +80,8 @@ are also published, in the sequence given.
#+BEGIN_SRC elisp :tangle build-site.el
;; -*- lexical-binding: t; -*-
+ ;;; The Object Prototype
+
( defun publication-object ( )
( let ( ( object-projects ( list ) )
( org-publish-project-alist ( list ) )
@@ -103,6 +105,8 @@ are also published, in the sequence given.
( print success-report )
( ) ) ) ) )
+ ;;; The Object Interface
+
( defun object-compose ( publication-instance )
( plist-get publication-instance :object-compose ) )
@@ -112,6 +116,10 @@ are also published, in the sequence given.
( defun object-report ( publication-instance )
( plist-get publication-instance :object-report ) )
+ ;;; The User Logic
+
+ ;;; The User Interface
+
( defun publish ( publication-instance &rest project-data )
( let ( ( data-projects ( plist-get project-data :data-projects ) ) )
( funcall ( object-get-projects publication-instance ) data-projects )