mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-16 01:01:38 +00:00
Update config
update toc key
This commit is contained in:
@ -2,7 +2,7 @@ import { getHeadings, SingleToc } from 'lib/utils';
|
||||
import Anchor from 'components/mdx/Anchor';
|
||||
import styles from './PostToc.module.css';
|
||||
import classNames from 'classnames';
|
||||
import { useCallback, useState } from 'react';
|
||||
import { Fragment, useCallback, useState } from 'react';
|
||||
import { FiChevronDown } from 'react-icons/fi';
|
||||
|
||||
interface Props {
|
||||
@ -61,14 +61,14 @@ const PostToc = ({ toc, tocLength }: Props) => {
|
||||
<div className="pl-4 border-l-4 border-gray-300 toc">
|
||||
<ul className="!pl-[unset]">
|
||||
{toc?.map((h) => (
|
||||
<>
|
||||
<TocItem item={h} key={h.link} />
|
||||
<Fragment key={h.link}>
|
||||
<TocItem item={h} />
|
||||
{h.children.map((child) => (
|
||||
<ul className="!pl-4" key={child.link}>
|
||||
<TocItem item={child} />
|
||||
</ul>
|
||||
))}
|
||||
</>
|
||||
</Fragment>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -1,19 +1,32 @@
|
||||
import remarkFrontmatter from 'remark-frontmatter';
|
||||
import composePlugins from 'next-compose-plugins';
|
||||
// import composePlugins from 'next-compose-plugins';
|
||||
|
||||
const composedConfig = composePlugins([
|
||||
/** @type {import('next').NextConfig} */
|
||||
{
|
||||
reactStrictMode: true,
|
||||
output: 'standalone',
|
||||
experimental: {
|
||||
// runtime: 'nodejs',
|
||||
// outputStandalone: true,
|
||||
images: { allowFutureImage: true },
|
||||
},
|
||||
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
|
||||
images: { domains: ['avatars.githubusercontent.com'] },
|
||||
// const composedConfig = composePlugins([
|
||||
// /** @type {import('next').NextConfig} */
|
||||
// {
|
||||
// reactStrictMode: true,
|
||||
// output: 'standalone',
|
||||
// experimental: {
|
||||
// // runtime: 'nodejs',
|
||||
// // outputStandalone: true,
|
||||
// images: { allowFutureImage: true },
|
||||
// },
|
||||
// pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
|
||||
// images: { domains: ['avatars.githubusercontent.com'] },
|
||||
// },
|
||||
// ]);
|
||||
/**
|
||||
* @type {import('next').NextConfig}
|
||||
*/
|
||||
const nextConfig = {
|
||||
/* config options here */
|
||||
reactStrictMode: true,
|
||||
output: 'standalone',
|
||||
experimental: {
|
||||
// runtime: 'nodejs',
|
||||
// outputStandalone: true,
|
||||
images: { allowFutureImage: true },
|
||||
},
|
||||
]);
|
||||
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
|
||||
};
|
||||
|
||||
export default composedConfig;
|
||||
export default nextConfig;
|
||||
|
Reference in New Issue
Block a user