Commits

Sergey Astanin  committed c32bb53

New post snippet (for Emacs' yasnippet)

  • Participants
  • Parent commits 410685a

Comments (0)

Files changed (2)

File yasnippets/markdown-mode/post.yasnippet

+# -*- mode: snippet -*-
+# name: a YAML header of a new Jekyll post
+# key: post
+# binding: "C-c C-n C-p"
+# --
+---
+title: "${1:_`(substring (replace-regexp-in-string "-" " " (file-name-nondirectory (file-name-sans-extension (let ((name (buffer-file-name))) (if name name "YYYY-MM-DD New post title"))))) 11)`}"
+date: `(format-time-string "%F %T")`
+tags: [ ${2:en, } ]
+layout: post
+published: false
+
+---
+
+$0

File yasnippets/markdown-mode/post.yasnippet~

+# -*- mode: snippet -*-
+# name: a YAML header of a new Jekyll post
+# key: post
+# binding: "C-c C-n C-p"
+# --
+---
+title: "${1:_`(substring (replace-regexp-in-string "-" " " (file-name-nondirectory (file-name-sans-extension (let ((name (buffer-file-name))) (if name name "YYYY-MM-DD New post title"))))) 11)`}"
+date: `(format-time-string "%F %T")`
+tags: [ ${2:en, } ]
+layout: post
+
+---
+
+$0