Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #203 from primer/erb-syntax
Add syntax highlighting support for ruby and erb
- Loading branch information
Showing
7 changed files
with
157 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@primer/gatsby-theme-doctocat": minor | ||
--- | ||
|
||
Add syntax highlighting support for `ruby` and `erb` code examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
export default { | ||
plain: { | ||
color: "#393A34", | ||
backgroundColor: "#f6f8fa", | ||
}, | ||
styles: [ | ||
{ | ||
types: ["comment", "prolog", "doctype", "cdata"], | ||
style: { | ||
color: "#999988", | ||
fontStyle: "italic", | ||
}, | ||
}, | ||
{ | ||
types: ["namespace"], | ||
style: { | ||
opacity: 0.7, | ||
}, | ||
}, | ||
{ | ||
types: ["string", "attr-value"], | ||
style: { | ||
color: "#e3116c", | ||
}, | ||
}, | ||
{ | ||
types: ["punctuation", "operator"], | ||
style: { | ||
color: "#393A34", | ||
}, | ||
}, | ||
{ | ||
types: [ | ||
"entity", | ||
"url", | ||
"symbol", | ||
"number", | ||
"boolean", | ||
"variable", | ||
"constant", | ||
"property", | ||
"regex", | ||
"inserted", | ||
], | ||
style: { | ||
color: "#36acaa", | ||
}, | ||
}, | ||
{ | ||
types: ["atrule", "keyword", "attr-name", "selector"], | ||
style: { | ||
color: "#00a4db", | ||
}, | ||
}, | ||
{ | ||
types: ["function", "deleted", "tag"], | ||
style: { | ||
color: "#d73a49", | ||
}, | ||
}, | ||
{ | ||
types: ["function-variable"], | ||
style: { | ||
color: "#6f42c1", | ||
}, | ||
}, | ||
{ | ||
types: ["tag", "selector", "keyword"], | ||
style: { | ||
color: "#00009f", | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import Prism from 'prismjs/components/prism-core' | ||
|
||
// Core languages | ||
import 'prismjs/components/prism-clike'; | ||
import 'prismjs/components/prism-markup'; | ||
import 'prismjs/components/prism-markup-templating'; | ||
|
||
// Supported languages | ||
import 'prismjs/components/prism-bash'; | ||
import 'prismjs/components/prism-css'; | ||
import 'prismjs/components/prism-diff'; | ||
import 'prismjs/components/prism-go'; | ||
import 'prismjs/components/prism-json'; | ||
import 'prismjs/components/prism-markdown'; | ||
import 'prismjs/components/prism-yaml'; | ||
|
||
// JS like | ||
import 'prismjs/components/prism-javascript'; | ||
import 'prismjs/components/prism-jsx'; | ||
import 'prismjs/components/prism-typescript'; | ||
import 'prismjs/components/prism-tsx'; | ||
|
||
// Ruby like | ||
import 'prismjs/components/prism-ruby'; | ||
import 'prismjs/components/prism-erb'; | ||
|
||
export default Prism |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
afb67b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
gatsby-theme-primer-example – ./
doctocat.now.sh
gatsby-theme-primer-example-primer.vercel.app
gatsby-theme-primer-example-git-master-primer.vercel.app
gatsby-theme-primer-example-git-master.primer.vercel.app
gatsby-theme-primer-example-git-master.primer.now.sh
gatsby-theme-primer-example.primer.now.sh
gatsby-theme-primer-example.primer.vercel.app
afb67b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
doctocat – ./
doctocat-git-master-primer.vercel.app
doctocat-primer.vercel.app
doctocat.primer.vercel.app
doctocat-git-master.primer.now.sh
doctocat-git-master.primer.vercel.app
doctocat.primer.now.sh