mirror of
https://github.com/foambubble/foam-template.git
synced 2025-06-07 20:08:54 +00:00
feature: 增加了其他内容
This commit is contained in:
parent
b47f5b539e
commit
25597d48ff
15 changed files with 80 additions and 100 deletions
|
@ -1,25 +0,0 @@
|
|||
# Foam Note Templates
|
||||
|
||||
Foam includes note templates!
|
||||
This allows you to easily create notes that have similar structure without having to use copy/paste :)
|
||||
|
||||
Templates support the [VS Code's Snippet Syntax](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax), which means you can:
|
||||
- add variables to the newly created note
|
||||
- add tabstop to automatically navigate to the key parts of the note, just like a form
|
||||
Below you can see an example showing a todo list and a timestamp.
|
||||
|
||||
## Todo List
|
||||
|
||||
1. ${1:First tabstop}
|
||||
2. ${2:A second tabstop}
|
||||
3. ${3:A third tabstop}
|
||||
|
||||
Note Created: ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}
|
||||
|
||||
---
|
||||
|
||||
Try out the above example by running the `Foam: Create New Note From Template` command and selecting the `your-first-template` template. Notice what happens when your new note is created!
|
||||
|
||||
To remove this template, simply delete the `.foam/templates/your-first-template.md` file.
|
||||
|
||||
Enjoy!
|
12
.vscode/extensions.json
vendored
12
.vscode/extensions.json
vendored
|
@ -8,8 +8,18 @@
|
|||
// Tons of markdown goodies (lists, tables of content, so much more)
|
||||
"yzhang.markdown-all-in-one",
|
||||
|
||||
// Image-pasting for markdown
|
||||
// 贴图插件
|
||||
"mushan.vscode-paste-image",
|
||||
|
||||
// markdown 语法检查器
|
||||
"DavidAnson.vscode-markdownlint",
|
||||
|
||||
// markdown 流程图插件
|
||||
"bierner.markdown-mermaid",
|
||||
// markdown 流程图语法高亮插件
|
||||
"bpruitt-goddard.mermaid-markdown-syntax-highlighting",
|
||||
|
||||
// 笔记自动同步插件
|
||||
"JSShou.note-sync"
|
||||
]
|
||||
}
|
||||
|
|
6
.vscode/settings.json
vendored
6
.vscode/settings.json
vendored
|
@ -1,4 +1,8 @@
|
|||
{
|
||||
"noteSync.enableNoteSync": false, // 只有这个设置了true,该插件才会生效,防止该插件全局生效
|
||||
"noteSync.pullStatusMessage": "笔记正在下拉", // 当在下拉笔记时左下角显示的状态文案
|
||||
"noteSync.finishStatusMessage": "笔记同步完成",
|
||||
//
|
||||
"editor.minimap.enabled": false,
|
||||
"editor.wrappingIndent": "indent",
|
||||
"editor.overviewRulerBorder": false,
|
||||
|
@ -19,7 +23,7 @@
|
|||
"git.enableSmartCommit": true,
|
||||
"git.postCommitCommand": "sync",
|
||||
"markdown.preview.breaks": true,
|
||||
"pasteImage.path": "${projectRoot}/attachments",
|
||||
"pasteImage.path": "${projectRoot}/docs/attachments",
|
||||
"pasteImage.showFilePathConfirmInputBox": true,
|
||||
"prettier.singleQuote": false,
|
||||
"spellright.notificationClass": "warning",
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
{{ content }}
|
||||
|
||||
<script type="text/javascript">
|
||||
// Hack: Replace page-link with "Page Title"
|
||||
document.querySelectorAll(".markdown-body a[title]").forEach((a) => {
|
||||
a.innerText = a.title;
|
||||
});
|
||||
// Hack: Remove .md extension from wikilinks to get the html in jekyll
|
||||
document.querySelectorAll("a").forEach(l => {
|
||||
if (l.href.endsWith('.md')) {
|
||||
l.href = l.href.substring(0, l.href.length-3)
|
||||
}
|
||||
})
|
||||
</script>
|
|
@ -1,18 +0,0 @@
|
|||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
{{ content }}
|
||||
|
||||
<script type="text/javascript">
|
||||
// Hack: Replace page-link with "Page Title"
|
||||
document.querySelectorAll(".markdown-body a[title]").forEach((a) => {
|
||||
a.innerText = a.title;
|
||||
});
|
||||
// Hack: Remove .md extension from wikilinks to get the html in jekyll
|
||||
document.querySelectorAll("a").forEach(l => {
|
||||
if (l.href.endsWith('.md')) {
|
||||
l.href = l.href.substring(0, l.href.length-3)
|
||||
}
|
||||
})
|
||||
</script>
|
|
@ -1,33 +0,0 @@
|
|||
---
|
||||
---
|
||||
|
||||
@import "{{ site.theme }}";
|
||||
|
||||
.markdown-body {
|
||||
max-width: 800px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.markdown-body p {
|
||||
font-size: 16px;
|
||||
line-height: 1.9em;
|
||||
margin-bottom: 1.2em;
|
||||
}
|
||||
|
||||
.markdown-body li {
|
||||
line-height: 1.9em;
|
||||
}
|
||||
|
||||
input.task-list-item-checkbox {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
blockquote {
|
||||
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida,
|
||||
"DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif;
|
||||
}
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
20
docs/features/markdown语法检查.md
Normal file
20
docs/features/markdown语法检查.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
# markdown语法检查
|
||||
|
||||
一个好的笔记需要规范的笔记标准,
|
||||
通过markdownlint插件规范了markdown语法。
|
||||
|
||||
但是有部分语法不一定符合需求,
|
||||
在项目根目录上创建一个`.markdownlint.json`文件,
|
||||
输入需要忽略的规则名,忽略某一项语法检查
|
||||
|
||||
输入示例:
|
||||
|
||||
```json
|
||||
{
|
||||
"MD025": false,
|
||||
"MD045": false,
|
||||
"MD033": false,
|
||||
"MD013": false,
|
||||
"MD034": false
|
||||
}
|
||||
```
|
15
docs/features/画流程图.md
Normal file
15
docs/features/画流程图.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
# 画流程图
|
||||
|
||||
mermaid支持用代码块描述流程图、用户图、类图、等,并在预览模式中展示成图片。
|
||||
|
||||
[mermaid官网](https://mermaid-js.github.io/)中有详细的语法介绍。
|
||||
|
||||
点击右上角的预览图标或`cmd+shift+P`输入`Markdown: Open Preview to the Side`命令,查看下列代码展示的流程图。
|
||||
|
||||
```mermaid
|
||||
graph TD;
|
||||
A-->B;
|
||||
A-->C;
|
||||
B-->D;
|
||||
C-->D;
|
||||
```
|
9
docs/features/自动同步.md
Normal file
9
docs/features/自动同步.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# 自动同步
|
||||
|
||||
通过在 `.vscode/setting.json` 里
|
||||
将`"noteSync.enableNoteSync": false` 改为 `"noteSync.enableNoteSync": true` 启用自动同步。
|
||||
|
||||
每次保存文件将创建一条git记录,并自动同步到云端仓库。
|
||||
建议git checkout -b `develop` 创建分支,使得自动保存到非master分支上。
|
||||
|
||||
同时在`pull requests`时建议`squash`,以便于合并多次提交。
|
|
@ -36,7 +36,7 @@ Foam 使用标准 Markdown,并添加了一些改动:
|
|||
这是 [[笔记属性]] 的维基链接(又名内部链接)。
|
||||
|
||||
这是一张图片:
|
||||

|
||||

|
||||
|
||||
> 这是块引用
|
||||
> 它可以跨越多行
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
你可以通过`cmd+alt+v`粘贴剪贴板中的图像.
|
||||
|
||||
图像会自动复制到`/attachments` 文件夹,并在粘贴它们的文件中添加引用。
|
||||
图像会自动复制到`/docs/attachments` 文件夹,并在粘贴它们的文件中添加引用。
|
||||
|
||||
提示将要求你确认图像的名称,在设置中设置`"pasteImage.showFilePathConfirmInputBox": false,` 来禁用它。
|
||||
|
||||
|
|
|
@ -41,4 +41,4 @@
|
|||
1. 复制一张图片
|
||||
2. 将光标移到下一行,然后按“cmd+alt+v”并确认文件名。
|
||||
3. .
|
||||
4. 图像文件已在 `/attachments` 中创建,并在此处添加了对其的引用。
|
||||
4. 图像文件已在 `/docs/attachments` 中创建,并在此处添加了对其的引用。
|
||||
|
|
10
readme.md
10
readme.md
|
@ -1,4 +1,4 @@
|
|||
<img src="attachments/foam-icon.png" width=100 align="left">
|
||||
<img src="docs/attachments/foam-icon.png" width=100 align="left">
|
||||
|
||||
# Foam
|
||||
|
||||
|
@ -40,3 +40,11 @@
|
|||
你可能已经注意到,Issues已禁用。为了使项目易于维护,请将你的问题提交到主 Foam 存储库中:
|
||||
|
||||
> <https://github.com/foambubble/foam>
|
||||
|
||||
## 阅读完后
|
||||
|
||||
可以将本业内容删除然后作为目录页面
|
||||
|
||||
- [[子弹笔记]]
|
||||
- [[入门指南]]
|
||||
- [[待办清单]]
|
||||
|
|
8
入门指南.md
8
入门指南.md
|
@ -26,6 +26,14 @@
|
|||
|
||||
- [ ] 查看foam所有的配置信息, 按 `cmd+,`, 然后 `Extensions > Foam`中找到所有配置信息。
|
||||
|
||||
- [ ] 使用mermaid[[画流程图]]
|
||||
|
||||
- [ ] 关闭部分[[markdown语法检查]]
|
||||
|
||||
- [ ] 打开笔记[[自动同步]]功能
|
||||
|
||||
---
|
||||
|
||||
- [ ] 在 VS Code 中,Foam 可以通过多种方式进行定制 ! 在 [Foam Recipes](https://foambubble.github.io/foam/recipes/recipes) 中查看详细信息!
|
||||
|
||||
- [ ] 加入[Discord 上的Foam 社区](https://foambubble.github.io/join-discord/e), 介绍自己并留言说明你是如何找到Foam,:) 我们渴望做得更好。
|
||||
|
|
Loading…
Add table
Reference in a new issue