{"id":34719228,"url":"https://github.com/tats-u/docusaurus-plugin-copy-temml-assets","last_synced_at":"2026-05-27T05:34:32.657Z","repository":{"id":288917289,"uuid":"969564308","full_name":"tats-u/docusaurus-plugin-copy-temml-assets","owner":"tats-u","description":"Docusaurus plugin to copy Temml assets","archived":false,"fork":false,"pushed_at":"2026-05-23T01:37:47.000Z","size":1527,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-23T03:26:11.718Z","etag":null,"topics":["docusaurus","docusaurus-plugin","mathml","temml"],"latest_commit_sha":null,"homepage":"https://tats-u.github.io/docusaurus-plugin-copy-temml-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-20T12:46:52.000Z","updated_at":"2026-05-23T01:37:48.000Z","dependencies_parsed_at":"2025-06-02T15:47:20.663Z","dependency_job_id":null,"html_url":"https://github.com/tats-u/docusaurus-plugin-copy-temml-assets","commit_stats":null,"previous_names":["tats-u/docusaurus-plugin-copy-temml-assets"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tats-u/docusaurus-plugin-copy-temml-assets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tats-u%2Fdocusaurus-plugin-copy-temml-assets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tats-u%2Fdocusaurus-plugin-copy-temml-assets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tats-u%2Fdocusaurus-plugin-copy-temml-assets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tats-u%2Fdocusaurus-plugin-copy-temml-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-temml-assets/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tats-u%2Fdocusaurus-plugin-copy-temml-assets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33553126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","mathml","temml"],"created_at":"2025-12-25T01:30:11.173Z","updated_at":"2026-05-27T05:34:32.642Z","avatar_url":"https://github.com/tats-u.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docusaurus-plugin-copy-temml-assets plugin\n\n[![Version](https://img.shields.io/npm/v/@tats-u/docusaurus-plugin-copy-temml-assets)](https://npmjs.com/package/@tats-u/docusaurus-plugin-copy-temml-assets) [![NPM Downloads](https://img.shields.io/npm/dm/@tats-u/docusaurus-plugin-copy-temml-assets)](https://npmjs.com/package/@tats-u/docusaurus-plugin-copy-temml-assets) [![NPM Last Update](https://img.shields.io/npm/last-update/@tats-u/docusaurus-plugin-copy-temml-assets)](https://npmjs.com/package/@tats-u/docusaurus-plugin-copy-temml-assets)\n\nThis plugin copies [Temml](https://temml.org) assets to the build directory.\n\nDemo: https://tats-u.github.io/docusaurus-plugin-copy-temml-assets (uses [Noto Sans Math](https://fonts.google.com/noto/specimen/Noto+Sans+Math))\n\n## Why Temml instead of KaTeX?\n\n- Can use the other fonts (including local fonts) than Latin Modern.\n- Can reduce the download size if you stick to local fonts.\n- Can reduce the number of deployment files.\n- Supports more LaTeX features.\n- Output is simpler (KaTeX outputs invisible MathML tags too).\n\n## How to Use\n\nInstall the plugin and [`@daiji256/rehype-mathml`](https://github.com/daiji256/rehype-mathml) (instead of `rehype-katex`):\n\n```\nnpm install @tats-u/docusaurus-plugin-copy-temml-assets @daiji256/rehype-mathml\n```\n\nThis package exports the following plugin and companion types and variables:\n\n| Name | Description |\n| --- | --- |\n| `copyTemmlAssetsPlugin` | Docusaurus plugin to copy KaTeX assets |\n| `CopyTemmlAssetsPluginOptions` | Configuration options for the plugin |\n| `getTemmlStyleSheet` | Ditto, but with custom base URL |\n| `getTemmlCssPath` | Ditto, but with custom base URL |\n\nThen add plugins to `docusaurus.config.js`:\n\n```js\nimport remarkMath from 'remark-math';\nimport rehypeMathml from '@daiji256/rehype-mathml';\nimport { copyTemmlAssetsPlugin, getTemmlStyleSheet } from '@tats-u/docusaurus-plugin-copy-temml-assets';\n\n/**\n * @import { CopyTemmlAssetsPluginOptions } from '@tats-u/docusaurus-plugin-copy-temml-assets';\n */\n\nconst remarkPlugins = [remarkMath];\n// Use @daiji256/rehype-mathml instead of rehype-katex\nconst rehypePlugins = [rehypeMathMl];\n\nconst baseUrl = '/';\n\n// You must use satisfies in TypeScript\nconst temmlPluginOptions = /** @satisfies {CopyTemmlAssetsPluginOptions} */ ({\n  baseUrl,\n  fontPath: 'path/to/font.woff2',\n});\n\nconst config = {\n  // ...\n  baseUrl,\n  stylesheets: [\n    // ...\n    getTemmlStyleSheet(temmlPluginOptions),\n  ],\n  plugins: [\n    // ...\n    [copyTemmlAssetsPlugin, temmlPluginOptions],\n  ],\n  // ...\n  presets: [\n    [\n      'classic',\n      /** @satisfies {import('docusaurus/preset-classic').PresetConfig} */ (\n        {\n          docs: {\n            // If you use docs\n            docs: {\n              // ...\n              remarkPlugins,\n              rehypePlugins,\n            },\n            // If you use blog\n            blog: {\n              // ...\n              remarkPlugins,\n              rehypePlugins,\n            },\n            // If you customize pages\n            pages: {\n              // ...\n              remarkPlugins,\n              rehypePlugins,\n            },\n          },\n        },\n      ),\n    ],\n  ],\n}\n```\n\n\u003e [!NOTE]\n\u003e For TypeScript, use the following instead:\n\u003e\n\u003e ```ts\n\u003e import {\n\u003e   type CopyTemmlAssetsPluginOptions,\n\u003e   copyTemmlAssetsPlugin,\n\u003e   getTemmlStyleSheet,\n\u003e } from '@tats-u/docusaurus-plugin-copy-temml-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/temml-{Temml version}/Temml-{Font type}.css`. If you want to change the path, pass `assetsRoot` to the plugin:\n\n```js\nconst temmlPluginOptions = /** @satisfies {CopyTemmlAssetsPluginOptions} */ ({\n  baseUrl,\n  fontPath: 'path/to/font.woff2',\n  assetsRoot: 'assets/temml',\n});\n```\n\n\u003e [!NOTE]\n\u003e For TypeScript, use `{ ... } satisfies CopyTemmlAssetsPluginOptions` instead.\n\n`fontPreset` is automatically detected from the basename of `fontPath` if not specified. If the basename is irregular, you can specify it manually:\n\n```js\nconst temmlPluginOptions = /** @satisfies {CopyTemmlAssetsPluginOptions} */ ({\n  baseUrl,\n  fontPath: 'path/to/stix2.woff2', // Standard name: STIXTwoMath.woff2\n  fontPreset: 'STIX2',\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-temml-assets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftats-u%2Fdocusaurus-plugin-copy-temml-assets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftats-u%2Fdocusaurus-plugin-copy-temml-assets/lists"}