Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including pub-pkg-seo with all npm packages installed. Try it out:

var pubPkgSeo = require("pub-pkg-seo")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

pub-pkg-seo v1.0.11

pub-server package for generating robots.txt and sitemap.xml

pub-pkg-seo

CI

This pub-server package provides a convenient way to generate sitemap.xml and robots.txt.

installation

  • npm install --save pub-pkg-seo
  • add pub-pkg-seo to your pub-config pkgs

usage

The generated /robots.txt file will allow all pages unless noRobots:true is set in pub-config.

Layout templates should embed {{{metaSeo}}} in the HTML header. This will also inject a <meta name="robots" content="noindex, nofollow"> unless noRobots:true

The generated /sitemap.xml will include fully qualified links to all generated pages except those with metadata values nocrawl:true or nopublish:true.

sitemap links will be qualified with the opts.appUrl prefix (also settable via the APP environment variable.)

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free