vuepress / ecosystem

Official plugins and themes for VuePress2
https://ecosystem.vuejs.press
MIT License
28 stars 36 forks source link

[Feature request] plugin-seo supports `Disallow: /` #89

Closed typed-sigterm closed 6 months ago

typed-sigterm commented 6 months ago

Clear and concise description of the problem

Some websites that are not open to the public and do not want to be indexed by search engines.

Suggested solution

interface SeoPluginOptions {
  /**
   * Whether to block search engine indexing
   *
   * 是否阻止搜索引擎收录
   */
  block?: boolean
}

-> robots.txt:

User-agent: *
Disallow: /

Alternative

No response

Additional context

No response

Mister-Hope commented 6 months ago

Then why don't you just disable the seo plugin

meteorlxy commented 6 months ago

Your point might be disallowing crawlers explicitly. Then you don't need seo plugin. You can create a .vuepress/public/robots.txt file with the content. See Assets > Public Files

typed-sigterm commented 6 months ago

Got it. Thanks