Skip to content

Instantly share code, notes, and snippets.

@pandanote-info
Last active November 8, 2020 09:18
Show Gist options
  • Select an option

  • Save pandanote-info/7fdbd500b869eec272f70cf9d86f12d4 to your computer and use it in GitHub Desktop.

Select an option

Save pandanote-info/7fdbd500b869eec272f70cf9d86f12d4 to your computer and use it in GitHub Desktop.
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