summaryrefslogtreecommitdiff
path: root/publish-mlnp.org
diff options
context:
space:
mode:
Diffstat (limited to 'publish-mlnp.org')
-rw-r--r--publish-mlnp.org127
1 files changed, 86 insertions, 41 deletions
diff --git a/publish-mlnp.org b/publish-mlnp.org
index c8f299c..7b81406 100644
--- a/publish-mlnp.org
+++ b/publish-mlnp.org
@@ -48,43 +48,50 @@ to assign subdomains to each website, as is recommended for
uncorrelated content.
#+NAME: tree
-#+BEGIN_SRC bash :results verbatim :exports results
- tree -L 2 -I *.html
+#+BEGIN_SRC bash :results verbatim :exports both
+ tree -F -L 2
#+END_SRC
#+RESULTS: tree
#+begin_example
-.
+./
├── README.org
├── about.org
-├── blog
-│   ├── 2022
-│   ├── 2023
+├── apps/
│   ├── index.org
│   └── sitemap.org
+├── blog/
+│   ├── 2022/
+│   ├── 2023/
+│   └── index.org
├── cv.org
├── cv.txt
├── index.org
+├── publish-mlnp.html
├── publish-mlnp.org
-├── resources
+├── resources/
│   ├── css.org
│   ├── favicon.png
│   ├── favicon.xcf
-│   ├── fonts
-│   └── mlnp.css
+│   ├── fonts/
+│   ├── mlnp.css
+│   └── topnav.html
├── sitemap.org
-└── wiki
- ├── aerospace
- ├── emacs
- ├── images
+└── wiki/
+ ├── emacs/
+ ├── engineering/
+ ├── fitness/
+ ├── images/
+ ├── index-with-images.org.bkp
+ ├── index.html
├── index.org
- ├── languages
- ├── linux
- ├── programming
+ ├── languages/
+ ├── linux/
+ ├── programming/
├── sitemap.org
- └── typography
+ └── typography/
-13 directories, 15 files
+15 directories, 20 files
#+end_example
@@ -121,12 +128,6 @@ one, instead of checking the overall delta, which ~rsync~ does.
(read-string
"Local target: " "/tmp/")))
- (setq org-publish-location-local
- (or org-publish-location-local
- (read-string "Local target: " "/tmp/")))
-
-
-
(unless (boundp 'org-publish-location-remote)
(setq org-publish-location-remote
(read-string
@@ -151,6 +152,8 @@ information, as it changes pretty frequently.
?w "build the wiki")
("blog.mlnp.fr"
?b "build the blog")
+ ("apps.mlnp.fr"
+ ?a "build the apps homepage")
("everything"
?e "build everything for all websites")
("all-styles"
@@ -197,8 +200,8 @@ The ~org-publish-project-alist~ variable is used by ~org-publish~ to
identify website components and their properties upon export. It
enables us to target different directories when publishing; I can
write this website in a single, version-controlled directory, whilst
-maintaining separate export directories for =wiki.mlnp.fr= and
-=blog.mlnp.fr=.
+maintaining separate export directories for =wiki.mlnp.fr=,
+=blog.mlnp.fr=, and =apps.mlnp.fr=.
Both the wiki and the blog call for css and font resources hosted on
=mlnp.fr=, so these resources need only be exported once---to the
@@ -206,17 +209,19 @@ Both the wiki and the blog call for css and font resources hosted on
#+NAME: org-publish-project-alist
#+BEGIN_SRC emacs-lisp :noweb no-export :results pp
- (require 'ox-publish)
- (setq org-publish-project-alist
- `( ;; This line left blank to avoid noweb honoring `( prefix.
- <<mlnp.fr>>
- <<wiki.mlnp.fr>>
- <<blog.mlnp.fr>>
- <<all-styles>>
- ("everything"
- :components ("mlnp.fr"
- "wiki.mlnp.fr"
- "blog.mlnp.fr"))))
+ (require 'ox-publish)
+ (setq org-publish-project-alist
+ `( ;; This line left blank to avoid noweb honoring `( prefix.
+ <<mlnp.fr>>
+ <<wiki.mlnp.fr>>
+ <<blog.mlnp.fr>>
+ <<apps.mlnp.fr>>
+ <<all-styles>>
+ ("everything"
+ :components ("mlnp.fr"
+ "wiki.mlnp.fr"
+ "blog.mlnp.fr"
+ "apps.mlnp.fr"))))
#+END_SRC
@@ -238,7 +243,8 @@ on locally published pages.
("all-styles"
:components ("styles-mlnp"
"styles-wiki"
- "styles-blog"))
+ "styles-blog"
+ "styles-apps"))
("styles-mlnp"
:base-directory "resources/"
:base-extension "css"
@@ -254,6 +260,11 @@ on locally published pages.
:base-extension "css"
:publishing-directory ,(concat org-publish-location-local "blog.mlnp.fr/resources/")
:publishing-function org-publish-attachment)
+ ("styles-apps"
+ :base-directory "resources/"
+ :base-extension "css"
+ :publishing-directory ,(concat org-publish-location-local "apps.mlnp.fr/resources/")
+ :publishing-function org-publish-attachment)
#+END_SRC
@@ -273,7 +284,7 @@ on locally published pages.
:publishing-directory ,(concat org-publish-location-local "mlnp.fr/")
:recursive nil ; Main site pages are all in top-level org directory.
:auto-sitemap t
- :sitemap-title "Sitemap for [[https://wiki.mlnp.fr][wiki.mlnp.fr]]"
+ :sitemap-title "Sitemap for [[https://mlnp.fr][mlnp.fr]]"
:publishing-function org-html-publish-to-html)
("mlnp-cv-txt"
:base-directory "./"
@@ -547,6 +558,39 @@ dashes when exported to the sitemap titles.
#+END_SRC
+** =apps.mlnp.fr=
+
+#+NAME: apps.mlnp.fr
+#+BEGIN_SRC emacs-lisp
+ ("apps.mlnp.fr"
+ :components ("apps-homepage"
+ "apps-resources"
+ "apps-fonts"))
+ ("apps-homepage"
+ :base-directory "apps/"
+ :base-extension "org"
+ :publishing-directory ,(concat org-publish-location-local "apps.mlnp.fr/")
+ :recursive t
+ :html-head "<link rel='stylesheet' type='text/css' href='https://apps.mlnp.fr/resources/mlnp.css'/>
+ <link rel='icon' type='image/png' href='https://apps.mlnp.fr/resources/favicon.png'/>"
+ :auto-sitemap t
+ :sitemap-filename "sitemap.org"
+ :sitemap-title "Sitemap for [[https://apps.mlnp.fr][apps.mlnp.fr]]"
+ :sitemap-sort-files chronologically
+ :publishing-function org-html-publish-to-html)
+ ("apps-resources"
+ :base-directory "resources/"
+ :base-extension "css\\|js\\|png"
+ :publishing-directory ,(concat org-publish-location-local "apps.mlnp.fr/resources/")
+ :publishing-function org-publish-attachment)
+ ("apps-fonts"
+ :base-directory "resources/fonts/"
+ :base-extension "ttf\\|otf"
+ :publishing-directory ,(concat org-publish-location-local "apps.mlnp.fr/resources/fonts/")
+ :publishing-function org-publish-attachment)
+#+END_SRC
+
+
* Main publishing logic :main:
This is the main publishing logic. Execute the following source block
@@ -575,7 +619,7 @@ to build the entire website.
(let* ((local org-publish-location-local)
(local-websites (concat local "*mlnp.fr"))
(remote org-publish-location-remote)
- (sync-command (format "rsync -razvP %s %s" local-websites remote)))
+ (sync-command (format "rsync -azvP %s %s" local-websites remote)))
(if (not (yes-or-no-p "Push local changes to remote target? "))
(message "Didn't publish remotely to %s." remote)
(message
@@ -584,7 +628,7 @@ to build the entire website.
#+END_SRC
#+RESULTS: main
-: #<window 57 on *Async Shell Command*>
+: #<window 257 on *Async Shell Command*>
The following links to the locally built homepages are useful after
building the website locally, to check that everything proceeded smoothly.
@@ -592,3 +636,4 @@ building the website locally, to check that everything proceeded smoothly.
- Main site :: [[file:/tmp/mlnp.fr/index.html]]
- Wiki :: [[file:/tmp/wiki.mlnp.fr/index.html]]
- Blog :: [[file:/tmp/blog.mlnp.fr/index.html]]
+- Apps :: [[file:/tmp/apps.mlnp.fr/index.html]]
Copyright 2019--2026 Marius PETER