这是用户在 2025-7-27 23:29 为 https://github.com/jobindjohn/obsidian-publish-mkdocs 保存的双语快照页面,由 沉浸式翻译 提供双语支持。了解如何保存?
set 限制解除
Skip to content
obsidian-publish-mkdocs Public template

A Template to Publish Obsidian/Foam Notes on Github Pages (uses MkDocs)

License

Open in github.dev Open in a new github.dev tab Open in codespace

jobindjohn/obsidian-publish-mkdocs

Add file

Add file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

148845b · Oct 11, 2024

History

41 Commits
Dec 14, 2023
Dec 14, 2023
Jul 4, 2022
Nov 23, 2021
Nov 23, 2021
Nov 23, 2021
Apr 1, 2021
Oct 11, 2024
Dec 14, 2023

Repository files navigation

Publish your Obsidian Notes发布您的 Obsidian 笔记

MkDocs template MkDocs模板Built with Material for MkDocs

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 博客的文件夹

Quick start 快速启动

  1. Create a new github repository using this template. Click the green button at the top or use this link.使用此模板创建一个新的 GitHub 代码库。点击顶部的绿色按钮或使用此链接。

  1. Give a name to your repository. By default your notes will be published at <https://username.github.io/repo-name/>
    • Copy only the main branch while creating the repo from the template从模板创建存储库时,仅复制  main  分支
    给您的存储库命名。默认情况下,您的笔记将在  <https://username.github.io/repo-name/>  发布。
  2. Clone the repository you generated into your Obsidian folder/vault.将您生成的仓库克隆到您的 Obsidian 文件夹/保险库中。
  3. Move your notes that you would like to make public to the repo-name/docs folder.
    • Easiest way to do this would be using drag and drop within Obsidian最简单的方法是在 Obsidian 中使用拖放功能来实现。
    将您想要公开的笔记移到  repo-name/docs  文件夹中。
  4. 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 主题发布您的笔记。
  5. Go to Settings > Pages and select the select the Source as your gh-pages branch.前往  Settings > Pages  并将源分支选择为您的  gh-pages  分支。

Not working for you? Open an issue and let me know what went wrong.如果对您不起作用?请打开一个议题并告知我哪里出了问题。

Configuring your website 配置您的网站

How do I arrange notes as sections and pages?如何将笔记整理成章节和页面?

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 nav option in the mkdocs.yml configuration 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 nav can become cumbersome as the number of notes increase though!例如,查看 GitHub 上蓝皮书的设置。不过,随着笔记数量的增加,使用  nav  来管理每一页可能会变得很麻烦!
    如果您希望手动安排页面,那么请在本仓库根目录下的  mkdocs.yml  配置文件中使用  nav  选项来设置自定义页面导航。
  • The Materials theme provides multiple options to arrange sections, use navigation tabs, and many other helpful navigation setups“材料”主题提供了多种选项来安排部分、使用导航标签以及许多其他有用的导航设置。

Alternatives 选择

Other interesting projects其他有趣的项目

➤ Notion
◷ 稍后读
Translate to
Translate to
Summarize
Paraphrase
Expand
Check Grammar
Answer
Explain
Go to chat