feature: 增加了其他内容

This commit is contained in:
AngusWG 2021-12-08 23:05:22 +08:00
parent b47f5b539e
commit 25597d48ff
15 changed files with 80 additions and 100 deletions

View file

@ -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!

View file

@ -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"
]
}

View file

@ -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",

View file

@ -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>

View file

@ -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>

View file

@ -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;
}

View file

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -0,0 +1,20 @@
# markdown语法检查
一个好的笔记需要规范的笔记标准,
通过markdownlint插件规范了markdown语法。
但是有部分语法不一定符合需求,
在项目根目录上创建一个`.markdownlint.json`文件,
输入需要忽略的规则名,忽略某一项语法检查
输入示例:
```json
{
"MD025": false,
"MD045": false,
"MD033": false,
"MD013": false,
"MD034": false
}
```

View 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;
```

View file

@ -0,0 +1,9 @@
# 自动同步
通过在 `.vscode/setting.json`
`"noteSync.enableNoteSync": false` 改为 `"noteSync.enableNoteSync": true` 启用自动同步。
每次保存文件将创建一条git记录并自动同步到云端仓库。
建议git checkout -b `develop` 创建分支使得自动保存到非master分支上。
同时在`pull requests`时建议`squash`,以便于合并多次提交。

View file

@ -36,7 +36,7 @@ Foam 使用标准 Markdown并添加了一些改动
这是 [[笔记属性]] 的维基链接(又名内部链接)。
这是一张图片:
![图片](../../attachments/foam-icon.png)
![图片](../attachments/foam-icon.png)
> 这是块引用
> 它可以跨越多行

View file

@ -2,7 +2,7 @@
你可以通过`cmd+alt+v`粘贴剪贴板中的图像.
图像会自动复制到`/attachments` 文件夹,并在粘贴它们的文件中添加引用。
图像会自动复制到`/docs/attachments` 文件夹,并在粘贴它们的文件中添加引用。
提示将要求你确认图像的名称,在设置中设置`"pasteImage.showFilePathConfirmInputBox": false,` 来禁用它。

View file

@ -41,4 +41,4 @@
1. 复制一张图片
2. 将光标移到下一行然后按“cmd+alt+v”并确认文件名。
3. .
4. 图像文件已在 `/attachments` 中创建,并在此处添加了对其的引用。
4. 图像文件已在 `/docs/attachments` 中创建,并在此处添加了对其的引用。

View file

@ -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>
## 阅读完后
可以将本业内容删除然后作为目录页面
- [[子弹笔记]]
- [[入门指南]]
- [[待办清单]]

View file

@ -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:) 我们渴望做得更好。