use utf-8
All checks were successful
ci/woodpecker/push/deploy Pipeline was successful

This commit is contained in:
Michael Zhang 2024-12-17 16:50:57 -06:00
parent 6e82102c1b
commit d9289b88b2
2 changed files with 3 additions and 2 deletions

View file

@ -94,6 +94,7 @@ const remarkAgda: RemarkPlugin = ({ base, publicDir }: Options) => {
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8" />
<link rel="stylesheet" href="${base}generated/agda/Agda.css" /> <link rel="stylesheet" href="${base}generated/agda/Agda.css" />
</head> </head>
<body> <body>

View file

@ -1,10 +1,10 @@
import getReadingTime from "reading-time"; import getReadingTime from "reading-time";
import { toString } from "mdast-util-to-string"; import { toString as mdastToString } from "mdast-util-to-string";
import type { RemarkPlugin } from "@astrojs/markdown-remark"; import type { RemarkPlugin } from "@astrojs/markdown-remark";
const remarkReadingTime: RemarkPlugin = () => { const remarkReadingTime: RemarkPlugin = () => {
return (tree, { data }) => { return (tree, { data }) => {
const textOnPage = toString(tree); const textOnPage = mdastToString(tree);
const readingTime = getReadingTime(textOnPage); const readingTime = getReadingTime(textOnPage);
// readingTime.text will give us minutes read as a friendly string, // readingTime.text will give us minutes read as a friendly string,