@whppt/sitemaps

1.0.1 • Public • Published

@whppt/sitemaps

npm version npm downloads License

📖 Release Notes

Table of Contents

Features

  • Sitemaps API queries.
  • Sitemaps viewing tool, available in the dashboard.

Usage

  1. Add @whppt/sitemaps dependency to your project
yarn add @whppt/sitemaps # or npm install @whppt/sitemaps
  1. Add @whppt/sitemaps to the modules section of nuxt.config.js
{
  modules: [
    // Simple usage
    '@whppt/sitemaps',

    // With options
    [
      '@whppt/sitemaps',
      {
        /* module options */
      },
    ],
  ];
}

note: nuxt modules loads modules in a reverse order, make sure to play any whppt modules before the @whppt/nuxt module

  1. Register the serverModule with @whppt/api-express, update your ~/server/index.js file to include.
const { serverModule } = require('@whppt/sitemaps');
// require any plugins that contain their own pageTypes like so
const myPlugin = require('./path/to/my/plugin.js').default;

const options = {
  modules: {
    // any other custom modules go here..
    sitemap: { filter: serverModule },
  },
  // pageTypes is required to tell the sitemaps query about all
  // of your custom pageTypes.
  pageTypes: [myPlugin.pageType /* Any other pageTypes you want the sitemaps module to be aware of */],
};

Options

coming soon...

License

MIT License

Readme

Keywords

none

Package Sidebar

Install

npm i @whppt/sitemaps

Weekly Downloads

13

Version

1.0.1

License

MIT

Unpacked Size

17.4 kB

Total Files

14

Last publish

Collaborators

  • terencek
  • gillyvii