{"_id":"@masonjames/emdash-human-sitemap","_rev":"2-c5a883b9ca8f7ce3fbc6fac80fc2c2e1","name":"@masonjames/emdash-human-sitemap","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@masonjames/emdash-human-sitemap","version":"0.1.0","keywords":["emdash","astro","cms","plugin","sitemap","human-sitemap","accessibility"],"author":{"name":"Mason James"},"license":"MIT","_id":"@masonjames/emdash-human-sitemap@0.1.0","maintainers":[{"name":"masonjames","email":"masonjames@gmail.com"}],"homepage":"https://github.com/masonjames/emdash-human-sitemap#readme","bugs":{"url":"https://github.com/masonjames/emdash-human-sitemap/issues"},"dist":{"shasum":"dbae0d36d50a62a971077cd434b857b69fad9ab6","tarball":"https://registry.npmjs.org/@masonjames/emdash-human-sitemap/-/emdash-human-sitemap-0.1.0.tgz","fileCount":14,"integrity":"sha512-I/vljABsPORzhoJIh7BJt3zFoZ0raQI9KRd3vdQvfWtZOG1v1o3B+8dLnWL2IRBLjkQ933tyvTFFVk/N+y7Onw==","signatures":[{"sig":"MEQCIFyPaK5EzC/WIKjiALckF0RXgcoJFbTtlJa5viD/UBhiAiATFmMkveAYOqNj0t7RSYnktTAzXFQadikT6Fd8K9VXfg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":43570},"main":"src/index.ts","type":"module","exports":{".":"./src/index.ts","./astro":"./src/astro/index.ts","./plugin":"./src/plugin.ts","./descriptor":"./src/descriptor.ts"},"gitHead":"1e85e865b96f5191ce41de0056ac01a8e8bded86","scripts":{"test":"node --import tsx --test tests/**/*.test.ts","check":"npm run typecheck && npm run test","typecheck":"tsc --noEmit"},"_npmUser":{"name":"masonjames","email":"masonjames@gmail.com"},"repository":{"url":"git+https://github.com/masonjames/emdash-human-sitemap.git","type":"git"},"_npmVersion":"11.11.1","description":"Human-readable sitemap block and Astro component for EmDash CMS","directories":{},"_nodeVersion":"25.8.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.0.0","typescript":"^5.0.0","@types/node":"^22.0.0","get-tsconfig":"^4.13.7"},"peerDependencies":{"astro":">=6.0.0-beta.0","emdash":">=0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/emdash-human-sitemap_0.1.0_1775187540289_0.09967681378457516","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@masonjames/emdash-human-sitemap","version":"0.1.1","description":"Human-readable sitemap block and Astro component for EmDash CMS","type":"module","main":"src/index.ts","exports":{".":"./src/index.ts","./descriptor":"./src/descriptor.ts","./plugin":"./src/plugin.ts","./astro":"./src/astro/index.ts"},"scripts":{"test":"node --import tsx --test tests/**/*.test.ts","typecheck":"tsc --noEmit","pack:check":"npm pack --dry-run","check":"npm run typecheck && npm run test","release:check":"npm run check && npm run pack:check"},"publishConfig":{"access":"public"},"keywords":["emdash","astro","cms","plugin","sitemap","human-sitemap","accessibility"],"peerDependencies":{"astro":">=6.0.0-beta.0","emdash":">=0.2.0"},"devDependencies":{"@types/node":"^22.0.0","get-tsconfig":"^4.13.7","tsx":"^4.0.0","typescript":"^5.0.0"},"repository":{"type":"git","url":"git+https://github.com/masonjames/emdash-human-sitemap.git"},"bugs":{"url":"https://github.com/masonjames/emdash-human-sitemap/issues"},"homepage":"https://github.com/masonjames/emdash-human-sitemap#readme","author":{"name":"Mason James"},"license":"MIT","_id":"@masonjames/emdash-human-sitemap@0.1.1","gitHead":"8e257b74f67b4b1e067e98b9ec871b629d3d1a79","_nodeVersion":"22.22.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-39XaOtgTtXqNXPuYAiuddHz1xaQWIJetu0FPNlFaxPbzzZVDM71qIp7b1UYNs7ek9gnDdvY1iNpXTzDlHZ16lg==","shasum":"6773ce3fd2b2a391a6dc6b268002e1812991e743","tarball":"https://registry.npmjs.org/@masonjames/emdash-human-sitemap/-/emdash-human-sitemap-0.1.1.tgz","fileCount":14,"unpackedSize":44365,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@masonjames%2femdash-human-sitemap@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCFkct7hHUxozTD0sGtexffPxgxAW7OIIWUFtFHXJMebAIhANpDwVaYguMx00sfsR6ggaWTcADKBVvvnXAPk9jDh21w"}]},"_npmUser":{"name":"masonjames","email":"masonjames@gmail.com"},"directories":{},"maintainers":[{"name":"masonjames","email":"masonjames@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/emdash-human-sitemap_0.1.1_1775220774140_0.6488210251705355"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-03T03:39:00.156Z","modified":"2026-04-03T12:52:54.591Z","0.1.0":"2026-04-03T03:39:00.459Z","0.1.1":"2026-04-03T12:52:54.305Z"},"bugs":{"url":"https://github.com/masonjames/emdash-human-sitemap/issues"},"author":{"name":"Mason James"},"license":"MIT","homepage":"https://github.com/masonjames/emdash-human-sitemap#readme","keywords":["emdash","astro","cms","plugin","sitemap","human-sitemap","accessibility"],"repository":{"type":"git","url":"git+https://github.com/masonjames/emdash-human-sitemap.git"},"description":"Human-readable sitemap block and Astro component for EmDash CMS","maintainers":[{"name":"masonjames","email":"masonjames@gmail.com"}],"readme":"# @masonjames/emdash-human-sitemap\n\nA trusted EmDash plugin that renders a human-readable sitemap for real people, not search-engine XML crawlers.\n\nIt adds:\n\n- a `humanSitemap` Portable Text block for editors,\n- a theme-importable `HumanSitemap` Astro component,\n- plugin settings for collections, menus, taxonomies, counts, sort, and section limits.\n\n## Install\n\nThis package expects the first EmDash release that exposes plugin settings helpers to the public runtime API. In practice, that means the next EmDash release after `0.1.0`.\n\n```bash\nnpm install @masonjames/emdash-human-sitemap\n```\n\nThen register it in `astro.config.mjs`:\n\n```js\nimport { defineConfig } from \"astro/config\";\nimport { emdash } from \"emdash/astro\";\nimport { humanSitemap } from \"@masonjames/emdash-human-sitemap/descriptor\";\n\nexport default defineConfig({\n  integrations: [\n    emdash({\n      plugins: [humanSitemap()],\n    }),\n  ],\n});\n```\n\n## Editor workflow\n\n1. Install and register the plugin.\n2. Open the plugin settings in EmDash admin.\n3. Choose the collections and menus you want to expose.\n4. Create a normal page such as `/sitemap`.\n5. Insert the **Human Sitemap** block.\n\n## Plugin settings\n\n`includedCollections` and `includedMenus` use one line per entry.\n\nExamples:\n\n```txt\npages\nposts|Articles\nresources|Knowledge Base\n```\n\n```txt\nprimary\nfooter|Footer Links\n```\n\nThe optional `|Label` suffix lets you rename a section heading without changing the underlying collection or menu slug.\n\nCollection and menu headings are overridable here. Taxonomy section headings currently use the taxonomy labels defined inside EmDash itself.\n\n## Direct theme usage\n\nYou can also import the component directly:\n\n```astro\n---\nimport { HumanSitemap } from \"@masonjames/emdash-human-sitemap/astro\";\n---\n\n<HumanSitemap\n  title=\"Browse the site\"\n  viewAllLinks={{\n    \"collection:posts\": { href: \"/posts\", label: \"Browse all posts\" },\n    \"taxonomy:category\": { href: \"/category\", label: \"Browse every category\" },\n  }}\n/>\n```\n\nIf your site uses custom URL patterns, pass explicit builders so links line up with your routes:\n\n```astro\n---\nimport { HumanSitemap } from \"@masonjames/emdash-human-sitemap/astro\";\n---\n\n<HumanSitemap\n  title={null}\n  collectionHrefBuilder={(collection, entry) => {\n    if (collection === \"pages\") return entry.id === \"index\" ? \"/\" : `/${entry.id}`;\n    if (collection === \"posts\") return `/writing/${entry.id}`;\n    return `/${collection}/${entry.id}`;\n  }}\n  taxonomyHrefBuilder={(taxonomy, term) => `/${taxonomy}/${term.slug}`}\n/>\n```\n\nDefault link behavior is intentionally simple:\n\n- pages: `/{slug}`\n- other collections: `/{collection}/{slug}`\n- taxonomies: `/{taxonomy}/{slug}`\n- menus: the resolved menu URLs already stored in EmDash\n\n## What the block can override\n\nPer page, editors can override:\n\n- title,\n- collections on/off,\n- menus on/off,\n- taxonomies on/off,\n- counts inherit/show/hide,\n- compact vs expanded layout.\n\n## Marketplace and `emdash plugin publish`\n\nThis package is a **trusted native plugin** intended for installation from npm and registration in `astro.config.mjs`.\n\nToday, EmDash marketplace publishing targets sandbox/standard plugins. Native plugins that rely on `componentsEntry` and Portable Text block rendering are not currently compatible with `emdash plugin bundle` / `emdash plugin publish`.\n\nSo the supported installation path for this package is:\n\n1. publish to npm,\n2. install it in your site,\n3. register it in `astro.config.mjs`.\n\n## CI and releases\n\nGitHub Actions runs CI for pushes and pull requests targeting `main`.\n\nTo publish a new version:\n\n1. bump `version` in `package.json`,\n2. commit and push to `main`,\n3. create and push a matching stable tag from that `main` commit, like `v0.1.1`.\n\nThe release workflow validates the package and then publishes it to npm.\n\n- CI currently installs with `--legacy-peer-deps` because the `emdash >=0.2.0` peer target has not landed on npm yet.\n- Preferred: configure npm Trusted Publishing for `masonjames/emdash-human-sitemap` using the workflow file `.github/workflows/release.yml`.\n- Fallback: add an `NPM_TOKEN` repository secret until trusted publishing is enabled.\n\n## Development\n\n```bash\nnpm install\nnpm run release:check\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}