From 94a78d90d79c639c11f2cec0480125658742b186 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Sun, 21 May 2023 16:17:45 +0200 Subject: [PATCH] Started working on manual syntax highlighting --- el/pub.el | 21 ++++++++++++++++++++- res/base.css | 13 +++++++++++++ src/config.org | 4 +--- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/el/pub.el b/el/pub.el index 8cb924d..e20e134 100644 --- a/el/pub.el +++ b/el/pub.el @@ -1,4 +1,23 @@ (require 'ox-publish) + +(setq package-list '(htmlize)) +(package-initialize) +; fetch the list of packages available +(unless package-archive-contents + (package-refresh-contents)) + +; install the missing packages +(dolist (package package-list) + (unless (package-installed-p package) + (package-install package))) + +(require 'htmlize) +(setq org-src-fontify-natively t) +(setq org-html-htmlize-output-type 'css-inline) +(setq org-src-preserve-indentation t) +(setq org-html-html5-fancy t) +(setq rainbow-delimiters-mode t) + ;; function run before the website is generated (defun before (n)) ;; function run after website has been generated @@ -20,7 +39,7 @@ ;; bundle the assets ("res" :base-directory "./res" - :base-extension "css\\|js\\|png\\|jpg" + :base-extension "css\\|js\\|png\\|jpg\\|ttf" :publishing-directory "./build/res" :recursive t :publishing-function org-publish-attachment diff --git a/res/base.css b/res/base.css index a36916f..bc8230e 100644 --- a/res/base.css +++ b/res/base.css @@ -47,6 +47,19 @@ body { align-self: center; width: 100% } +blockquote { + opacity: 0.9; + position: relative; +} +blockquote::before { + content: ''; + height: 100%; + width: 0.2rem; + background: var(--color-text); + position: absolute; + margin-left: -1rem; + border-radius: 8px; +} h1 { color: var(--color-headline); } diff --git a/src/config.org b/src/config.org index e8be2af..33d4dc9 100644 --- a/src/config.org +++ b/src/config.org @@ -1,5 +1,5 @@ #+options: html-link-use-abs-url:nil html-postamble:t html-preamble:t -#+options: html-scripts:nil html-style:t html5-fancy:t tex:t +#+options: html-scripts:t html-style:t html5-fancy:t tex:t #+html_doctype: html5 #+html_container: div #+html_content_class: content @@ -10,5 +10,3 @@ #+CREATOR: All content is licensed under CC BY-SA 4.0 unless stated otherwise #+html_link_home: / #+html_link_up: .. -#+bind: org-publish-project-alist ~/Projects/@lisp/pages -#+bind: org-export-publishing-directory "./build" -- 2.38.5