LekoArts / gatsby-themes

Get high-quality and customizable Gatsby themes to quickly bootstrap your website! Choose from many professionally created and impressive designs with a wide variety of features and customization options.
https://themes.lekoarts.de
MIT License
1.88k stars 544 forks source link

[gatsby-theme-minimal-blog]: How to deactivate the "reading time" plugin #323

Closed chronoclast closed 4 years ago

chronoclast commented 4 years ago

First of all, congratulations for the amazing work! Sorry upfront for the (probably stupid/beginner) question, I really couldn't find an answer by myself. Thanks a lot!!! Viele Grüße aus Berlin!

Summary

I would like to deactivate / remove the "reading time" plugin, so it's not shown in the blog posts; the one shown below, I mean:

Screenshot 2020-03-25 at 12 33 18

Relevant information

I was going through this documentation, but I couldn't find such package or configuration (or a similar one) used in the project.

Theme

I'm using the gatsby-theme-minimal-blog.

compliment commented 4 years ago

Remove timeToRead parts in @lekoarts/gatsby-theme-minimal-blog/src/components/post.tsx and shadow it.

@@ -19,7 +19,6 @@ type PostProps = {
       description?: string
       body: string
       excerpt: string
-      timeToRead: number
       banner?: {
         childImageSharp: {
           resize: {
@@ -50,8 +49,6 @@ const Post = ({ data: { post } }: PostProps) => (
           <ItemTags tags={post.tags} />
         </React.Fragment>
       )}
-      {` — `}
-      <span>{post.timeToRead} min read</span>
     </p>
     <section sx={{ my: 5, ".gatsby-resp-image-wrapper": { my: [4, 4, 5], boxShadow: shadow.join(`, `) } }}>
       <MDXRenderer>{post.body}</MDXRenderer>
chronoclast commented 4 years ago

@compliment thank you so much!

All good now! I guess I couldn't find it across all files, since I was looking for readingTime instead of timeToRead. Damn... 😅

LekoArts commented 4 years ago

Thanks for the comment @compliment !

ChristianIvicevic commented 4 years ago

@LekoArts I noticed that using the starter however does not show any timeToRead whatsover. Even on a fresh bootstrap.

LekoArts commented 4 years ago

@ChristianIvicevic https://minimal-blog.lekoarts.de/introduction-to-defence-against-the-dark-arts and https://github.com/LekoArts/gatsby-themes/blob/master/cypress/e2e/minimal-blog.ts#L92 is both using the starter and it shows up / the test passes, so this is probably something on your end.