1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-10-30 08:27:32 -04:00
gitea/docs/content/administration/search-engines-indexation.zh-cn.md
John Olheiser bd4c7ce578
Docusaurus-ify (#26051)
This PR cleans up the docs in a way to make them simpler to ingest by
our [docs repo](https://gitea.com/gitea/gitea-docusaurus).

1. It includes all of the sed invocations our ingestion did, removing
the need to do it at build time.
2. It replaces the shortcode variable replacement method with
`@variable@` style, simply for easier sed invocations when required.
3. It removes unused files and moves the docs up a level as cleanup.

---------

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-07-26 04:53:13 +00:00

1.1 KiB
Raw Blame History

date title slug sidebar_position toc draft aliases menu
2023-05-23T09:00:00+08:00 搜索引擎索引 search-engines-indexation 60 false false
/zh-cn/search-engines-indexation
sidebar
parent name sidebar_position identifier
administration 搜索引擎索引 60 search-engines-indexation

Gitea 安装的搜索引擎索引

默认情况下,您的 Gitea 安装将被搜索引擎索引。 如果您不希望您的仓库对搜索引擎可见,请进一步阅读。

使用 robots.txt 阻止搜索引擎索引

为了使 Gitea 为顶级安装提供自定义的robots.txt(默认为空的 404请在[custom文件夹或CustomPath]administration/customizing-gitea.md中创建一个名为 robots.txt 的文件。

有关如何配置 robots.txt 的示例,请参考 https://moz.com/learn/seo/robotstxt

User-agent: *
Disallow: /

如果您将Gitea安装在子目录中则需要在顶级目录中创建或编辑 robots.txt

User-agent: *
Disallow: /gitea/