Last active
November 8, 2020 09:18
-
-
Save pandanote-info/7fdbd500b869eec272f70cf9d86f12d4 to your computer and use it in GitHub Desktop.
GitHub Pages用のmarkdownファイルを作成する際に必要な設定や記述などを集めたテンプレートを挿入するためのEmacs lispの関数。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; 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