parcel-reporter-sitemap

1.0.3 • Public • Published

Parcel (v2) Sitemap Plugin

GitHub Workflow Status npm Slack

A parcel plugin for creating (very) basic sitemaps.

Disclaimer:

This plugin will not create a fully featured sitemap, but the most basic one, that is still valid. Parcel makes it generally very easy for you to create a sitemap manually, as html files keep their names while beeing processed. So if you want to achieve perfect SEO optimization you should not use this plugin but create a sitemap manually.

However, if you just want to make sure all pages are listed so that search engines can crawl them, this plugin has you covered.

Installation

npm install -D parcel-reporter-sitemap

# or with yarn

yarn add -D parcel-reporter-sitemap

Configuration

Once the packager is installed, create or update .parcelrc accordingly:

{
  "extends": ["@parcel/config-default"],
  "reporters":  ["parcel-reporter-sitemap"]
}

Sitemap reporter configuration is done through environment variables.

  • PARCEL_SITEMAP_SITE_URL: location where your site will be hosted

If not specified parcel-reporter-sitemap will fallback to Parcel "public-url".

PARCEL_SITEMAP_SITE_URL="https://my.website.tld/"

More info

Contribute

You're interested in contributing? Awesome! Fork, make change, commit and create pull request. I'll do my best to merge changes!

License

MIT License

Previous work

Package Sidebar

Install

npm i parcel-reporter-sitemap

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

237 kB

Total Files

42

Last publish

Collaborators

  • fgribreau