From e4d6b56677a4bdcf4e3c2679d644a8b4521dcf5f Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Thu, 1 Jul 2021 10:40:03 +1000 Subject: updated post-process, footer and cleaned up publish - post-process: added email sub - footer: added anti-piracy notice - publish.el: removed redundant function --- publish.el | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'publish.el') diff --git a/publish.el b/publish.el index a09494b..4254b31 100644 --- a/publish.el +++ b/publish.el @@ -35,16 +35,9 @@ PROJECT: `posts in this case." ((eq style 'tree) (file-name-nondirectory (directory-file-name entry))) (t entry))) -(defun me/org-microposts-sitemap (title list) - "Default site map, as a string. -TITLE is the title of the site map. LIST is an internal -representation for the files to include, as returned by -`org-list-to-lisp'. PROJECT is the current project." - (concat "#+TITLE: " title "\n\n" - (org-list-to-org list))) - - (defun org-publish-find-content (file project) + "Finds the content of an org file. +The content starts with the first empty line." (let ((file (org-publish--expand-file-name file project))) (when (and (file-readable-p file) (not (directory-name-p file))) (with-temp-buffer @@ -54,11 +47,11 @@ representation for the files to include, as returned by (buffer-substring beg (point-max))))))) (defun me/org-microposts-sitemap-format-entry (entry style project) - "Format posts with author and published data in the index page. + "Format microposts with author and published data in the index page. ENTRY: file-name STYLE: -PROJECT: `posts in this case." +PROJECT: `microposts in this case." (cond ((not (directory-name-p entry)) (format "*[[%s][%s]]* - %s\n<<%s>>\n\n%s" (file-name-sans-extension entry) @@ -107,7 +100,6 @@ PUB-DIR is when the output will be placed." :publishing-function me/org-publish-microblog :auto-sitemap t :sitemap-format-entry me/org-microposts-sitemap-format-entry - :sitemap-function me/org-microposts-sitemap :sitemap-title "Yuchen's Microblog" :sitemap-sort-files anti-chronologically :sitemap-filename "../pages/microblog.org" -- cgit v1.2.3