Skip to content

提倡默认主目录docs为别的目录行不行呢 #3151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Hanwall opened this issue Jul 8, 2023 · 3 comments
Closed

提倡默认主目录docs为别的目录行不行呢 #3151

Hanwall opened this issue Jul 8, 2023 · 3 comments

Comments

@Hanwall
Copy link

Hanwall commented Jul 8, 2023

Feature request

What problem does this feature solve?

我是外行,但是也玩了很多静态网站构建程序,您的这个很好玩但是部署的时候给我很头大的感觉,能不能在文档里面提倡程序默认主目录比如叫source。运行调试的时候vuepress dev source 就行,我自己就可以添加一个docs在项目根目录软连接到source/.vuepress/dist目录,这样部署的时候就不需要自定义action,或者写脚本提交dist目录到分支了,虽然大部分情况下主分支写代码,其它新建分支部署pages,但是个人还是喜欢直接部署主分支,因为我写的就是纯静态博客部署在gitpage的。而不是为了一个程序附加写的文档。我是看了文档新建了docs,新手当然就跟着例子写,写最后发现部署好麻烦哦。

What does the proposed API look like?

NULL

How should this be implemented in your opinion?

NULL

Are you willing to work on this yourself?

NULL

@Shyam-Chen
Copy link

{
  ...
  "scripts": {
    "docs:dev": "vitepress dev source",
    "docs:build": "vitepress build source",
    "docs:preview": "vitepress preview source"
  },
  ...
}

@Hanwall Hanwall closed this as completed Jul 15, 2023
@Hanwall
Copy link
Author

Hanwall commented Jul 15, 2023

非常感谢。 上面的问题已经解决,只是当初看文档的时候按照文档来搞蒙了。

但是还有第二个问题就是sidebar的问题,

sidebar的深度配置有三个地方
1,markdown文件YAML front matter配置,深度最高只能为2
---
sidebar: auto
sidebarDepth: 2
---
2,themeConfig里面的sidebarDepth: 1,    // 可选的, 默认值是 1,最高到3级标题

3,Markdown: {
      extractHeaders: [ 'h2', 'h3']
  },默认情况下,VuePress 会提取 h2 和 h3 标题。你可以通过这个选项来修改提取出的标题级别。但是最高是多少级标题

我配置了3到h5级标题感觉不起作用啊,这个需要另外安装插件否

@Hanwall Hanwall reopened this Jul 15, 2023
@Shyam-Chen
Copy link

@Hanwall Hanwall closed this as completed Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants