From a1adb2e6c8376e361935e77a3e7ad4a0180729fa Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Thu, 18 Jan 2024 19:49:11 +0100 Subject: Create initial build object. The code is more complex than necessary, because of my insistence of creating an all-object oriented framework. --- www/build-site.el | 10 ++++++++++ www/www.org | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 www/build-site.el create mode 100644 www/www.org diff --git a/www/build-site.el b/www/build-site.el new file mode 100644 index 0000000..cac2525 --- /dev/null +++ b/www/build-site.el @@ -0,0 +1,10 @@ +;; -*- lexical-binding: t; -*- + +( require 'ox-publish ) + +( setq build-publication + ( let ( ( report-success "Build complete!" ) ) + ( lambda () + ( message report-success ) ) ) ) + +( funcall build-publication ) diff --git a/www/www.org b/www/www.org new file mode 100644 index 0000000..f9de036 --- /dev/null +++ b/www/www.org @@ -0,0 +1,58 @@ +#+STARTUP: showall + +* [[https://orgmode.org/manual/Publishing.html][Publishing]] + +Org includes a publishing management system that allows you to configure +automatic HTML conversion of /projects/ composed of interlinked Org files. You +can also configure Org to automatically upload your exported HTML pages and +related attachments, such as images and source code files, to a web server. + +You can also use Org to convert files into PDF, or even combine HTML and PDF +conversion so that files are available in both formats on the server. + +Publishing has been contributed to Org by David O’Toole. + +** [[https://orgmode.org/manual/Configuration.html][Configuration]] + +Publishing needs significant configuration to specify files, destination and +many other properties of a project. + +*** [[https://orgmode.org/manual/Project-alist.html][The variable =org-publish-project-alist=]] + +Publishing is configured almost entirely through setting the value of one +variable, called =org-publish-project-alist=. Each element of the list +configures one project, and may be in one of the two following forms: + +#+BEGIN_EXAMPLE + ( "project-name" :property value :property value ... ) +#+END_EXAMPLE + +i.e., a well-formed property list with alternating keys and values, or: + +#+BEGIN_EXAMPLE + ( "project-name" :components ( "project-name" "project-name" ... ) ) +#+END_EXAMPLE + +In both cases, projects are configured by specifying property values. A project +defines the set of files that are to be published, as well as the publishing +configuration to use when publishing those files. When a project takes the +second form listed above, the individual members of the =:components= propert +are taken to be sub-projects, which group together files requiring different +publishing options. When you publish such a “meta-project”, all the components +are also published, in the sequence given. + +#+NAME: build-site +#+BEGIN_SRC elisp :tangle build-site.el + ;; -*- lexical-binding: t; -*- + + ( require 'ox-publish ) + + ( setq build-publication + ( let ( ( report-success "Build complete!" ) ) + ( lambda () + ( message report-success ) ) ) ) + + ( funcall build-publication ) +#+END_SRC + +* EOF -- cgit v1.2.3