Using Reseed

The Reseed CLI is run with one command, followed by one or more options in any order.

All commands (except clean) require both baseurl and dest options set. The rewrite-rss command also requires the rss option set. The clean command only requires the dest option set.

See Options for more info.

#Commands

All commands will first delete the directory specified by --dest. Be sure this option is configured correctly to avoid deleting the wrong files!

#reseed

Cleans destination directory, and copies files from src to dest/baseurl. CSS and HTML files have their hrefs/urls/etc (excluding external links) rewritten so that baseurl is prepended. If the site has a sitemap.xml, the urls within that sitemap will also be rewritten. If an RSS file is specified with the -r | --rss option, that file will be similarly processed.

Example:

$ reseed -s path/to/src -d path/to/dest -b baseurl

#reseed clean

Deletes all files in the destination directory.

Example:

$ reseed clean -d path/to/dest

#reseed clone-assets

Copy all files (excluding CSS and HTML) from source to dest/baseurl without altering the data.

Example:

$ reseed clone-assets -b baseurl -d path/to/dest

#reseed rewrite-css

Copies CSS files from src to dest/baseurl. Then rewrites the newly copied files so that internal urls/hrefs/etc have baseurl prepended to them.

Example:

$ reseed rewrite-css -b baseurl -d path/to/dest

#reseed rewrite-html

Copies HTML files from src to dest/baseurl. Rewrites the newly copied files so that internal urls/hrefs/etc have baseurl prepended to them.

Example:

$ reseed rewrite-html -b baseurl -d path/to/dest

#reseed rewrite-sitemap

Copies the sitemap (defaults to sitemap.xml) from src to dest/baseurl. Rewrites the copied file so that links have baseurl prepended to them. If the provided file is a sitemap index, the referenced sitemaps will also be processed.

The sitemap (or sitemap index) file can be specified using the -m | --sitemap option. If no sitemap file is specified, will default to sitemap.xml.

Example:

$ reseed rewrite-sitemap -b baseurl -d path/to/dest -m sitemapindex.xml

#reseed rewrite-rss

Copies the specified RSS file(s) from src to dest/baseurl. Rewrites the copied file(s) so that links have baseurl prepended to them.

The RSS file must be specified using the -r | --rss option. This option is a glob. The specified file(s) must have the .xml extension.

If using a glob with wildcards (*) you must wrap the glob in quotes. See the example below.

Example:

$ reseed rewrite-rss -b baseurl -d path/to/dest -r "**/index.xml"

#reseed serve

Runs reseed, then serves the copied files on a local webserver to be viewed in a browser. Then runs watch.

Example:

$ reseed serve -s path/to/src -d path/to/dest -b baseurl

#reseed watch

Continuously watches the src directory to check for changes. If a change occurs, a new build is triggered, and the browser is then reloaded.

Example:

$ reseed watch -s path/to/src -d path/to/dest -b baseurl

#Options

OptionAliasTypeDescription
--source-sStringThe source folder to clone. Defaults to current working directory.
--dest-dStringThe destination folder to clone the files to.
--baseurl-bStringThe filename to prepend to the files in the source.
--port-pIntegerThe port number to serve the cloned site on.
--extrasrc-eStringExtra src attribute to be rewritten.</br>Can set multiple attributes by specifying the flag multiple times.
--sitemap-mStringPath to the index sitemap. Defaults to sitemap.xml.
--rss-rStringGlob to rss file or files
--overwrite-oBooleanWhen cleaning --dest, don't prompt for confirmation.
--split IntegerThe number of partitions to divide files into.
--partition IntegerThe partition number to process.
--help BooleanShow help in the terminal