{"id":34719196,"url":"https://github.com/tats-u/docusaurus-plugin-copy-katex-assets","last_synced_at":"2026-05-25T06:32:35.155Z","repository":{"id":287714827,"uuid":"965566105","full_name":"tats-u/docusaurus-plugin-copy-katex-assets","owner":"tats-u","description":"Docusaurus plugin to copy KaTeX assets","archived":false,"fork":false,"pushed_at":"2026-05-23T01:38:17.000Z","size":626,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-23T03:26:14.531Z","etag":null,"topics":["docusaurus","docusaurus-plugin","katex"],"latest_commit_sha":null,"homepage":"https://tats-u.github.io/docusaurus-plugin-copy-katex-assets/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tats-u.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":"2025-04-13T12:56:42.000Z","updated_at":"2026-05-23T01:38:16.000Z","dependencies_parsed_at":"2025-04-13T14:31:30.880Z","dependency_job_id":"6ae387fa-3e2a-40b0-b084-1e94eed7e59d","html_url":"https://github.com/tats-u/docusaurus-plugin-copy-katex-assets","commit_stats":null,"previous_names":["tats-u/docusaurus-plugin-copy-katex-assets"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/tats-u/docusaurus-plugin-copy-katex-assets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tats-u%2Fdocusaurus-plugin-copy-katex-assets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tats-u%2Fdocusaurus-plugin-copy-katex-assets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tats-u%2Fdocusaurus-plugin-copy-katex-assets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tats-u%2Fdocusaurus-plugin-copy-katex-assets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tats-u","download_url":"https://codeload.github.com/tats-u/docusaurus-plugin-copy-katex-assets/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tats-u%2Fdocusaurus-plugin-copy-katex-assets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33462841,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-25T06:15:14.662Z","status":"ssl_error","status_checked_at":"2026-05-25T06:14:31.284Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["docusaurus","docusaurus-plugin","katex"],"created_at":"2025-12-25T01:30:05.502Z","updated_at":"2026-05-25T06:32:35.149Z","avatar_url":"https://github.com/tats-u.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docusaurus-plugin-copy-katex-assets plugin\n\n[![Version](https://img.shields.io/npm/v/@tats-u/docusaurus-plugin-copy-katex-assets)](https://npmjs.com/package/@tats-u/docusaurus-plugin-copy-katex-assets) [![NPM Downloads](https://img.shields.io/npm/dm/@tats-u/docusaurus-plugin-copy-katex-assets)](https://npmjs.com/package/@tats-u/docusaurus-plugin-copy-katex-assets) [![NPM Last Update](https://img.shields.io/npm/last-update/@tats-u/docusaurus-plugin-copy-katex-assets)](https://npmjs.com/package/@tats-u/docusaurus-plugin-copy-katex-assets)\n\nThis plugin copies KaTeX assets to the build directory. This makes it unnecessary to [load KaTeX assets from the CDN](https://docusaurus.io/docs/markdown-features/math-equations).\n\nDemo: https://tats-u.github.io/docusaurus-plugin-copy-katex-assets\n\n## How to Use\n\nInstall the plugin:\n\n```\nnpm install @tats-u/docusaurus-plugin-copy-katex-assets\n```\n\nThis package exports the following plugin and companion types and variables:\n\n| Name | Description |\n| --- | --- |\n| `copyKaTeXAssetsPlugin` | Docusaurus plugin to copy KaTeX assets |\n| `CopyKaTeXAssetsPluginOptions` | Configuration options for the plugin |\n| `defaultKaTeXStyleSheet` | Default KaTeX style sheet entry for `config.stylesheets` array |\n| `getKaTeXStyleSheet` | Ditto, but with custom base URL |\n| `defaultKaTeXCssPath` | Default KaTeX CSS path |\n| `getKaTeXCssPath` | Ditto, but with custom base URL |\n\nThen add the plugin to `docusaurus.config.js`:\n\n```js\nimport { copyKatexAssetsPlugin, defaultKaTeXStyleSheet } from '@tats-u/docusaurus-plugin-copy-katex-assets';\n\n/**\n * @import { CopyKaTeXAssetsPluginOptions } from '@tats-u/docusaurus-plugin-copy-katex-assets';\n */\n\nconst config = {\n  // ...\n  stylesheets: [\n    // ...\n    defaultKaTeXStyleSheet,\n  ],\n  plugins: [\n    // ...\n    copyKatexAssetsPlugin,\n  ],\n}\n```\n\n\u003e [!NOTE]\n\u003e For TypeScript, use the following instead:\n\u003e\n\u003e ```ts\n\u003e import { type CopyKaTeXAssetsPluginOptions, copyKatexAssetsPlugin, defaultKaTeXStyleSheet } from '@tats-u/docusaurus-plugin-copy-katex-assets';\n\u003e ```\n\n### Compatibility with Docusaurus Faster\n\nThis plugin is compatible with [Docusaurus Faster](https://github.com/facebook/docusaurus/issues/10556).\n\n### Configuration\n\nThe default deployed path is `/assets/katex-{KaTeX version}/katex.min.css`. If you want to change the path, pass `assetsRoot` to the plugin:\n\n```js\nconst config = {\n  // ...\n  plugins: [\n    // ...\n    [\n      copyKatexAssetsPlugin,\n      // Important: Path shall not start with `/`.\n      /** @satisfies {CopyKaTeXAssetsPluginOptions} */({ assetsRoot: 'assets/katex' }),\n    ],\n  ],\n}\n```\n\n\u003e [!NOTE]\n\u003e For TypeScript, use `{ ... } satisfies CopyKaTeXAssetsPluginOptions` instead.\n\n\nIf you want to use a custom base URL, pass `baseUrl` to the plugin, and use `getKaTeXStyleSheet` instead of `defaultKaTeXStyleSheet`:\n\n```js\nconst baseUrl = '/your-repo-name/';\n\nconst config = {\n  // ...\n  baseUrl,\n  // ...\n  stylesheets: [\n    // ...\n    getKaTeXStyleSheet(baseUrl),\n  ],\n  plugins: [\n    // ...\n    [\n      copyKatexAssetsPlugin,\n      /** @satisfies {CopyKaTeXAssetsPluginOptions} */({ baseUrl }),\n    ],\n  ],\n}\n```\n\n## Acknowledgement\n\nThis plugin is derived from [docusaurus-copy-plugin](https://github.com/rlamana/docusaurus-plugin-copy). Thanks to [Ramón Lamana (@rlamana)](https://github.com/rlamana) for the original work.\n\n## Demo Website\n\nThis website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.\n\n### Installation\n\n```\n$ pnpm i\n```\n\n### Local Development\n\n```\n$ node --run start\n```\n\nThis command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.\n\n### Build\n\n```\n$ node --run build\n```\n\nThis command generates static content into the `build` directory and can be served using any static contents hosting service.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftats-u%2Fdocusaurus-plugin-copy-katex-assets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftats-u%2Fdocusaurus-plugin-copy-katex-assets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftats-u%2Fdocusaurus-plugin-copy-katex-assets/lists"}