source: .emacs@ 54096f7

Last change on this file since 54096f7 was 54096f7, checked in by Mikhail Kirillov <w96k@…>, on Jan 23, 2020 at 9:06:23 PM

Add pdf cv; Add english cv; Update home;

  • Property mode set to 100644
File size: 4.4 KB
Line 
1;;; Emacs configuration for building a project
2
3(require 'org)
4(require 'ox-publish)
5(require 'ox-latex)
6(require 's)
7(require 'simple-httpd)
8
9(setq current-folder (file-truename "./"))
10
11;; Use in:<invidio-id> syntax to include embed invidio video
12(defvar in-iframe-format
13 ;; You may want to change your width and height.
14 (concat "<iframe id=\"ivplayer\" type=\"text/html\""
15 "src=\"https://www.invidio.us/embed/%s\""
16 " frameborder=\"0\""
17 " allowfullscreen>%s</iframe>"))
18
19(org-add-link-type
20 "in"
21 (lambda (handle)
22 (browse-url
23 (concat "https://www.invidio.us/embed/"
24 handle)))
25 (lambda (path desc backend)
26 (cl-case backend
27 (html (format in-iframe-format
28 path (or desc "")))
29 (latex (format "\href{%s}{%s}"
30 path (or desc "video"))))))
31
32(setq org-publish-project-alist
33 `(("blog"
34 :components ("blog-content" "blog-styles")
35 :base-directory current-folder)
36 ("blog-styles"
37 :base-directory ,(concat current-folder "public")
38 :base-extension "jpg\\|gif\\|png\\|ico\\|css\\|txt\\|pdf"
39 :publishing-directory ,(concat current-folder "dist/public")
40 :recursive t
41 :publishing-function org-publish-attachment
42 )
43 ("blog-content"
44 :base-directory ,(concat current-folder "content")
45 :publishing-directory ,(concat current-folder "dist")
46 :recursive t
47 :publishing-function org-html-publish-to-html
48
49 :html-doctype "xhtml5"
50
51 :with-title nil
52 :with-author t
53 :with-creator nil
54 :with-date t
55 :with-email t
56 :with-footnotes t
57 :html-html5-fancy t
58 :html-preamble "
59<header class=\"navbar\">
60<a href=\"/\" class=\"logo\">@w96k</a>
61<a class=\"button\" href=\"/about.html\">Обо мне</a>
62<a class=\"button\" href=\"/cv.html\">CV</a>
63</header>"
64
65 :html-head "
66<link rel=\"shortcut icon\" href=\"/public/favicon.png\">
67<link rel=\"stylesheet\" href=\"/public/css/mini.css\" type=\"text/css\"/>
68<link rel=\"stylesheet\" href=\"/public/css/custom.css\" type=\"text/css\"/>
69"
70
71 :html-container "article"
72 :html-postamble "
73 <div class=\"row\">
74 <div class=\"col-sm-12 col-md-4\">
75 <p class=\"licenses\">
76 <a href=\"https://creativecommons.org/licenses/by/4.0/\">
77 <img alt=\"Лицензия Creative Commons\" src=\"/public/images/cc.png\" />
78</a>
79 <a href=\"https://www.gnu.org/licenses/gpl-3.0.txt\">
80 <img src=\"/public/images/gpl.png\">
81 </a>
82 </p>
83 </div>
84
85 <div id=\"copyright\" class=\"col-sm-12 col-md-4\">
86 <p>© 2019-2020 <i>Mikhail Kirillov</i></p>
87 <p>
88 Сайт работает в <a href=\"https://anybrowser.org/campaign/\">любом браузере</a>
89 </p>
90 </div>
91
92 <div class=\"col-sm-12 col-md-4\" id=\"meta\">
93 <p><span class=\"icon-settings\"></span> %c</p>
94 <p><span class=\"icon-calendar\"></span> %C</p>
95 </div>
96 </div>
97
98 <br>
99 <div align=\"center\">
100 <small>
101 <p>Содержимое доступно по лицензии
102 <a href=\"https://creativecommons.org/licenses/by-sa/4.0/deed.ru\">
103 Creative Commons «Attribution-ShareAlike» («Атрибуция — На тех же условиях») 4.0 Всемирная (CC BY-SA 4.0)
104 </a>
105 </p>
106 <p>Исходный код доступен по лицензии GNU General Public License Version 3</p>
107 <p><a href=\"/legal.html\">Подробнее о правах</a></p>
108 </small>
109 </div>"
110
111 :section-numbers nil
112 :with-sub-superscript nil
113
114 ;; sitemap - list of blog articles
115 :auto-sitemap t
116 :sitemap-filename "sitemap.org"
117 :sitemap-title "@w96k"
118 :sitemap-sort-files anti-chronologically)))
119
120;; Don't ask for block evaluation
121(setq org-confirm-babel-evaluate nil)
122
123;; Set output folder
124(setq httpd-root (concat current-folder "/dist/"))
125
126;; Fix image width
127(setq org-image-actual-width nil)
128
129;; PDF output settings
130(setq org-latex-listings 'minted)
131(setq org-latex-tables-centered nil)
132(add-to-list 'org-latex-packages-alist '("russian" "babel"))
133(add-to-list 'org-latex-packages-alist '("" "minted"))
134(add-to-list 'org-latex-packages-alist '("" "nopageno"))
135(add-to-list 'org-latex-packages-alist '("utf8x" "inputenc"))
136(add-to-list 'org-latex-packages-alist '("a4paper, margin=0.75in" "geometry"))
137
Note: See TracBrowser for help on using the repository browser.