Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新增模板变量 title #751

Closed
alexcdever opened this issue Dec 15, 2020 · 3 comments
Closed

新增模板变量 title #751

alexcdever opened this issue Dec 15, 2020 · 3 comments
Assignees
Milestone

Comments

@alexcdever
Copy link

你在什么场景下需要该功能? In what scenarios do you need this function?

新建文档的时候

描述最优的解决方案 Describe the optimal solution

将文档名称作为默认的一级标题

描述候选解决方案 Describe the candidate solution

其他信息 Other information

@88250
Copy link
Member

88250 commented Dec 15, 2020

你好,我觉得可以通过模板支持 title 变量来实现:

  1. 自定义模板,使用 {{.title}} 变量
  2. 在新建的文档中调用该模板完成插入,{{.title}} 变量会使用当前文档的名称进行填充

虽然有点麻烦,但是这样更灵活一些吧,你觉得呢?

@88250 88250 changed the title 提个建议,新建文档的时候,将文档名称默认为一级标题 新增模板变量 title Dec 15, 2020
@88250 88250 self-assigned this Dec 15, 2020
@88250 88250 added this to the 0.5.4 milestone Dec 15, 2020
@alexcdever
Copy link
Author

你好,我觉得可以通过模板支持 title 变量来实现:

  1. 自定义模板,使用 {{.title}} 变量
  2. 在新建的文档中调用该模板完成插入,{{.title}} 变量会使用当前文档的名称进行填充

虽然有点麻烦,但是这样更灵活一些吧,你觉得呢?

已经有这个自定义模板的功能了吗?还是这只是一个方案?我觉得也行。

@88250
Copy link
Member

88250 commented Dec 15, 2020

目前模板还不支持 title 变量,v0.5.4 会支持,谢谢。

88250 added a commit to siyuan-note/user-guide-en_US that referenced this issue Dec 15, 2020
88250 added a commit to siyuan-note/user-guide-zh_CN that referenced this issue Dec 15, 2020
@88250 88250 closed this as completed Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants