Skip to content

Feature Time to read#37

Open
HumbertoMLL wants to merge 3 commits intoPlatziMaster:developfrom
HumbertoMLL:develop
Open

Feature Time to read#37
HumbertoMLL wants to merge 3 commits intoPlatziMaster:developfrom
HumbertoMLL:develop

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

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.

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/

<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.

2 participants