work.el: Handle files both under en/, fr/, and root.
This commit is contained in:
parent
7732e866ad
commit
57d0d22d7f
1 changed files with 21 additions and 14 deletions
35
work.el
35
work.el
|
@ -32,17 +32,24 @@
|
|||
(make-powered-by lang)
|
||||
"</span>"))
|
||||
|
||||
;; Produce the <link> tag including the stylesheet relative to the
|
||||
;; given root.
|
||||
(defun make-styles (root)
|
||||
(concat "<link rel=\"stylesheet\" type=\"text/css\" href=\"" root "content/css/default.css\" />"))
|
||||
|
||||
;; Produce the preamble with links relative to the given root.
|
||||
(defun make-preamble (root)
|
||||
(concat "
|
||||
<span class=\"myname\">Sergiu Ivanov</span>
|
||||
<span class=\"logos\">
|
||||
<a href=\"https://www.ibisc.univ-evry.fr/\"><img src=\"" root "content/imgs/ibisc.png\" alt=\"lab logo\" class=\"ibisclogo\" /></a>
|
||||
<a href=\"https://www.univ-evry.fr/accueil.html\"><img src=\"" root "content/imgs/ueve.png\" alt=\"university logo\" class=\"uevelogo\" /></a>
|
||||
</span>"))
|
||||
|
||||
|
||||
;; Set up org-publish for my work site.
|
||||
(let* ((work-base "~/Candies/Sites/work/")
|
||||
(publishing-base (concat work-base "www/"))
|
||||
(my-styles "<link rel=\"stylesheet\" type=\"text/css\" href=\"../content/css/default.css\" />")
|
||||
(my-preamble "
|
||||
<span class=\"myname\">Sergiu Ivanov</span>
|
||||
<span class=\"logos\">
|
||||
<a href=\"https://www.ibisc.univ-evry.fr/\"><img src=\"../content/imgs/ibisc.png\" alt=\"lab logo\" class=\"ibisclogo\" /></a>
|
||||
<a href=\"https://www.univ-evry.fr/accueil.html\"><img src=\"../content/imgs/ueve.png\" alt=\"university logo\" class=\"uevelogo\" /></a>
|
||||
</span>"))
|
||||
(publishing-base (concat work-base "www/")))
|
||||
|
||||
|
||||
(setq org-publish-project-alist
|
||||
|
@ -62,8 +69,8 @@
|
|||
|
||||
:html-head-include-default-style nil
|
||||
:html-head-include-scripts nil
|
||||
:html-head-extra ,my-styles
|
||||
:html-preamble ,my-preamble
|
||||
:html-head-extra ,(make-styles "../")
|
||||
:html-preamble ,(make-preamble "../")
|
||||
:html-postamble ,(make-postamble 'en))
|
||||
|
||||
|
||||
|
@ -82,8 +89,8 @@
|
|||
|
||||
:html-head-include-default-style nil
|
||||
:html-head-include-scripts nil
|
||||
:html-head-extra ,my-styles
|
||||
:html-preamble ,my-preamble
|
||||
:html-head-extra ,(make-styles "")
|
||||
:html-preamble ,(make-preamble "")
|
||||
:html-postamble ,(make-postamble 'en))
|
||||
|
||||
|
||||
|
@ -99,8 +106,8 @@
|
|||
|
||||
:html-head-include-default-style nil
|
||||
:html-head-include-scripts nil
|
||||
:html-head-extra ,my-styles
|
||||
:html-preamble ,my-preamble
|
||||
:html-head-extra ,(make-styles "../")
|
||||
:html-preamble ,(make-preamble "../")
|
||||
:html-postamble ,(make-postamble 'fr))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue