mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-01 04:26:47 +01:00
- [script] removed file extension from link names.
This commit is contained in:
parent
7cd0b5740b
commit
d73bf1eb18
@ -330,21 +330,25 @@
|
||||
(values posts all-topics)))
|
||||
|
||||
(defun write-links (posts stream)
|
||||
(loop for post in posts do
|
||||
(let* ((filename (strip-dirs-from-path (archive-file-path post)))
|
||||
(relative-archive-path (strcat *uri-path-prefix*
|
||||
(cat-parent-dir +archive-dir+
|
||||
(percent-encode filename))))
|
||||
(link-text (strcat (format-date-to-string (post-date post))
|
||||
" "
|
||||
(cl-ppcre:regex-replace-all "-"
|
||||
filename
|
||||
" ")))
|
||||
(link (geminize-link (format nil
|
||||
" ~a ~a~%"
|
||||
relative-archive-path
|
||||
link-text))))
|
||||
(write-sequence link stream))))
|
||||
(flet ((clean-link-filename (filename)
|
||||
(cl-ppcre:regex-replace "\\.gmi$"
|
||||
(cl-ppcre:regex-replace-all "-"
|
||||
filename
|
||||
" ")
|
||||
"")))
|
||||
(loop for post in posts do
|
||||
(let* ((filename (strip-dirs-from-path (archive-file-path post)))
|
||||
(relative-archive-path (strcat *uri-path-prefix*
|
||||
(cat-parent-dir +archive-dir+
|
||||
(percent-encode filename))))
|
||||
(link-text (strcat (format-date-to-string (post-date post))
|
||||
" "
|
||||
(clean-link-filename filename)))
|
||||
(link (geminize-link (format nil
|
||||
" ~a ~a~%"
|
||||
relative-archive-path
|
||||
link-text))))
|
||||
(write-sequence link stream)))))
|
||||
|
||||
(defun make-gemlog-index (all-posts output-directory)
|
||||
(let ((gemlog-index-path (cat-parent-dir output-directory +archive-gemlog-file+)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user