;;; Emacs configuration for building a project (require 'org) (require 'ox-publish) (require 'ox-latex) ;; (require 'org-webring) (require 's) (require 'simple-httpd) (setq org-html-head-include-default-style nil) (setq current-folder (file-truename "./")) (defvar youtube-iframe-format ;; You may want to change your width and height. (concat "")) (defvar local-video-format ;; You may want to change your width and height. (concat "")) (org-add-link-type "youtube" (lambda (handle) (browse-url (concat "https://invidiou.site/embed/" handle))) (lambda (path desc backend) (cl-case backend (html (format youtube-iframe-format path (or desc ""))) (latex (format "\href{%s}{%s}" path (or desc "video")))))) (org-add-link-type "video" (lambda (handle) (browse-url (concat "/" handle))) (lambda (path desc backend) (cl-case backend (html (format local-video-format path (or desc ""))) (latex (format "\href{%s}{%s}" path (or desc "video")))))) (setq org-publish-project-alist `(("blog" :components ("blog-content" "blog-styles") :base-directory current-folder) ("blog-styles" :base-directory ,(concat current-folder "public") :base-extension "jpg\\|webp\\|gif\\|svg\\|png\\|ico\\|css\\|txt\\|pdf\\|webm\\|mp4\\|mp3\\|flac\\|mov\\|html" :publishing-directory ,(concat current-folder "dist/public") :recursive t :publishing-function org-publish-attachment ) ("blog-content" :base-directory ,(concat current-folder "content") :publishing-directory ,(concat current-folder "dist") :recursive t :publishing-function org-html-publish-to-html :html-doctype "html5" :exclude ".*/logsec/.*" :with-title nil :with-author t :with-creator nil :with-date t :with-email t :with-footnotes t :html-preamble "
~w96k About Articles Donations
" :html-head " " :html-container "article" :html-postamble "

No rights reserved

%C

" :section-numbers nil :with-sub-superscript nil ;; sitemap - list of blog articles :auto-sitemap t :sitemap-filename "sitemap.org" :sitemap-title "@w96k" :sitemap-sort-files chronologically))) ;; Don't ask for block evaluation (setq org-confirm-babel-evaluate nil) ;; Set output folder (setq httpd-root (concat current-folder "/dist/")) ;; Fix image width (setq org-image-actual-width nil) ;; PDF output settings (setq org-latex-listings 'minted) (setq org-latex-tables-centered nil) (add-to-list 'org-latex-packages-alist '("russian" "babel")) (add-to-list 'org-latex-packages-alist '("" "minted")) (add-to-list 'org-latex-packages-alist '("" "nopageno")) (add-to-list 'org-latex-packages-alist '("utf8x" "inputenc")) (add-to-list 'org-latex-packages-alist '("a4paper, margin=0.75in" "geometry")) (setq org-src-fontify-natively t)