Chrome extension β Generates sitemap.xml and robots.txt for any website, including static and dynamic (React, Vue, Svelte, etc.) sites.
| Feature | Description |
|---|---|
| SPA Support | Collects links after JS render on single-page apps (React, Vue, Svelte, Angular) |
| Automatic Crawl | Crawls all same-site pages from a start URL using BFS |
| sitemap.xml | Outputs standard sitemaps.org XML |
| robots.txt | Generates sample robots.txt with User-agent, Allow, and Sitemap |
| Progress Bar | Visual progress based on pages crawled |
| Error List | Lists URLs that timed out or failed to load |
| Download | One-click download of generated sitemap and robots files |
Clone the repo
git clone https://github.com/eros1sh/sitemap-generator.git
cd sitemap-generator
Load the extension in Chrome
chrome://extensions/ in the address barsitemap-generator folderThe Dynamic Sitemap Generator icon appears in the toolbar.
https://example.com).sitemap.xml in your site root and adjust robots.txt if needed.βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Popup (popup.js) β
β β’ "Start Crawl" β gets active tab URL β
β β’ Sends START_CRAWLING to background β
β β’ Listens for CRAWL_STATUS / ERROR_FOUND / CRAWL_COMPLETE β
β β’ Shows progress, error list, sitemap/robots β
βββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ
β chrome.runtime.sendMessage
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Service Worker (background.js) β
β β’ Queue + visitedUrls + errors β
β β’ Per URL: open tab β wait 3s β executeScript β
β β’ getLinksOnPage(siteOrigin) collects same-origin <a href> β
β β’ BFS crawl of all pages β
β β’ generateSitemap() β XML urlset β
β β’ generateRobotsTxt() β User-agent, Allow, Sitemap β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
<, >, &, ', " in sitemap URLs are escaped as XML entities.| Permission | Purpose |
|---|---|
activeTab |
Access URL of the tab where the extension is used |
scripting |
Run script in pages to collect links |
storage |
Reserved for optional use |
downloads |
Download sitemap.xml and robots.txt |
tabs |
Open/close tabs for background crawl |
<all_urls> |
Host access to crawl any site |
The extension only crawls when you click Start Crawl; it does not collect data in the background continuously.
background.js (e.g. to 5000 ms).git checkout -b feature/your-featuregit commit -m 'Add some feature'git push origin feature/your-featureThis project is licensed under the MIT License. See LICENSE for details.
eros1sh
This extension was built to simplify generating sitemaps and robots files for SEO and indexing.