#+TITLE: Welcome!
#+KEYWORDS: programming
#+AUTHOR: Yann Esposito
#+EMAIL: yann.esposito@gmail.com
#+DESCRIPTION:
#+LANGUAGE: en
#+LANG: en
#+OPTIONS: H:5
#+STARTUP: showeverything
This is a new take on my personal blog.
I tried to have some minimalism in mind but not too much.
True minimalism would have been to only serve text files.
But I would prefer to have at least links working. Also
syntax highlighting of source code is nice.
But I dislike the new trend of design space and white colors.
It doesn't really fit the spirit of my website.
So it looks a bit more like a text into a colored terminal.
The CSS support dark/light theme.
If unknown, the default color scheme is dark in the hope to save a bit of energy
from screen.
You can have a basic demo about most supported content styles/type (paragraphs,
lists, tables, etc...) [[file:./demo.org][here]].
I write all the content with [[http://orgmode.org][org-mode]].
* Code magic :noexport:
#+begin_src elisp :results none
(require 'org)
(require 'ox-publish)
(require 'ox-html)
(require 'org-element)
(require 'ox-rss)
(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))))
(defvar org-blog-head
(concat
""
""
""
""))
(defun menu (lst)
"Blog menu"
(concat
""
(mapconcat 'identity
(append
'("Home"
"Posts")
lst)
" | ")
""))
(defun str-time-to-year-float (date-str)
(/ (float-time
(apply 'encode-time
(mapcar (lambda (x) (if (null x) 0 x))
(parse-time-string date-str))))
(* 365.25 24 60 60)))
(defvar blog-creation-date "2019-07-01")
(defun y-date (date-str)
"Number of year since the begining of this blog"
(let ((y (- (str-time-to-year-float date-str)
(str-time-to-year-float blog-creation-date))))
(format "∆t=%.2f" y)))
(defun org-blog-preamble (info)
"Pre-amble for whole blog."
(concat
"