diff --git a/Frontend/docs/home.md b/Frontend/docs/home.md index 241363b..c71e7ed 100644 --- a/Frontend/docs/home.md +++ b/Frontend/docs/home.md @@ -17,6 +17,4 @@ Some of the core features of RESTfulMC include: | Feature | Description | |-------------------------:|------------------------------------------------------------------:| | [Player Lookup](/player) | praesent omittam mollis maximus has pretium mediocritatem eripuit | -| [Server Lookup](/server) | sapien faucibus numquam ponderum utamur himenaeos menandri tation | - ---- \ No newline at end of file +| [Server Lookup](/server) | sapien faucibus numquam ponderum utamur himenaeos menandri tation | \ No newline at end of file diff --git a/Frontend/public/media/github-white-logo.svg b/Frontend/public/media/github-white-logo.svg new file mode 100644 index 0000000..d5e6491 --- /dev/null +++ b/Frontend/public/media/github-white-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Frontend/src/app/(pages)/docs/[[...slug]]/page.tsx b/Frontend/src/app/(pages)/docs/[[...slug]]/page.tsx index 96c9b72..5ffb560 100644 --- a/Frontend/src/app/(pages)/docs/[[...slug]]/page.tsx +++ b/Frontend/src/app/(pages)/docs/[[...slug]]/page.tsx @@ -13,6 +13,8 @@ import { } from "@/components/ui/breadcrumb"; import { capitalize } from "@/lib/stringUtils"; import { CustomMDX } from "@/components/mdx"; +import Link from "next/link"; +import Image from "next/image"; /** * The page to display content @@ -36,7 +38,7 @@ const ContentPage = ({ params }: PageProps): ReactElement => { const splitSlug: string[] = content.slug?.split("/") || []; return ( - + {/* Breadcrumb */} @@ -61,15 +63,28 @@ const ContentPage = ({ params }: PageProps): ReactElement => { )} - {/* Publish Date */} Published on{" "} {moment(content.published, "MM-DD-YYYY").format("MMMM Do YYYY")} - {/* Content */} + + {/* View on Git */} + + + ); }; diff --git a/Frontend/src/app/common/mdxUtils.ts b/Frontend/src/app/common/mdxUtils.ts index caa6b63..9a15af1 100644 --- a/Frontend/src/app/common/mdxUtils.ts +++ b/Frontend/src/app/common/mdxUtils.ts @@ -49,6 +49,7 @@ const getMetadata = ( .replace(/\\/g, "/") // Normalize the path .replace(/\.mdx?$/, "") .substring(1), + extension: path.extname(file), ...parseMetadata(fs.readFileSync(filePath, "utf-8")), }; // Map each file to its metadata }); diff --git a/Frontend/src/app/types/mdx.d.ts b/Frontend/src/app/types/mdx.d.ts index 9f1e4f3..4ac0934 100644 --- a/Frontend/src/app/types/mdx.d.ts +++ b/Frontend/src/app/types/mdx.d.ts @@ -27,6 +27,11 @@ type MDXMetadata = { */ slug?: string | undefined; + /** + * The extension of the file, defined once read. + */ + extension?: string | undefined; + /** * The metadata of the file. */
Published on{" "} {moment(content.published, "MM-DD-YYYY").format("MMMM Do YYYY")}