This commit is contained in:
headpatsyou 2026-01-07 20:54:54 +00:00
parent 39623235f8
commit f95325dbfd
2 changed files with 3 additions and 4 deletions

View file

@ -2,8 +2,6 @@
title: Como funcionam as classes de peso?
readTime: 5 min
intendedFor: Atletas
author: João Silva
authorImage: https://via.placeholder.com/60
---
As classes de peso determinam em que categoria o atleta compete. Consulte as regras da IPF para a lista atualizada de classes.

View file

@ -1,7 +1,7 @@
import { notFound } from "next/navigation";
import { readFile, readdir } from "node:fs/promises";
import { join } from "node:path";
import { parseMarkdownWithFrontmatter } from "@/lib/markdown";
import { parseMarkdownWithFrontmatter, Frontmatter } from "@/lib/markdown";
import ReactMarkdown from "react-markdown";
import remarkGfm from "remark-gfm";
@ -33,7 +33,8 @@ export default async function FaqArticlePage({ params }: Params) {
const file = join(root, "content", "pt", "perguntas", `${slug}.md`);
try {
const raw = await readFile(file);
const { content, frontmatter } = parseMarkdownWithFrontmatter(raw.toString());
const { content, frontmatter: fm } = parseMarkdownWithFrontmatter(raw.toString());
const frontmatter = fm as Frontmatter & { readTime?: string; intendedFor?: string; author?: string; authorImage?: string };
return (
<article aria-labelledby="article-title" className="max-w-3xl mx-auto">
<header className="mb-8 pb-6 border-b border-gray-200">