-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Time to read #37
base: develop
Are you sure you want to change the base?
Conversation
src/pages/index.js
Outdated
@@ -1,6 +1,7 @@ | |||
import React from "react" | |||
import { Link, graphql } from "gatsby" | |||
|
|||
|
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.
Este espacio no es necesario.
src/templates/blog-post.js
Outdated
@@ -7,17 +7,26 @@ import Layout from "../components/layout"; | |||
import SEO from "../components/seo"; | |||
import { rhythm } from "../utils/typography"; | |||
|
|||
const readingTime = (text)=> { |
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.
const readingTime = (text)=> { | |
const readingTime = (text) => { |
src/templates/blog-post.js
Outdated
const minutes = numOfWords / wordsPerMinute; | ||
const readTime = Math.ceil(minutes); | ||
return `Tiempo de lectura ${readTime} min`; | ||
} |
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.
Esta función debe de estar en /utils/
src/templates/blog-post.js
Outdated
|
||
return ( | ||
<Layout location={location} title={siteTitle}> | ||
<SEO | ||
title={title} | ||
description={description || post.excerpt} | ||
description={description + timeToRead || post.excerpt} |
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.
timeToRead no es necesario en la Descripción del sitio. Utilizar las meta etiquetas para el SEO.
Ya quedaron los cambios @gndx |
DESCRIPTION
Te da el tiempo de lectura en minutos de los post de platziblog, tomando en cuenta que en un adulto en promedio lee 200 palabras por minutoi
INFORMATION
PR TYPE