
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
gatsby-remark-code-titles
Advanced tools
[](https://circleci.com/gh/DSchau/gatsby-remark-code-titles)
Adds a code title to code snippets

npm install gatsby-remark-code-titles --save-dev
in your gatsby-config.js
plugins: [
{
resolve: 'gatsby-transformer-remark',
options: {
plugins: [
{
resolve: 'gatsby-remark-code-titles',
options: {
className: 'your-custom-class-name',
},
}, // IMPORTANT: this must be ahead of other plugins that use code blocks
],
},
},
];
Now that we've injected the custom title, we need to style it! This presumes standard Gatsby prism highlighting, but tweak to your heart's content.
.gatsby-remark-code-title {
margin-bottom: -0.6rem;
padding: 0.5em 1em;
font-family: Consolas, 'Andale Mono WT', 'Andale Mono', 'Lucida Console',
'Lucida Sans Typewriter', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono',
'Liberation Mono', 'Nimbus Mono L', Monaco, 'Courier New', Courier,
monospace;
background-color: black;
color: white;
z-index: 0;
border-top-left-radius: 0.3em;
border-top-right-radius: 0.3em;
}
in your Markdown content
```js:title=example-file.js
alert('how cool is this!');
```js
This plugin will parse the Markdown AST, pluck the title, and then "clean" the code snippet language for further processing. In other words, the plugin will create the following structure, injecting a custom div with the title:
<div class="gatsby-code-title">example-file.js</div>
```js
alert('how cool is this');
```
FAQs
[](https://circleci.com/gh/DSchau/gatsby-remark-code-titles)
We found that gatsby-remark-code-titles demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.