Skip to content

头部导航栏的配置

新建.vitepress文件夹,且新建config.js文件

js
import {defineConfig} from 'vite'
export default defineConfig({
	themeConfig:{
		siteTitle: '程序员小洛',//不要标题可以设置为false,默认是vitepress
        logo:'/my1.png',
	}
})
import {defineConfig} from 'vite'
export default defineConfig({
	themeConfig:{
		siteTitle: '程序员小洛',//不要标题可以设置为false,默认是vitepress
        logo:'/my1.png',
	}
})

导航栏

js
import {defineConfig} from 'vite'
export default defineConfig({
	themeConfig:{
        nav: [
            {
                text: '编程开发',
                items: [
                  { text: 'HTML',link: '/html/',activeMatch:'/html/'}, 
                  { text: 'CSS',link: '/css/',activeMatch:'/css/' },
                  { text: 'JS', link: '/js/',activeMatch:'/js/' },
                  { text: 'VUE', link: '/vue/',activeMatch:'/vue/' },
                  { text: 'UNI-APP', link: '/uni-app/',activeMatch:'/uni-app/' },
                  { text: 'REACT', link: '/react/',activeMatch:'/react/' },
                  { text: 'NODE', link: '/node/',activeMatch:'/node/' },
                ]
            },
          {
            text: '软件/资源',
            items: [
                { text: 'yarn', link: '/tools/yarn'},
                { text: 'npm', link: '/tools/npm'},
                { text: 'git', link: '/tools/git'},
                { text: 'uniapp插件', link: '/components/',activeMatch:'/components/'},
                { text: 'mac', link: '/mac'},
                { text: '网站', link: '/website'},
                { text: '搭建博客文档', link: '/doc/',activeMatch:'/doc/'}
                
            ]
        },
            { text: '我的官网', link: 'https://www.suntemple.cn' }
        ],
	}
})
import {defineConfig} from 'vite'
export default defineConfig({
	themeConfig:{
        nav: [
            {
                text: '编程开发',
                items: [
                  { text: 'HTML',link: '/html/',activeMatch:'/html/'}, 
                  { text: 'CSS',link: '/css/',activeMatch:'/css/' },
                  { text: 'JS', link: '/js/',activeMatch:'/js/' },
                  { text: 'VUE', link: '/vue/',activeMatch:'/vue/' },
                  { text: 'UNI-APP', link: '/uni-app/',activeMatch:'/uni-app/' },
                  { text: 'REACT', link: '/react/',activeMatch:'/react/' },
                  { text: 'NODE', link: '/node/',activeMatch:'/node/' },
                ]
            },
          {
            text: '软件/资源',
            items: [
                { text: 'yarn', link: '/tools/yarn'},
                { text: 'npm', link: '/tools/npm'},
                { text: 'git', link: '/tools/git'},
                { text: 'uniapp插件', link: '/components/',activeMatch:'/components/'},
                { text: 'mac', link: '/mac'},
                { text: '网站', link: '/website'},
                { text: '搭建博客文档', link: '/doc/',activeMatch:'/doc/'}
                
            ]
        },
            { text: '我的官网', link: 'https://www.suntemple.cn' }
        ],
	}
})

社交链接

js
import {defineConfig} from 'vite'
export default defineConfig({
	themeConfig:{
         socialLinks: [
            { icon: 'github', link: 'https://github.com/' }
         ],
	}
})
import {defineConfig} from 'vite'
export default defineConfig({
	themeConfig:{
         socialLinks: [
            { icon: 'github', link: 'https://github.com/' }
         ],
	}
})

程序员小洛文档