From 367de29ccdf1e905291bb48132d522921ff1d4e8 Mon Sep 17 00:00:00 2001 From: "Yann Esposito (Yogsototh)" Date: Sat, 2 May 2020 15:30:40 +0200 Subject: [PATCH] Add descriptions. --- project.el | 29 ++++-------------- project.el.sig | Bin 586 -> 586 bytes src/demo.org | 2 +- src/index.org | 1 - src/posts/0006-modern-irc/index.org | 6 ++-- .../index.org | 2 +- src/posts/0008-further-blog-changes/index.org | 2 +- src/posts/0009-optim-nojs-website/index.org | 3 +- src/posts/0010-Haskell-Now/index.org | 12 +++++--- src/posts/0011-export-tangle-names/index.org | 2 +- src/posts/0012-solaryzed-theme/index.org | 2 +- src/slides.org | 1 - 12 files changed, 22 insertions(+), 40 deletions(-) diff --git a/project.el b/project.el index da9e7e8..6bc861f 100644 --- a/project.el +++ b/project.el @@ -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 "
" + "" "" "" "" "" "" "" + "" "
")) (defun relative-link (output-file) @@ -204,43 +205,25 @@ (menu '("↑ Top ↑")) "")) -(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:%s@@: " artdate) (format " *[[file:%s][%s]]*" file title) - (format " @@html:
@@%s@@html:
@@" description) + (format " @@html:
%s
@@" description) (format " @@html:
@@ ") - ;; (keywords-to-html keywords) " @@html:
@@\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-") diff --git a/project.el.sig b/project.el.sig index 560983c0e48e9a5c00e4c9c50a17915611b6b258..5fd442ff3cbbf895ea249db0abcdf1a3fed289f7 100644 GIT binary patch delta 533 zcmV+w0_y$B1j+=EBm#BzktQI2wxkdLaKf8;SN%3D{T#tL9);G-hz4N=Y-JfVm-hzZtJCFkRb=8_+qf`mvk(%vj+U$ zWzjySD_nVxoRh)Q?gBS3)O1qw%SW{sY=tJieGmK02iJtFnFVKVGbVD|pgFz{+4O><1q0doUd#JYh8JUfKV2*$VgHCjjpH7*n-Wt#iQtrm1;v zKyq1sK)3I;i0*D$q#{9o5K{)a{ER8r= zo!VrT7>pOX4zY7lg*TZI*4aU0FT8Ws3oyt}SMe}{=UO1sZ^@LoZ$7DR8g`ye%CQt) zA+txG8dyj0t<{pY~7s3)D)c7OP^aV XuraTk5(AAOB<}49-f8aJW-i=fTQ#We zdLEV1y4@zUMRn!3aKFSv()uY3`ks*Z^(kW-c3I=DHtn}H(STOLX(7#4*Zz@X9su(b zqZPOAc-CTzJdv5`Uy+%4i_0=nFVX>G{$F|#WGK@^=0|23YLu<&rG))|)XmAx1yrcX zZiTf9e(3P)KQeBSRpwg3pu9!;WhCjHABT$CaN{8Omk0j=X_h2>fF8PV-IAV~57DCG zs6UYCA9obO7QAz*=&35%T|D1*7z9lFNUXq&2dPua@hH1 z(^9i0s5A48ILH3qhhidsGSfWP#`nPTsAqGPL~itJ`hBnOxXag=DAp5QoQqoSfvqQ& zPxro0Glc}U%;nMlUbUM|?+tL%5H@=VRe>~@t)Sc#pqEDdzS)%cNEYi$RH}9_JYCfF z%Fz&RwDP6qsqiGE8;mkI8s4f{5gOvexFhcmMBlhNt(o~Hb6SFb34|5+H(gE^5*Nmj z@tmKoCC3|5qq*nPP_%|wiLp;7w-2#uF??im+0 diff --git a/src/demo.org b/src/demo.org index 623df21..fd73bea 100644 --- a/src/demo.org +++ b/src/demo.org @@ -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 diff --git a/src/index.org b/src/index.org index a954870..846512d 100644 --- a/src/index.org +++ b/src/index.org @@ -2,7 +2,6 @@ #+KEYWORDS: programming #+AUTHOR: Yann Esposito #+EMAIL: yann@esposito.host -#+DESCRIPTION: #+LANGUAGE: en #+LANG: en #+OPTIONS: H:5 diff --git a/src/posts/0006-modern-irc/index.org b/src/posts/0006-modern-irc/index.org index 7687387..1be8a87 100644 --- a/src/posts/0006-modern-irc/index.org +++ b/src/posts/0006-modern-irc/index.org @@ -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) diff --git a/src/posts/0007-switch-iterm-profile-catalina/index.org b/src/posts/0007-switch-iterm-profile-catalina/index.org index 045e6be..c8f589b 100644 --- a/src/posts/0007-switch-iterm-profile-catalina/index.org +++ b/src/posts/0007-switch-iterm-profile-catalina/index.org @@ -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 diff --git a/src/posts/0008-further-blog-changes/index.org b/src/posts/0008-further-blog-changes/index.org index 7138efc..658f434 100644 --- a/src/posts/0008-further-blog-changes/index.org +++ b/src/posts/0008-further-blog-changes/index.org @@ -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 diff --git a/src/posts/0009-optim-nojs-website/index.org b/src/posts/0009-optim-nojs-website/index.org index 2de782b..5bfd068 100644 --- a/src/posts/0009-optim-nojs-website/index.org +++ b/src/posts/0009-optim-nojs-website/index.org @@ -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 diff --git a/src/posts/0010-Haskell-Now/index.org b/src/posts/0010-Haskell-Now/index.org index 5d82863..910d35a 100644 --- a/src/posts/0010-Haskell-Now/index.org +++ b/src/posts/0010-Haskell-Now/index.org @@ -4,11 +4,13 @@ #+author: Yann Esposito #+EMAIL: yann@esposito.host #+keywords: Haskell, programming, functional, tutorial -#+DESCRIPTION: A short and intense introduction to Haskell.
-#+DESCRIPTION:
-#+DESCRIPTION: This is an update of my old (2012) article.
-#+DESCRIPTION: A lot of things have changed since then.
-#+DESCRIPTION: I took the time to read it again.
+#+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 diff --git a/src/posts/0011-export-tangle-names/index.org b/src/posts/0011-export-tangle-names/index.org index 1f5f150..6521f94 100644 --- a/src/posts/0011-export-tangle-names/index.org +++ b/src/posts/0011-export-tangle-names/index.org @@ -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 diff --git a/src/posts/0012-solaryzed-theme/index.org b/src/posts/0012-solaryzed-theme/index.org index 37726b4..acfe53c 100644 --- a/src/posts/0012-solaryzed-theme/index.org +++ b/src/posts/0012-solaryzed-theme/index.org @@ -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 diff --git a/src/slides.org b/src/slides.org index 26a8d97..47d4b10 100644 --- a/src/slides.org +++ b/src/slides.org @@ -2,7 +2,6 @@ #+KEYWORDS: programming, presentations, slides #+AUTHOR: Yann Esposito #+EMAIL: yann@esposito.host -#+DESCRIPTION: #+LANGUAGE: en #+LANG: en #+OPTIONS: H:5