提交您的主题

官方原文档链接:提交您的主题

If you want to share your theme with the Obsidian community, the best way is to submit it to the official list of themes. Once we've reviewed and published your theme, users can install it directly from within Obsidian. It'll also be featured in the plugin directory on the Obsidian website.
如果您想与黑曜石社区分享您的主题,最好的方法是将其提交到官方主题列表中。一旦我们审核并发布了您的主题,用户就可以直接从 Obsidian 中安装它。它还将出现在 Obsidian 网站的插件目录中。

You only need to submit the initial version of your theme. After your theme has been published, users can automatically download new releases from GitHub directly from within Obsidian.
您只需要提交模板的初始版本。发布主题后,用户可以直接从 Obsidian 中自动从 GitHub 下载新版本。

Prerequisites 前置条件

To complete this guide, you'll need:
要完成本指南,您需要:

Before you begin 准备工作

Before you submit your theme, make sure you have the following files in the root folder of your repository:
在提交主题之前,请确保存储库的根文件夹中有以下文件:

Step 1: 将主题发布到 GitHub

Template repositories 模板存储库

If you created your theme from one of our template repositories, you may skip this step.
如果您从我们的模板存储库之一创建了主题,则可以跳过此步骤。

To review your theme, we need to access to the source code on GitHub. If you're unfamiliar with GitHub, refer to the GitHub docs for how to Create a new repository.
要查看您的主题,我们需要访问 GitHub 上的源代码。如果您不熟悉 GitHub,请参阅 GitHub 文档,了解如何创建新存储库。

Step 2: 提交模版以供审核

In this step, you'll submit your theme to the Obsidian team for review.
在此步骤中,您需要将模版提交给黑曜石团队进行审核。

  1. In community-css-themes.json, add a new entry at the end of the JSON array. The following example shows the entry for the Minimal theme.
    在 community-css-themes.json 中,在 JSON 数组的末尾添加一个新条目。以下示例显示了 Minimal 主题的条目。

    {
      "name": "Minimal",
      "author": "kepano",
      "repo": "kepano/obsidian-minimal",
      "screenshot": "dark-simple.png",
      "modes": ["dark", "light"]
    },
    
    • name and author determines how your plugin appears to the user, and should match the corresponding properties in your Manifest.
      name 和 author 决定插件对用户的显示方式,并且应与清单中的相应属性匹配。
    • repo is the path to your GitHub repository. For example, if your GitHub repo is located at https://github.com/your-username/your-repo-name, the path is your-username/your-repo-name.
      repo 是 GitHub 存储库的路径。例如,如果 GitHub 存储库位于 https://github.com/your-username/your-repo-name 则路径为 your-username/your-repo-name .
    • screenshot is the path to a screenshot of your theme. The screenshot looks best with a 16:9 aspect ratio. Recommended image dimensions: 512 x 288 pixels.
      screenshot 是主题屏幕截图的路径。屏幕截图在 16:9 的纵横比下看起来最好。建议的图像尺寸:512 x 288 像素。
    • modes lists the color modes that your theme supports.
      modes 列出了您的主题支持的颜色模式。

    Remember to add a comma after the closing brace, }, of the previous entry.
    请记住在上一个条目的右大括号}后添加一个逗号。

  2. Select Commit changes... in the upper-right corner.
    选择提交更改...在右上角。

  3. Select Propose changes. 选择“提出更改”。

  4. Select Create pull request.
    选择“创建拉取请求”。

  5. Select Preview, and then select Community Theme.
    选择“预览”,然后选择“社区主题”。

  6. Click Create pull request.
    单击“创建拉取请求”。

  7. In the name of the pull request, enter "Add [...] theme", where [...] is the name of your theme.
    在拉取请求的名称中,输入“添加 [...]theme“,其中 [...] 是主题的名称。

  8. Fill in the details in the description for the pull request. For the checkboxes, insert an x between the brackets, [x], to mark them as done.
    在拉取请求的说明中填写详细信息。对于复选框,请在括号之间插入  x 以 [x] 将其标记为完成。

  9. Click Create pull request (for the last time 🤞).
    单击“创建拉取请求(最后一次🤞)”。

You've now submitted your theme to the Obsidian theme directory. Sit back and wait for us to review your submission.
现在,您已将主题提交到 Obsidian 主题目录。请坐下来等待我们审核您的提交。

How long does it take to review my theme?
审核我的主题需要多长时间?

The time it takes to review your submission depends on the current workload of the Obsidian team. The team is still small, so please be patient while you wait for your theme to be reviewed. We're currently unable to give any estimates on when we'll be able to review your submission.
审核提交所需的时间取决于黑曜石团队当前的工作量。团队仍然很小,所以在等待您的主题被审查时请耐心等待。我们目前无法估计何时能够审核您的提交。

Step 4: 处理审阅意见

Once a reviewer has reviewed your theme, they'll add a comment to your pull request with the result of the review. The reviewer may require that you update your theme, or they can offer suggestions on how you can improve it.
审阅者审核完您的主题后,他们会在您的拉取请求中添加评论,其中包含审核结果。审阅者可能会要求您更新主题,或者他们可以就如何改进主题提供建议。

Address any required changes and update the GitHub release with the new changes. Leave a comment on the PR to let us know you've addressed the feedback. Don't open a new PR.
解决任何必需的更改,并使用新更改更新 GitHub 版本。在 PR 上发表评论,让我们知道你已解决反馈。不要打开新的 PR。

We'll publish the theme as soon we've verified that all required changes have been addressed.
一旦我们验证了所有必需的更改都已解决,我们将立即发布主题。

 注意

While only Obsidian team members can publish your theme, other community members may also offer to review your submission in the meantime.
虽然只有黑曜石团队成员可以发布您的主题,但其他社区成员也可能在此期间提出审查您的提交。

Next steps 后续步骤


Once we've reviewed and published your theme, it's time to announce it to the community:
一旦我们审核并发布了您的主题,就可以向社区发布它了:

LINKS TO THIS PAGE 链接到此页面

Home 首页

Release your theme with GitHub Actions
使用 GitHub Actions 发布主题