This commit is contained in:
tangly1024.com
2023-10-18 16:29:44 +08:00
parent ad4507224e
commit a84c719029
6 changed files with 17 additions and 22 deletions

View File

@@ -90,13 +90,6 @@ module.exports = withBundleAnalyzer({
// 'react-dom': 'preact/compat'
// })
// }
// 排除所有后缀名为 .md 的文件的编译
config.module.rules.push({
test: /\.md$/,
use: 'raw-loader'
});
// 动态主题:添加 resolve.alias 配置,将动态路径映射到实际路径
config.resolve.alias['@theme-components'] = path.resolve(__dirname, 'themes', THEME)
return config

View File

@@ -1,7 +0,0 @@
# HEO 主题说明
> 主题设计者 [张洪](https://zhheo.com/)
> 主题开发者 [tangly1024](https://github.com/tangly1024)
1. 开启方式 在blog.config.js 将主题配置为 `HEO`
2. 更多说明参考此[文档](https://docs.tangly1024.com/article/notionnext-heo)

View File

@@ -29,7 +29,7 @@ export const MenuListTop = (props) => {
return (<>
<nav id='nav-mobile' className='leading-8 justify-center font-light w-full flex'>
{links?.map(link => link && link.show && <MenuItemDrop key={link?.id} link={link} />)}
{links?.map((link, index) => link && link.show && <MenuItemDrop key={index} link={link} />)}
</nav>
</>)
}

View File

@@ -1,5 +1,12 @@
import CONFIG from './config'
/**
* HEO 主题说明
* > 主题设计者 [张洪](https://zhheo.com/)
* > 主题开发者 [tangly1024](https://github.com/tangly1024)
* 1. 开启方式 在blog.config.js 将主题配置为 `HEO`
* 2. 更多说明参考此[文档](https://docs.tangly1024.com/article/notionnext-heo)
*/
import CONFIG from './config'
import CommonHead from '@/components/CommonHead'
import { useEffect, useState } from 'react'
import Footer from './components/Footer'

View File

@@ -1,5 +0,0 @@
# NAV 主题说明
> 主题开发者 [emengweb](https://github.com/emengweb)
1. 开启方式 在blog.config.js 将主题配置为 `NAV`

View File

@@ -1,5 +1,11 @@
'use client'
/**
* # NAV 主题说明
* 主题开发者 [emengweb](https://github.com/emengweb)
* 开启方式 在blog.config.js 将主题配置为 `NAV`
*/
import CONFIG from './config'
import { useEffect, useState, createContext, useContext } from 'react'
import Footer from './components/Footer'
@@ -54,6 +60,7 @@ const LayoutBase = (props) => {
let links = customMenu
// 默认使用自定义菜单否则将遍历所有的category生成菜单
if (!CONFIG.USE_CUSTOM_MENU) {
links = categoryOptions && categoryOptions?.map(c => {
return { id: c.name, title: `# ${c.name}`, to: `/category/${c.name}`, show: true }
@@ -79,7 +86,7 @@ const LayoutBase = (props) => {
{/* 左侧推拉抽屉 */}
<div className={'font-sans hidden md:block dark:border-transparent relative z-10 mx-4 w-52 max-h-full pb-44'}>
<div className='main-menu z-20 mt-20 pl-9 pr-7 pb-5 sticky pt-1 top-0 overflow-y-scroll h-fit max-h-full scroll-hidden bg-white dark:bg-neutral-800 rounded-xl '>
<div className='main-menu z-20 pl-9 pr-7 pb-5 sticky pt-1 top-20 overflow-y-scroll h-fit max-h-full scroll-hidden bg-white dark:bg-neutral-800 rounded-xl '>
{/* 嵌入 */}
{slotLeft}