File tree Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 11import { page } from 'cubedev-tracking' ;
22
3+ import 'prismjs/plugins/command-line/prism-command-line.css'
4+
35export const onRouteUpdate = ( { location, prevLocation } , pluginOptions = { } ) => {
46 //if (process.env.NODE_ENV !== `production` || typeof snowplow !== `function`) {
57 // return null
Original file line number Diff line number Diff line change @@ -77,6 +77,14 @@ const config = {
7777 options : {
7878 inlineCodeMarker : null ,
7979 noInlineHighlight : true ,
80+ aliases : {
81+ dotenv : 'bash' ,
82+ } ,
83+ prompt : {
84+ user : "user" ,
85+ host : "localhost" ,
86+ global : false ,
87+ } ,
8088 } ,
8189 } ,
8290 {
Original file line number Diff line number Diff line change @@ -152,3 +152,31 @@ pre[class*="language-"] {
152152 cursor : help ;
153153}
154154
155+ .language-bash {
156+
157+ > .command-line-prompt {
158+ border-right : none ;
159+ margin-right : 0 ;
160+ }
161+
162+ > .command-line-prompt > span :before {
163+ color : #999 ;
164+ content : " " ;
165+ display : block ;
166+ padding-right : 0.8em ;
167+ }
168+
169+ /* Prompt for all users */
170+ > .command-line-prompt > span [data-user ]:before {
171+ content : " $" ;
172+ }
173+
174+ /* Prompt for root */
175+ > .command-line-prompt > span [data-user = " root" ]:before {
176+ content : " #" ;
177+ }
178+
179+ > .command-line-prompt > span [data-prompt ]:before {
180+ content : attr (data-prompt );
181+ }
182+ }
You can’t perform that action at this time.
0 commit comments