Add descriptions.

This commit is contained in:
Yann Esposito (Yogsototh) 2020-05-02 15:30:40 +02:00
parent ae8c3a1954
commit 367de29ccd
Signed by untrusted user who does not match committer: yogsototh
GPG Key ID: 7B19A4C650D59646
12 changed files with 22 additions and 40 deletions

View File

@ -10,7 +10,6 @@
(defvar draft-publish-assets-dir (concat draft-publish-dir "/"))
(defvar posts-dir (concat base-dir "/posts"))
(defvar rss-title "Subscribe to articles")
(defvar posts-descr "Articles")
(defvar css-path "/css/mk.css")
(defvar author-name "Yann Esposito")
(defvar author-email "yann@esposito.host")
@ -57,12 +56,14 @@
(defun logo ()
(concat
"<div id=\"logo\">"
"<a href=\"/\">"
"<svg width=\"5em\" viewBox=\"0 0 64 64\">"
"<circle cx=\"32\" cy=\"32\" r=\"30\" stroke=\"var(--b2)\" stroke-width=\"2\" fill=\"var(--b03)\"/>"
"<circle cx=\"32\" cy=\"32\" r=\"12\" stroke=\"var(--r)\" stroke-width=\"2\" fill=\"var(--o)\"/>"
"<circle cx=\"32\" cy=\"32\" r=\"6\" stroke-width=\"0\" fill=\"var(--y)\"/>"
"<ellipse cx=\"32\" cy=\"14\" rx=\"14\" ry=\"8\" stroke-width=\"0\" fill=\"var(--b3)\"/>"
"</svg>"
"</a>"
"</div>"))
(defun relative-link (output-file)
@ -204,43 +205,25 @@
(menu '("<a href=\"#preamble\">↑ Top ↑</a>"))
"</div>"))
(defun y/org-get-keywords ()
(org-element-map (org-element-parse-buffer 'element) 'keyword
(lambda (keyword) (cons (org-element-property :key keyword)
(org-element-property :value keyword)))))
(defun y/org-get-meta (keyword)
(cdr (assoc keyword (y/org-get-keywords))))
(defun y/get-meta (file meta-name)
"Return the value of the meta of an org-mode file.
(y/get-meta file \"DESCRIPTION\")
"
(org-babel-with-temp-filebuffer file (y/org-get-meta meta-name)))
(defun date-format-entry (entry _style project)
"Return string for each ENTRY in PROJECT."
(when (string-match "posts/.*" entry)
(let* ((file (org-publish--expand-file-name entry project))
(title (org-publish-find-title entry project))
(artdate (format-time-string "%Y-%m-%d" (org-publish-find-date entry project)))
;; (keywords (y/get-meta file "KEYWORDS"))
(description (y/get-meta file "DESCRIPTION")))
(description (org-publish-find-property entry :description project 'html)))
(concat
(format " @@html:<span class=\"metas\">%s</span>@@: " artdate)
(format " *[[file:%s][%s]]*" file title)
(format " @@html:<div class=\"description\">@@%s@@html:</div>@@" description)
(format " @@html:<div class=\"description\">%s</div>@@" description)
(format " @@html:<div class=\"metas\">@@ ")
;; (keywords-to-html keywords)
" @@html:</div>@@\n"))))
(defun org-blog-sitemap-fn-descr (descr title list)
(defun org-blog-sitemap-fn-descr (_descr title list)
"Return sitemap using TITLE and LIST returned by `org-blog-sitemap-format-entry'."
(concat "#+TITLE: " title "\n"
"#+AUTHOR: " author-name "\n"
"#+EMAIL: " author-email "\n"
"#+DESCRIPTION: " descr "\n"
(concat "@@html:" (menu '()) "@@")
"\n\n"
(mapconcat (lambda (li) (format "%s" (car li)))
@ -297,7 +280,7 @@ Return output file name."
(t (copy-file filename dst-file t))))))
(defalias 'org-blog-posts-sitemap-fn
(apply-partially 'org-blog-sitemap-fn-descr posts-descr))
(apply-partially 'org-blog-sitemap-fn-descr ""))
(setq org-html-htmlize-output-type 'css)
(setq org-html-htmlize-font-prefix "org-")

Binary file not shown.

View File

@ -1,7 +1,7 @@
#+TITLE: This is the title
#+AUTHOR: Yann Esposito
#+EMAIL: yann@esposito.host
#+KEYWORDS: programming
#+KEYWORDS: programming demo
#+DESCRIPTION: css demonstration
#+OPTIONS: H:5
#+OPTIONS: auto-id:t toc:t

View File

@ -2,7 +2,6 @@
#+KEYWORDS: programming
#+AUTHOR: Yann Esposito
#+EMAIL: yann@esposito.host
#+DESCRIPTION:
#+LANGUAGE: en
#+LANG: en
#+OPTIONS: H:5

View File

@ -4,14 +4,12 @@
#+EMAIL: yann@esposito.host
#+DATE: [2019-10-19 Sat]
#+KEYWORDS: self-hosting, chat, irc
#+DESCRIPTION: How to modernize IRC
#+DESCRIPTION: Why and how to have modern and respectful chat system with IRC.
#+OPTIONS: auto-id:t toc:t
#+begin_notes
tl;dr: Why and how to have modern and respectful chat system with IRC.
After reviewing and testing many different chat solutions the clear winner
is IRC. More precisely via those softwares:
(at least for my taste) is IRC. More precisely via those softwares:
- IRC
- ZNC (with playback and palaver module)
- weechat with replay script (terminal client)

View File

@ -3,7 +3,7 @@
#+EMAIL: yann@esposito.host
#+DATE: [2019-11-10 Sun]
#+KEYWORDS: self-hosting, chat, irc
#+DESCRIPTION: Small script to change the profile of iTerm in sync with macOS preferences
#+DESCRIPTION: Change the profile of iTerm in sync with macOS preferences.
#+OPTIONS: auto-id:t toc:nil
#+begin_notes

View File

@ -3,7 +3,7 @@
#+EMAIL: yann@esposito.host
#+DATE: [2019-11-30 Sat]
#+KEYWORDS: blog
#+DESCRIPTION: Recent changes on my blog system
#+DESCRIPTION: About recent changes on my blog system.
#+OPTIONS: auto-id:t toc:nil
When I started this new blog, I wanted to find something minimal to be able

View File

@ -3,7 +3,8 @@
#+EMAIL: yann@esposito.host
#+DATE: [2019-12-06 Fri]
#+KEYWORDS: blog, shell, script
#+DESCRIPTION: How to optimize the size of a full website by using information in both HTML and CSS.
#+DESCRIPTION: Optimize the size of a full static website by taking advantage
#+DESCRIPTION: of information found in both HTML and CSS.
#+OPTIONS: auto-id:t toc:nil
One of the major problem with CSS and HTML is that they are highly

View File

@ -4,11 +4,13 @@
#+author: Yann Esposito
#+EMAIL: yann@esposito.host
#+keywords: Haskell, programming, functional, tutorial
#+DESCRIPTION: A short and intense introduction to Haskell.<br/>
#+DESCRIPTION: <br/>
#+DESCRIPTION: This is an update of my old (2012) article.<br/>
#+DESCRIPTION: A lot of things have changed since then.<br/>
#+DESCRIPTION: I took the time to read it again.<br/>
#+DESCRIPTION: A short and intense introduction to Haskell.
#+DESCRIPTION: This is an update of my old (2012) article.
#+DESCRIPTION: A lot of things have changed since then.
#+DESCRIPTION: Mostly I changed my approach about the easiest way to install
#+DESCRIPTION: a Haskell playground.
#+DESCRIPTION: I removed the not as important part, and added a short
#+DESCRIPTION: introduction about starting a new project.
#+OPTIONS: auto-id:t toc:t
#+STARTUP: overview

View File

@ -3,7 +3,7 @@
#+author: Yann Esposito
#+EMAIL: yann@esposito.host
#+keywords: org-mode, blog
#+DESCRIPTION: add links to code block during orgmode export
#+DESCRIPTION: Add links to code block during orgmode export.
#+OPTIONS: auto-id:t toc:t
#+STARTUP: overview

View File

@ -4,7 +4,7 @@
#+EMAIL: yann@esposito.host
#+keywords: colorscheme
#+DESCRIPTION: A generalization of solarized (https://solaryzed.esy.fun).
#+DESCRIPTION: I tried to make keep the same fundamentals and to free some variables.
#+DESCRIPTION: I tried to keep the same fundamentals and to free some variables.
#+OPTIONS: auto-id:t toc:t
#+STARTUP: overview

View File

@ -2,7 +2,6 @@
#+KEYWORDS: programming, presentations, slides
#+AUTHOR: Yann Esposito
#+EMAIL: yann@esposito.host
#+DESCRIPTION:
#+LANGUAGE: en
#+LANG: en
#+OPTIONS: H:5