Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@saucelabs/theme-github-codeblock
Advanced tools
A Docusaurus v2 plugin that supports referencing code examples from public GitHub repositories.
A Docusaurus v2 plugin that supports referencing code examples from public GitHub repositories.
Note: this theme plugin requires Docusaurus v2
First, add the theme plugin to your dependencies:
# NPM
npm install --save @saucelabs/theme-github-codeblock
# Yarn
yarn add @saucelabs/theme-github-codeblock
Add the theme plugin to your list of themes in the docusaurus.config.js
:
// ...
themes: [
'@saucelabs/theme-github-codeblock'
],
// ...
In order to reference GitHub snippets in your markdown, create code blocks with a reference
attached to the language meta string and put the link to your GitHub reference in the code block, e.g.:
```js reference
https://github.com/saucelabs/docusaurus-theme-github-codeblock/blob/main/src/theme/ReferenceCodeBlock/index.tsx#L105-L108
```
You can also set a custom title:
```js reference title="Example"
https://github.com/saucelabs/docusaurus-theme-github-codeblock/blob/main/src/theme/ReferenceCodeBlock/index.tsx#L105-L108
```
The plugin will download the code and display the desired lines:
If you are interested contributing to this project, see CONTRIBUTING.md.
FAQs
A Docusaurus v2 plugin that supports referencing code examples from public GitHub repositories.
The npm package @saucelabs/theme-github-codeblock receives a total of 938 weekly downloads. As such, @saucelabs/theme-github-codeblock popularity was classified as not popular.
We found that @saucelabs/theme-github-codeblock demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.