aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuchen Pei <hi@ypei.me>2022-04-14 21:19:57 +1000
committerYuchen Pei <hi@ypei.me>2022-04-14 21:19:57 +1000
commit35483ab1d59bf4da5d432e1a14716d25b2430a19 (patch)
tree19e72a5360d432b95bd4830aaef4d4fe3cb4bd91
parent87973ec8a51d55ecfd4131b56d16656fbd698f96 (diff)
minor update
-rw-r--r--microposts/boyer-moore.org4
-rw-r--r--posts/2018-12-02-lime-shapley.org6
-rw-r--r--publish.el30
3 files changed, 25 insertions, 15 deletions
diff --git a/microposts/boyer-moore.org b/microposts/boyer-moore.org
index 6298454..8c67b74 100644
--- a/microposts/boyer-moore.org
+++ b/microposts/boyer-moore.org
@@ -7,7 +7,7 @@ The
algorithm for finding the majority of a sequence of elements]] falls in
the category of "very clever algorithms".
-#+begin_example
+#+begin_src c++
int majorityElement(vector<int>& xs) {
int count = 0;
int maj = xs[0];
@@ -18,4 +18,4 @@ the category of "very clever algorithms".
}
return maj;
}
-#+end_example
+#+end_src
diff --git a/posts/2018-12-02-lime-shapley.org b/posts/2018-12-02-lime-shapley.org
index a7a8491..a0c09bc 100644
--- a/posts/2018-12-02-lime-shapley.org
+++ b/posts/2018-12-02-lime-shapley.org
@@ -7,7 +7,11 @@
# no Back-Cover Texts. You should have received a copy of the GNU
# Free Documentation License. If not, see <https://www.gnu.org/licenses/>.
-# This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
+# This work is licensed under the Creative Commons
+# Attribution-ShareAlike 4.0 International License. To view a copy of
+# this license, visit http://creativecommons.org/licenses/by-sa/4.0/
+# or send a letter to Creative Commons, PO Box 1866, Mountain View, CA
+# 94042, USA.
#+title: Shapley, LIME and SHAP
diff --git a/publish.el b/publish.el
index 4b7274c..e3aaa6f 100644
--- a/publish.el
+++ b/publish.el
@@ -19,6 +19,7 @@
(package-initialize)
(require 'ox-publish)
+(require 'htmlize)
(defvar this-date-format "%Y-%m-%d")
@@ -91,6 +92,8 @@ PUB-DIR is when the output will be placed."
(if (equal "../pages/microblog.org" (file-name-nondirectory filename))
(org-html-publish-to-html plist filename pub-dir)))
+(setq org-src-fontify-natively t)
+
(setq org-publish-project-alist
'(("posts"
:base-directory "posts"
@@ -113,6 +116,7 @@ PUB-DIR is when the output will be placed."
:html-postamble me/html-postamble
:html-mathjax-options ((path "/js/mathjax/MathJax.js?config=TeX-AMS_CHTML"))
:html-mathjax-template "<script type=\"text/javascript\" src=\"%PATH\"></script>"
+ :htmlized-source t
)
("microposts"
:base-directory "microposts"
@@ -132,6 +136,7 @@ PUB-DIR is when the output will be placed."
:html-postamble me/html-postamble
:html-mathjax-options ((path "/js/mathjax/MathJax.js?config=TeX-AMS_CHTML"))
:html-mathjax-template "<script type=\"text/javascript\" src=\"%PATH\"></script>"
+ :htmlized-source t
)
("pages"
:base-directory "pages"
@@ -152,21 +157,22 @@ PUB-DIR is when the output will be placed."
:html-prefer-user-labels t
:html-mathjax-options ((path "/js/mathjax/MathJax.js?config=TeX-AMS_CHTML"))
:html-mathjax-template "<script type=\"text/javascript\" src=\"%PATH\"></script>"
+ :htmlized-source t
)
("css"
- :base-directory "css"
- :base-extension "css"
- :publishing-directory "site/css"
- :publishing-function org-publish-attachment
- :recursive t
- )
+ :base-directory "css"
+ :base-extension "css"
+ :publishing-directory "site/css"
+ :publishing-function org-publish-attachment
+ :recursive t
+ )
("js"
- :base-directory "js"
- :base-extension "js"
- :publishing-directory "site/js"
- :publishing-function org-publish-attachment
- :recursive t
- )
+ :base-directory "js"
+ :base-extension "js"
+ :publishing-directory "site/js"
+ :publishing-function org-publish-attachment
+ :recursive t
+ )
("assets"
:base-directory "assets"
:base-extension any