Skip to main content

为 wiki 创建页脚或边栏

您可以为 wiki 添加自定义边栏或页脚,以便为读者提供更多上下文信息。

谁可以使用此功能?

Wiki 适用于具有 GitHub Free 和组织的 GitHub Free 的公共存储库,以及具有 GitHub Pro、GitHub Team、GitHub Enterprise Cloud 和 GitHub Enterprise Server 的公共和专用存储库。 有关详细信息,请参阅 GitHub的计划

  1. On GitHub, navigate to the main page of the repository.

  2. Under your repository name, click Wiki.

    Screenshot of the menu in a repository. The "Wiki" option is outlined in dark orange.

  3. At the bottom of the page, click Add a custom footer.

  4. Use the text editor to type the content you want your footer to have.

  5. In the "Edit message" field, enter a commit message describing the footer you’re adding.

  6. To commit your changes to the wiki, click Save Page.

Creating a sidebar

  1. On GitHub, navigate to the main page of the repository.

  2. Under your repository name, click Wiki.

    Screenshot of the menu in a repository. The "Wiki" option is outlined in dark orange.

  3. Click Add a custom sidebar on the right side of the page.

  4. Use the text editor to add your page's content.

  5. In the "Edit message" field, enter a commit message describing the sidebar you’re adding.

  6. To commit your changes to the wiki, click Save Page.

If you create a file named _Footer.<extension> or _Sidebar.<extension>, we'll use them to populate the footer and sidebar of your wiki, respectively. Like every other wiki page, the extension you choose for these files determines how we render them.