@humaner/into-markdown
v0.1.2
Published
Crawl a website. Get one clean markdown file for your agent knowledge source. No API key needed.
Maintainers
Readme
@humaner/into-markdown
Crawl a website. Get one clean markdown file for your agent knowledge source. No API needed.
npm install @humaner/into-markdown
npx playwright install chromiumCLI : Render the .md summary into /documentation - you must create the folder first
npx @humaner/into-markdown https://example.com > documentation/site.mdOptional UI
This repo only include the npm package and do not include any UI evironment. https://markdown.humaner.io remains the property of Humaner. If you want to do-so you must create your own environement.
import { convertSiteToMarkdown } from "@humaner/into-markdown";
const result = await convertSiteToMarkdown("https://example.com");
How it works
- Discover pages from
sitemap.xmland same-host links (BFS), up to 50 pages - Fetch each page over HTTP
- If the HTML looks like a JS shell, render it in headless Chromium (Playwright)
- Strip site chrome (nav, footer, sidebar, cookies, CTAs)
- Convert to markdown (Turndown + GFM tables)
- Bucket by path and assemble one
.mdknowledge-base document
Limits
- Max 50 pages per crawl
- ~5 minute wall clock
- Same host only
- Public pages only (SSRF guard)
- Static HTML stays on the fast path; SPAs use Chromium
Package surface
See SPEC.md for the API contract.
Scripts
npm install
npm run validate
npm run build
npm run setup:browser # to install ChromiumLicense
MIT
