summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorMarek Paśnikowski <marek@marekpasnikowski.pl>2024-01-20 11:21:31 +0100
committerMarek Paśnikowski <marek@marekpasnikowski.pl>2024-01-20 11:21:31 +0100
commita88401dcbce6b4d6742eaec1033609c13f912a32 (patch)
tree287b395a1262a4898bdbde767b082859128de9a8 /www
parent1c78e3098aab34d330bbb7c8e5fe60fac037ddb8 (diff)
Separate testing facility in a new file
Pull out and expand the testing code into a dedicated file. Also, remove the requirement on 'ox-publish because this package is not yet used at all.
Diffstat (limited to 'www')
-rw-r--r--www/build-site.el4
-rw-r--r--www/www-test-data.el27
-rw-r--r--www/www.org35
3 files changed, 58 insertions, 8 deletions
diff --git a/www/build-site.el b/www/build-site.el
index e1c712e..3e88b9a 100644
--- a/www/build-site.el
+++ b/www/build-site.el
@@ -1,7 +1,5 @@
;; -*- lexical-binding: t; -*-
-( require 'ox-publish )
-
( defun publication-object ( )
( let ( ( object-projects ( list ) )
( org-publish-project-alist ( list ) )
@@ -39,5 +37,3 @@
( funcall object-compose )
( funcall object-report )
( ) ) )
-
-( publish :data-projects ( list "marekpasnikowski.pl" ) )
diff --git a/www/www-test-data.el b/www/www-test-data.el
new file mode 100644
index 0000000..19705c7
--- /dev/null
+++ b/www/www-test-data.el
@@ -0,0 +1,27 @@
+;; -*- lexical-binding: t; -*-
+
+( load "~/src/channel/www/build-site" )
+
+( print "publish-test-1" )
+
+( publish :data-projects ( list "test.pl" "example.org" ) )
+
+( print "publish-test-2" )
+
+( publish
+
+ :data-projects
+ ( list "test.pl"
+
+ :property1
+ "value1"
+
+ :property2
+ "value2" ) )
+
+( print "publish-test-3" )
+
+( publish "test.pl"
+
+ :components
+ ( list "example.pl" "example.org" ) )
diff --git a/www/www.org b/www/www.org
index 980f3e6..c51bf76 100644
--- a/www/www.org
+++ b/www/www.org
@@ -17,6 +17,37 @@ Publishing has been contributed to Org by David O’Toole.
Publishing needs significant configuration to specify files, destination and
many other properties of a project.
+#+NAME: www-test-data
+#+BEGIN_SRC elisp :tangle www-test-data.el
+ ;; -*- lexical-binding: t; -*-
+
+ ( load "~/src/channel/www/build-site" )
+
+ ( print "publish-test-1" )
+
+ ( publish :data-projects ( list "test.pl" "example.org" ) )
+
+ ( print "publish-test-2" )
+
+ ( publish
+
+ :data-projects
+ ( list "test.pl"
+
+ :property1
+ "value1"
+
+ :property2
+ "value2" ) )
+
+ ( print "publish-test-3" )
+
+ ( publish "test.pl"
+
+ :components
+ ( list "example.pl" "example.org" ) )
+#+END_SRC
+
*** [[https://orgmode.org/manual/Project-alist.html][The variable =org-publish-project-alist=]]
Publishing is configured almost entirely through setting the value of one
@@ -45,8 +76,6 @@ are also published, in the sequence given.
#+BEGIN_SRC elisp :tangle build-site.el
;; -*- lexical-binding: t; -*-
- ( require 'ox-publish )
-
( defun publication-object ( )
( let ( ( object-projects ( list ) )
( org-publish-project-alist ( list ) )
@@ -84,8 +113,6 @@ are also published, in the sequence given.
( funcall object-compose )
( funcall object-report )
( ) ) )
-
- ( publish :data-projects ( list "marekpasnikowski.pl" ) )
#+END_SRC
* EOF