1
0
Fork 1
mirror of https://github.com/thatmattlove/hyperglass.git synced 2026-01-17 00:38:06 +00:00
thatmattlove-hyperglass/docs/next.config.mjs
thatmattlove 556dccf509 update docs backend
fixes issue with OpenGraph tags
2024-05-28 21:30:33 -04:00

35 lines
837 B
JavaScript

import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import withNextra from "nextra";
function copyChangelog() {
const dir = path.dirname(fileURLToPath(import.meta.url));
const src = path.resolve(dir, "..", "CHANGELOG.md");
const data = fs.readFileSync(src);
const replaced = data.toString().replace("# Changelog\n\n", "");
const dst = path.resolve(dir, "pages", "changelog.mdx");
fs.writeFileSync(dst, replaced);
}
copyChangelog();
/**
* @type {import('nextra').NextraConfig}
*/
const nextraConfig = {
theme: "nextra-theme-docs",
themeConfig: "./theme.config.tsx",
};
/**
* @type {import('next').NextConfig}
*/
const config = {
images: {
unoptimized: true,
},
output: "export",
};
export default withNextra(nextraConfig)(config);