diff options
Diffstat (limited to 'fi/blog/index.org')
| -rw-r--r-- | fi/blog/index.org | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/fi/blog/index.org b/fi/blog/index.org index 62167c8..740897b 100644 --- a/fi/blog/index.org +++ b/fi/blog/index.org @@ -1,7 +1,7 @@ #+TITLE: Blogin sisällys -#+begin_src emacs-lisp :exports results - +#+name: code:index-utils +#+begin_src emacs-lisp :exports none (defun get-org-file-property (path property) "Gets PROPERTY of org file at PATH. Returns nil if not found." (with-temp-buffer (setq case-fold-search t) @@ -24,7 +24,12 @@ nil) (format-time-string "%Y-%m-%d" (file-attribute-modification-time - (file-attributes (concat "./" name)))))) + (file-attributes (concat "./" path)))))) +#+end_src + +#+begin_src emacs-lisp :exports results :noweb yes + + <<code:index-utils>> (defun generate-entry (name) @@ -54,12 +59,14 @@ (string-prefix-p "#" name) (string-prefix-p "." name) (string= "index.org" name)))) - (directory-files "./")))) + (sort (directory-files "./") + :key (lambda (f) (get-file-date f)) + :reverse t)))) (seq-map (lambda (name) `(,(generate-entry name))) files)) #+end_src #+RESULTS: -| [[./post.org][Test-post-title]] (2026-06-12) Test subtitle | -| [[./tekstinsyotto.html][tekstinsyotto]] (2025-07-28) Alaotsikkoa ei saatavilla | -| [[./yksinkertaisesti-monipuolinen.txt][yksinkertaisesti-monipuolinen]] (2024-05-06) Alaotsikkoa ei saatavilla | +| [[./sivujen-uudistus.org][Verkkosivujeni uudistus]] (2026-06-14) Mitä sivuilleni on tapahtunut ja miksi | +| [[./tekstinsyotto.html][tekstinsyotto]] (2025-07-28) Alaotsikkoa ei saatavilla | +| [[./yksinkertaisesti-monipuolinen.txt][yksinkertaisesti-monipuolinen]] (2024-05-06) Alaotsikkoa ei saatavilla | |
