Format with prettier
This commit is contained in:
@ -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;
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user