Skip to content

Commit d91639d

Browse files
author
Fumito
authored
Merge pull request #7 from serverless-operations/prism
Prism
2 parents cf4febb + b1f3abf commit d91639d

File tree

4 files changed

+128
-119
lines changed

4 files changed

+128
-119
lines changed

src/assets/css/prism-okaidia.css

Lines changed: 121 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,127 @@
1+
/* PrismJS 1.20.0
2+
https://prismjs.com/download.html#themes=prism-okaidia&languages=markup+css+clike+javascript+bash+docker+git+graphql+http+json+json5+jsonp+markup-templating+php+plsql+python+sass+scss+sql+typescript */
13
/**
24
* okaidia theme for JavaScript, CSS and HTML
35
* Loosely based on Monokai textmate theme by http://www.monokai.nl/
46
* @author ocodia
57
*/
68

7-
code[class*="language-"],
8-
pre[class*="language-"] {
9-
color: #f8f8f2;
10-
background: none;
11-
text-shadow: 0 1px rgba(0, 0, 0, 0.3);
12-
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
13-
font-size: 1em;
14-
text-align: left;
15-
white-space: pre;
16-
word-spacing: normal;
17-
word-break: normal;
18-
word-wrap: normal;
19-
line-height: 1.5;
20-
21-
-moz-tab-size: 4;
22-
-o-tab-size: 4;
23-
tab-size: 4;
24-
25-
-webkit-hyphens: none;
26-
-moz-hyphens: none;
27-
-ms-hyphens: none;
28-
hyphens: none;
29-
}
30-
31-
/* Code blocks */
32-
pre[class*="language-"] {
33-
padding: 1em;
34-
margin: .5em 0;
35-
overflow: auto;
36-
border-radius: 0.3em;
37-
}
38-
39-
:not(pre) > code[class*="language-"],
40-
pre[class*="language-"] {
41-
background: #272822;
42-
}
43-
44-
/* Inline code */
45-
:not(pre) > code[class*="language-"] {
46-
padding: .1em;
47-
border-radius: .3em;
48-
white-space: normal;
49-
}
50-
51-
.token.comment,
52-
.token.prolog,
53-
.token.doctype,
54-
.token.cdata {
55-
color: slategray;
56-
}
57-
58-
.token.punctuation {
59-
color: #f8f8f2;
60-
}
61-
62-
.token.namespace {
63-
opacity: .7;
64-
}
65-
66-
.token.property,
67-
.token.tag,
68-
.token.constant,
69-
.token.symbol,
70-
.token.deleted {
71-
color: #f92672;
72-
}
73-
74-
.token.boolean,
75-
.token.number {
76-
color: #ae81ff;
77-
}
78-
79-
.token.selector,
80-
.token.attr-name,
81-
.token.string,
82-
.token.char,
83-
.token.builtin,
84-
.token.inserted {
85-
color: #a6e22e;
86-
}
87-
88-
.token.operator,
89-
.token.entity,
90-
.token.url,
91-
.language-css .token.string,
92-
.style .token.string,
93-
.token.variable {
94-
color: #f8f8f2;
95-
}
96-
97-
.token.atrule,
98-
.token.attr-value,
99-
.token.function,
100-
.token.class-name {
101-
color: #e6db74;
102-
}
103-
104-
.token.keyword {
105-
color: #66d9ef;
106-
}
107-
108-
.token.regex,
109-
.token.important {
110-
color: #fd971f;
111-
}
112-
113-
.token.important,
114-
.token.bold {
115-
font-weight: bold;
116-
}
117-
.token.italic {
118-
font-style: italic;
119-
}
120-
121-
.token.entity {
122-
cursor: help;
123-
}
9+
code[class*="language-"],
10+
pre[class*="language-"] {
11+
color: #f8f8f2;
12+
background: none;
13+
text-shadow: 0 1px rgba(0, 0, 0, 0.3);
14+
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
15+
font-size: 12px;
16+
text-align: left;
17+
white-space: pre;
18+
word-spacing: normal;
19+
word-break: normal;
20+
word-wrap: normal;
21+
line-height: 1.5;
22+
23+
-moz-tab-size: 4;
24+
-o-tab-size: 4;
25+
tab-size: 4;
26+
27+
-webkit-hyphens: none;
28+
-moz-hyphens: none;
29+
-ms-hyphens: none;
30+
hyphens: none;
31+
}
32+
33+
/* Code blocks */
34+
pre[class*="language-"] {
35+
padding: 1em;
36+
margin: .5em 0;
37+
overflow: auto;
38+
border-radius: 0.3em;
39+
}
40+
41+
:not(pre) > code[class*="language-"],
42+
pre[class*="language-"] {
43+
background: #272822;
44+
}
45+
46+
/* Inline code */
47+
:not(pre) > code[class*="language-"] {
48+
padding: .1em;
49+
border-radius: .3em;
50+
white-space: normal;
51+
}
52+
53+
.token.comment,
54+
.token.prolog,
55+
.token.doctype,
56+
.token.cdata {
57+
color: #8292a2;
58+
}
59+
60+
.token.punctuation {
61+
color: #f8f8f2;
62+
}
63+
64+
.token.namespace {
65+
opacity: .7;
66+
}
67+
68+
.token.property,
69+
.token.tag,
70+
.token.constant,
71+
.token.symbol,
72+
.token.deleted {
73+
color: #f92672;
74+
}
75+
76+
.token.boolean,
77+
.token.number {
78+
color: #ae81ff;
79+
}
80+
81+
.token.selector,
82+
.token.attr-name,
83+
.token.string,
84+
.token.char,
85+
.token.builtin,
86+
.token.inserted {
87+
color: #a6e22e;
88+
}
89+
90+
.token.operator,
91+
.token.entity,
92+
.token.url,
93+
.language-css .token.string,
94+
.style .token.string,
95+
.token.variable {
96+
color: #f8f8f2;
97+
}
98+
99+
.token.atrule,
100+
.token.attr-value,
101+
.token.function,
102+
.token.class-name {
103+
color: #e6db74;
104+
}
105+
106+
.token.keyword {
107+
color: #66d9ef;
108+
}
109+
110+
.token.regex,
111+
.token.important {
112+
color: #fd971f;
113+
}
114+
115+
.token.important,
116+
.token.bold {
117+
font-weight: bold;
118+
}
119+
.token.italic {
120+
font-style: italic;
121+
}
122+
123+
.token.entity {
124+
cursor: help;
125+
}
126+
127+

src/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export default function (Vue, { router, head, appOptions, isClient, isServer })
3131
Vue.use(Vuetify)
3232
Vue.use(Vuex)
3333
Vue.use(Vuelidate)
34+
Vue.use(Prism)
3435

3536
appOptions.store = new Vuex.Store({
3637
state: {

src/templates/WordPressBlog.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ query ($id: ID!) {
9595
import Prism from 'prismjs'
9696
import ShareButtons from '~/components/ShareButtons'
9797
98+
import 'prismjs/components/prism-javascript'
99+
import 'prismjs/components/prism-json'
100+
import 'prismjs/components/prism-typescript'
101+
98102
export default {
99103
components: {
100104
ShareButtons

src/templates/WordPressPost.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export default {
127127
{
128128
key: `og:image`,
129129
property: `og:image`,
130-
content: this.$page.wordPressPost.featuredMedia.sourceUrl,
130+
content: this.$page.metadata.siteOgImage,
131131
},
132132
{
133133
key: `og:title`,
@@ -139,7 +139,7 @@ export default {
139139
},
140140
{
141141
name: 'twitter:image',
142-
content: this.$page.wordPressPost.featuredMedia.sourceUrl,
142+
content: this.$page.metadata.siteOgImage,
143143
}
144144
]
145145
}

0 commit comments

Comments
 (0)