a
This commit is contained in:
parent
39623235f8
commit
f95325dbfd
2 changed files with 3 additions and 4 deletions
|
|
@ -2,8 +2,6 @@
|
||||||
title: Como funcionam as classes de peso?
|
title: Como funcionam as classes de peso?
|
||||||
readTime: 5 min
|
readTime: 5 min
|
||||||
intendedFor: Atletas
|
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.
|
As classes de peso determinam em que categoria o atleta compete. Consulte as regras da IPF para a lista atualizada de classes.
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
import { readFile, readdir } from "node:fs/promises";
|
import { readFile, readdir } from "node:fs/promises";
|
||||||
import { join } from "node:path";
|
import { join } from "node:path";
|
||||||
import { parseMarkdownWithFrontmatter } from "@/lib/markdown";
|
import { parseMarkdownWithFrontmatter, Frontmatter } from "@/lib/markdown";
|
||||||
import ReactMarkdown from "react-markdown";
|
import ReactMarkdown from "react-markdown";
|
||||||
import remarkGfm from "remark-gfm";
|
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`);
|
const file = join(root, "content", "pt", "perguntas", `${slug}.md`);
|
||||||
try {
|
try {
|
||||||
const raw = await readFile(file);
|
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 (
|
return (
|
||||||
<article aria-labelledby="article-title" className="max-w-3xl mx-auto">
|
<article aria-labelledby="article-title" className="max-w-3xl mx-auto">
|
||||||
<header className="mb-8 pb-6 border-b border-gray-200">
|
<header className="mb-8 pb-6 border-b border-gray-200">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue