-
Notifications
You must be signed in to change notification settings - Fork 2
/
templates
98 lines (87 loc) · 3.03 KB
/
templates
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
;; 参考:https://github.com/minad/tempel
;;; fundamental-mode
fundamental-mode ;; 适用于所有 Mode。
(today (format-time-string "%Y-%m-%d"))
;;; org-mode
org-mode ;; 空格分割的多个 Mode 名称。
;; 插入自己的 GnuPG 加密 key(journal 等 GPG 文件使用)。
(my-gpg "# -*- mode:org; epa-file-encrypt-to: (\"[email protected]\") -*-")
(my-org-file "#+TITLE: " (p "title") n
"#+AUTHOR: 张俊([email protected])" n
"#+DATE: " (format-time-string "%Y-%m-%d %a") n
"#+STARTUP: overview" n
"#+OPTIONS: prop:t ^:nil" n
"#+LANGUAGE: zh-CN" n)
(my-blog-file "#+AUTHOR: 张俊([email protected])" n
"#+DATE: " (format-time-string "%Y-%m-%d %a") n
"#+HUGO_BASE_DIR: ~/blog/blog.opsnull.com" n
"#+HUGO_SECTION: posts" n
"#+HUGO_BUNDLE: " (p "artile bundle name") n
"#+EXPORT_FILE_NAME: index" n
"#+HUGO_AUTO_SET_LASTMOD: t" n
"#+HUGO_WEIGHT: auto" n
"#+HUGO_TAGS: " (p "tag1 tag2") n
"#+HUGO_CATEGORIES: " (p "catagory1 catagory2") n
"#+HUGO_LOCALE: zh" n
"#+OPTIONS: title:t" n
"#+HUGO_CUSTOM_FRONT_MATTER: :series " "'(\"" (p "series name") "\") :series_order " (p "1") n
" " n
(p "这是摘要") n
" " n
"#+hugo: more"
" " n
" " n
"#+begin_details" n
"#+begin_summary" n
"变更历史" n
"#+end_summary" n
" " n
(format-time-string "%Y-%m-%d %a ") "首次创建" n
"#+end_details" n)
(my-blog-subtree ":PROPERTIES:" n
":HUGO_BASE_DIR: ~/blog/blog.opsnull.com/" n
":EXPORT_HUGO_SECTION: " (p "section") n
":EXPORT_HUGO_BUNDLE: " (p "bundle") n
":EXPORT_HUGO_WEIGHT: auto" n
":EXPORT_FILE_NAME: index" n
":EXPORT_HUGO_LOCALE: zh" n
":EXPORT_DATE: " (format-time-string "%Y-%m-%d %a") n
":EXPORT_HUGO_CUSTOM_FRONT_MATTER: :series " "'(\"" (p "series name") "\") :series_order " (p "1") n
":EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :summary " (p "summary") n
":EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :showSummary true" n
":END:")
(my-latex "#+DATE: " (format-time-string "%Y-%m-%d %a") n
"#+SUBTITLE: 内部资料,注意保密!
#+AUTHOR: 张俊([email protected])
# 中文语言环境(目录等用中文显示)。
#+LANGUAGE: zh-CN
# 不自动输出 titile 和 toc,后续定制输出。
# 但是需要明确设置 num 来控制输出的目录级别。
#+OPTIONS: prop:t title:nil num:2 toc:nil ^:nil
#+LATEX_COMPILER: xelatex
#+LATEX_CLASS: ctexart
# 引用自定义 latext style 文件,需要去掉 .sty 后缀。
#+LATEX_HEADER: \\usepackage{/Users/alizj/emacs/mystyle}
# 定制 PDF 封面和目录。
#+begin_export latex
% 封面页
\\begin{titlepage}
% 插入标题
\\maketitle
% 插入封面图
%\\ThisCenterWallPaper{0.4}{/path/to/image.png}
% 封面页不编号
\\noindent\\fboxsep=0pt
\\setcounter{page}{0}
\\thispagestyle{empty}
\\end{titlepage}
% 摘要页
\\begin{abstract}
这是一个摘要。
\\end{abstract}
% 目录页
\\newpage
\\tableofcontents
\\newpage
#+end_export
")