mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
chore: deprecate Nextra and remove related code (#1728)
- Remove unused `nextra` and `nextra-theme-docs` dependencies from packages/app - No .mdx content pages existed — nextra was only wired up as configuration with no actual consumers
This commit is contained in:
parent
ce09b59b1d
commit
651bf99bd3
7 changed files with 46 additions and 1855 deletions
5
.changeset/forty-parents-think.md
Normal file
5
.changeset/forty-parents-think.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@hyperdx/app": patch
|
||||
---
|
||||
|
||||
chore: deprecate Nextra and remove related code
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
import { configureRuntimeEnv } from 'next-runtime-env/build/configure.js';
|
||||
import nextra from 'nextra';
|
||||
import { readFileSync } from 'fs';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { dirname, join } from 'path';
|
||||
|
|
@ -18,11 +17,6 @@ process.env.NEXT_PUBLIC_APP_VERSION = version;
|
|||
|
||||
configureRuntimeEnv();
|
||||
|
||||
const withNextra = nextra({
|
||||
theme: 'nextra-theme-docs',
|
||||
themeConfig: './src/nextra.config.tsx',
|
||||
});
|
||||
|
||||
const basePath = process.env.NEXT_PUBLIC_HYPERDX_BASE_PATH;
|
||||
|
||||
const nextConfig = {
|
||||
|
|
@ -60,27 +54,25 @@ const nextConfig = {
|
|||
}
|
||||
return config;
|
||||
},
|
||||
...withNextra({
|
||||
async headers() {
|
||||
return [
|
||||
{
|
||||
source: '/(.*)?', // Matches all pages
|
||||
headers: [
|
||||
{
|
||||
key: 'X-Frame-Options',
|
||||
value: 'DENY',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
},
|
||||
productionBrowserSourceMaps: false,
|
||||
...(process.env.NEXT_OUTPUT_STANDALONE === 'true'
|
||||
? {
|
||||
output: 'standalone',
|
||||
}
|
||||
: {}),
|
||||
}),
|
||||
async headers() {
|
||||
return [
|
||||
{
|
||||
source: '/(.*)?', // Matches all pages
|
||||
headers: [
|
||||
{
|
||||
key: 'X-Frame-Options',
|
||||
value: 'DENY',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
},
|
||||
productionBrowserSourceMaps: false,
|
||||
...(process.env.NEXT_OUTPUT_STANDALONE === 'true'
|
||||
? {
|
||||
output: 'standalone',
|
||||
}
|
||||
: {}),
|
||||
...(process.env.NEXT_PUBLIC_CLICKHOUSE_BUILD
|
||||
? {
|
||||
assetPrefix: '/clickstack',
|
||||
|
|
|
|||
|
|
@ -71,8 +71,6 @@
|
|||
"next-query-params": "^4.3.1",
|
||||
"next-runtime-env": "1",
|
||||
"next-seo": "^4.28.1",
|
||||
"nextra": "2.0.1",
|
||||
"nextra-theme-docs": "^2.0.2",
|
||||
"numbro": "^2.4.0",
|
||||
"nuqs": "1.17.0",
|
||||
"object-hash": "^3.0.0",
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
import React from 'react';
|
||||
|
||||
import { useWordmark } from './theme/ThemeProvider';
|
||||
// import NextraMain from './NextraMain';
|
||||
import useNextraSeoProps from './useNextraSeoProps';
|
||||
|
||||
function ThemedLogo() {
|
||||
return useWordmark();
|
||||
}
|
||||
|
||||
const theme = {
|
||||
useNextSeoProps: useNextraSeoProps,
|
||||
logo: <ThemedLogo />,
|
||||
footer: {
|
||||
text: 'Made with ♥ in San Francisco, © 2024 DeploySentinel, Inc.',
|
||||
},
|
||||
head: null,
|
||||
editLink: {
|
||||
component: null,
|
||||
},
|
||||
darkMode: false,
|
||||
feedback: { content: null },
|
||||
nextThemes: {
|
||||
forcedTheme: 'dark',
|
||||
defaultTheme: 'dark',
|
||||
},
|
||||
components: {},
|
||||
// main: NextraMain,
|
||||
gitTimestamp: null,
|
||||
};
|
||||
export default theme;
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
import { useConfig } from 'nextra-theme-docs';
|
||||
|
||||
import { useIsBlog, useIsDocs, useIsTerms } from './utils';
|
||||
|
||||
export default function useNextraSeoProps() {
|
||||
const isBlog = useIsBlog();
|
||||
const isDocs = useIsDocs();
|
||||
const isTerms = useIsTerms();
|
||||
|
||||
const { frontMatter, title } = useConfig();
|
||||
|
||||
const pageTitleSuffix = isBlog
|
||||
? 'HyperDX Blog'
|
||||
: isDocs
|
||||
? 'HyperDX Docs'
|
||||
: isTerms
|
||||
? 'HyperDX'
|
||||
: '';
|
||||
|
||||
return {
|
||||
title: `${frontMatter.title ?? title} - ${pageTitleSuffix}`,
|
||||
description: frontMatter.summary,
|
||||
openGraph: {
|
||||
...(frontMatter.hero != null
|
||||
? {
|
||||
images: [
|
||||
{
|
||||
url: `https://www.hyperdx.io${frontMatter.hero}`,
|
||||
alt: 'HyperDX Blog',
|
||||
type: 'image/png',
|
||||
},
|
||||
],
|
||||
}
|
||||
: {}),
|
||||
site_name: 'HyperDX',
|
||||
},
|
||||
twitter: {
|
||||
site: '@hyperdxio',
|
||||
cardType: 'summary_large_image',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
@ -213,12 +213,6 @@ button:focus-visible {
|
|||
border-bottom: 2px solid var(--color-text) !important;
|
||||
}
|
||||
|
||||
// Nextra Overrides
|
||||
.nextra-toc,
|
||||
.nextra-sidebar-container {
|
||||
font-family: var(--font-inter) !important;
|
||||
}
|
||||
|
||||
// custom overrides for jsontree
|
||||
.react-json-tree {
|
||||
& > ul {
|
||||
|
|
|
|||
Loading…
Reference in a new issue