Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
markdown-navbar
Advanced tools
A React component renders an interactive navbar panel of Markdown docs for your blog or website.
Implement some regular functions easily by using this component, such as:
yarn add markdown-navbar # or `npm i markdown-navbar --save`
import React from 'react';
import ReactDOM from 'react-dom';
// One third-part component for render markdown documentation
import ReactMarkdown from 'react-markdown';
import MarkdownNavbar from 'markdown-navbar';
// The default style of markdown-navbar should be imported additionally
import 'markdown-navbar/dist/navbar.css';
const article = `# Markdown-Navbar Demo
## Chicken Chicken
Chicken Chicken Chicken Chicken Chicken.
* Chicken Chicken Chicken Chicken Chicken.
* Chicken Chicken Chicken Chicken Chicken.
* Chicken Chicken Chicken Chicken Chicken.
### Chicken Chicken Chicken
Chicken Chicken Chicken Chicken Chicken.
#### Chicken Chicken Chicken Chicken
Chicken Chicken Chicken Chicken Chicken Chicken.`;
function App() {
return (
<div className="App">
<div className="article">
<ReactMarkdown source={article} />
</div>
<div className="navigation">
<MarkdownNavbar source={article} />
</div>
</div>
);
}
ReactDOM.render(<App />, document.getElementById('root'));
declarative
is setted as true
.Property | Data Type | Default Value | Description |
---|---|---|---|
className | string | "" | The className that defines the outermost container of navbar |
source | string | "" | Markdown text content |
headingTopOffset | number | 0 | Anchor displacement relative to the top of the window (for the anchor jump) |
updateHashAuto | boolean | true | Automatically update the hash value of browser address when page scrolling if true |
declarative | boolean | false | Use the text of the title from Markdown content as the hash value for the anchor if true |
ordered | boolean | true | Whether the title contains a numerical prefix, such as: 1. 2. 2.2 |
onNavItemClick | function | (event, element, hashValue) => {} | The event callback function after clicking navbar item |
onHashChange | function | (newHash, oldHash) => {} | The event callback function before the hash value of browser address changing |
1.4.3 (2020-08-12)
<a name="1.4.0"></a>
hashchange
has been triggered (e76941d)<a name="1.3.7"></a>
FAQs
Best markdown navigation bar for React.
The npm package markdown-navbar receives a total of 189 weekly downloads. As such, markdown-navbar popularity was classified as not popular.
We found that markdown-navbar 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.