Format with prettier

This commit is contained in:
prototypa
2022-11-06 14:22:40 -05:00
parent ef74d5dc53
commit 0571bd5eaf
14 changed files with 62 additions and 71 deletions

View File

@ -2,10 +2,10 @@ import getReadingTime from 'reading-time';
import { toString } from 'mdast-util-to-string';
export function remarkReadingTime() {
return function (tree, { data }) {
const text = toString(tree);
const readingTime = Math.ceil(getReadingTime(text).minutes);
return function (tree, { data }) {
const text = toString(tree);
const readingTime = Math.ceil(getReadingTime(text).minutes);
data.astro.frontmatter.readingTime = readingTime;
};
}
data.astro.frontmatter.readingTime = readingTime;
};
}