Skip to main content

此版本的 GitHub Enterprise 已停止服务 2022-10-12. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

Editing wiki content

You can add images and links to content in your wiki, and use some supported MediaWiki formats.

Wiki 适用于具有 GitHub Free 和组织的 GitHub Free 的公共仓库,以及具有 GitHub Pro、GitHub Team、GitHub Enterprise Cloud 和 GitHub Enterprise Server 的公共和私有仓库。

You can create links in wikis using the standard markup supported by your page, or using MediaWiki syntax. For example:

  • If your pages are rendered with Markdown, the link syntax is [Link Text](full-URL-of-wiki-page).
  • With MediaWiki syntax, the link syntax is [[nameofwikipage|Link Text]].

Adding images

Wikis can display PNG, JPEG, and GIF images.

  1. On your GitHub Enterprise Server instance, navigate to the main page of the repository.
  2. 在存储库名称下,单击 Wiki。 Wiki 菜单链接
  3. Using the wiki sidebar, navigate to the page you want to change, and then click Edit.
  4. On the wiki toolbar, click Image. Wiki Add image button
  5. In the "Insert Image" dialog box, type the image URL and the alt text (which is used by search engines and screen readers).
  6. Click OK.

Linking to images in a repository

You can link to an image in a repository on GitHub Enterprise Server by copying the URL in your browser and using that as the path to the image. For example, embedding an image in your wiki using Markdown might look like this:

[[https://github.com/USERNAME/REPOSITORY/blob/main/img/octocat.png|alt=octocat]]

Supported MediaWiki formats

No matter which markup language your wiki page is written in, certain MediaWiki syntax will always be available to you.

  • Links (except AsciiDoc)
  • Horizontal rules via ---
  • Shorthand symbol entities (such as δ or €)

For security and performance reasons, some syntaxes are unsupported.

  • Transclusion
  • Definition lists
  • Indentation
  • Table of contents