GithubHelp home page GithubHelp logo

zpfz / vuepress-theme-antdocs Goto Github PK

View Code? Open in Web Editor NEW
214.0 3.0 28.0 126 KB

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

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

License: MIT License

JavaScript 8.47% Vue 62.77% HTML 3.24% Less 25.52%
antd vuepress-theme vuepress antdocs ant-design vuepress-doc

vuepress-theme-antdocs's Introduction

AntDocs logo

AntDocs

An Ant Design style theme for VuePress.

Build Status Downloads Version License

Features

  • Equipped with Ant Design style, you can directly use various components of the UI library.
  • Optimize parts of styles.
  • More features are waiting for you to discover ...

Quick start

Install theme

npm i vuepress-theme-antdocs

or

yarn add vuepress-theme-antdocs

Use theme

Open your .vuepress/config.js, and then add VuePress theme reference code:

module.exports = {
  theme: 'antdocs'
}

You can get help here: Using a theme

Preview

vuepress-theme-antdocs's People

Contributors

kitaharafay avatar xkloveme avatar yexk avatar zpfz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vuepress-theme-antdocs's Issues

支持最大内容宽度设定

Is your feature request related to a problem? Please describe.
没有相关 issue

Describe the solution you'd like
考虑到电脑显示屏幕太宽,而 AntDocs 内容默认显示区域基本占满整个屏幕,尤其是在禁用侧边栏后的效果特别难受。

Describe alternatives you've considered
其实 VuePress 默认主题就考虑到了最大内容宽度,所以效果就比较舒服。

下面是 AntDocs 主题和 VuePress 默认主题的对比图。(这里的 VuePress 默认主题预览图用的是一个 alternative,但是和官方默认主题一致)
AntDocs
VuePress 默认

Additional context

建议修改ads的class名字改为promote

Is your feature request related to a problem? Please describe.
它不是一个问题,具体表现为 当我开启了 adblock之后,ad 或者 ads的class名的dom节点都会被隐藏。

Describe the solution you'd like
建议修改相关关键字的 改成promote 亲测有效。。针对Ads.vue修改即可

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

考虑扩展为vitepress的主题吗

我发现这个主题看起来还不错,没那么多花里胡哨,考虑支持一下vitepress吗,因为比起启动速度,vite比webpack确实快太多了

启动项目后报link未定义,首页无法显示

Describe the bug
启动应用后,应用正常启动。但是进入首页后报如下错误,link未定义页面无法正常显示:
微信图片_20210520130543

To Reproduce
Steps to reproduce the behavior:

  1. 启动应用。
  2. 正常启动后访问首页

Expected behavior
A clear and concise description of what you expected to happen.

System Info

  • VuePress version: 1.8.2
  • Antdocs version: 1.3.4
  • Node version: v14.16.0
  • OS version: win10 (Microsoft Windows [版本 10.0.16299.15])

node package.json引用依赖

"devDependencies": {
    "@vuepress/plugin-active-header-links": "^1.5.4",
    "@vuepress/plugin-back-to-top": "^1.5.4",
    "@vuepress/plugin-nprogress": "^1.5.4",
    "vuepress": "^1.5.4",
    "vuepress-plugin-permalink-pinyin": "^1.0.0"
  },
  "dependencies": {
    "vuepress-theme-antdocs": "^1.3.4"
  }

Additional context
Add any other context about the problem here.

进入多级目录的文档,顶部 nav 的激活高亮有问题

Describe the bug
我的文档位于 docs/document/category1/doc1.md
设置了顶部 Nav:

nav: [
      { text: "文档", link: "/document/", }
]

进入 domain.com/document/category1/doc1.html 页面时 nav 没有激活高亮

To Reproduce
同描述

Expected behavior
文档(/document/)导航菜单激活高亮

System Info

  • VuePress version: 1.8.2
  • Antdocs version: 1.3.5
  • Node version: 14.17.2
  • OS version: OSX 11

Additional context

看源码打印了 currentPagea-menukey 分别是 currentPage="/document/category1/" key = /document/ 所以被认为未选中激活了

代码块颜色如何修改?

Describe the bug
为什么代码块默认是这种颜色呢?
image
palette.styl 没动过,想要 vuepress 官网的那种样式。不知道有没有开放配置?

System Info

  • VuePress version:1.8.2
  • Antdocs version:1.3.4
  • Node version:14.16.1
  • OS version:10.15.7

安装后无法启动

yarn docs:dev

yarn run v1.22.15
$ vuepress dev docs
Error: Cannot find module '@vuepress/shared-utils'
Require stack:

  • F:\Baiker\node_modules\vuepress-theme-antdocs\index.js
  • F:\Baiker\node_modules@vuepress\core\lib\app\resolvePluginModule.js
  • F:\Baiker\node_modules@vuepress\core\lib\app\resolvePluginObject.js
  • F:\Baiker\node_modules@vuepress\core\lib\app\appUse.js
  • F:\Baiker\node_modules@vuepress\core\lib\app\index.js
  • F:\Baiker\node_modules@vuepress\core\lib\index.js
  • F:\Baiker\node_modules@vuepress\cli\lib\commands\build\createBuild.js
  • F:\Baiker\node_modules@vuepress\cli\lib\commands\build\index.js
  • F:\Baiker\node_modules@vuepress\cli\lib\commands\index.js
  • F:\Baiker\node_modules@vuepress\cli\lib\index.js
  • F:\Baiker\node_modules\vuepress-vite\bin\vuepress.js
  • F:\Baiker\node_modules\vuepress\bin\vuepress.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:924:15)
    at Function.Module._load (node:internal/modules/cjs/loader:769:27)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object. (F:\Baiker\node_modules\vuepress-theme-antdocs\index.js:2:24)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    error Command failed with exit code 1.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Centos服务器上打包 直接 killed

我在Centos服务器上把项目拉下来,vuepress/vuepress-theme-antdocs都安装了,执行vuepress build dosc
image

[root@lannis book2.0]# vuepress build docs
wait Extracting site metadata...
tip Apply theme vuepress-theme-antdocs ...
tip Apply plugin container (i.e. "vuepress-plugin-container") ...
tip Apply plugin @vuepress/last-updated (i.e. "@vuepress/plugin-last-updated") ...
tip Apply plugin @vuepress/register-components (i.e. "@vuepress/plugin-register-components") ...
tip Apply plugin @vuepress/nprogress (i.e. "@vuepress/plugin-nprogress") ...
tip Apply plugin @vuepress/medium-zoom (i.e. "@vuepress/plugin-medium-zoom") ...
tip Apply plugin @vuepress/back-to-top (i.e. "@vuepress/plugin-back-to-top") ...
tip Apply plugin @vuepress/active-header-links (i.e. "@vuepress/plugin-active-header-links") ...
tip Apply plugin @vuepress/search (i.e. "@vuepress/plugin-search") ...

● Client █████████████████████████ building (69%) 715/716 modules 1 active
 css-loader › postcss-loader › less-loader › node_modules/[email protected]@vuepress-theme-antdocs/styles/index.less

● Server █████████████████████████ building (69%) 708/709 modules 1 active
 css-loader › postcss-loader › less-loader › node_modules/[email protected]@vuepress-theme-antdocs/styles/index.less

Killed
[root@lannis book2.0]#

我在centos上用vuepress-creator创建的项目也不能打包~~~vuepress本地也安装了,打包还是失败。。。

image

[root@lannis myproject]# npm run build

> [email protected] build /lannis/opt/myproject
> vuepress build docs

wait Extracting site metadata...
tip Apply theme vuepress-theme-antdocs ...
tip Apply plugin container (i.e. "vuepress-plugin-container") ...
tip Apply plugin @vuepress/last-updated (i.e. "@vuepress/plugin-last-updated") ...
tip Apply plugin @vuepress/register-components (i.e. "@vuepress/plugin-register-components") ...
tip Apply plugin @vuepress/active-header-links (i.e. "@vuepress/plugin-active-header-links") ...
tip Apply plugin @vuepress/search (i.e. "@vuepress/plugin-search") ...
tip Apply plugin @vuepress/nprogress (i.e. "@vuepress/plugin-nprogress") ...
tip Apply plugin smooth-scroll (i.e. "vuepress-plugin-smooth-scroll") ...

● Client █████████████████████████ building (69%) 625/627 modules 2 active
 node_modules/ant-design-vue/es/_util/requestAnimationTimeout.js

● Server █████████████████████████ building (69%) 590/592 modules 2 active
 node_modules/ant-design-vue/es/time-picker/locale/en_US.js

Killed
[root@lannis myproject]#

咋搞哦。、、

跑不起来?

问题描述

依据 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

内存占用过高

谷歌浏览器 Firefox 都有同样问题, 内存占用一直往上涨,高达8个g左右也不知道是啥问题导致的

sidebar子目录配置

你好!我们的项目采用了Antdocs,但需要配置sidebar子目录,请问应该如何实现?

footer add ico

for chinese gov something special reasons, put on record to ICP or public security department need in footer add the hyperlink and ico.

Feat: 首页主次级图标区分

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
目前首页的主次级按钮都用的是 ghost 属性的 a-button,区分性较差。既然是主次级按钮,我个人认为在样式上需要有区分。因此,主按钮采用默认 primary,次按钮采用 primary ghost 的方案应该更好。

屏幕截图(14)

Describe alternatives you've considered
(No)

Additional context
(empty)

新版本的代码区块样式问题

Describe the bug
A clear and concise description of what the bug is.
开启代码的行号时,看到这边的行号样式是白色

image

修改样式之后有很明显的错位
image

To Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

System Info

  • VuePress version: 1.8.2
  • Antdocs version: 1.3.2
  • Node version:
  • OS version:

Additional context
Add any other context about the problem here.

细节完善

markdown最好能设置成左右对齐, 现在行尾参差不齐就很难受...

另, 有一个主题叫vuepress-theme-teadoc, 可以参(zhao)考(chao)一下, 非常流畅.
我现在的文档就是用的它的主题 lammps.org.cn, 我觉得现阶段要比这个更好一些

请教为什么图片会生成俩次

图片存放位置:
E:\xxxx\docs.vuepress\public\img
image

通过yarn run docs:build 构建

会发现dict文件夹中存在俩个img图片位置
第一个位置
image
第二个位置(实际网站只用到这个)
image

请问如何让他图片只生成一次呢,图片太占用空间了

[Modify] 优秀案例信息更正

首先,感谢作者提供如此优秀的主题!

在官方网站上面的优秀案例部分,其中第一个:老孟的网站
laomeng

创建者变更为:xieyezi,因为该项目是本人搭建的。
以上,谢谢支持!

最后更新时间没有出来额

这是我的配置文件:
// config.js

module.exports = {
  title: "xieyezi", //左上角的博客标题以及网站显示的标题
  description: "使用vuepress搭建的个人博客",
  theme: "antdocs",
  head: [
    ["link", { rel: "icon", href: "/favicon.ico" }], // 增加一个自定义的 favicon(网页标签的图标)
    [
      "meta",
      {
        name: "viewport",
        content: "width=device-width,initial-scale=1,user-scalable=no",
      },
    ],

    [
      "link",
      {
        rel: "stylesheet",
        href: "https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css",
      },
    ],
  ],
  themeConfig: {
    //主题配置项
    logo: "/logo.png",
    smoothScroll: true, //平滑滚动
    sidebarDepth: 1,
    editLinks: true, // 编辑链接
    editLinkText: "帮助我改善这个页面", // 链接字段
    lastUpdated: "最后更新时间", // 最后更新时间
    backToTop: true,
    nav: [
      //导航栏
      { text: "Home", link: "/" },
      { text: "Flutter", link: "/flutter/" },
      { text: "Vue", link: "/vue/" },
      { text: "React", link: "/react/" },
      { text: "Typescript", link: "/typescript/" },
      { text: "Javascript", link: "/javascript/" },
      { text: "Docker", link: "/docker/" },
      {
        text: "Conatact",
        items: [
          {
            text: "Github",
            link: "https://github.com/xieyezi",
          },
          {
            text: "QQ",
            link: "https://github.com/xieyezi",
          },
          {
            text: "WeChat",
            link: "https://github.com/xieyezi",
          },
        ],
      },
    ],
  },

  plugins: [
    //美化相关:
    ["cursor-effects"], //鼠标点击特效
    ["vuepress-plugin-reading-progress"], //顶部进度条
    [
      "vuepress-plugin-code-copy",
      {
        color: "#6D7EAD",
        successText: "🌈复制成功!🌈",
      },
    ],
    // ["go-top"],  悬挂猫返回顶部,yarn add -D vuepress-plugin-go-top

    //功能添加:
    [
      "vuepress-plugin-auto-sidebar",
      {
        titleMode: "uppercase",
      },
    ], //自动生成侧边栏
    [
      "permalink-pinyin",
      {
        lowercase: true,
        separator: "-",
      },
    ], //转换链接汉字为英文的插件
  ],
};

期望效果:
在文章右下角出现“最后更新时间”

导航栏配置 `target="_blank"` 和官方的主题行为不一致。

Describe the bug
导航栏配置 target="_blank" 和官方的仓库行为不一致。

To Reproduce

module.exports = {
    themeConfig: {
        nav: [{ text: 'API', link: '/doxy/index.html', target:'_blank' }]
    }
}

Expected behavior
应该在新页面打开,而且该导航栏应该被当作 External Link。

System Info

  • VuePress version: 1.9.7
  • Antdocs version: latest version (github main branch)
  • Node version: v19.2.0
  • OS version: macOS 12.6.2

Additional context
相关代码可能如下:https://github.com/vuejs/vuepress/blob/38e98634af117f83b6a32c8ff42488d91b66f663/packages/%40vuepress/theme-default/components/NavLink.vue#L57

return Reg.test(path);

在style.less内不能覆盖原有样式

我在.vuepress/styles/style.less文件内编写样式
执行yarn docs:dev后
发现并不能覆盖原有的样式,我需要在哪里编写样式才可以覆盖原有样式。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.