跳至主要內容

导航栏布局设置

Tom Tan大约 1 分钟使用指南配置页面配置使用指南

(adsbygoogle = window.adsbygoogle || []).push({});

导航栏设置

我们需求顶部的导航栏, 搜索栏, 链接, 多语言展示的位置要调整,比如菜单链接要放到最右边, 搜索栏要放在菜单的左边等等, 这需要修改 docs/.vuepress/theme.ts 这个配置文件.

import { hopeTheme } from "vuepress-theme-hope";

export default hopeTheme({
  navbarLayout: {
    start: ["Brand"], // 左边是 logo
    center: ["Links"], // 中间是 菜单链接
    end: ["Language", "Repo", "Outlook", "Search"], // 右边是 多语言/Github/邮箱/搜索栏
  },
});

原来的效果:
图片


要改成这样的。

import { hopeTheme } from "vuepress-theme-hope";

export default hopeTheme({
  navbarLayout: {
    start: ["Brand"], // logo
    end: ["Search""Links"], // 多语言/Github/邮箱/搜索栏
  },
});

改成之后的效果

图片

(adsbygoogle = window.adsbygoogle || []).push({});
上次编辑于:
贡献者: Tom Tan