Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
GitHub Pages用のmarkdownファイルを作成する際に必要な設定や記述などを集めたテンプレートを挿入するためのEmacs lispの関数。
;; Set template for GitHub Pages.
;; See https://pandanote.info/?p=6871 for details.
(defun markdown-insert-github-pages-template (page-title)
"Insert template for GitHub Pages."
(interactive "sTitle: ")
(let ()
(insert (concat
"---\n"
"title: " page-title " - panda大学習帳外伝\n"
"description: \n"
"mathjax: true\n"
"image: \n"
"twitter: \n"
" card: summary_large_image\n"
"encoding: UTF-8\n"
"update: \n"
"---\n"
"{% include pagelink.md %}\n"
"# " page-title "\n"
"{% if page.update %}最終更新日: {{ page.update }} {% endif %}\n"
"## はじめに\n"
"## \n"
"## まとめ\n\n"
"## リンク\n"
"{% include pagelink.md %}\n\n"
))
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment