diff --git a/.foam/templates/your-first-template.md b/.foam/templates/your-first-template.md deleted file mode 100644 index 5f85612..0000000 --- a/.foam/templates/your-first-template.md +++ /dev/null @@ -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! diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 7083091..19eabfc 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -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" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 9709fc7..0e09275 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -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", diff --git a/_layouts/home.html b/_layouts/home.html deleted file mode 100644 index 33d9afb..0000000 --- a/_layouts/home.html +++ /dev/null @@ -1,18 +0,0 @@ ---- -layout: default ---- - -{{ content }} - - diff --git a/_layouts/page.html b/_layouts/page.html deleted file mode 100644 index 33d9afb..0000000 --- a/_layouts/page.html +++ /dev/null @@ -1,18 +0,0 @@ ---- -layout: default ---- - -{{ content }} - - diff --git a/assets/css/style.scss b/assets/css/style.scss deleted file mode 100644 index a6fd4c6..0000000 --- a/assets/css/style.scss +++ /dev/null @@ -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; -} diff --git a/attachments/foam-icon.png b/docs/attachments/foam-icon.png similarity index 100% rename from attachments/foam-icon.png rename to docs/attachments/foam-icon.png diff --git a/docs/features/markdown语法检查.md b/docs/features/markdown语法检查.md new file mode 100644 index 0000000..37ecdf1 --- /dev/null +++ b/docs/features/markdown语法检查.md @@ -0,0 +1,20 @@ +# markdown语法检查 + +一个好的笔记需要规范的笔记标准, +通过markdownlint插件规范了markdown语法。 + +但是有部分语法不一定符合需求, +在项目根目录上创建一个`.markdownlint.json`文件, +输入需要忽略的规则名,忽略某一项语法检查 + +输入示例: + +```json +{ + "MD025": false, + "MD045": false, + "MD033": false, + "MD013": false, + "MD034": false +} +``` diff --git a/docs/features/画流程图.md b/docs/features/画流程图.md new file mode 100644 index 0000000..49dd492 --- /dev/null +++ b/docs/features/画流程图.md @@ -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; +``` diff --git a/docs/features/自动同步.md b/docs/features/自动同步.md new file mode 100644 index 0000000..1fcb696 --- /dev/null +++ b/docs/features/自动同步.md @@ -0,0 +1,9 @@ +# 自动同步 + +通过在 `.vscode/setting.json` 里 +将`"noteSync.enableNoteSync": false` 改为 `"noteSync.enableNoteSync": true` 启用自动同步。 + +每次保存文件将创建一条git记录,并自动同步到云端仓库。 +建议git checkout -b `develop` 创建分支,使得自动保存到非master分支上。 + +同时在`pull requests`时建议`squash`,以便于合并多次提交。 diff --git a/docs/how-to/write-notes-in-foam.md b/docs/how-to/write-notes-in-foam.md index be2ad37..3880854 100644 --- a/docs/how-to/write-notes-in-foam.md +++ b/docs/how-to/write-notes-in-foam.md @@ -36,7 +36,7 @@ Foam 使用标准 Markdown,并添加了一些改动: 这是 [[笔记属性]] 的维基链接(又名内部链接)。 这是一张图片: -![图片](../../attachments/foam-icon.png) +![图片](../attachments/foam-icon.png) > 这是块引用 > 它可以跨越多行 diff --git a/docs/how-to/从剪贴板粘贴图像.md b/docs/how-to/从剪贴板粘贴图像.md index 5bb0f47..f03fc3a 100644 --- a/docs/how-to/从剪贴板粘贴图像.md +++ b/docs/how-to/从剪贴板粘贴图像.md @@ -2,7 +2,7 @@ 你可以通过`cmd+alt+v`粘贴剪贴板中的图像. -图像会自动复制到`/attachments` 文件夹,并在粘贴它们的文件中添加引用。 +图像会自动复制到`/docs/attachments` 文件夹,并在粘贴它们的文件中添加引用。 提示将要求你确认图像的名称,在设置中设置`"pasteImage.showFilePathConfirmInputBox": false,` 来禁用它。 diff --git a/docs/how-to/使用快捷键进行编辑.md b/docs/how-to/使用快捷键进行编辑.md index a1fcc32..c3c6cd3 100644 --- a/docs/how-to/使用快捷键进行编辑.md +++ b/docs/how-to/使用快捷键进行编辑.md @@ -41,4 +41,4 @@ 1. 复制一张图片 2. 将光标移到下一行,然后按“cmd+alt+v”并确认文件名。 3. . - 4. 图像文件已在 `/attachments` 中创建,并在此处添加了对其的引用。 + 4. 图像文件已在 `/docs/attachments` 中创建,并在此处添加了对其的引用。 diff --git a/readme.md b/readme.md index 824f509..ad165b6 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ - + # Foam @@ -40,3 +40,11 @@ 你可能已经注意到,Issues已禁用。为了使项目易于维护,请将你的问题提交到主 Foam 存储库中: > + +## 阅读完后 + +可以将本业内容删除然后作为目录页面 + +- [[子弹笔记]] +- [[入门指南]] +- [[待办清单]] diff --git a/入门指南.md b/入门指南.md index 4a7fe44..2a48057 100644 --- a/入门指南.md +++ b/入门指南.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,:) 我们渴望做得更好。