adding md -> org wrapper

This commit is contained in:
2026-02-22 22:43:11 +00:00
parent 07b5987213
commit 56b9342fd2
14 changed files with 138 additions and 31 deletions

View File

@@ -4,8 +4,8 @@
See the categories: @@html:<a href="../home/categories.html">Categories</a>@@ See the categories: @@html:<a href="../home/categories.html">Categories</a>@@
* Blogs: * Blogs:
- [[file:2026/2026-list.org][2026 List]] @@html:<span class="post-date">22-02-2026 18:51</span>@@ - [[file:2026/2026-list.org][2026 List]] @@html:<span class="post-date">22-02-2026 22:37</span>@@
- [[file:2025/2025-list.org][2025 List]] @@html:<span class="post-date">22-02-2026 18:51</span>@@ - [[file:2025/2025-list.org][2025 List]] @@html:<span class="post-date">22-02-2026 22:37</span>@@
- [[file:2025/2025-list.sync-conflict-20260222-170216-VT6366A.org][2025 List]] @@html:<span class="post-date">22-02-2026 17:02</span>@@ - [[file:2025/2025-list.sync-conflict-20260222-170216-VT6366A.org][2025 List]] @@html:<span class="post-date">22-02-2026 17:02</span>@@
- [[file:2025/2025-list.sync-conflict-20260222-170034-NE5VEIB.org][2025 List]] @@html:<span class="post-date">22-02-2026 17:00</span>@@ - [[file:2025/2025-list.sync-conflict-20260222-170034-NE5VEIB.org][2025 List]] @@html:<span class="post-date">22-02-2026 17:00</span>@@
- [[file:2025/2025-list.sync-conflict-20260222-165714-NE5VEIB.org][2025 List]] @@html:<span class="post-date">22-02-2026 16:56</span>@@ - [[file:2025/2025-list.sync-conflict-20260222-165714-NE5VEIB.org][2025 List]] @@html:<span class="post-date">22-02-2026 16:56</span>@@

View File

@@ -215,17 +215,52 @@ A file has comments if:
(add-to-list 'org-export-filter-body-functions (add-to-list 'org-export-filter-body-functions
#'z/org-html-insert-comments-into-body) #'z/org-html-insert-comments-into-body)
(defun z/lima-sitemap-format-entry (entry style project)
"Format sitemap ENTRY for lima, ensuring .html links."
(let* ((file (if (listp entry) (car entry) entry))
(title (org-publish-find-title file project))
(base (file-name-base file)))
(format "[[file:%s.html][%s]]"
base
(or title base))))
;; (defun z/publish-lima-file (plist filename pub-dir)
;; "Publish Org or Markdown file from lima directory."
;; (let* ((ext (file-name-extension filename))
;; (base (file-name-base filename))
;; (output-file (expand-file-name
;; (concat base ".html")
;; pub-dir)))
;; ;; Ensure output directory exists
;; (make-directory pub-dir t)
;; (cond
;; ;; ORG FILES
;; ((string= ext "org")
;; (org-publish-org-to 'z-html filename ".html" plist pub-dir))
;; ;; MARKDOWN FILES
;; ((string= ext "md")
;; (message "Converting %s → %s" filename output-file)
;; (let ((exit-code
;; (call-process
;; "pandoc"
;; nil
;; "*pandoc-output*"
;; t
;; filename
;; "-o"
;; output-file
;; "--standalone")))
;; (unless (eq exit-code 0)
;; (error "Pandoc failed with exit code %s" exit-code)))))))
(defun z/publish-lima-file (plist filename pub-dir) (defun z/publish-lima-file (plist filename pub-dir)
"Publish Org or Markdown file from lima directory." "Publish Org or Markdown file from lima directory."
(let* ((ext (file-name-extension filename)) (let* ((ext (file-name-extension filename))
(base (file-name-base filename)) (base (file-name-base filename)))
(output-file (expand-file-name
(concat base ".html")
pub-dir)))
;; Ensure output directory exists
(make-directory pub-dir t)
(cond (cond
;; ORG FILES ;; ORG FILES
@@ -234,21 +269,48 @@ A file has comments if:
;; MARKDOWN FILES ;; MARKDOWN FILES
((string= ext "md") ((string= ext "md")
(message "Converting %s → %s" filename output-file) (let* ((temp-org
(let ((exit-code (expand-file-name
(call-process (concat base ".org")
"pandoc" (make-temp-file "lima-build-" t)))) ;; temp directory
nil
"*pandoc-output*"
t
filename
"-o"
output-file
"--standalone")))
(unless (eq exit-code 0)
(error "Pandoc failed with exit code %s" exit-code)))))))
;; Convert Markdown → Org
(call-process
"pandoc"
nil nil nil
filename
"-f" "markdown"
"-t" "org"
"-o" temp-org)
;; Ensure title exists
(with-temp-buffer
(insert-file-contents temp-org)
(goto-char (point-min))
(unless (re-search-forward "^#\\+TITLE:" nil t)
(goto-char (point-min))
(insert "#+TITLE: " base "\n\n"))
(write-region (point-min) (point-max) temp-org))
;; Publish using ORIGINAL base name
(let ((output-file
(expand-file-name
(concat base ".html")
pub-dir)))
(org-publish-org-to
'z-html
temp-org
".html"
plist
pub-dir)
;; Rename to correct base if needed
(let ((generated
(expand-file-name
(concat (file-name-base temp-org) ".html")
pub-dir)))
(when (file-exists-p generated)
(rename-file generated output-file t)))))))))
(setq org-html-htmlize-output-type 'css) (setq org-html-htmlize-output-type 'css)
@@ -439,6 +501,7 @@ A file has comments if:
:sitemap-title "Lima" :sitemap-title "Lima"
:sitemap-style list :sitemap-style list
:sitemap-sort-files anti-chronologically :sitemap-sort-files anti-chronologically
:sitemap-format-entry z/lima-sitemap-format-entry
:html-head ,z-shared-head) :html-head ,z-shared-head)
("org-assets" ("org-assets"

View File

@@ -10,7 +10,7 @@ Feel free to explore:
** Lima ** Lima
- [[file:lima/limas-play-area.org][lima's page]] - [[file:lima/lima-list.org][lima's page]]
** Main Pages: ** Main Pages:

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 KiB

BIN
lima/dummy.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

View File

@@ -1,3 +1,4 @@
#+TITLE: Lima #+TITLE: Lima
- [[file:test.md][test]] - [[file:linking.html][linking]]
- [[file:test.html][test]]

33
lima/linking.md Normal file
View File

@@ -0,0 +1,33 @@
# Meeting notes
* 📅 15 January 2021, via Nextcloud Talk
* 👥 Julius, Vanessa, Jan, …
## Tasks ✅
* [ ] Finish marketing campaign
* [ ] To do 2
* [ ]
## Agenda 📑
* What we want to change
*
## Recap from last meeting 🔁
*
## Discussion 💬
* Vanessa suggested …
* Julius brought up …
*
::: error
NOOOO
:::
![git1.jpg](.attachments.17127/git1.jpg)

View File

@@ -8,3 +8,7 @@ this is further testing
| | | | | | | |
remfsdfsd remfsdfsd
![dummy.jpg](.attachments.17098/dummy.jpg)
![Khulfa.png](.attachments.17098/Khulfa.png)

View File

@@ -980,8 +980,10 @@ Resetting org-publish-cache
Generating sitemap for Lima Generating sitemap for Lima
Publishing file /home/zaine/master-folder/org_files/org_web/lima/lima-list.org using z/publish-lima-file Publishing file /home/zaine/master-folder/org_files/org_web/lima/lima-list.org using z/publish-lima-file
Publishing file /home/zaine/master-folder/org_files/org_web/lima/linking.md using z/publish-lima-file
Publishing file /home/zaine/master-folder/org_files/org_web/lima/test.md using z/publish-lima-file Publishing file /home/zaine/master-folder/org_files/org_web/lima/test.md using z/publish-lima-file
Converting /home/zaine/master-folder/org_files/org_web/lima/test.md → /home/zaine/master-folder/org_files/org_web/output/lima/test.html
Resetting org-publish-cache Resetting org-publish-cache
Publishing file /home/zaine/master-folder/org_files/org_web/assets/images/hzone/patpat.png using org-publish-attachment Publishing file /home/zaine/master-folder/org_files/org_web/assets/images/hzone/patpat.png using org-publish-attachment
Publishing file /home/zaine/master-folder/org_files/org_web/assets/images/reviews/probation-objectives/probation-objectives-2.png using org-publish-attachment Publishing file /home/zaine/master-folder/org_files/org_web/assets/images/reviews/probation-objectives/probation-objectives-2.png using org-publish-attachment
@@ -1592,6 +1594,10 @@ nil
nil nil
nil
nil
nil nil
Generating virtual environment Generating virtual environment
python3 -m venv .venv python3 -m venv .venv

View File

@@ -4,7 +4,7 @@
See the categories: @@html:<a href="../home/categories.html">Categories</a>@@ See the categories: @@html:<a href="../home/categories.html">Categories</a>@@
* Posts: * Posts:
- [[file:career/career-list.org][Career List]] @@html:<span class="post-date">22-02-2026 18:51</span>@@ - [[file:career/career-list.org][Career List]] @@html:<span class="post-date">22-02-2026 22:37</span>@@
- [[file:career/database-permissions.org][Database permissions, roles and accounts]] @@html:<span class="post-date">18-01-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@ - [[file:career/database-permissions.org][Database permissions, roles and accounts]] @@html:<span class="post-date">18-01-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:career/monitoring-and-logging.org][Monitoring and Logging]] @@html:<span class="post-date">18-01-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@ - [[file:career/monitoring-and-logging.org][Monitoring and Logging]] @@html:<span class="post-date">18-01-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@
- [[file:career/pipelines.org][Pipelines and how they work]] @@html:<span class="post-date">18-01-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@ - [[file:career/pipelines.org][Pipelines and how they work]] @@html:<span class="post-date">18-01-2026 23:00</span>@@ @@html:<a href="/tags/learning.html"> <span class="post-tag">learning</span> </a>@@ @@html:<a href="/tags/notes.html"> <span class="post-tag">notes</span> </a>@@

View File

@@ -2,6 +2,7 @@
#+OPTIONS: toc:nil num:nil #+OPTIONS: toc:nil num:nil
* Recently Updated (top 26 files - per lima's request) * Recently Updated (top 26 files - per lima's request)
- [[file:index.org][Home Page]] @@html:<span class="post-date">2026-02-22 22:24</span>@@
- [[file:blogs/2025/2025-list.sync-conflict-20260222-170216-VT6366A.org][2025 List]] @@html:<span class="post-date">2026-02-22 17:02</span>@@ - [[file:blogs/2025/2025-list.sync-conflict-20260222-170216-VT6366A.org][2025 List]] @@html:<span class="post-date">2026-02-22 17:02</span>@@
- [[file:blogs/2025/2025-list.sync-conflict-20260222-170034-NE5VEIB.org][2025 List]] @@html:<span class="post-date">2026-02-22 17:00</span>@@ - [[file:blogs/2025/2025-list.sync-conflict-20260222-170034-NE5VEIB.org][2025 List]] @@html:<span class="post-date">2026-02-22 17:00</span>@@
- [[file:blogs/2025/2025-list.sync-conflict-20260222-165714-NE5VEIB.org][2025 List]] @@html:<span class="post-date">2026-02-22 16:56</span>@@ - [[file:blogs/2025/2025-list.sync-conflict-20260222-165714-NE5VEIB.org][2025 List]] @@html:<span class="post-date">2026-02-22 16:56</span>@@
@@ -16,7 +17,6 @@
- [[file:posts/career/database-permissions.org][Database permissions, roles and accounts]] @@html:<span class="post-date">2026-01-18 23:01</span>@@ - [[file:posts/career/database-permissions.org][Database permissions, roles and accounts]] @@html:<span class="post-date">2026-01-18 23:01</span>@@
- [[file:posts/career/pipelines.org][Pipelines and how they work]] @@html:<span class="post-date">2026-01-18 23:00</span>@@ - [[file:posts/career/pipelines.org][Pipelines and how they work]] @@html:<span class="post-date">2026-01-18 23:00</span>@@
- [[file:blogs/2026/01-january/11-01-week-review.org][[11-01-2026] - Weekly Review]] @@html:<span class="post-date">2026-01-17 21:23</span>@@ - [[file:blogs/2026/01-january/11-01-week-review.org][[11-01-2026] - Weekly Review]] @@html:<span class="post-date">2026-01-17 21:23</span>@@
- [[file:index.org][Home Page]] @@html:<span class="post-date">2026-01-17 21:21</span>@@
- [[file:posts/career/airflow.org][Datamarts, Airflow and DAG's]] @@html:<span class="post-date">2026-01-17 21:17</span>@@ - [[file:posts/career/airflow.org][Datamarts, Airflow and DAG's]] @@html:<span class="post-date">2026-01-17 21:17</span>@@
- [[file:blogs/2025/12-december/21-12-week-review.org][[21-12-2025] - Weekly Review]] @@html:<span class="post-date">2026-01-17 21:09</span>@@ - [[file:blogs/2025/12-december/21-12-week-review.org][[21-12-2025] - Weekly Review]] @@html:<span class="post-date">2026-01-17 21:09</span>@@
- [[file:blogs/2025/12-december/28-12-week-review.org][[28-12-2025] - Weekly Review]] @@html:<span class="post-date">2026-01-17 21:08</span>@@ - [[file:blogs/2025/12-december/28-12-week-review.org][[28-12-2025] - Weekly Review]] @@html:<span class="post-date">2026-01-17 21:08</span>@@

View File

@@ -78,13 +78,13 @@
- lima - lima
- [[file:lima/lima-list.org][Lima]] - [[file:lima/lima-list.org][Lima]]
- tags - tags
- [[file:tags/introduction.org][Tag: introduction]]
- [[file:tags/learning.org][Tag: learning]] - [[file:tags/learning.org][Tag: learning]]
- [[file:tags/introduction.org][Tag: introduction]]
- [[file:tags/notes.org][Tag: notes]] - [[file:tags/notes.org][Tag: notes]]
- [[file:tags/review.org][Tag: review]] - [[file:tags/review.org][Tag: review]]
- [[file:tags/education.org][Tag: education]]
- [[file:tags/insights.org][Tag: insights]] - [[file:tags/insights.org][Tag: insights]]
- [[file:tags/website.org][Tag: website]] - [[file:tags/website.org][Tag: website]]
- [[file:tags/emacs.org][Tag: emacs]] - [[file:tags/emacs.org][Tag: emacs]]
- [[file:tags/education.org][Tag: education]]
- [[file:tags/maths.org][Tag: maths]] - [[file:tags/maths.org][Tag: maths]]
- [[file:tags/reading.org][Tag: reading]] - [[file:tags/reading.org][Tag: reading]]