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.
gatsby-remark-design-system-towavephone
Advanced tools
Remark plugin to create your design system with preconfigured specimens
🎨 Create your design system with Gatsby in Markdown
See it live in action! You can also have a look at the example repo.
gatsby-remark-design-system (inspired by Catalog) is a plugin that sits on top of Gatsby's remark transformer. You'll need to setup a Gatsby project and install at least the plugins gatsby-source-filesystem
, gatsby-transformer-remark
and gatsby-plugin-sass
. You then can use the so called Specimens in your markdown files to create your design system or styleguide.
Writing content in markdown is easy and so should be creating a design system. Including this plugin into your project will help you create a design system from scratch in no time - and you can also include other plugins, e.g. gatsby-remark-prismjs
to have syntax highlighted code.
npm install gatsby-remark-design-system
Note: If you're unsure about the instructions take a look at the implementation of the example repo!
// In your gatsby-config.js
plugins: [
{
resolve: 'gatsby-transformer-remark',
options: {
plugins: [
{
resolve: 'gatsby-remark-design-system',
options: {
// Class prefix for all elements of the design system specimens
// This prefix also needs to be set on wrapper components in your Gatsby project
// Default value is 'grds' - so if you want you can leave out this option entirely
classPrefix: 'grds',
}
}
],
},
},
],
The plugin ships with a theme that you can easily include in your Gatsby project, or you can build your own theme by copying and modyfing the example. To load the theme, just require its SCSS, e.g.
// layouts/index.js
require('gatsby-remark-design-system/theme/gatsby-remark-design-system-theme.scss');
If you just want to change the classPrefix
or other SCSS variables (but otherwise want to use the preconfigured theme) you should overwrite the variables like so:
// Create a empty scss file that gets imported into your project (e.g. base.scss)
$prefix: cool;
$primary: #c93a3c;
// Import your other scss files if necessary
// .......
// Import the theme
@import '~gatsby-remark-design-system/theme/gatsby-remark-design-system-theme.scss';
You can use the specimens by using three backticks followed by the name. The content of the specimen then gets defined in the code block.
```name|option
content
```
Options
autoplay: boolean
Default: false
loop: boolean
Default: false
name: string
span: number[1-6]
Width of the specimen
src: string
The path/url to the file. Needs to be in quotes
Example
```audio
autoplay: false
loop: false
name: Sound File #1
src: "/sound.mp3"
span: 3
```
Options
color: string
Define the color (in HEX, e.g. #b0f6ff)
name: string
Example
```color
name: Smaragd
color: #939d7b
```
Options
name: string, color: string
Each line represents a color. First define the name then after a comma the HEX value
Example
```color-palette
T400 - Shabby, #448c6c
T300 - Legendary, #dca114
T200 - Smoke, #6c3b0b
```
Options
color: string
Define the background color (in HEX, e.g. white) of the preview box
image: boolean
If true the image will be shown below
span: number[1-6]
Width of the specimen
src: string
The path/url to the file. Needs to be in quotes
subtitle: string
The filesize or other information
title: string
width: string
The width of the preview image (default: 200px)
Example
```download
color: white
image: true
span: 3
src: "/logo.png"
subtitle: 8KB
title: Avatar Social
width: 250px
```
Options
None
Example
```example
<button>You can insert your HTML here</button>
```
Options
directive
Green, positive note for showing Dos
warning
Red, warning note for showing Don'ts
neutral
Neutral note (Default)
Example
```hint|directive
Make it so!
```
```hint
Neutral Hint
```
```hint|warning
nooooooooo, not this way
```
Options
size: number|weight: number|metrics: string|weightDesc: string|usage: string
Each line represents a type. You have to define the values in the mentioned order and seperate with |
Example
```typography
42|700|Display|42, line height is 1.1x|Bold, 700|Display type is used for visual impact and emphasis
32|400|Page title|32, line height is 1.1x|Normal, 400|Page title is used to provide hiearchy
```
Options
autoplay: boolean
Default: false
loop: boolean
Default: false
muted: boolean
Default: false
name: string
src: string
The path/url to the file. Needs to be in quotes
Example
```video
autoplay: false
loop: false
muted: false
name: Animation Video
src: "https://www.w3schools.com/html/mov_bbb.mp4"
span: 3
```
FAQs
Remark plugin to create your design system with preconfigured specimens
The npm package gatsby-remark-design-system-towavephone receives a total of 0 weekly downloads. As such, gatsby-remark-design-system-towavephone popularity was classified as not popular.
We found that gatsby-remark-design-system-towavephone 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.