This repository has been archived by the owner on Jan 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
61 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,34 @@ | ||
# merge-sitemaps | ||
|
||
A simple CLI and npm package to merge sitemaps together. | ||
|
||
## Usage | ||
|
||
### With CLI | ||
|
||
```bash | ||
$ npx merge-sitemaps sitemap.xml subdir/other-sitemap.xml build/sitemap.xml | ||
``` | ||
|
||
(With the CLI, argument 1 is the base sitemap, argument 2 is the secondary sitemap, and argument 3 is the destination for the output.) | ||
|
||
### With API | ||
|
||
```js | ||
var mergeSitemaps = require("merge-sitemaps"); | ||
|
||
// note: the API doesn't actually do any work with files, it just does the string manipulation and related stuff | ||
console.log( | ||
mergeSitemaps("base-xml-sitemap-as-string", "secondary-xml-sitemap-as-string") | ||
); | ||
``` | ||
|
||
## License | ||
|
||
MIT. See the LICENSE file. | ||
|
||
## Credits | ||
|
||
- [Reece Dunham](https://rdil.rocks) - Author | ||
- [Dowland Aiello](https://github.com/dowlandaiello) - Making it work | ||
- [This StackOverflow post](https://stackoverflow.com/questions/27936772/how-to-deep-merge-instead-of-shallow-merge) - Very helpful |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Dev files | ||
|
||
These are example sitemaps used to test the program in development. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>https://rdil.rocks/thing/</loc><changefreq>weekly</changefreq><priority>0.5</priority></url></urlset> | ||
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://rdil.rocks/pages/thing.html</loc><lastmod>2020-09-15T11:03:04-04:00</lastmod></url><url><loc>https://rdil.rocks/</loc><lastmod>2020-09-15T11:03:04-04:00</lastmod></url></urlset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters