Would you like to take some of your notes in Obsidian and make it public?您愿意将您在 Obsidian 中的一些笔记公开吗?
This template gives you an easy (and automated) way to publish your Obsidian notes (or blog!) on your Github pages.此模板为您提供了一种简便(且自动化)的方式,将您的 Obsidian 笔记(或博客!)发布到您的 Github 页面上。
With this template, you get these out-of-the-box:使用此模板,您可以直接获得以下这些内容:
- an awesome website based on Material theme, complete with a search bar (Checkout this template repo published here)
一个基于 Material 主题的超赞网站,配有搜索栏(查看在此发布的此模板库) - get the Obsidian/Roam style
[[wikilinks]]from your vault in your published notes从您的知识库中获取 Obsidian/Roam 风格的[[wikilinks]]并将其添加到您发布的笔记中。 - Toggle between light and dark mode
- Blog folder 博客的文件夹
- Create a new github repository using this template. Click the green button at the top or use this link.使用此模板创建一个新的 GitHub 代码库。点击顶部的绿色按钮或使用此链接。
- Give a name to your repository. By default your notes will be published at
<https://username.github.io/repo-name/>- Copy only the
mainbranch while creating the repo from the template从模板创建存储库时,仅复制main分支
<https://username.github.io/repo-name/>发布。 - Copy only the
- Clone the repository you generated into your Obsidian folder/vault.将您生成的仓库克隆到您的 Obsidian 文件夹/保险库中。
- Move your notes that you would like to make public to the
repo-name/docsfolder.- Easiest way to do this would be using drag and drop within Obsidian最简单的方法是在 Obsidian 中使用拖放功能来实现。
repo-name/docs文件夹中。 - Commit and push the changes. Github actions will take care of the rest, publishing your notes using MkDocs, with the Material theme.提交并推送更改。GitHub Actions 会处理其余事宜,使用 MkDocs 和 Material 主题发布您的笔记。
- Go to
Settings > Pagesand select the select the Source as yourgh-pagesbranch.前往Settings > Pages并将源分支选择为您的gh-pages分支。
Not working for you? Open an issue and let me know what went wrong.如果对您不起作用?请打开一个议题并告知我哪里出了问题。
By default, the sections and pages will follow the folder structure within /docs. The folders and sub-folders will show up as sections. Try not to have white spaces in your folder and file names, as these will be converted to HTML links. The webpage heading will be the same as the first-level heading in the markdown note.默认情况下,各部分和页面将遵循 /docs 内的文件夹结构。文件夹和子文件夹将显示为部分。请尽量不要在文件夹和文件名中使用空格,因为这些空格将被转换为 HTML 链接。网页标题将与 Markdown 笔记中的第一级标题相同。
- If you would like to arrange the pages manually, then use the
navoption in themkdocs.ymlconfiguration file at the root of this repo to set custom page navigation.- For example, see the setup for the Blue Book at github. Managing each page using
navcan become cumbersome as the number of notes increase though!例如,查看 GitHub 上蓝皮书的设置。不过,随着笔记数量的增加,使用nav来管理每一页可能会变得很麻烦!
mkdocs.yml配置文件中使用nav选项来设置自定义页面导航。 - For example, see the setup for the Blue Book at github. Managing each page using
- The Materials theme provides multiple options to arrange sections, use navigation tabs, and many other helpful navigation setups“材料”主题提供了多种选项来安排部分、使用导航标签以及许多其他有用的导航设置。
- binyamin/eleventy-garden: 🌱 A starter site for building a mind garden with eleventy宾亚明/eleventy-garden:🌱 一个使用 Eleventy 构建思维花园的起始站点
- datopian/obsidian-flowershow: plugin for publishing with flowershow direct from your obsidian vault.datopian/obsidian-flowershow:一款插件,可直接从您的 Obsidian 保险库发布到 Flowershow。
- kmaasrud/oboe: tool to convert an Obsidian vault into a static directory of HTML files.kmaasrud/oboe:一款将 Obsidian 笔记库转换为静态 HTML 文件目录的工具。
- Jackiexiao/foam-mkdocs-template: template for Obsidian/Foam using mkdocs/mkdocs-material/mkdocs-roamlinks-pluginJackiexiao/foam-mkdocs-template:使用 mkdocs/mkdocs-material/mkdocs-roamlinks-plugin 的 Obsidian/Foam 模板
- foambubble/foam-template: Foam workpace templatefoambubble/foam-template:Foam 工作区模板
- ObsidianPublisher/obsidian-mkdocs-publisher-template: Obsidian Mkdocs Publisher, a free obsidian publish alternative throught MkdocsObsidianPublisher/obsidian-mkdocs-publisher-template:Obsidian Mkdocs Publisher,一个通过 Mkdocs 实现的免费 Obsidian 发布替代方案。
- KosmosisDire/obsidian-webpage-export: Webpage HTML Export lets you export single files or whole vaults as HTML websites or documents. It is similar to publish, but you get direct access to the exported HTML.KosmosisDire/obsidian-webpage-export:网页 HTML 导出功能可让您将单个文件或整个知识库导出为 HTML 网站或文档。它类似于发布功能,但您可以直接访问导出的 HTML。
- Enveloppe/obsidian-enveloppe: publish your notes on a GitHub repository from Obsidian VaultEnveloppe/obsidian-enveloppe:从 Obsidian 保险库在 GitHub 代码库中发布您的笔记

