diff --git a/.project.el.gpg b/.project.el.gpg index 12d4779..e3fbbea 100644 Binary files a/.project.el.gpg and b/.project.el.gpg differ diff --git a/src/css/minimalist.css b/src/css/minimalist.css index 7ff5f2e..6dd4a33 100644 --- a/src/css/minimalist.css +++ b/src/css/minimalist.css @@ -465,29 +465,38 @@ blockquote:after, .main blockquote:after { } /* -------- */ /* org colors */ +.underline { + text-decoration: underline; +} .todo, .done, .main .todo, .main .done { - color: var(--todo-txt); + background-color: var(--reveal-background); + border: solid 1px; + height: 10px; + display: inline-block; + line-height: 12px; + font-weight: bold; + font-size: 10px; } .TODO, .main .TODO { - background-color: var(--red); + color: var(--red); } .IN_PROGRESS, .main .IN_PROGRESS { - background-color: var(--yellow); + color: var(--yellow); } .IN_REVIEW, .main .IN_REVIEW { - background-color: var(--cyan); + color: var(--cyan); } .HOLD, .main .HOLD { - background-color: var(--violet); + color: var(--violet); } .WAITING, .main .WAITING { - background-color: var(--violet); + color: var(--violet); } .DONE, .main .DONE { - background-color: var(--green); + color: var(--green); } .CANCELED, .main .CANCELED { - background-color: var(--magenta); + color: var(--magenta); } .notes, .main .notes { background-color: var(--reveal-background); diff --git a/src/demo.org b/src/demo.org index 2987777..cdc5dc3 100644 --- a/src/demo.org +++ b/src/demo.org @@ -26,6 +26,95 @@ paragraph. But if I use a double space There should be a forced newline. +* Lorem Ipsum + :PROPERTIES: + :CUSTOM_ID: lorem-ipsum + :END: + + #+begin_src http :pretty + GET https://jaspervdj.be/lorem-markdownum/markdown.txt + #+end_src + +** Deos illo sacrum perque victorem eurytus paterque + :PROPERTIES: + :CUSTOM_ID: deos-illo-sacrum-perque-victorem-eurytus-paterque + :END: + +*** Haec tela discedentem femina + :PROPERTIES: + :CUSTOM_ID: haec-tela-discedentem-femina + :END: + +Lorem markdownum invidiosa iactor! Fidem utque indeploratum pariter. + +#+BEGIN_SRC javascript + var port = tooltipPimThreading; + if (pinterest_net_koffice) { + format -= installer; + buffer = 4; + office_device(2, ssh + model); + } else { + website_controller_linux.gigabyte = clone; + } + fileProtocol = driverOcr; +#+END_SRC + +*** Duorum habuisse horrentia de noceat + :PROPERTIES: + :CUSTOM_ID: duorum-habuisse-horrentia-de-noceat + :END: + +Patriam vocalibus peraget robore recursus diruta ut ergo signa factis, +nigrum, attonitas, in Solis. Mugit [[http://news.ycombinator.com][non +carpe sed]] ceperunt dextra ausum; sanguine durior. Soror Cinyras illos +remugis; super quia somno nunc retemptat oracula cumque. Id Helicen +primum, proles turis nemus claudit molior naturalique deciperetur qua +sulcat et, ad volui. + +1. Tubas gener +2. Ad pacta +3. Vetantis ferrum pugnabant quoque +4. Diomede pallida boum membra + +Saepe /mihi/? Tum comae iurasse statione morsus vigilans, ergo. Ipse dum +sunt Hymettia: fecit cum et coactis, potae carmine lynca fertur +descenderat. + +*** Subitis de luce et poenas cum + :PROPERTIES: + :CUSTOM_ID: subitis-de-luce-et-poenas-cum + :END: + +Cladem adit ergo es tecto sit visa dryades vota quos, prima ligno ficta. +Ibat supplex, /est/ costis oblita, elisi regis captum Phoebi tandem +conchaeque! Aera et Aello genetrix. + +Et caelo adspexit, cornua et Iuppiter inmensae /abies/. Micabant Paeonas +meliora constitit, ut expers *artisque* adspicit fretum, vulnere +oppidaque, tenuit arma, haec velamine unda. Retinentia iudice, *quos +moras* comitata aliquid prospiciens cepit cum iustius sua cur truncis +ausus unde partibus marisque et grave. Fui opertis liquor laudatae di +erat, repellit conspectos manibus. + +Auresque longius res Fando es /nil nec ora/ vixque et tot pendens maius +in et meliora! Flentibus verba nostro agmenque: dedit est regis virque +post Talia telumque, sol *et lanient* perierunt timido. Fitque variare +truncas Phoebus agros, salictis tam pumice facti! Post et neque et +vidit, Lycaeo incautus, latratus terrae thalamique ulta. + +* Math + :PROPERTIES: + :CUSTOM_ID: math + :END: + + \(x^y / \log(x)\) + +\[ \prod_{i=0}^n \sum_{x_i\in E} \frac{1}{x_i} \] + +* Level 1 + :PROPERTIES: + :CUSTOM_ID: level-1 + :END: ** Level 2 :PROPERTIES: :CUSTOM_ID: level-2-85fc diff --git a/src/index.org b/src/index.org index d891b96..f13a805 100644 --- a/src/index.org +++ b/src/index.org @@ -16,16 +16,17 @@ So programming, functional programming in particular. That website was created with the following constraints in mind by order of priority: -1. /Respect Privacy/; no tracker of any sort (no ads, no google analytics, no +1. *Respect Privacy*; no tracker of any sort (no ads, no google analytics, no referrer for all external links, etc...) -2. /javascript free/; no js at all, yes even the theme changer -3. /disability friendly/; should be easy to read on a text browser so people +2. *javascript free*; no js at all, yes even the theme changer +3. *disability friendly*; should be easy to read on a text browser so people with disabilities could easily consume it -4. /nerdy/; should feel mostly like markdown text in a terminal and source code +4. *nerdy*; should feel mostly like markdown text in a terminal and source code should be syntax higlighted. -5. /org-mode friendly/; I should write my post in [[https://orgmode.org][org mode]] -6. /user friendly/; support your preferred light/dark theme by default but you +5. *org-mode friendly*; I should write my post in [[https://orgmode.org][org mode]] +6. *user friendly*; support your preferred light/dark theme by default but you can change it if you want. -7. /frugal/; try to minize the resources needed to visit my website; no +7. *rss*; you should be able to get informed when I add a new blog post. +8. *frugal*; try to minize the resources needed to visit my website; no javascript, no webfont, not too much CSS magic, not much images or really compressed one. diff --git a/src/posts/2019-07-04-static-org-publish.org b/src/posts/2019-07-04-static-org-publish.org index cf33167..746eb59 100644 --- a/src/posts/2019-07-04-static-org-publish.org +++ b/src/posts/2019-07-04-static-org-publish.org @@ -4,7 +4,12 @@ #+EMAIL: yann@esposito.host #+DATE: [2019-07-27] #+KEYWORDS: programming, blog, org-mode, meta -#+OPTIONS: auto-id:t +#+OPTIONS: auto-id:t toc:t + +* Introduction + :PROPERTIES: + :CUSTOM_ID: introduction + :END: #+begin_quote /tl;dr/: [[#full-solution][Go to the full solution]] for the impatients. @@ -81,6 +86,17 @@ See [[file:project-el/index.org][my other post about it]]. :END: #+begin_src elisp +(setq domainname "https://her.esy.fun") +(setq base-dir (concat (projectile-project-root) "src")) +(setq publish-dir (concat (projectile-project-root) "_site")) +(setq assets-dir (concat base-dir "/")) +(setq publish-assets-dir (concat publish-dir "/")) +(setq rss-dir base-dir) +(setq rss-title "Subscribe to articles") +(setq publish-rss-dir publish-dir) +(setq css-path "/css/minimalist.css") +(setq author-name "Yann Esposito") +(setq author-email "yann@esposito.host") (require 'org) (require 'ox-publish) @@ -89,16 +105,8 @@ See [[file:project-el/index.org][my other post about it]]. (require 'ox-rss) (setq org-link-file-path-type 'relative) - -(defun org-blog-prepare (project-plist) - "With help from `https://github.com/howardabrams/dot-files'. -Touch `index.org' to rebuilt it. -Argument `PROJECT-PLIST' contains information about the current project." - (let* ((base-directory (plist-get project-plist :base-directory)) - (buffer (find-file-noselect (expand-file-name "index.org" base-directory) t))) - (with-current-buffer buffer - (set-buffer-modified-p t) - (save-buffer 0)))) +(setq org-publish-timestamp-directory + (concat (projectile-project-root) "_cache/")) (defvar org-blog-head (concat @@ -136,6 +144,11 @@ Argument `PROJECT-PLIST' contains information about the current project." (str-time-to-year-float blog-creation-date)))) (format "∆t=%.2f" y))) +(defun get-from-info (info k) + (let ((i (car (plist-get info k)))) + (when (and i (stringp i)) + i))) + (defun org-blog-preamble (info) "Pre-amble for whole blog." (concat @@ -144,17 +157,15 @@ Argument `PROJECT-PLIST' contains information about the current project." "

" (format "%s" (car (plist-get info :title))) "

" - (when-let ((date (get-from-info info :date))) - (format "%s" date)) + (when-let ((date (plist-get info :date))) + (format "%s" + (format-time-string "%Y-%m-%d" + (org-timestamp-to-time + (car date))))) (when-let ((subtitle (car (plist-get info :subtitle)))) (format "

%s

" subtitle)) "")) -(defun get-from-info (info k) - (let ((i (car (plist-get info k)))) - (when (and i (stringp i)) - i))) - (defun rand-obfs (c) (let ((r (% (random) 20))) (cond ;; ((eq 0 r) (format "%c" c)) @@ -206,9 +217,11 @@ Argument `PROJECT-PLIST' contains information about the current project." (defun org-blog-sitemap-format-entry (entry _style project) "Return string for each ENTRY in PROJECT." (when (s-starts-with-p "posts/" entry) - (format "@@html:@@ %s: @@html:@@ [[file:%s][%s]] @@html:@@" - (format-time-string "%Y-%m-%d" - (org-publish-find-date entry project)) + (format (concat "@@html:" + "@@ %s: @@html:@@" + " [[file:%s][%s]]" + " @@html:@@") + (format-time-string "%Y-%m-%d" (org-publish-find-date entry project)) entry (org-publish-find-title entry project)))) @@ -233,11 +246,16 @@ Argument `PROJECT-PLIST' contains information about the current project." (insert (mapconcat 'identity '("" "" + "" + "" "
" "
" - "" + "Change theme: " + "" + "()" " / " - "" + "" + "()" "
" "
" "
") @@ -257,7 +275,6 @@ Argument `PROJECT-PLIST' contains information about the current project." :publishing-directory ,publish-dir :recursive t - :preparation-function org-blog-prepare :publishing-function org-blog-publish-to-html :with-toc nil