{"id":41823811,"url":"https://github.com/website-local/mdn-local","last_synced_at":"2026-05-02T12:03:50.396Z","repository":{"id":36986244,"uuid":"173395322","full_name":"website-local/mdn-local","owner":"website-local","description":"download localized mozilla developer docs to local device for offline usage","archived":false,"fork":false,"pushed_at":"2026-01-24T07:42:23.000Z","size":3201,"stargazers_count":28,"open_issues_count":5,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-01-24T17:35:07.396Z","etag":null,"topics":["cheerio","documentation","localization","mdn","mozilla","nodejs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/website-local.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-03-02T02:46:52.000Z","updated_at":"2026-01-24T07:42:26.000Z","dependencies_parsed_at":"2024-02-17T02:36:04.407Z","dependency_job_id":"da47d565-4e98-496e-a415-f74943aa4312","html_url":"https://github.com/website-local/mdn-local","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/website-local/mdn-local","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/website-local%2Fmdn-local","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/website-local%2Fmdn-local/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/website-local%2Fmdn-local/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/website-local%2Fmdn-local/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/website-local","download_url":"https://codeload.github.com/website-local/mdn-local/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/website-local%2Fmdn-local/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28748570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T07:58:02.558Z","status":"ssl_error","status_checked_at":"2026-01-25T07:57:57.153Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cheerio","documentation","localization","mdn","mozilla","nodejs"],"created_at":"2026-01-25T08:00:41.854Z","updated_at":"2026-05-02T12:03:50.389Z","avatar_url":"https://github.com/website-local.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mdn-local\ndownload localized mozilla developer docs to local device\n\n## Summary\n\n`mdn-local` downloads [MDN Web Docs](https://developer.mozilla.org/) for offline\nuse. It creates a self-contained local copy of a selected locale together with\nthe resources needed to view docs, examples, compatibility tables, and injected\noffline helpers without relying on the public site at runtime.\n\nFor locales other than `en-US`, `en-US` pages are used as a fallback when a\nlocalized page does not exist.\n\n## Quick start\n\nGo to [releases](https://github.com/website-local/mdn-local/releases), download\nan archive package instead of the source tarball, extract it somewhere on your\ndisk, then open `index.html`.\n\n## Using a release package\n\nIf you downloaded a prebuilt archive from the releases page, you do not need\nNode.js or a build step.\n\n1. Extract the archive to a local directory.\n2. Open `developer.mozilla.org/index.html` if it exists in the extracted\n   package.\n3. If the package contains a top-level `index.html`, open that file instead.\n\nThe packaged docs are intended to work directly from the local filesystem for\noffline browsing.\n\n## Build from source\n\nNode.js `\u003e=18.17.0` is required.\n\n```bash\nnpm ci\nnpm run build\n```\n\nUseful commands:\n\n- `npm run build` builds `lib/` and copies non-TypeScript assets\n- `npm test` runs lint and Jest\n- `npm run lint` applies ESLint fixes to `src/` and `test/`\n- `npm run tsc` runs the TypeScript compiler only\n\n## Developer usage\n\n`mdn-local` is built on top of\n[website-scrap-engine](https://github.com/website-local/website-scrap-engine).\nThe main entry point is\n[src/mdn/mdn-downloader.ts](https://github.com/website-local/mdn-local/blob/master/src/mdn/mdn-downloader.ts).\n\nExample probe download:\n\n```typescript\nimport createDownloader from './lib/mdn/mdn-downloader.js';\n\ncreateDownloader({\n  // Output directory\n  localRoot: 'temp/developer.mozilla.org_probe_en-US',\n  // Minimal scope for a smoke test\n  initialUrl: [\n    'https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API'\n  ],\n  maxDepth: 0,\n  deduplicateStripSearch: true,\n  meta: {\n    locale: 'en-US',\n    http2: false,\n  }\n}).then(d =\u003e d.onIdle().then(() =\u003e d.dispose()))\n  .catch(console.error);\n```\n\nFull locale download:\n\n```typescript\nimport createDownloader from './lib/mdn/mdn-downloader.js';\n\ncreateDownloader({\n  // Output directory\n  localRoot: 'temp/developer.mozilla.org_zh-CN',\n  // Omit initialUrl to use mdn-local's built-in locale entry set\n  concurrency: 15,\n  minConcurrency: 11,\n  req: {\n    retry: {\n      limit: 42\n    }\n  },\n  meta: {\n    locale: 'zh-CN',\n    http2: false,\n  }\n}).then(d =\u003e d.onIdle().then(() =\u003e d.dispose()))\n  .catch(console.error);\n```\n\nNotes:\n\n- Build first with `npm run build`, then run your script with `node`.\n- If `initialUrl` is omitted, `mdn-local` uses its built-in starting URLs for\n  the selected locale and performs a broad crawl from there.\n- Full locale downloads are large and long-running. Expect many hours of work\n  and a large output tree under `\u003clocalRoot\u003e/developer.mozilla.org/`.\n- After the download completes, open\n  `\u003clocalRoot\u003e/developer.mozilla.org/index.html`.\n\n## Output layout\n\nGenerated files are written under `\u003clocalRoot\u003e/developer.mozilla.org/`.\n\n- Localized HTML pages are stored under paths such as\n  `en-US/docs/.../*.html`\n- Injected assets are stored under `static/js/` and `static/css/`\n- Download logs are stored under `developer.mozilla.org/logs/`\n\nImportant log files:\n\n- `error.log`\n- `404.log`\n- `retry.log`\n- `skip.log`\n- `request.log`\n- `response.log`\n\nAs of `website-scrap-engine@0.9.0`, file logging is configured explicitly\nthrough the engine's `createLogger` hook. `mdn-local` keeps using the log4js\nadapter so these log files continue to be generated for download validation.\n\n## Which path to use\n\n- Use a release package if you only want to read the offline docs.\n- Build from source if you want to generate a new locale snapshot, run tests,\n  or change the downloader behavior.\n\n## Large video handling\n\nA set of large videos have been replaced with much smaller alternatives for\nfaster download and smaller packages. See\n[issue #1118](https://github.com/website-local/mdn-local/issues/1118) for\ndetails and the\n[asset release](https://github.com/website-local/assets/releases/tag/mdn-local-video)\nfor the full list.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebsite-local%2Fmdn-local","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebsite-local%2Fmdn-local","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebsite-local%2Fmdn-local/lists"}