home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

publish.el (5082B)


      1 ;;; publish.el --- Publish www project -*- lexical-binding: t; -*-
      2 ;; Author: Vincent Demeester <vincent@sbr.pm>
      3 
      4 ;;; Commentary:
      5 ;; This script will convert the org-mode files in this directory into
      6 ;; html.
      7 
      8 ;;; Code:
      9 (require 'package)
     10 (require 'publish-common)
     11 
     12 (setq org-publish-project-alist
     13       `(("posts"
     14          :base-directory "posts"
     15          :base-extension "org"
     16          :recursive t
     17          :publishing-function org-html-publish-to-html
     18          :publishing-directory "./public/posts"
     19          :exclude ,(regexp-opt '("README.org" "draft"))
     20          :auto-sitemap t
     21          :with-footnotes t
     22          :with-toc nil
     23          :with-drawers t
     24          :sitemap-filename "index.org"
     25          :sitemap-title "Posts"
     26          :sitemap-format-entry sbr/org-sitemap-format-entry
     27          :sitemap-style list
     28          :sitemap-sort-files anti-chronologically
     29          :sitemap-function sbr/org-publish-sitemap
     30          :html-head-include-scripts nil
     31          :html-head-include-default-style nil
     32          :html-head ,sbr-website-html-head
     33          :html-preamble sbr-website-html-preamble
     34          :html-postamble ,sbr-website-html-postamble)
     35         ("posts-rss"
     36          :base-directory "posts"
     37          :base-extension "org"
     38          :recursive t
     39          :html-link-home "https://vincent.demeester.fr/"
     40          :rss-link-home "https://vincent.demeester.fr/posts/"
     41          :html-link-use-abs-url t
     42          :rss-extension "xml"
     43          :publishing-directory "./public"
     44          :publishing-function (sbr/org-rss-publish-to-rss)
     45          :section-number nil
     46          :exclude ".*"
     47          :include ("index.org"))
     48         ("articles"
     49          :base-directory "articles"
     50          :base-extension "org"
     51          :recursive t
     52          :publishing-function org-html-publish-to-html
     53          :publishing-directory "./public/articles"
     54          :exclude ,(regexp-opt '("README.org" "draft"))
     55          :auto-sitemap t
     56          :with-footnotes t
     57          :with-toc nil
     58          :with-drawers t
     59          :sitemap-filename "sitemap.org"
     60          :sitemap-title "Articles"
     61          :sitemap-style tree
     62          :sitemap-sort-files anti-chronologically
     63          ;;:sitemap-format-entry sbr/org-sitemap-format-entry
     64          ;;:sitemap-function sbr/org-publish-sitemap
     65          :html-head-include-scripts nil
     66          :html-head-include-default-style nil
     67          :html-head ,sbr-website-html-head
     68          :html-preamble sbr-website-html-preamble
     69          :html-postamble ,sbr-website-html-postamble)
     70         ("articles-assets"
     71          :exclude ,(regexp-opt '("*.org"))
     72          :base-directory "articles"
     73          :base-extension ,site-attachments
     74          :publishing-directory "./public/articles"
     75          :publishing-function org-publish-attachment
     76          :recursive t)
     77         ("about"
     78          :base-directory "about"
     79          :base-extension "org"
     80          :exclude ,(regexp-opt '("README.org" "draft"))
     81          :index-filename "index.org"
     82          :recursive nil
     83          :with-footnotes t
     84          :with-toc nil
     85          :with-drawers t
     86          :publishing-function org-html-publish-to-html
     87          :publishing-directory "./public/about"
     88          :html-head-include-scripts nil
     89          :html-head-include-default-style nil
     90          :html-head ,sbr-website-html-head
     91          :html-preamble sbr-website-html-preamble
     92          :html-postamble ,sbr-website-html-postamble)
     93         ("index"
     94          :base-directory ""
     95          :base-extension "org"
     96          :exclude ,(regexp-opt '("README.org" "draft"))
     97          :index-filename "index.org"
     98          :recursive nil
     99          :with-footnotes t
    100          :with-toc nil
    101          :with-drawers t
    102          :with-title nil
    103          :publishing-function org-html-publish-to-html
    104          :publishing-directory "./public"
    105          :html-head-include-scripts nil
    106          :html-head-include-default-style nil
    107          :html-head ,sbr-website-html-head
    108          :html-preamble sbr-website-html-preamble
    109          :html-postamble ,sbr-website-html-postamble)
    110         ("css"
    111          :base-directory "./css"
    112          :base-extension ,site-attachments
    113          :recursive t
    114          :publishing-directory "./public/css"
    115          :publishing-function org-publish-attachment
    116          :recursive t)
    117         ("images"
    118          :base-directory "./images"
    119          :base-extension ,site-attachments
    120          :publishing-directory "./public/images"
    121          :publishing-function org-publish-attachment
    122          :recursive t)
    123         ("assets"
    124          :base-directory "./assets"
    125          :base-extension ,site-attachments
    126          :publishing-directory "./public/assets"
    127          :publishing-function org-publish-attachment
    128          :recursive t)
    129         ("legacy"
    130          :base-directory "./legacy"
    131          :base-extension ,site-attachments
    132          :publishing-directory "./public/"
    133          :publishing-function org-publish-attachment
    134          :recursive t)
    135         ("all" :components ("posts" "about" "index" "articles" "articles-assets" "css" "images" "assets" "legacy" "posts-rss"))))
    136 
    137 (provide 'publish)
    138 ;;; publish.el ends here