@gitbook-ng/gitbook-plugin-sitemap

1.3.2 • Public • Published

Sitemap for @gitbook-ng/gitbook

A sitemap plugin for @gitbook-ng/gitbook.

Generate a sitemap for the gitbook website. The output sitemap file is sitemap.xml.

Add it to your book.json with a basic configuration:

{
    "plugins": ["sitemap"],
    "pluginsConfig": {
        "sitemap": {
            "hostname": "https://example.com",
            "pathPrefix": "/mybook/"
        }
    }
}

Install

It is part of @gitbook-ng/gitbook, you donot need install it separately.

Config

hostname

Root domain of URL, must not include URL path.

e.g. https://example.com

pathPrefix

Path prefix for sitemap link. If you do not want to host your book on the root (/) of your site, for example, you want to host your book on https://example.com/books/book1/, you can use following config:

{
    "plugins": ["sitemap"],
    "pluginsConfig": {
        "sitemap": {
            "hostname": "https://example.com",
            "pathPrefix": "/books/book1/"
        }
    }
}

Package Sidebar

Install

npm i @gitbook-ng/gitbook-plugin-sitemap

Weekly Downloads

20

Version

1.3.2

License

Apache-2.0

Unpacked Size

14.6 kB

Total Files

4

Last publish

Collaborators

  • mingc