projects
/
blog.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
8cd3d89
)
Add the correct date format when creating post
author
Peng Li
<seudut@gmail.com>
Thu, 11 May 2017 11:52:03 +0000
(19:52 +0800)
committer
Peng Li
<seudut@gmail.com>
Thu, 11 May 2017 11:52:03 +0000
(19:52 +0800)
blog-tool.el
patch
|
blob
|
history
my-publish.el
patch
|
blob
|
history
diff --git
a/blog-tool.el
b/blog-tool.el
index
cb04b8e
..
6d5401d
100644
(file)
--- a/
blog-tool.el
+++ b/
blog-tool.el
@@
-33,11
+33,9
@@
"Create a post."
(interactive)
(let ((title (read-from-minibuffer "Title: "))
"Create a post."
(interactive)
(let ((title (read-from-minibuffer "Title: "))
- (date (format-time-string "%Y-%m-%d"))
(filename ""))
(setq filename
(concat blog-root-dir "/posts/"
(filename ""))
(setq filename
(concat blog-root-dir "/posts/"
- date "-"
(replace-regexp-in-string " " "-" title)
".org"))
(find-file filename)
(replace-regexp-in-string " " "-" title)
".org"))
(find-file filename)
@@
-45,8
+43,9
@@
"#+TITLE: " title "\n"
"#+AUTHOR: " my-name "\n"
"#+EMAIL: " my-email "\n"
"#+TITLE: " title "\n"
"#+AUTHOR: " my-name "\n"
"#+EMAIL: " my-email "\n"
- "#+DATE: " date " " (format-time-string "%A") "\n"
- "\n"))
+ "#+DATE: "))
+ (org-insert-time-stamp (current-time) nil nil nil "\n")
+ (insert "\n")
(save-buffer)))
(save-buffer)))
diff --git
a/my-publish.el
b/my-publish.el
index
f9e0da0
..
b21533d
100644
(file)
--- a/
my-publish.el
+++ b/
my-publish.el
@@
-43,7
+43,7
@@
"<nav><ul>"
"<li><a href= '/about.html' >About</a></li>"
"<li><a href= '/posts/sitemap.html' >Blog</a></li>"
"<nav><ul>"
"<li><a href= '/about.html' >About</a></li>"
"<li><a href= '/posts/sitemap.html' >Blog</a></li>"
- "<li><a href= '/index.html' >Home</a></li>"
+
;;
"<li><a href= '/index.html' >Home</a></li>"
"</ul></nav>"
"</header>"
"<hr>"))
"</ul></nav>"
"</header>"
"<hr>"))
@@
-112,7
+112,9
@@
;; sitemap
:auto-sitemap t
:sitemap-filename "sitemap.org"
;; sitemap
:auto-sitemap t
:sitemap-filename "sitemap.org"
- :sitemap-title "Sitemap"
+ :sitemap-title "Blog"
+ :sitemap-sort-files anti-chronologically
+ :sitemap-file-entry-format "%d %t"
;; other generic options
:with-toc nil ; table of contents
;; other generic options
:with-toc nil ; table of contents