Skip to content

Commit 17b3e42

Browse files
fix blog queries
1 parent baf594e commit 17b3e42

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/pages/blog/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export const pageQuery = graphql`
150150
slug
151151
sourceInstanceName
152152
}
153-
excerpt(format: MARKDOWN)
153+
excerpt(format: PLAIN)
154154
frontmatter {
155155
title
156156
date

src/templates/blog-post.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const stripDescription = (markdown) => {
7979
.process(markdown, (err, file) => {
8080
text = file.contents;
8181
});
82-
return text.trim();
82+
return text?.trim();
8383
};
8484

8585
function BlogPostTemplate({ data }) {
@@ -267,7 +267,7 @@ export const pageQuery = graphql`
267267
}
268268
post: markdownRemark(fields: { slug: { eq: $slug } }) {
269269
id
270-
excerpt(format: MARKDOWN, pruneLength: 160)
270+
excerpt(format: PLAIN, pruneLength: 160)
271271
html
272272
rawMarkdownBody
273273
frontmatter {
@@ -294,7 +294,7 @@ export const pageQuery = graphql`
294294
slug
295295
sourceInstanceName
296296
}
297-
excerpt(format: MARKDOWN)
297+
excerpt(format: PLAIN)
298298
frontmatter {
299299
title
300300
date

src/templates/platform.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export const pageQuery = graphql`
247247
authorimage
248248
externalLink
249249
}
250-
excerpt(format: MARKDOWN)
250+
excerpt(format: PLAIN)
251251
}
252252
}
253253
}

src/templates/role.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ query RoleBySlug($slug: String!, $tagRE: String!) {
168168
date
169169
authorimage
170170
}
171-
excerpt(format: MARKDOWN)
171+
excerpt(format: PLAIN)
172172
}
173173
}
174174
}

src/templates/use-case.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export const pageQuery = graphql`
171171
date
172172
authorimage
173173
}
174-
excerpt(format: MARKDOWN)
174+
excerpt(format: PLAIN)
175175
}
176176
}
177177
}

0 commit comments

Comments
 (0)