Skip to content
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

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

HumbertoMLL
Copy link
Contributor

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

name: Humberto López
username: https://platzi.com/@HumbertoMLL
coach: Ana
cohort: 1

PR TYPE

  • BlogPost
  • BugFix
  • Feature
  • Enhancement

@@ -1,6 +1,7 @@
import React from "react"
import { Link, graphql } from "gatsby"


Copy link
Contributor

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.

@@ -7,17 +7,26 @@ import Layout from "../components/layout";
import SEO from "../components/seo";
import { rhythm } from "../utils/typography";

const readingTime = (text)=> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const readingTime = (text)=> {
const readingTime = (text) => {

const minutes = numOfWords / wordsPerMinute;
const readTime = Math.ceil(minutes);
return `Tiempo de lectura ${readTime} min`;
}
Copy link
Contributor

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/


return (
<Layout location={location} title={siteTitle}>
<SEO
title={title}
description={description || post.excerpt}
description={description + timeToRead || post.excerpt}
Copy link
Contributor

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.

@HumbertoMLL
Copy link
Contributor Author

Ya quedaron los cambios @gndx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants