(setq user-full-name "Stephane Adjemian") (setq user-mail-address "stepan@adjemian.eu") (set-language-environment "UTF-8") (require 'package) (setq package-enable-at-startup nil) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) (package-initialize) (use-package ox-publish :init (setq org-html-validation-link nil make-backup-files nil org-src-fontify-natively nil org-confirm-babel-evaluate nil org-src-tab-acts-natively t org-html-htmlize-output-type nil org-babel-python-command "python3") :config (org-add-link-type "color" (lambda (path) (message (concat "color " (progn (add-text-properties 0 (length path) (list 'face `((t (:foreground ,path)))) path) path)))) (lambda (path desc format) (cond ((eq format 'html) (format "%s" path desc)) ((eq format 'latex) (format "{\\color{%s}%s}" path desc))))) (org-babel-do-load-languages 'org-babel-load-languages '( (emacs-lisp . t) (org . t) (shell . t) (python . t) (gnuplot . t) (matlab . t) (R . t) )) (setq org-publish-project-alist '( ;; Content that should be processed. ("pages" :base-directory "./pages" :base-extension "org" :publishing-directory "./output" :recursive t :publishing-function org-html-publish-to-html :headline-levels 4 :section-numbers nil :html-head nil :html-head-include-default-style nil :html-head-include-scripts nil :html-preamble nil :html-postamble nil ) ("blog" :base-directory "./blog" :base-extension "org" :publishing-directory "./output/posts" :recursive t :publishing-function org-html-publish-to-html :headline-levels 4 :section-numbers nil :html-head nil :html-head-include-default-style nil :html-head-include-scripts nil :html-preamble "

%t



" :html-postamble "




" ) ;; For static files (untouched by emacs) ("static-pages" :base-directory "./pages" :base-extension "asc\\|css\\|scss\\|less\\|ttf\\|woff\\|woff2\\|eot\\|yml\\|json\\|js\\|png\\|ttf\\|jpg\\|gif\\|pdf\\|svg\\|tex\\|m\\|py\\|jl" :publishing-directory "./output" :recursive t :publishing-function org-publish-attachment ) ("static-blog" :base-directory "./blog" :base-extension "org\\|css\\|yml\\|json\\|js\\|png\\|jpg\\|gif\\|pdf\\|svg\\|tex\\|m\\|py\\|jl" :publishing-directory "./output/posts" :recursive t :publishing-function org-publish-attachment ) ;; Combine the two previous components in a single one ("site" :components ("pages" "blog" "static-pages" "static-blog")))) )