summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Peter <marius.peter@tutanota.com>2022-04-05 20:00:36 +0200
committerMarius Peter <marius.peter@tutanota.com>2022-04-05 20:00:36 +0200
commit503b28c4b43c4256680399add97cd9bf6cbd28d3 (patch)
tree30c6921da6ba5a0f2c4e8432b05d0c11d454910b
parent6e66b0b7dedaf6fae27d052e49ecbe7fb4907f92 (diff)
More granularity in wiki components.
-rw-r--r--publish-mlnp.org179
1 files changed, 95 insertions, 84 deletions
diff --git a/publish-mlnp.org b/publish-mlnp.org
index 0ee6463..c8f299c 100644
--- a/publish-mlnp.org
+++ b/publish-mlnp.org
@@ -107,13 +107,12 @@ Two publishing locations are prompted, if undefined:
is used to publish the website on the internet, it then becomes
visible at [[http://mlnp.fr/][mlnp.fr]].
- We follow the recommendation outlined in the manual's [[https://orgmode.org/manual/Uploading-Files.html][uploading
- files]] section: in the case of remote publishing, we first publish
- locally, then ~rsync~ the local copy with the remote one. This is
- much more efficient for small updates---when attempting to publish
- to the remote target directly, =tramp= will `dumbly' check files for
- changes one by one, instead of checking the overall delta, which
- ~rsync~ does.
+We follow the recommendation outlined in the manual's [[https://orgmode.org/manual/Uploading-Files.html][uploading files]]
+section: in the case of remote publishing, we first publish locally,
+then ~rsync~ the local copy with the remote one. This is much more
+efficient for small updates---when attempting to publish to the remote
+target directly, =tramp= will `dumbly' check files for changes one by
+one, instead of checking the overall delta, which ~rsync~ does.
#+NAME: org-publish-locations
#+BEGIN_SRC emacs-lisp
@@ -169,7 +168,7 @@ The website styling information is described on the [[file:resources/css.org][CS
** JS
-The goal of this website is to /not/ have to rely on JavaScript.
+A goal of this website is to /not/ have to rely on JavaScript.
* COMMENT HTML preamble
@@ -220,43 +219,6 @@ Both the wiki and the blog call for css and font resources hosted on
"blog.mlnp.fr"))))
#+END_SRC
-#+RESULTS: org-publish-project-alist
-#+begin_example
-(("mlnp.fr" :components
- ("mlnp-main-pages" "mlnp-cv-txt" "mlnp-resources" "resources-pages" "mlnp-fonts"))
- ("mlnp-main-pages" :base-directory "./" :base-extension "org" :publishing-directory "/tmp/mlnp.fr/" :recursive nil :auto-sitemap t :sitemap-title "Sitemap for [[https://wiki.mlnp.fr][wiki.mlnp.fr]]" :publishing-function org-html-publish-to-html)
- ("mlnp-cv-txt" :base-directory "./" :base-extension "txt" :publishing-directory "/tmp/mlnp.fr/" :publishing-function org-publish-attachment)
- ("mlnp-resources" :base-directory "resources/" :base-extension "css\\|js\\|png" :publishing-directory "/tmp/mlnp.fr/resources/" :publishing-function org-publish-attachment)
- ("resources-pages" :base-directory "resources/" :base-extension "org" :publishing-directory "/tmp/mlnp.fr/resources/" :recursive t :publishing-function org-html-publish-to-html)
- ("mlnp-fonts" :base-directory "resources/fonts/" :base-extension "ttf\\|otf" :publishing-directory "/tmp/mlnp.fr/resources/fonts/" :publishing-function org-publish-attachment)
- ("wiki.mlnp.fr" :components
- ("wiki-main-pages" "wiki-resources" "wiki-fonts" "wiki-images"))
- ("wiki-main-pages" :components
- ("wiki-sitemap" "wiki---aerospace" "wiki---emacs" "wiki---languages" "wiki---linux" "wiki---programming" "wiki---typography"))
- ("wiki-sitemap")
- ("wiki---aerospace" :base-directory "wiki/aerospace" :base-extension "org" :publishing-directory "/tmp/wiki.mlnp.fr/aerospace" :recursive t :html-head "<link rel='stylesheet' type='text/css' href='https://wiki.mlnp.fr/resources/mlnp.css'/>\n <link rel='icon' type='image/png' href='https://wiki.mlnp.fr/resources/favicon.png'/>" :auto-sitemap t :sitemap-filename "index.org" :publishing-function org-html-publish-to-html)
- ("wiki---emacs" :base-directory "wiki/emacs" :base-extension "org" :publishing-directory "/tmp/wiki.mlnp.fr/emacs" :recursive t :html-head "<link rel='stylesheet' type='text/css' href='https://wiki.mlnp.fr/resources/mlnp.css'/>\n <link rel='icon' type='image/png' href='https://wiki.mlnp.fr/resources/favicon.png'/>" :auto-sitemap t :sitemap-filename "index.org" :publishing-function org-html-publish-to-html)
- ("wiki---languages" :base-directory "wiki/languages" :base-extension "org" :publishing-directory "/tmp/wiki.mlnp.fr/languages" :recursive t :html-head "<link rel='stylesheet' type='text/css' href='https://wiki.mlnp.fr/resources/mlnp.css'/>\n <link rel='icon' type='image/png' href='https://wiki.mlnp.fr/resources/favicon.png'/>" :auto-sitemap t :sitemap-filename "index.org" :publishing-function org-html-publish-to-html)
- ("wiki---linux" :base-directory "wiki/linux" :base-extension "org" :publishing-directory "/tmp/wiki.mlnp.fr/linux" :recursive t :html-head "<link rel='stylesheet' type='text/css' href='https://wiki.mlnp.fr/resources/mlnp.css'/>\n <link rel='icon' type='image/png' href='https://wiki.mlnp.fr/resources/favicon.png'/>" :auto-sitemap t :sitemap-filename "index.org" :publishing-function org-html-publish-to-html)
- ("wiki---programming" :base-directory "wiki/programming" :base-extension "org" :publishing-directory "/tmp/wiki.mlnp.fr/programming" :recursive t :html-head "<link rel='stylesheet' type='text/css' href='https://wiki.mlnp.fr/resources/mlnp.css'/>\n <link rel='icon' type='image/png' href='https://wiki.mlnp.fr/resources/favicon.png'/>" :auto-sitemap t :sitemap-filename "index.org" :publishing-function org-html-publish-to-html)
- ("wiki---typography" :base-directory "wiki/typography" :base-extension "org" :publishing-directory "/tmp/wiki.mlnp.fr/typography" :recursive t :html-head "<link rel='stylesheet' type='text/css' href='https://wiki.mlnp.fr/resources/mlnp.css'/>\n <link rel='icon' type='image/png' href='https://wiki.mlnp.fr/resources/favicon.png'/>" :auto-sitemap t :sitemap-filename "index.org" :publishing-function org-html-publish-to-html)
- ("wiki-resources" :base-directory "resources/" :base-extension "css\\|js\\|png" :publishing-directory "/tmp/wiki.mlnp.fr/resources/" :publishing-function org-publish-attachment)
- ("wiki-fonts" :base-directory "resources/fonts/" :base-extension "ttf\\|otf" :publishing-directory "/tmp/wiki.mlnp.fr/resources/fonts/" :publishing-function org-publish-attachment)
- ("wiki-images" :base-directory "wiki/images/" :base-extension "png\\|jpg" :publishing-directory "/tmp/wiki.mlnp.fr/images/" :publishing-function org-publish-attachment)
- ("blog.mlnp.fr" :components
- ("blog-main-pages" "blog-resources" "blog-fonts"))
- ("blog-main-pages" :base-directory "blog/" :base-extension "org" :publishing-directory "/tmp/blog.mlnp.fr/" :recursive t :html-head "<link rel='stylesheet' type='text/css' href='https://blog.mlnp.fr/resources/mlnp.css'/>\n <link rel='icon' type='image/png' href='https://blog.mlnp.fr/resources/favicon.png'/>" :auto-sitemap t :sitemap-title "Sitemap for [[https://blog.mlnp.fr][blog.mlnp.fr]]" :sitemap-sort-files anti-chronologically :publishing-function org-html-publish-to-html)
- ("blog-resources" :base-directory "resources/" :base-extension "css\\|js\\|png" :publishing-directory "/tmp/blog.mlnp.fr/resources/" :publishing-function org-publish-attachment)
- ("blog-fonts" :base-directory "resources/fonts/" :base-extension "ttf\\|otf" :publishing-directory "/tmp/blog.mlnp.fr/resources/fonts/" :publishing-function org-publish-attachment)
- ("all-styles" :components
- ("styles-mlnp" "styles-wiki" "styles-blog"))
- ("styles-mlnp" :base-directory "resources/" :base-extension "css" :publishing-directory "/tmp/mlnp.fr/resources/" :publishing-function org-publish-attachment)
- ("styles-wiki" :base-directory "resources/" :base-extension "css" :publishing-directory "/tmp/wiki.mlnp.fr/resources/" :publishing-function org-publish-attachment)
- ("styles-blog" :base-directory "resources/" :base-extension "css" :publishing-directory "/tmp/blog.mlnp.fr/resources/" :publishing-function org-publish-attachment)
- ("everything" :components
- ("mlnp.fr" "wiki.mlnp.fr" "blog.mlnp.fr")))
-#+end_example
-
** All styles
@@ -350,20 +312,21 @@ dashes when exported to the sitemap titles.
"wiki-fonts"
"wiki-images"))
("wiki-main-pages"
- :components (;; "wiki-sitemap"
+ :components ("wiki-sitemap"
"wiki-index"
- "wiki---aerospace"
+ "wiki---engineering"
"wiki---emacs"
"wiki---languages"
+ "wiki---fitness"
"wiki---linux"
"wiki---programming"
"wiki---typography"))
- ;; ("wiki-sitemap" ;; TODO
- ;; )
-<<wiki-index>>
- <<wiki---aerospace>>
+ <<wiki-sitemap>>
+ <<wiki-index>>
+ <<wiki---engineering>>
<<wiki---emacs>>
<<wiki---languages>>
+ <<wiki---fitness>>
<<wiki---linux>>
<<wiki---programming>>
<<wiki---typography>>
@@ -385,6 +348,23 @@ dashes when exported to the sitemap titles.
#+END_SRC
+*** Sitemap
+
+#+NAME: wiki-sitemap
+#+BEGIN_SRC emacs-lisp
+ ("wiki-sitemap"
+ :base-directory "wiki/"
+ :base-extension "org"
+ :publishing-directory ,(concat org-publish-location-local "wiki.mlnp.fr/")
+ :recursive t ; Encompass all wiki pages.
+ :html-head "<link rel='stylesheet' type='text/css' href='https://wiki.mlnp.fr/resources/mlnp.css'/>
+ <link rel='icon' type='image/png' href='https://wiki.mlnp.fr/resources/favicon.png'/>"
+ :auto-sitemap t
+ :sitemap-title "Full sitemap for [[https://wiki.mlnp.fr][wiki.mlnp.fr]]"
+ :publishing-function org-html-publish-to-html)
+#+END_SRC
+
+
*** Index
#+NAME: wiki-index
@@ -401,19 +381,21 @@ dashes when exported to the sitemap titles.
#+END_SRC
-*** Aerospace
+*** Engineering
-#+NAME: wiki---aerospace
+#+NAME: wiki---engineering
#+BEGIN_SRC emacs-lisp
- ("wiki---aerospace"
- :base-directory "wiki/aerospace"
+ ("wiki---engineering"
+ :base-directory "wiki/engineering"
:base-extension "org"
- :publishing-directory ,(concat org-publish-location-local "wiki.mlnp.fr/aerospace")
+ :publishing-directory ,(concat org-publish-location-local "wiki.mlnp.fr/engineering")
:recursive t
:html-head "<link rel='stylesheet' type='text/css' href='https://wiki.mlnp.fr/resources/mlnp.css'/>
<link rel='icon' type='image/png' href='https://wiki.mlnp.fr/resources/favicon.png'/>"
:auto-sitemap t
:sitemap-filename "index.org"
+ :html-link-up "https://wiki.mlnp.fr/engineering/"
+ :html-link-home "https://wiki.mlnp.fr"
:publishing-function org-html-publish-to-html)
#+END_SRC
@@ -431,6 +413,8 @@ dashes when exported to the sitemap titles.
<link rel='icon' type='image/png' href='https://wiki.mlnp.fr/resources/favicon.png'/>"
:auto-sitemap t
:sitemap-filename "index.org"
+ :html-link-up "https://wiki.mlnp.fr/emacs/"
+ :html-link-home "https://wiki.mlnp.fr"
:publishing-function org-html-publish-to-html)
#+END_SRC
@@ -448,6 +432,8 @@ dashes when exported to the sitemap titles.
<link rel='icon' type='image/png' href='https://wiki.mlnp.fr/resources/favicon.png'/>"
:auto-sitemap t
:sitemap-filename "index.org"
+ :html-link-up "https://wiki.mlnp.fr/languages/"
+ :html-link-home "https://wiki.mlnp.fr"
:publishing-function org-html-publish-to-html)
#+END_SRC
@@ -465,6 +451,8 @@ dashes when exported to the sitemap titles.
<link rel='icon' type='image/png' href='https://wiki.mlnp.fr/resources/favicon.png'/>"
:auto-sitemap t
:sitemap-filename "index.org"
+ :html-link-up "https://wiki.mlnp.fr/linux/"
+ :html-link-home "https://wiki.mlnp.fr"
:publishing-function org-html-publish-to-html)
#+END_SRC
@@ -482,6 +470,27 @@ dashes when exported to the sitemap titles.
<link rel='icon' type='image/png' href='https://wiki.mlnp.fr/resources/favicon.png'/>"
:auto-sitemap t
:sitemap-filename "index.org"
+ :html-link-up "https://wiki.mlnp.fr/programming/"
+ :html-link-home "https://wiki.mlnp.fr"
+ :publishing-function org-html-publish-to-html)
+#+END_SRC
+
+
+*** Fitness
+
+#+NAME: wiki---fitness
+#+BEGIN_SRC emacs-lisp
+ ("wiki---fitness"
+ :base-directory "wiki/fitness"
+ :base-extension "org"
+ :publishing-directory ,(concat org-publish-location-local "wiki.mlnp.fr/fitness")
+ :recursive t
+ :html-head "<link rel='stylesheet' type='text/css' href='https://wiki.mlnp.fr/resources/mlnp.css'/>
+ <link rel='icon' type='image/png' href='https://wiki.mlnp.fr/resources/favicon.png'/>"
+ :auto-sitemap t
+ :sitemap-filename "index.org"
+ :html-link-up "https://wiki.mlnp.fr/fitness/"
+ :html-link-home "https://wiki.mlnp.fr"
:publishing-function org-html-publish-to-html)
#+END_SRC
@@ -499,6 +508,8 @@ dashes when exported to the sitemap titles.
<link rel='icon' type='image/png' href='https://wiki.mlnp.fr/resources/favicon.png'/>"
:auto-sitemap t
:sitemap-filename "index.org"
+ :html-link-up "https://wiki.mlnp.fr/typography/"
+ :html-link-home "https://wiki.mlnp.fr"
:publishing-function org-html-publish-to-html)
#+END_SRC
@@ -507,35 +518,36 @@ dashes when exported to the sitemap titles.
#+NAME: blog.mlnp.fr
#+BEGIN_SRC emacs-lisp
- ("blog.mlnp.fr"
- :components ("blog-main-pages"
- "blog-resources"
- "blog-fonts"))
- ("blog-main-pages"
- :base-directory "blog/"
- :base-extension "org"
- :publishing-directory ,(concat org-publish-location-local "blog.mlnp.fr/")
- :recursive t
- :html-head "<link rel='stylesheet' type='text/css' href='https://blog.mlnp.fr/resources/mlnp.css'/>
- <link rel='icon' type='image/png' href='https://blog.mlnp.fr/resources/favicon.png'/>"
- :auto-sitemap t
- :sitemap-title "Sitemap for [[https://blog.mlnp.fr][blog.mlnp.fr]]"
- :sitemap-sort-files anti-chronologically
- :publishing-function org-html-publish-to-html)
- ("blog-resources"
- :base-directory "resources/"
- :base-extension "css\\|js\\|png"
- :publishing-directory ,(concat org-publish-location-local "blog.mlnp.fr/resources/")
- :publishing-function org-publish-attachment)
- ("blog-fonts"
- :base-directory "resources/fonts/"
- :base-extension "ttf\\|otf"
- :publishing-directory ,(concat org-publish-location-local "blog.mlnp.fr/resources/fonts/")
- :publishing-function org-publish-attachment)
+ ("blog.mlnp.fr"
+ :components ("blog-main-pages"
+ "blog-resources"
+ "blog-fonts"))
+ ("blog-main-pages"
+ :base-directory "blog/"
+ :base-extension "org"
+ :publishing-directory ,(concat org-publish-location-local "blog.mlnp.fr/")
+ :recursive t
+ :html-head "<link rel='stylesheet' type='text/css' href='https://blog.mlnp.fr/resources/mlnp.css'/>
+ <link rel='icon' type='image/png' href='https://blog.mlnp.fr/resources/favicon.png'/>"
+ :auto-sitemap t
+ :sitemap-filename "index.org"
+ :sitemap-title "Sitemap for [[https://blog.mlnp.fr][blog.mlnp.fr]]"
+ :sitemap-sort-files chronologically
+ :publishing-function org-html-publish-to-html)
+ ("blog-resources"
+ :base-directory "resources/"
+ :base-extension "css\\|js\\|png"
+ :publishing-directory ,(concat org-publish-location-local "blog.mlnp.fr/resources/")
+ :publishing-function org-publish-attachment)
+ ("blog-fonts"
+ :base-directory "resources/fonts/"
+ :base-extension "ttf\\|otf"
+ :publishing-directory ,(concat org-publish-location-local "blog.mlnp.fr/resources/fonts/")
+ :publishing-function org-publish-attachment)
#+END_SRC
-* COMMENT Main publishing logic :main:
+* Main publishing logic :main:
This is the main publishing logic. Execute the following source block
to build the entire website.
@@ -557,7 +569,6 @@ to build the entire website.
(save-window-excursion
(find-file "cv.org")
(org-ascii-export-to-ascii))
- ;; TODO (org-publish-sitemap "wiki.mlnp.fr")
(org-publish org-publish-component)
@@ -573,7 +584,7 @@ to build the entire website.
#+END_SRC
#+RESULTS: main
-: #<window 95 on *Async Shell Command*>
+: #<window 57 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.
Copyright 2019--2026 Marius PETER