(require 'ox-publish)
(require 'htmlize)
(setq org-publish-project-alist
`(("pages"
:base-directory "~/Documents/Repositories/études_doctorat/org/"
:publishing-directory "~/Documents/Repositories/études_doctorat/public/"
:base-extension "org"
:recursive t
:publishing-function org-html-publish-to-html
:section-numbers 3
:with-toc t
:auto-sitemap t
:sitemap-title "Un doctorat au CRESCO"
:sitemap-filename "index.org"
:sitemap-format-entry blog-sitemap-format-entry
:sitemap-sort-files anti-chronologically
:author "Jean-Christophe Helary"
:email "jean.helary@univ-tlse2.fr"
:language "fr"
:html-doctype "html5"
:html-indent t
:html-html5-fancy t
:html-head-include-scripts nil
:html-head-include-default-style nil
:html-htmlize-output-type css
:htmlized-source t
:html-head "<link rel=\"stylesheet\" type=\"text/css\" href=\"css/stylesheet.css\" />"
:html-preamble "<nav>
<a href=\"/\">Index</a>
</nav>"
:html-postamble "<hr/>
<footer>
<div class=\"description\">Ce blog est une tentative de publication irrégulière de l’avancée de ma recherche et de mes réflexions concernant la publication.<br/> Les contenus sont distribués avec la licence <a rel=\"license\" href=\"https://creativecommons.org/licenses/by/4.0/deed.fr\">CC BY 4.0</a> sauf indication contraire.</div>
<div class=\"copyright\"> Mise à jour le %C. Copyright © 2025 <a href=\"https://sr.ht/~brandelune/\">Jean-Christophe Helary</a>.</div>
</footer>"
:section-numbers nil
:with-toc nil)
("static"
:base-directory "~/Documents/Repositories/études_doctorat/org/"
:publishing-directory "~/Documents/Repositories/études_doctorat/public/"
:base-extension "css\\|txt\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|html"
:recursive t
:publishing-function org-publish-attachment)
("brandelune.srht.site"
:components ("pages" "static"))))
(defun blog-sitemap-format-entry (entry style project)
(cond ((not (directory-name-p entry))
(format "%s [[file:%s][%s]]"
(format-time-string "%Y-%m-%d - " (org-publish-find-date entry project))
entry
(org-publish-find-title entry project)))
((eq style 'tree)
(file-name-nondirectory (directory-file-name entry)))
(t entry)))
(htmlize-file "~/Documents/Repositories/études_doctorat/org/code/org-publish.el")
(org-publish "brandelune.srht.site" t)