{"id":16618716,"url":"https://github.com/jperasmus/docsify-copy-code","last_synced_at":"2025-04-05T12:08:54.180Z","repository":{"id":25697676,"uuid":"105060727","full_name":"jperasmus/docsify-copy-code","owner":"jperasmus","description":"A docsify plugin that copies Markdown code block to your clipboard","archived":false,"fork":false,"pushed_at":"2024-03-17T07:18:10.000Z","size":671,"stargazers_count":96,"open_issues_count":4,"forks_count":75,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T13:51:27.899Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jperasmus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2017-09-27T19:31:36.000Z","updated_at":"2024-05-19T16:54:57.892Z","dependencies_parsed_at":"2024-03-17T08:26:56.706Z","dependency_job_id":"ea683c56-afd8-402d-b0a9-5245922db795","html_url":"https://github.com/jperasmus/docsify-copy-code","commit_stats":{"total_commits":66,"total_committers":6,"mean_commits":11.0,"dds":0.5303030303030303,"last_synced_commit":"0f7c9004f73256aba8213a2f9fddffb55589bb21"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jperasmus%2Fdocsify-copy-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jperasmus%2Fdocsify-copy-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jperasmus%2Fdocsify-copy-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jperasmus%2Fdocsify-copy-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jperasmus","download_url":"https://codeload.github.com/jperasmus/docsify-copy-code/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332612,"owners_count":20921853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-12T02:21:18.468Z","updated_at":"2025-04-05T12:08:54.159Z","avatar_url":"https://github.com/jperasmus.png","language":"JavaScript","readme":"# docsify-copy-code\n\n[![NPM](https://img.shields.io/npm/v/docsify-copy-code.svg?style=flat-square)](https://www.npmjs.com/package/docsify-copy-code)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://github.com/jhildenbiddle/docsify-copy-code/blob/master/LICENSE)\n\nA [docsify](https://docsify.js.org) plugin that adds a button to easily copy code blocks to your clipboard.\n\n## Installation\n\n### Production\n\nAdd following script tag to your `index.html` after docsify. Specifying the `@[version]` in the URL ensures that the release of a major update (v3.x) will not break your production site:\n\n```html\n\u003c!-- Latest v2.x.x --\u003e\n\u003cscript src=\"https://unpkg.com/docsify-copy-code@2\"\u003e\u003c/script\u003e\n```\n\n### Development\n\nIf you prefer to load the latest version of the library, you may do so by omitting the `@[version]` from the above URL.\n\n```html\n\u003c!-- Latest (not recommended for production) --\u003e\n\u003cscript src=\"https://unpkg.com/docsify-copy-code\"\u003e\u003c/script\u003e\n```\n\n## Usage\n\nCreate a markdown code block with help of triple backticks at the beginning and end of your code. This block will have a copy button on the top right when hovering over it.\n\n## Options\n\n### Button text\n\nButton text can be customized as follows:\n\n```javascript\nwindow.$docsify = {\n  // docsify-copy-code (defaults)\n  copyCode: {\n    buttonText: 'Copy to clipboard',\n    errorText: 'Error',\n    successText: 'Copied',\n  },\n};\n```\n\n### Localization (l10n)\n\nButton text can also be customized based on the current URL. Object key/value pairs are processed in the order provided.\n\n```javascript\nwindow.$docsify = {\n  copyCode: {\n    buttonText: {\n      '/zh-cn/': '点击复制',\n      '/ru/': 'Скопировать в буфер обмена',\n      '/de-de/': 'Klicken Sie zum Kopieren',\n      '/es/': 'Haga clic para copiar',\n      '/': 'Copy to clipboard',\n    },\n    errorText: {\n      '/zh-cn/': '错误',\n      '/ru/': 'ошибка',\n      '/': 'Error',\n    },\n    successText: {\n      '/zh-cn/': '复制',\n      '/ru/': 'Скопировано',\n      '/de-de/': 'Kopiert',\n      '/es/': 'Copiado',\n      '/': 'Copied',\n    },\n  },\n};\n```\n\n**Note:** Docsify's [alias](https://docsify.js.org/#/configuration?id=alias) option makes it easy to manage local content using separate directories. See the [`/demo/`](https://github.com/jperasmus/docsify-copy-code/tree/master/demo) content in this repo for an example.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](https://github.com/jperasmus/docsify-copy-code/blob/master/LICENSE) for details.\n","funding_links":[],"categories":["Plugins"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjperasmus%2Fdocsify-copy-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjperasmus%2Fdocsify-copy-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjperasmus%2Fdocsify-copy-code/lists"}