diff --git a/next.config.js b/next.config.js index 1f7a5d347..5c09791ce 100644 --- a/next.config.js +++ b/next.config.js @@ -41,7 +41,7 @@ const securityHeaders = [ ]; module.exports = { - // output: "export", + output: "export", experimental: { forceSwcTransforms: true, }, @@ -58,6 +58,7 @@ module.exports = { }, images: { domains: ["images.prismic.io"], + unoptimized: true, }, async redirects() { return [ diff --git a/public/sitemap-0.xml b/public/sitemap-0.xml new file mode 100644 index 000000000..d3f764dea --- /dev/null +++ b/public/sitemap-0.xml @@ -0,0 +1,16 @@ + + +https://defichain.com2024-10-02T07:59:16.196Zdaily0.7 +https://defichain.com/bug-bounty2024-10-02T07:59:16.196Zdaily0.7 +https://defichain.com/explore/dex2024-10-02T07:59:16.196Zdaily0.7 +https://defichain.com/explore/dfi2024-10-02T07:59:16.196Zdaily0.7 +https://defichain.com/explore/masternodes2024-10-02T07:59:16.196Zdaily0.7 +https://defichain.com/explore/masternodes/technical-guide2024-10-02T07:59:16.196Zdaily0.7 +https://defichain.com/explore/wallets2024-10-02T07:59:16.196Zdaily0.7 +https://defichain.com/learn2024-10-02T07:59:16.196Zdaily0.7 +https://defichain.com/media2024-10-02T07:59:16.196Zdaily0.7 +https://defichain.com/metachain2024-10-02T07:59:16.196Zdaily0.7 +https://defichain.com/privacy-policy2024-10-02T07:59:16.196Zdaily0.7 +https://defichain.com/security2024-10-02T07:59:16.196Zdaily0.7 +https://defichain.com/white-paper2024-10-02T07:59:16.196Zdaily0.7 + \ No newline at end of file diff --git a/src/pages/learn/[slug].page.tsx b/src/pages/learn/[slug].page.tsx deleted file mode 100644 index 54cf73929..000000000 --- a/src/pages/learn/[slug].page.tsx +++ /dev/null @@ -1,101 +0,0 @@ -import { Container } from "@components/commons/Container"; -import React from "react"; -import { remark } from "remark"; -import ReactMarkdown from "react-markdown"; -import { PageHeader } from "@components/commons/PageHeader"; -import rehypeSlug from "rehype-slug"; -import rehypeSanitize from "rehype-sanitize"; -import rehypeAutolinkHeadings from "rehype-autolink-headings"; -import remarkGfm from "remark-gfm"; -import { GetStaticPathsResult } from "next/types"; -import { Head } from "@components/commons/Head"; -import { getAllPosts, getPostBySlug, Post } from "./utils/api"; - -interface PostPageProps { - props: { - post: Post; - }; -} - -export default function PostPage({ post }): JSX.Element { - return ( - <> - - -
-
- {post.description} -
-
-
- -
- - {post.content} - -
-
- - ); -} - -export async function getStaticProps({ - params, - locale, -}): Promise { - const post = getPostBySlug( - params.slug, - ["title", "description", "content"], - locale, - ); - - const result = await remark().process(post.content); - - return { - props: { - post: { - ...post, - content: result.toString(), - }, - } as any, - }; -} - -export async function getStaticPaths(context): Promise { - const allPosts = context.locales.map((locale) => ({ - locale, - posts: getAllPosts(["slug"], locale), - })); - - return { - paths: allPosts - .map((postsWithLocale) => - postsWithLocale.posts.map((post) => ({ - params: { - slug: post.slug, - }, - locale: postsWithLocale.locale, - })), - ) - .flat(), - fallback: false, - }; -}