验证Google的网站所有权以获取GitBook网站



如何在gitbook中进行Google验证所有权网站,例如,SiteMap上传到Google?

Google解释了许多技术。显然,最简单的是将HTML文件上传到主文件夹页面:https://support.google.com/webmasters/webmasters/answer/35179?hl = en

问题是GitBook没有以这种方式上传文件:www.mygitbooksite.com/googleVerificacion4341321.html。但是可以添加一个文件夹:www.mygitbooksite.com/someFolder/googleVerificacion4341321.html

我找到了一个可以与解决方案相关的gitbook插件:https://www.npmjs.com/package/package/gitbook-plugin-verifications

我搜索了很多,但是在进行此验证时没有运气,只有在如何添加Google Analytics(分析(中。

预先感谢!

回答我自己的问题,我找到了一种通过 html meta tag 的方法来验证网站的方法:

安装插件gitbook-plugin-meta-single,然后编辑 book.json文件:

  "pluginsConfig": {
        "meta-single": {
            "name": "google-site-verification",
            "content": "here the key string provided by google"
        }
    }

它将在<HEAD> TAG

中添加键
 <HTML>
  <HEAD>
  <TITLE>Your Title</TITLE>
  <meta name="google-site-verification" content="here the key string provided by google">
  </HEAD>
  <BODY>

单击验证在Google页面中的按钮,以便它们可以重新检查身份验证。就是这样!

最新更新