@whppt/sitemaps
v1.0.1
Published
[![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href] [![License][license-src]][license-href]
Downloads
25
Readme
@whppt/sitemaps
Table of Contents
Features
- Sitemaps API queries.
- Sitemaps viewing tool, available in the dashboard.
Usage
- Add
@whppt/sitemaps
dependency to your project
yarn add @whppt/sitemaps # or npm install @whppt/sitemaps
- Add
@whppt/sitemaps
to themodules
section ofnuxt.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
- 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...