diff options
author | Thomas Letan <lthms@soap.coffee> | 2020-02-23 23:18:16 +0100 |
---|---|---|
committer | Thomas Letan <lthms@soap.coffee> | 2020-02-23 23:18:16 +0100 |
commit | 89e27fc582b71966522be56103b117558de370c6 (patch) | |
tree | 97a290e69615e8b61cb1ecd88f0106bb153c0eac /site/cleopatra | |
parent | Reduce the size of the `alt' attribute of the header (diff) |
Reduce the length of long lines of code in cleopatra
Diffstat (limited to 'site/cleopatra')
-rw-r--r-- | site/cleopatra/Bootstrap.org | 5 | ||||
-rw-r--r-- | site/cleopatra/Contents/Org.org | 17 | ||||
-rw-r--r-- | site/cleopatra/Soupault.org | 9 |
3 files changed, 22 insertions, 9 deletions
diff --git a/site/cleopatra/Bootstrap.org b/site/cleopatra/Bootstrap.org index 9274fb4..9ffbe77 100644 --- a/site/cleopatra/Bootstrap.org +++ b/site/cleopatra/Bootstrap.org @@ -133,7 +133,8 @@ custom Emacs that you build yourself if you so desire. #+BEGIN_SRC makefile :tangle Makefile :noweb tangle EMACSBIN := emacs EMACS := ROOT="${ROOT}" ${EMACSBIN} -TANGLE := --batch --load="${ROOT}/scripts/tangle-org.el" 2>> build.log +TANGLE := --batch --load="${ROOT}/scripts/tangle-org.el" \ + 2>> build.log #+END_SRC ** Bootstrapping @@ -149,7 +150,7 @@ dependency. default: init-log build init-log: - @echo "==============[CLEOPATRA BUILD LOG]==============" \ + @echo "===========[CLEOPATRA BUILD LOG]===========" \ > build.log .PHONY: init-log default build diff --git a/site/cleopatra/Contents/Org.org b/site/cleopatra/Contents/Org.org index d46244f..722a57f 100644 --- a/site/cleopatra/Contents/Org.org +++ b/site/cleopatra/Contents/Org.org @@ -7,8 +7,9 @@ (setq user-emacs-directory (concat (getenv "ROOT") "/emacs.d")) (setq package-user-dir (concat (getenv "ROOT") "/emacs.d")) -(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/") - ("melpa" . "https://melpa.org/packages/"))) +(setq package-archives + '(("gnu" . "https://elpa.gnu.org/packages/") + ("melpa" . "https://melpa.org/packages/"))) (package-initialize) @@ -43,11 +44,14 @@ #+BEGIN_SRC emacs-lisp :tangle scripts/export-org.el (require 'packages) -(org-babel-do-load-languages 'org-babel-load-languages'((shell . t))) +(org-babel-do-load-languages + 'org-babel-load-languages + '((shell . t))) (setq org-src-preserve-indentation t) (setq org-src-fontify-natively t) (setq org-confirm-babel-evaluate nil) (setq org-export-with-toc nil) + (org-html-export-to-html nil nil nil t) #+END_SRC @@ -66,7 +70,8 @@ INIT := --batch --load="${ROOT}/scripts/packages.el" \ @${EMACS} ${INIT} @touch .emacs -%.html : %.org scripts/packages.el scripts/export-org.el .emacs org.mk +%.html : %.org scripts/packages.el scripts/export-org.el \ + .emacs org.mk @echo " export $*.org" @${EMACS} $< ${EXPORT} @@ -79,7 +84,9 @@ GENAUX += .emacs emacs.d/ display: inline margin-left: .2em -.section-number-2:after, .section-number-3:after, .section-number-4:after +.section-number-2:after, +.section-number-3:after, +.section-number-4:after content: ". " .org-src-container diff --git a/site/cleopatra/Soupault.org b/site/cleopatra/Soupault.org index d6330d7..047cbd5 100644 --- a/site/cleopatra/Soupault.org +++ b/site/cleopatra/Soupault.org @@ -121,6 +121,11 @@ prefix_urls(HTML.select(page, "script"), "src", prefix_url) ** Marking External Links #+BEGIN_SRC lua :tangle plugins/external-urls.lua +function mark(name) + return '<i class="url-mark fa fa-' .. name .. + '" aria-hidden="true"></i>' +end + links = HTML.select(page, "a") index, link = next(links) @@ -130,10 +135,10 @@ while index do if href then if Regex.match(href, "^https?://github.com") then - icon = HTML.parse("<i class=\"url-mark fa fa-github\" aria-hidden=\"true\"></i>") + icon = HTML.parse(mark('github')) HTML.append_child(link, icon) elseif Regex.match(href, "^https?://") then - icon = HTML.parse("<i class=\"url-mark fa fa-external-link\" aria-hidden=\"true\"></i>") + icon = HTML.parse(mark('external-link')) HTML.append_child(link, icon) end end |