#+TITLE: Welcome!
#+DATE: 2019-07-04
#+KEYWORDS: programming
#+AUTHOR: Yann Esposito
#+EMAIL: yann.esposito@gmail.com
#+DESCRIPTION:
#+LANGUAGE: en
#+LANG: en
#+OPTIONS: H:5
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.
I know light is more usual, but I prefer to use a dark background as it will
tend to consume slightly less energy for some screen technologies.
With [[http://orgmode.org][org-mode]]
You can have a basic demo about most supported content styles/type (paragraphs,
lists, tables, etc...) [[file:./demo.org][here]].
* 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 org-blog-preamble (info)
"Pre-amble for whole blog."
(concat
"Her.esy.fun"
(when-let ((date (get-from-info info :date)))
(format " - %s" date))
""))
(defun menu ()
"Blog menu"
(concat
""
"Home"
"Posts"
""))
(defun get-from-info (info k)
(let ((i (car (plist-get info k))))
(when (and i (stringp i))
i)))
(defun org-blog-postamble (info)
"Post-amble for whole blog."
(concat ""
"
"
(menu)))
(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))
entry
(org-publish-find-title entry project))))
(defun org-blog-sitemap-function (title list)
"Return sitemap using TITLE and LIST returned by `org-blog-sitemap-format-entry'."
(concat "#+TITLE: " title "\n"
"#+AUTHOR: Yann Esposito\n"
"#+EMAIL: yann.esposito@gmail.com\n"
"\n#+begin_archive\n"
(mapconcat (lambda (li)
(format "@@html: