zpfz / vuepress-theme-antdocs

🔥🎨 An Ant Design style theme for VuePress. (QQ Group: 867711329) [NOTE: The AntDocs-next is WIP.]

Home Page:https://antdocs.js.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

跑不起来?

xieyezi opened this issue · comments

问题描述

依据 vuepress官方教程搭建出最基本的项目结构之后,跑 docs:dev 命令可以正常运行,接着在项目根目录执行 yarn add vuepress-theme-antdocs ,并且在 config.js配置主题之后,再运行就报错。报错如下:

QQ20200301-181601@2x

目录结构

project
├─── docs
│   ├── README.md
│   └── .vuepress
│       ├── public
│       └── config.js
└── package.json

config.js

module.exports = {
    title: 'Hello VuePress',
    description: 'Just playing around',
    theme: 'antdocs'
}

版本信息

Mac OS: 10.14.6 (18G95)
yarn: 1.22.0
vuepress: @1.1.0
AntDocs: ^0.1.0-beta

你好,我们已经定位到问题。经测试,该问题的引起可能是由于你的项目没有局部安装 VuePress,直接使用了全局 VuePress 会引起该问题。考虑到用户 VuePress 使用版本不一致以及兼容性,主题默认不再安装 VuePress 依赖,所以使用前请给你的项目安装上 VuePress。

Hello, we have located the problem. After testing, the problem may be caused by VuePress not being installed locally in your project, and directly using global VuePress will cause the problem. Considering that users use VuePress with inconsistent versions and compatibility, the theme no longer installs VuePress dependencies by default, so please install VuePress on your project before use.

thank you

您好,请问这个主题中有没有方法设置搜索内容为全局关键字的形式展示,现在好像只能搜索到对应的 title

您好,请问这个主题中有没有方法设置搜索内容为全局关键字的形式展示,现在好像只能搜索到对应的 title

你可能需要返回VuePress文档熟悉一下相关配置,AntDocs除了一些新特性,其他配置与默认主题大同小异,关于搜索内容请详细阅读https://vuepress.vuejs.org/theme/default-theme-config.html#search-box

嗯嗯,按照文档确实很多配置信息都有,但是我试图使用 algolia 时,出现了如下报错信息,我查看了您的源代码,发现这个组件确实是存在的不知是否是我的配置方法不对

Screen Shot 2020-07-15 at 11 40 33 AM

[Vue warn]: Failed to mount component: template or render function not defined.

found in

--->


at node_modules/_vuepress-theme-antdocs@1.1.1@vuepress-theme-antdocs/components/Navbar.vue
at node_modules/vuepress-theme-antdocs@1.1.1@vuepress-theme-antdocs/layouts/Layout.vue
at node_modules/
@vuepress_core@1.5.2@@vuepress/core/lib/client/components/GlobalLayout.vue

嗯嗯,按照文档确实很多配置信息都有,但是我试图使用 algolia 时,出现了如下报错信息,我查看了您的源代码,发现这个组件确实是存在的不知是否是我的配置方法不对

Screen Shot 2020-07-15 at 11 40 33 AM

近期因个人事情繁忙,暂时没有时间对主题的 issue 进行 bug 排查,推荐你进群 867711329 进行交流,后续待 2.0 版本上线后可以对新版本主题优先体验~