[Org] Repository for my personal website.
Website publishing file.
publish-mlnp.org
@@ -6,7 +6,8 @@
6
6
#+DATE: <2022-01-26 Wed>
7
7
#+OPTIONS: toc:nil
8
8
9
Removed:
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="resources/mlnp.css" />
9
Added:
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="resources/mlnp.css"/>
10
Added:
#+HTML_HEAD: <link rel="icon" type="image/png" href="resources/favicon.png"/>
10
11
#+INCLUDE: resources/topnav.html export html
11
12
12
13
@@ -26,9 +27,11 @@
26
27
* Introduction
27
28
28
29
This entire website is built with [[https://orgmode.org/][Org mode]], an Emacs mode designed for
29
Removed:
literate programming among other things. Using Org mode for designing,
30
Removed:
building and publishing a website brings the following benefits:
30
Added:
literate programming among other things.
31
31
32
Added:
33
Added:
** Benefits
34
Added:
32
35
- Work within Emacs :: This advantage concerns existing Emacs users.
33
36
- Literate programming :: Org files contain a mix of plain text
34
37
associated with documentation, and code that can be executed. A
@@ -37,6 +40,54 @@
37
40
of remembering why a particular piece of code was written.
38
41
39
42
43
Added:
** Project structure
44
Added:
45
Added:
My three websites---main, wiki, and blog---are edited in the same
46
Added:
directory, but can be exported to different locations. This enables me
47
Added:
to assign subdomains to each website, as is recommended for
48
Added:
uncorrelated content.
49
Added:
50
Added:
#+NAME: tree
51
Added:
#+BEGIN_SRC bash :results verbatim :exports results
52
Added:
tree -L 2 -I *.html
53
Added:
#+END_SRC
54
Added:
55
Added:
#+RESULTS: tree
56
Added:
#+begin_example
57
Added:
.
58
Added:
├── README.org
59
Added:
├── about.org
60
Added:
├── blog
61
Added:
│ ├── 2022
62
Added:
│ ├── 2023
63
Added:
│ ├── index.org
64
Added:
│ └── sitemap.org
65
Added:
├── cv.org
66
Added:
├── cv.txt
67
Added:
├── index.org
68
Added:
├── publish-mlnp.org
69
Added:
├── resources
70
Added:
│ ├── css.org
71
Added:
│ ├── favicon.png
72
Added:
│ ├── favicon.xcf
73
Added:
│ ├── fonts
74
Added:
│ └── mlnp.css
75
Added:
├── sitemap.org
76
Added:
└── wiki
77
Added:
├── aerospace
78
Added:
├── emacs
79
Added:
├── images
80
Added:
├── index.org
81
Added:
├── languages
82
Added:
├── linux
83
Added:
├── programming
84
Added:
├── sitemap.org
85
Added:
└── typography
86
Added:
87
Added:
13 directories, 15 files
88
Added:
#+end_example
89
Added:
90
Added:
40
91
* Publishing targets
41
92
42
93
This first section lays out the interactive prompts used to bind
@@ -46,9 +97,9 @@
46
97
- Components :: What parts of the website should be built?
47
98
48
99
49
Removed:
** Location
100
Added:
** Locations
50
101
51
Removed:
Two possible publishing locations are considered:
102
Added:
Two publishing locations are prompted, if undefined:
52
103
53
104
- Local :: The website is built on the local machine. This is useful
54
105
for website development.
@@ -56,24 +107,42 @@
56
107
is used to publish the website on the internet, it then becomes
57
108
visible at [[http://mlnp.fr/][mlnp.fr]].
58
109
59
Removed:
#+NAME: org-publish-location
60
Removed:
#+BEGIN_SRC elisp
61
Removed:
(setq org-publish-location
62
Removed:
(read-answer
63
Removed:
"Should the website be built on the local or remote target? "
64
Removed:
'(("/tmp/"
65
Removed:
?l "build website on the local machine")
66
Removed:
("/ssh:root@192.162.71.223:/var/www/"
67
Removed:
?r "build website on the remote machine"))))
110
Added:
We follow the recommendation outlined in the manual's [[https://orgmode.org/manual/Uploading-Files.html][uploading
111
Added:
files]] section: in the case of remote publishing, we first publish
112
Added:
locally, then ~rsync~ the local copy with the remote one. This is
113
Added:
much more efficient for small updates---when attempting to publish
114
Added:
to the remote target directly, =tramp= will `dumbly' check files for
115
Added:
changes one by one, instead of checking the overall delta, which
116
Added:
~rsync~ does.
117
Added:
118
Added:
#+NAME: org-publish-locations
119
Added:
#+BEGIN_SRC emacs-lisp
120
Added:
(unless (boundp 'org-publish-location-local)
121
Added:
(setq org-publish-location-local
122
Added:
(read-string
123
Added:
"Local target: " "/tmp/")))
124
Added:
125
Added:
(setq org-publish-location-local
126
Added:
(or org-publish-location-local
127
Added:
(read-string "Local target: " "/tmp/")))
128
Added:
129
Added:
130
Added:
131
Added:
(unless (boundp 'org-publish-location-remote)
132
Added:
(setq org-publish-location-remote
133
Added:
(read-string
134
Added:
"Remote target: " "root@192.162.71.223:/var/www/")))
68
135
#+END_SRC
69
136
70
137
71
138
** Components
72
139
73
Removed:
We outline three components: the main site, the wiki, and the blog.
140
Added:
We outline three significant components: the main site, the wiki, and
141
Added:
the blog. We define an additional component to publish only styling
142
Added:
information, as it changes pretty frequently.
74
143
75
144
#+NAME: org-publish-component
76
Removed:
#+begin_src elisp
145
Added:
#+begin_src emacs-lisp
77
146
(setq org-publish-component
78
147
(read-answer
79
148
"Which `org-publish-project-alist' component should be built? "
@@ -83,8 +152,10 @@
83
152
?w "build the wiki")
84
153
("blog.mlnp.fr"
85
154
?b "build the blog")
86
Removed:
("all"
87
Removed:
?a "build all websites"))))
155
Added:
("everything"
156
Added:
?e "build everything for all websites")
157
Added:
("all-styles"
158
Added:
?s "build only websites' styles"))))
88
159
#+end_src
89
160
90
161
@@ -135,83 +206,303 @@
135
206
=mlnp.fr/resources/= folder.
136
207
137
208
#+NAME: org-publish-project-alist
138
Removed:
#+BEGIN_SRC elisp :noweb yes
209
Added:
#+BEGIN_SRC emacs-lisp :noweb no-export :results pp
139
210
(require 'ox-publish)
140
211
(setq org-publish-project-alist
141
212
`( ;; This line left blank to avoid noweb honoring `( prefix.
142
213
<<mlnp.fr>>
143
214
<<wiki.mlnp.fr>>
144
215
<<blog.mlnp.fr>>
145
Removed:
("all"
216
Added:
<<all-styles>>
217
Added:
("everything"
146
218
:components ("mlnp.fr"
147
219
"wiki.mlnp.fr"
148
220
"blog.mlnp.fr"))))
149
221
#+END_SRC
150
222
223
Added:
#+RESULTS: org-publish-project-alist
224
Added:
#+begin_example
225
Added:
(("mlnp.fr" :components
226
Added:
("mlnp-main-pages" "mlnp-cv-txt" "mlnp-resources" "resources-pages" "mlnp-fonts"))
227
Added:
("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)
228
Added:
("mlnp-cv-txt" :base-directory "./" :base-extension "txt" :publishing-directory "/tmp/mlnp.fr/" :publishing-function org-publish-attachment)
229
Added:
("mlnp-resources" :base-directory "resources/" :base-extension "css\\|js\\|png" :publishing-directory "/tmp/mlnp.fr/resources/" :publishing-function org-publish-attachment)
230
Added:
("resources-pages" :base-directory "resources/" :base-extension "org" :publishing-directory "/tmp/mlnp.fr/resources/" :recursive t :publishing-function org-html-publish-to-html)
231
Added:
("mlnp-fonts" :base-directory "resources/fonts/" :base-extension "ttf\\|otf" :publishing-directory "/tmp/mlnp.fr/resources/fonts/" :publishing-function org-publish-attachment)
232
Added:
("wiki.mlnp.fr" :components
233
Added:
("wiki-main-pages" "wiki-resources" "wiki-fonts" "wiki-images"))
234
Added:
("wiki-main-pages" :components
235
Added:
("wiki-sitemap" "wiki---aerospace" "wiki---emacs" "wiki---languages" "wiki---linux" "wiki---programming" "wiki---typography"))
236
Added:
("wiki-sitemap")
237
Added:
("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)
238
Added:
("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)
239
Added:
("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)
240
Added:
("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)
241
Added:
("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)
242
Added:
("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)
243
Added:
("wiki-resources" :base-directory "resources/" :base-extension "css\\|js\\|png" :publishing-directory "/tmp/wiki.mlnp.fr/resources/" :publishing-function org-publish-attachment)
244
Added:
("wiki-fonts" :base-directory "resources/fonts/" :base-extension "ttf\\|otf" :publishing-directory "/tmp/wiki.mlnp.fr/resources/fonts/" :publishing-function org-publish-attachment)
245
Added:
("wiki-images" :base-directory "wiki/images/" :base-extension "png\\|jpg" :publishing-directory "/tmp/wiki.mlnp.fr/images/" :publishing-function org-publish-attachment)
246
Added:
("blog.mlnp.fr" :components
247
Added:
("blog-main-pages" "blog-resources" "blog-fonts"))
248
Added:
("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)
249
Added:
("blog-resources" :base-directory "resources/" :base-extension "css\\|js\\|png" :publishing-directory "/tmp/blog.mlnp.fr/resources/" :publishing-function org-publish-attachment)
250
Added:
("blog-fonts" :base-directory "resources/fonts/" :base-extension "ttf\\|otf" :publishing-directory "/tmp/blog.mlnp.fr/resources/fonts/" :publishing-function org-publish-attachment)
251
Added:
("all-styles" :components
252
Added:
("styles-mlnp" "styles-wiki" "styles-blog"))
253
Added:
("styles-mlnp" :base-directory "resources/" :base-extension "css" :publishing-directory "/tmp/mlnp.fr/resources/" :publishing-function org-publish-attachment)
254
Added:
("styles-wiki" :base-directory "resources/" :base-extension "css" :publishing-directory "/tmp/wiki.mlnp.fr/resources/" :publishing-function org-publish-attachment)
255
Added:
("styles-blog" :base-directory "resources/" :base-extension "css" :publishing-directory "/tmp/blog.mlnp.fr/resources/" :publishing-function org-publish-attachment)
256
Added:
("everything" :components
257
Added:
("mlnp.fr" "wiki.mlnp.fr" "blog.mlnp.fr")))
258
Added:
#+end_example
151
259
260
Added:
261
Added:
** All styles
262
Added:
263
Added:
We specify a separate publishing component for website styling
264
Added:
information according to the following rationale:
265
Added:
266
Added:
1. the page nesting hierarchy is subject to change;
267
Added:
2. thus, pages should use absolute paths to reference their stylesheet
268
Added:
in order to access it reliably, i.e. the remote URL;
269
Added:
3. thus, pages built locally also require the remote stylesheet.
270
Added:
271
Added:
\rarr If the stylesheet isn't published remotely, it wouldn't be reflected
272
Added:
on locally published pages.
273
Added:
274
Added:
#+NAME: all-styles
275
Added:
#+BEGIN_SRC emacs-lisp
276
Added:
("all-styles"
277
Added:
:components ("styles-mlnp"
278
Added:
"styles-wiki"
279
Added:
"styles-blog"))
280
Added:
("styles-mlnp"
281
Added:
:base-directory "resources/"
282
Added:
:base-extension "css"
283
Added:
:publishing-directory ,(concat org-publish-location-local "mlnp.fr/resources/")
284
Added:
:publishing-function org-publish-attachment)
285
Added:
("styles-wiki"
286
Added:
:base-directory "resources/"
287
Added:
:base-extension "css"
288
Added:
:publishing-directory ,(concat org-publish-location-local "wiki.mlnp.fr/resources/")
289
Added:
:publishing-function org-publish-attachment)
290
Added:
("styles-blog"
291
Added:
:base-directory "resources/"
292
Added:
:base-extension "css"
293
Added:
:publishing-directory ,(concat org-publish-location-local "blog.mlnp.fr/resources/")
294
Added:
:publishing-function org-publish-attachment)
295
Added:
#+END_SRC
296
Added:
297
Added:
152
298
** =mlnp.fr=
153
299
154
300
#+NAME: mlnp.fr
155
301
#+BEGIN_SRC emacs-lisp
156
302
("mlnp.fr"
157
303
:components ("mlnp-main-pages"
304
Added:
"mlnp-cv-txt"
158
305
"mlnp-resources"
159
306
"resources-pages" ; Only hosted on the main website.
160
307
"mlnp-fonts"))
161
308
("mlnp-main-pages"
162
309
:base-directory "./"
163
310
:base-extension "org"
164
Removed:
:publishing-directory ,(concat org-publish-location "mlnp.fr/")
311
Added:
:publishing-directory ,(concat org-publish-location-local "mlnp.fr/")
165
312
:recursive nil ; Main site pages are all in top-level org directory.
313
Added:
:auto-sitemap t
314
Added:
:sitemap-title "Sitemap for [[https://wiki.mlnp.fr][wiki.mlnp.fr]]"
166
315
:publishing-function org-html-publish-to-html)
316
Added:
("mlnp-cv-txt"
317
Added:
:base-directory "./"
318
Added:
:base-extension "txt"
319
Added:
:publishing-directory ,(concat org-publish-location-local "mlnp.fr/")
320
Added:
:publishing-function org-publish-attachment)
167
321
("mlnp-resources"
168
322
:base-directory "resources/"
169
Removed:
:base-extension "css\\|js"
170
Removed:
:publishing-directory ,(concat org-publish-location "mlnp.fr/resources/")
323
Added:
:base-extension "css\\|js\\|png"
324
Added:
:publishing-directory ,(concat org-publish-location-local "mlnp.fr/resources/")
171
325
:publishing-function org-publish-attachment)
172
326
("resources-pages"
173
327
:base-directory "resources/"
174
328
:base-extension "org"
175
Removed:
:publishing-directory ,(concat org-publish-location "mlnp.fr/resources/")
329
Added:
:publishing-directory ,(concat org-publish-location-local "mlnp.fr/resources/")
330
Added:
:recursive t ; Resource files could be nested deep inside resources/ folder.
176
331
:publishing-function org-html-publish-to-html)
177
332
("mlnp-fonts"
178
333
:base-directory "resources/fonts/"
179
334
:base-extension "ttf\\|otf"
180
Removed:
:publishing-directory ,(concat org-publish-location "mlnp.fr/resources/fonts/")
335
Added:
:publishing-directory ,(concat org-publish-location-local "mlnp.fr/resources/fonts/")
181
336
:publishing-function org-publish-attachment)
182
337
#+END_SRC
183
338
184
339
185
340
** =wiki.mlnp.fr=
186
341
342
Added:
We use triple dashes in component names so that they convert to em
343
Added:
dashes when exported to the sitemap titles.
344
Added:
187
345
#+NAME: wiki.mlnp.fr
188
Removed:
#+BEGIN_SRC emacs-lisp
346
Added:
#+BEGIN_SRC emacs-lisp :noweb no-export
189
347
("wiki.mlnp.fr"
190
348
:components ("wiki-main-pages"
191
349
"wiki-resources"
192
Removed:
"wiki-fonts"))
350
Added:
"wiki-fonts"
351
Added:
"wiki-images"))
193
352
("wiki-main-pages"
194
Removed:
:base-directory "wiki/"
195
Removed:
:base-extension "org"
196
Removed:
:publishing-directory ,(concat org-publish-location "wiki.mlnp.fr/")
197
Removed:
:recursive t
198
Removed:
:html-head "<link rel='stylesheet' type='text/css' href='http://wiki.mlnp.fr/resources/mlnp.css'>"
199
Removed:
:auto-sitemap t
200
Removed:
:sitemap-title "Sitemap for [[http://wiki.mlnp.fr][wiki.mlnp.fr]]"
201
Removed:
:publishing-function org-html-publish-to-html)
353
Added:
:components (;; "wiki-sitemap"
354
Added:
"wiki-index"
355
Added:
"wiki---aerospace"
356
Added:
"wiki---emacs"
357
Added:
"wiki---languages"
358
Added:
"wiki---linux"
359
Added:
"wiki---programming"
360
Added:
"wiki---typography"))
361
Added:
;; ("wiki-sitemap" ;; TODO
362
Added:
;; )
363
Added:
<<wiki-index>>
364
Added:
<<wiki---aerospace>>
365
Added:
<<wiki---emacs>>
366
Added:
<<wiki---languages>>
367
Added:
<<wiki---linux>>
368
Added:
<<wiki---programming>>
369
Added:
<<wiki---typography>>
202
370
("wiki-resources"
203
371
:base-directory "resources/"
204
Removed:
:base-extension "css\\|js"
205
Removed:
:publishing-directory ,(concat org-publish-location "wiki.mlnp.fr/resources/")
372
Added:
:base-extension "css\\|js\\|png"
373
Added:
:publishing-directory ,(concat org-publish-location-local "wiki.mlnp.fr/resources/")
206
374
:publishing-function org-publish-attachment)
207
375
("wiki-fonts"
208
376
:base-directory "resources/fonts/"
209
377
:base-extension "ttf\\|otf"
210
Removed:
:publishing-directory ,(concat org-publish-location "wiki.mlnp.fr/resources/fonts/")
378
Added:
:publishing-directory ,(concat org-publish-location-local "wiki.mlnp.fr/resources/fonts/")
211
379
:publishing-function org-publish-attachment)
380
Added:
("wiki-images"
381
Added:
:base-directory "wiki/images/"
382
Added:
:base-extension "png\\|jpg"
383
Added:
:publishing-directory ,(concat org-publish-location-local "wiki.mlnp.fr/images/")
384
Added:
:publishing-function org-publish-attachment)
212
385
#+END_SRC
213
386
214
387
388
Added:
*** Index
389
Added:
390
Added:
#+NAME: wiki-index
391
Added:
#+BEGIN_SRC emacs-lisp
392
Added:
("wiki-index"
393
Added:
:base-directory "wiki/"
394
Added:
:base-extension "org"
395
Added:
:publishing-directory ,(concat org-publish-location-local "wiki.mlnp.fr/")
396
Added:
:recursive nil ; Only top-level wiki pages.
397
Added:
:html-head "<link rel='stylesheet' type='text/css' href='https://wiki.mlnp.fr/resources/mlnp.css'/>
398
Added:
<link rel='icon' type='image/png' href='https://wiki.mlnp.fr/resources/favicon.png'/>"
399
Added:
:auto-sitemap nil
400
Added:
:publishing-function org-html-publish-to-html)
401
Added:
#+END_SRC
402
Added:
403
Added:
404
Added:
*** Aerospace
405
Added:
406
Added:
#+NAME: wiki---aerospace
407
Added:
#+BEGIN_SRC emacs-lisp
408
Added:
("wiki---aerospace"
409
Added:
:base-directory "wiki/aerospace"
410
Added:
:base-extension "org"
411
Added:
:publishing-directory ,(concat org-publish-location-local "wiki.mlnp.fr/aerospace")
412
Added:
:recursive t
413
Added:
:html-head "<link rel='stylesheet' type='text/css' href='https://wiki.mlnp.fr/resources/mlnp.css'/>
414
Added:
<link rel='icon' type='image/png' href='https://wiki.mlnp.fr/resources/favicon.png'/>"
415
Added:
:auto-sitemap t
416
Added:
:sitemap-filename "index.org"
417
Added:
:publishing-function org-html-publish-to-html)
418
Added:
#+END_SRC
419
Added:
420
Added:
421
Added:
*** Emacs
422
Added:
423
Added:
#+NAME: wiki---emacs
424
Added:
#+BEGIN_SRC emacs-lisp
425
Added:
("wiki---emacs"
426
Added:
:base-directory "wiki/emacs"
427
Added:
:base-extension "org"
428
Added:
:publishing-directory ,(concat org-publish-location-local "wiki.mlnp.fr/emacs")
429
Added:
:recursive t
430
Added:
:html-head "<link rel='stylesheet' type='text/css' href='https://wiki.mlnp.fr/resources/mlnp.css'/>
431
Added:
<link rel='icon' type='image/png' href='https://wiki.mlnp.fr/resources/favicon.png'/>"
432
Added:
:auto-sitemap t
433
Added:
:sitemap-filename "index.org"
434
Added:
:publishing-function org-html-publish-to-html)
435
Added:
#+END_SRC
436
Added:
437
Added:
438
Added:
*** Languages
439
Added:
440
Added:
#+NAME: wiki---languages
441
Added:
#+BEGIN_SRC emacs-lisp
442
Added:
("wiki---languages"
443
Added:
:base-directory "wiki/languages"
444
Added:
:base-extension "org"
445
Added:
:publishing-directory ,(concat org-publish-location-local "wiki.mlnp.fr/languages")
446
Added:
:recursive t
447
Added:
:html-head "<link rel='stylesheet' type='text/css' href='https://wiki.mlnp.fr/resources/mlnp.css'/>
448
Added:
<link rel='icon' type='image/png' href='https://wiki.mlnp.fr/resources/favicon.png'/>"
449
Added:
:auto-sitemap t
450
Added:
:sitemap-filename "index.org"
451
Added:
:publishing-function org-html-publish-to-html)
452
Added:
#+END_SRC
453
Added:
454
Added:
455
Added:
*** Linux
456
Added:
457
Added:
#+NAME: wiki---linux
458
Added:
#+BEGIN_SRC emacs-lisp
459
Added:
("wiki---linux"
460
Added:
:base-directory "wiki/linux"
461
Added:
:base-extension "org"
462
Added:
:publishing-directory ,(concat org-publish-location-local "wiki.mlnp.fr/linux")
463
Added:
:recursive t
464
Added:
:html-head "<link rel='stylesheet' type='text/css' href='https://wiki.mlnp.fr/resources/mlnp.css'/>
465
Added:
<link rel='icon' type='image/png' href='https://wiki.mlnp.fr/resources/favicon.png'/>"
466
Added:
:auto-sitemap t
467
Added:
:sitemap-filename "index.org"
468
Added:
:publishing-function org-html-publish-to-html)
469
Added:
#+END_SRC
470
Added:
471
Added:
472
Added:
*** Programming
473
Added:
474
Added:
#+NAME: wiki---programming
475
Added:
#+BEGIN_SRC emacs-lisp
476
Added:
("wiki---programming"
477
Added:
:base-directory "wiki/programming"
478
Added:
:base-extension "org"
479
Added:
:publishing-directory ,(concat org-publish-location-local "wiki.mlnp.fr/programming")
480
Added:
:recursive t
481
Added:
:html-head "<link rel='stylesheet' type='text/css' href='https://wiki.mlnp.fr/resources/mlnp.css'/>
482
Added:
<link rel='icon' type='image/png' href='https://wiki.mlnp.fr/resources/favicon.png'/>"
483
Added:
:auto-sitemap t
484
Added:
:sitemap-filename "index.org"
485
Added:
:publishing-function org-html-publish-to-html)
486
Added:
#+END_SRC
487
Added:
488
Added:
489
Added:
*** Typography
490
Added:
491
Added:
#+NAME: wiki---typography
492
Added:
#+BEGIN_SRC emacs-lisp
493
Added:
("wiki---typography"
494
Added:
:base-directory "wiki/typography"
495
Added:
:base-extension "org"
496
Added:
:publishing-directory ,(concat org-publish-location-local "wiki.mlnp.fr/typography")
497
Added:
:recursive t
498
Added:
:html-head "<link rel='stylesheet' type='text/css' href='https://wiki.mlnp.fr/resources/mlnp.css'/>
499
Added:
<link rel='icon' type='image/png' href='https://wiki.mlnp.fr/resources/favicon.png'/>"
500
Added:
:auto-sitemap t
501
Added:
:sitemap-filename "index.org"
502
Added:
:publishing-function org-html-publish-to-html)
503
Added:
#+END_SRC
504
Added:
505
Added:
215
506
** =blog.mlnp.fr=
216
507
217
508
#+NAME: blog.mlnp.fr
@@ -223,53 +514,70 @@
223
514
("blog-main-pages"
224
515
:base-directory "blog/"
225
516
:base-extension "org"
226
Removed:
:publishing-directory ,(concat org-publish-location "blog.mlnp.fr/")
517
Added:
:publishing-directory ,(concat org-publish-location-local "blog.mlnp.fr/")
227
518
:recursive t
228
Removed:
:html-head "<link rel='stylesheet' type='text/css' href='http://blog.mlnp.fr/resources/mlnp.css'>"
519
Added:
:html-head "<link rel='stylesheet' type='text/css' href='https://blog.mlnp.fr/resources/mlnp.css'/>
520
Added:
<link rel='icon' type='image/png' href='https://blog.mlnp.fr/resources/favicon.png'/>"
229
521
:auto-sitemap t
230
Removed:
:sitemap-title "Sitemap for [[http://blog.mlnp.fr][blog.mlnp.fr]]"
522
Added:
:sitemap-title "Sitemap for [[https://blog.mlnp.fr][blog.mlnp.fr]]"
231
523
:sitemap-sort-files anti-chronologically
232
524
:publishing-function org-html-publish-to-html)
233
525
("blog-resources"
234
526
:base-directory "resources/"
235
Removed:
:base-extension "css\\|js"
236
Removed:
:publishing-directory ,(concat org-publish-location "blog.mlnp.fr/resources/")
527
Added:
:base-extension "css\\|js\\|png"
528
Added:
:publishing-directory ,(concat org-publish-location-local "blog.mlnp.fr/resources/")
237
529
:publishing-function org-publish-attachment)
238
530
("blog-fonts"
239
531
:base-directory "resources/fonts/"
240
532
:base-extension "ttf\\|otf"
241
Removed:
:publishing-directory ,(concat org-publish-location "blog.mlnp.fr/resources/fonts/")
533
Added:
:publishing-directory ,(concat org-publish-location-local "blog.mlnp.fr/resources/fonts/")
242
534
:publishing-function org-publish-attachment)
243
535
#+END_SRC
244
536
245
537
246
Removed:
* Main publishing logic :main:
538
Added:
* COMMENT Main publishing logic :main:
247
539
248
540
This is the main publishing logic. Execute the following source block
249
541
to build the entire website.
250
542
251
543
#+NAME: main
252
Removed:
#+BEGIN_SRC elisp :noweb no-export
253
Removed:
<<org-publish-location>>
544
Added:
#+BEGIN_SRC emacs-lisp :noweb no-export
545
Added:
;; Never interrupt website publishing by asking to confirm evaluation
546
Added:
;; of source blocks.
547
Added:
(setq org-confirm-babel-evaluate nil)
548
Added:
549
Added:
<<org-publish-locations>>
254
550
<<org-publish-component>>
255
551
<<org-publish-project-alist>>
256
552
553
Added:
;; (org-publish-remove-all-timestamps)
554
Added:
555
Added:
;; Prepare resources:
257
556
(org-babel-tangle-file "resources/css.org")
258
Removed:
(org-publish-remove-all-timestamps)
557
Added:
(save-window-excursion
558
Added:
(find-file "cv.org")
559
Added:
(org-ascii-export-to-ascii))
560
Added:
;; TODO (org-publish-sitemap "wiki.mlnp.fr")
259
561
260
562
(org-publish org-publish-component)
261
Removed:
(format "Successfully built %s!" org-publish-component)
563
Added:
564
Added:
(let* ((local org-publish-location-local)
565
Added:
(local-websites (concat local "*mlnp.fr"))
566
Added:
(remote org-publish-location-remote)
567
Added:
(sync-command (format "rsync -razvP %s %s" local-websites remote)))
568
Added:
(if (not (yes-or-no-p "Push local changes to remote target? "))
569
Added:
(message "Didn't publish remotely to %s." remote)
570
Added:
(message
571
Added:
"Publishing local changes at %s to remote %s." local remote)
572
Added:
(async-shell-command sync-command)))
262
573
#+END_SRC
263
574
264
575
#+RESULTS: main
265
Removed:
: Successfully built wiki.mlnp.fr component!
576
Added:
: #<window 95 on *Async Shell Command*>
266
577
578
Added:
The following links to the locally built homepages are useful after
579
Added:
building the website locally, to check that everything proceeded smoothly.
267
580
268
Removed:
Link to the locally built homepages:
269
Removed:
270
581
- Main site :: [[file:/tmp/mlnp.fr/index.html]]
271
582
- Wiki :: [[file:/tmp/wiki.mlnp.fr/index.html]]
272
583
- Blog :: [[file:/tmp/blog.mlnp.fr/index.html]]
273
Removed:
274
Removed:
275
Removed:
* TODO Export resume to txt upon publishing