
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@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 819 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.