📝 Minimalistic Vue-powered static site generator

Overview

logo

Downloads Version License VuePress channel on Discord

VuePress 2 is coming! Please check out vuepress-next.

Documentation

Check out our docs at https://vuepress.vuejs.org/.

Showcase

Contribution

Want to contribute? Check our Contributing Guide and issues for beginners!

yarn install # install all dependencies
yarn dev  # serves VuePress' own docs with itself
yarn test # make sure your code change pass the test

If you don't have a local checkout, you can also open VuePress in Gitpod, a free online IDE for GitHub.

If you intend to make "substantial" changes to VuePress or its documentation, please checkout VuePress RFCs.

If you have a VuePress-related project/component/tool, add it with a pull request to this curated list!

Contributors

Creator / Lead

Evan You
Evan You

💻
ULIVZ
ULIVZ

💻 📖

Active Core Team

Billyyyyy3320
Billyyyyy3320

💻
Ben Hong
Ben Hong

💻 📖 💬
meteorlxy
meteorlxy

💻
Ramona
Ramona

💻 📖
Franck Abgrall
Franck Abgrall

💻 💬

Core Team Emeriti

Here we honor some no-longer-active core team members who have made valuable contributions in the past.

Giraud Florent
Giraud Florent

💻
Sarah Dayan
Sarah Dayan

💻 📖
Vinayak Kulkarni
Vinayak Kulkarni

🔌 💻 📝
Victoria Bergquist
Victoria Bergquist

💻 🎨
Nikita Sobolev
Nikita Sobolev

💻 📖
Fatih Acet
Fatih Acet

💻
Vladimir Pouzanov
Vladimir Pouzanov

💻

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

License

MIT

Comments
  • Blog Support roadmap (Resolved)

    Blog Support roadmap (Resolved)

    Hello,

    I'm excited to use vuepress for my personal website but I kinda want blog support before I switch, so I was thinking I'd kickstart that discussion on that now. This issue is to seek input as to what blog support might look like.

    I was thinking a minimum viable product might be

    • [ ] some kind of tag/category system
    • [ ] An alternative default theme which feels more like a blog
    • [ ] helper utilities for themes (high order components?) for getting lists of posts around the tag/category system
    • [ ] Pre-defined markdown templates that correspond to theme vue components, like hexo's layouts
    • [ ] A CLI command for bootstrapping posts, vuepress new [layout] <post title>
    type: question or discussion 
    opened by chuckdries 90
  • Hot reload not working

    Hot reload not working

    • [x] I confirm that this is an issue rather than a question.

    Bug report

    Steps to reproduce

    $ yarn add vuepress --dev
    $ mkdir docs
    $ youch docs/index.md
    $ yarn vuepress dev docs
    
    success [08:52:12] Build 1d01b9 finished in 172 ms! ( http://localhost:8080/ )
    

    What is expected?

    Vuepress CLI detects file changes and rebuilds.

    What is actually happening?

    Vuepress CLI doesn't detect file changes. I have to run vuepress dev docs again to build codes.

    Other relevant information

    • Output of npx vuepress info in my VuePress project:
    % npx vuepress info
    
    Environment Info:
    
      System:
        OS: macOS 10.15.4
        CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
      Binaries:
        Node: 14.2.0 - ~/.nodebrew/current/bin/node
        Yarn: 1.22.4 - ~/.nodebrew/current/bin/yarn
        npm: 6.14.4 - ~/.nodebrew/current/bin/npm
      Browsers:
        Chrome: Not Found
        Edge: Not Found
        Firefox: Not Found
        Safari: Not Found
      npmPackages:
        @vuepress/core:  1.5.0 
        @vuepress/theme-default:  1.5.0 
        vuepress: ^1.5.0 => 1.5.0 
      npmGlobalPackages:
        vuepress: Not Found
    
    type: bug priority: high 
    opened by reiwa 62
  • vuepress dev: throws res.getHeader() is not a function

    vuepress dev: throws res.getHeader() is not a function

    • [x] I confirm that this is an issue rather than a question.

    Bug report

    • Related issue: https://github.com/webpack/webpack-dev-middleware/issues/380
    • PR fix: https://github.com/shellscape/koa-webpack/pull/110

    Version

    Steps to reproduce

    NOTE: This was a first time use of vuepress.

    $ npm i -g vuepress
    $ echo "# Some Stuff" >> README.md
    $ vuepress dev
    
    > VuePress dev server listening at http://localhost:8080/
    

    Visit http://localhost:8080/ in browser

    Server throws ...

    (node:14508) UnhandledPromiseRejectionWarning: TypeError: res.getHeader is not a function
        at processRequest (C:\ProgramData\nvm\v10.9.0\node_modules\vuepress\node_modules\webpack-dev-middleware\lib\middleware.js:82:18)
        at ready (C:\ProgramData\nvm\v10.9.0\node_modules\vuepress\node_modules\webpack-dev-middleware\lib\util.js:51:12)
        at handleRequest (C:\ProgramData\nvm\v10.9.0\node_modules\vuepress\node_modules\webpack-dev-middleware\lib\util.js:167:5)
        at Promise (C:\ProgramData\nvm\v10.9.0\node_modules\vuepress\node_modules\webpack-dev-middleware\lib\middleware.js:44:7)
        at new Promise (<anonymous>)
        at middleware (C:\ProgramData\nvm\v10.9.0\node_modules\vuepress\node_modules\webpack-dev-middleware\lib\middleware.js:43:12)
        at Promise.all.Promise (C:\ProgramData\nvm\v10.9.0\node_modules\vuepress\node_modules\koa-webpack\index.js:43:7)
        at new Promise (<anonymous>)
        at C:\ProgramData\nvm\v10.9.0\node_modules\vuepress\node_modules\koa-webpack\index.js:42:5
        at dispatch (C:\ProgramData\nvm\v10.9.0\node_modules\vuepress\node_modules\koa\node_modules\koa-compose\index.js:42:32)
        at C:\ProgramData\nvm\v10.9.0\node_modules\vuepress\node_modules\@shellscape\koa-static\legacy\index.js:58:19
        at Generator.throw (<anonymous>)
        at step (C:\ProgramData\nvm\v10.9.0\node_modules\vuepress\node_modules\@shellscape\koa-static\legacy\index.js:6:221)
        at _throw (C:\ProgramData\nvm\v10.9.0\node_modules\vuepress\node_modules\@shellscape\koa-static\legacy\index.js:6:455)
    (node:14508) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
    (node:14508) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    
    version: 0.x 
    opened by tohagan 60
  • Has anyone gotten mermaid working?

    Has anyone gotten mermaid working?

    How would I get mermaid diagrams formatted in vuepress?

    I tried this with a correct NPM install:

    module.exports = {
      markdown: {
        config: md => {
          md.use(require('markdown-it-mermaid'))
          md.use(require('markdown-it-footnote'))
        }
      }
    }
    

    ... and I tried the same with all five markdown-it plugins found in an NPM search. Most of them generated errors of some sort, and the one that didn't simply did nothing, showing this block

    ```mermaid
    graph TD
        A[Christmas] -->|Get money| B(Go shopping)
        B --> C{Let me think}
        C -->|One| D[Laptop]
        C -->|Two| E[iPhone]
        C -->|Three| F[Car]
    ```
    

    as an fenced block of unknown type.

    This is not the overall markdown-it plugin process, since I tested it with markdown-it-footnote, and it worked fine.

    I've been looking for a tool to replace an awful Confluence implementation, and I like what I see so far of vuepress. I would love to be able to integrate mermaid as well. Has anyone done this successfully? Any suggestions for another plugin or a better way to integrate this?

    type: question or discussion 
    opened by CrossEye 44
  • No such file: `node_modules/@vuepress/core/.temp/app-enhancers/global-components-2.js`

    No such file: `node_modules/@vuepress/core/.temp/app-enhancers/global-components-2.js`

    • [x] I confirm that this is an issue rather than a question.

    Bug report

    In development mode it sometimes breaks down when incrementally compiling the changes and I get this error in the browser console:

    [WDS] Errors while compiling. Reload prevented.
    
    ./node_modules/@vuepress/core/.temp/app-enhancers/global-components-2.js
    Module build failed (from ./node_modules/babel-loader/lib/index.js):
    Error: ENOENT: no such file or directory, open '/<path to project>/node_modules/@vuepress/core/.temp/app-enhancers/global-components-2.js'
    

    The build output in the terminal does not report any errors, and will happily recompile further changes, but nothing will happen in the browser.

    Steps to reproduce

    • vuepress dev src
    • Make some changes to files, have noticed it both when making changes to content and theme.
    • It works maybe 80-90% of the time, but once the error happens, saving again doesn't fix it and i have to ctrl-c and start the development server again.

    I am sorry for not providing a minimal example, but I truly have no clue which part of my code/setup is causing this. I am using a custom theme and VueX, but the issue started appearing before setting up VueX.

    What is expected?

    A normal incremental compile + hot reload.

    What is actually happening?

    The error pasted above.

    Other relevant information

    (I am running this via WSL, which is probably why it doesn't report my browsers)

    • Output of npx vuepress info in my VuePress project:
    Environment Info:
    
      System:
        OS: Linux 4.4 Ubuntu 18.04.4 LTS (Bionic Beaver)
        CPU: (8) x64 Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
      Binaries:
        Node: 10.15.0 - ~/.nvm/versions/node/v10.15.0/bin/node
        Yarn: 1.19.1 - ~/.yarn/bin/yarn
        npm: 6.14.3 - ~/.nvm/versions/node/v10.15.0/bin/npm
      Browsers:
        Chrome: Not Found
        Firefox: Not Found
      npmPackages:
        @vuepress/core:  1.4.0
        @vuepress/theme-default:  1.4.0
        vuepress: ^1.3.0 => 1.4.0
      npmGlobalPackages:
        vuepress: Not Found
    

    Other than this issue, I really really like using VuePress so far, keep up the great work!

    type: bug has PR 
    opened by Actimia 34
  • feat: back to top

    feat: back to top

    Implemented https://github.com/vuejs/vuepress/issues/372

    Well the icon looks a little bit funny, would be nice if some one could provide a better icon.

    image

    cc @ulivz @meteorlxy

    version: next 
    opened by ycmjason 34
  • Hot reload doesn't reflect frontmatter nor config.js changes

    Hot reload doesn't reflect frontmatter nor config.js changes

    • [x] I confirm that this is a issue rather than a question.

    Bug report

    The hot reload functionality when using vuepress dev does not seem to pickup changes to:

    • *.md frontmatter
    • .vuepress/config.js

    I'm new to VuePress so not sure if this was this previously working in earlier versions, but not working in 1.0.0-alpha.37.

    Version

    1.0.0-alpha.37

    Steps to reproduce

    1. Install vuepress@next globally - yarn global add vuepress@next

    2. Start with empty folder and a single README.md file, with a few headings

    3. Create a .vuepress/config.js file and enable a sidebar:

      themeConfig: {
        sidebar: ['/']
      }
      
    4. Run vuepress dev and view in browser

    5. Add frontmatter to README.md such as:

      ---
      title: X
      ---
      
    6. Nothing happens. Content changes are reloaded, but none of the frontmatter data.

    7. Add another sidebar item to config.js

    8. Again, the browser is not updated.

    Not even a browser refresh helps in either of these issues. I have to quit the dev server and restart it for the frontmatter and new sidebar elements to be reflected in the browser.

    What is expected?

    I would expect the frontmatter data to be rescanned and injected into the page and reflected in sidebars.

    What is actually happening?

    Content changes are hot reloaded, but none of the frontmatter data nor config.js changes.

    Other relevant information

    • Your OS: Windows 10
    • Node.js version: 10.2.1
    • Browser version: Chrome 73.0.3683.27 beta
    • Is this a global or local install? global
    • Which package manager did you use for the install? yarn
    type: bug contribution welcome priority: high topic: config 
    opened by SimonEast 32
  • Fix #1613

    Fix #1613

    Summary

    Adds a init hook to the plugin lifecycle.

    What kind of change does this PR introduce? (check at least one)

    • [ ] Bugfix
    • [x] Feature
    • [ ] Code style update
    • [ ] Refactor
    • [ ] Docs
    • [x] Build-related changes
    • [ ] Other, please describe:

    If changing the UI of default theme, please provide the before/after screenshot:

    Does this PR introduce a breaking change? (check one)

    • [ ] Yes
    • [x] No

    If yes, please describe the impact and migration path for existing applications:

    The PR fulfills these requirements:

    • [x] When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

    You have tested in the following browsers: (Providing a detailed version will be better.)

    • [ ] Chrome
    • [ ] Firefox
    • [ ] Safari
    • [ ] Edge
    • [ ] IE

    If adding a new feature, the PR's description includes:

    • [x] A convincing reason for adding this feature
    • [x] Related documents have been updated
    • [x] Related tests have been updated

    To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

    Other information:

    #1613

    opened by shad-k 30
  • Failed to execute 'appendChild' on 'Node': This node type does not support this method.

    Failed to execute 'appendChild' on 'Node': This node type does not support this method.

    • [ ] I confirm that this is an issue rather than a question.

    Bug report

    Steps to reproduce

    What is expected?

    What is actually happening?

    Other relevant information

    • Output of npx vuepress info in my VuePress project:

    When I develop my docs in development environment, it is ok. When i build it and put it on my server with nginx, it is also ok. However when i refresh the page with routes like this http://xxx.com/develop It has the error below image

    opened by Luxiaoshi 29
  • Installation instructions on VuePress home page don't work

    Installation instructions on VuePress home page don't work

    Bug report

    Version

    Steps to reproduce

    Follow instructions on home page: https://vuepress.vuejs.org/#as-easy-as-1-2-3

    What is expected?

    To see a working example.

    What is actually happening?

    If I install globally (as per the instructions) and try vuepress dev I get:

    $ vuepress dev
    
     WAIT  Extracting site metadata...
    
     TIP  Temp directory: C:/Users/Youdaman/AppData/Roaming/npm/node_modules/vuepress/node_modules/@vuepress/core/.temp
    TypeError: Cannot read property 'endsWith' of null
        at loadTheme (C:\Users\Youdaman\AppData\Roaming\npm\node_modules\vuepress\node_modules\@vuepress\core\lib\prepare\loadTheme.js:51:20)
        at AppContext.resolveTheme (C:\Users\Youdaman\AppData\Roaming\npm\node_modules\vuepress\node_modules\@vuepress\core\lib\prepare\AppContext.js:264:32)
        at AppContext.process (C:\Users\Youdaman\AppData\Roaming\npm\node_modules\vuepress\node_modules\@vuepress\core\lib\prepare\AppContext.js:72:16)
        at prepare (C:\Users\Youdaman\AppData\Roaming\npm\node_modules\vuepress\node_modules\@vuepress\core\lib\prepare\index.js:15:20)
        at dev (C:\Users\Youdaman\AppData\Roaming\npm\node_modules\vuepress\node_modules\@vuepress\core\lib\dev.js:23:25)
        at args (C:\Users\Youdaman\AppData\Roaming\npm\node_modules\vuepress\node_modules\@vuepress\cli\index.js:120:14)
        at Command.program.command.description.option.option.option.option.option.option.action (C:\Users\Youdaman\AppData\Roaming\npm\node_modules\vuepress\node_modules\@vuepress\cli\index.js:50:23)
        at Command.listener (C:\Users\Youdaman\AppData\Roaming\npm\node_modules\vuepress\node_modules\commander\index.js:315:8)
        at Command.emit (events.js:182:13)
        at Command.parseArgs (C:\Users\Youdaman\AppData\Roaming\npm\node_modules\vuepress\node_modules\commander\index.js:654:12)
    

    If I try to install it locally (without -g) and run I get:

    $ vuepress dev
    
     WAIT  Extracting site metadata...
    
     TIP  Temp directory: C:/Users/Youdaman/AppData/Roaming/npm/node_modules/vuepress/node_modules/@vuepress/core/.temp
    
     TIP  Apply theme @vuepress/theme-default
    
     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") ...
    WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
     - configuration.output.path: The provided value "C:/Users/Youdaman/Desktop/vuepress-next-test/.vuepress/dist" is not an absolute path!
       -> The output directory as **absolute path** (required).
        at webpack (C:\Users\Youdaman\AppData\Roaming\npm\node_modules\vuepress\node_modules\webpack\lib\webpack.js:31:9)
        at dev (C:\Users\Youdaman\AppData\Roaming\npm\node_modules\vuepress\node_modules\@vuepress\core\lib\dev.js:95:20)
        at process._tickCallback (internal/process/next_tick.js:68:7)
    
    

    Other relevant information

    • Your OS: Windows 10
    • Node.js version: v10.7.0
    • Is this a global or local install? Both.
    • Which package manager did you use for the install? npm

    I had previously installed vuepress without the @next suffix after reading the instructions in the docs (see https://vuepress.vuejs.org/guide/getting-started.html#global-installation) as per my previous issue here https://github.com/vuejs/vuepress/issues/903#issuecomment-427587953

    I removed the old (0.14 I think) version before installing the new version globally. When I tried installing locally I used vuepress@next as per the instructions on the home page -- easy to miss as they're below the fold and there's a big green button that says "Get Started" which takes you to the stale docs (click "Getting Started" in the sidebar nav after that) that have instructions to install vuepress and not vuepress@next.

    opened by Youdaman 29
  • Automatic Reload not working?

    Automatic Reload not working?

    You can have an automatic reload to be on the development server, for every change I have to reload the page manually

    So you can compile the directory directly in C: \ vuepress-dev

    The command vuepress dev already works but when I make some change in the README.md it does not update automatically

    • Your OS: Window
    • Node.js version: v8.4.0
    • VuePress version: v0.7.0
    • Browser version: Google Chrome Versión 65.0.3325.181 (Build oficial) (64 bits)
    • Is this a global or local install?: Global
    • Which package manager did you use for the install?: NPM
    opened by luisDanielRoviraContreras 27
  • Last updated does not work when deployed using GitHub Actions

    Last updated does not work when deployed using GitHub Actions

    • [x] I confirm that this is an issue rather than a question.

    Bug report

    When deploying the docs to GitHub Pages using the GitHub Action jenkey2011/vuepress-deploy@master the "Last updated" value is never shown. Instead, when building and serving the docs using yarn build locally it is working as expected.

    Steps to reproduce

    Setup the GitHub jenkey2011/vuepress-deploy@master to deploy to GitHub Pages:

    name: Build and Deploy
    on:
      - push
    jobs:
      build-and-deploy:
        runs-on: ubuntu-20.04
        steps:
          - name: Checkout
            uses: actions/checkout@master
          - name: vuepress-deploy
            uses: jenkey2011/vuepress-deploy@master
            env:
              ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
              BUILD_SCRIPT: yarn && yarn build
              BUILD_DIR: src/.vuepress/dist
    

    What is expected?

    I would expect that also using the GitHub Action that the "Last updated" value is shown.

    What is actually happening?

    "Last updated" value is not shown. From what I see in the GitHub Action log is that the action does the right commands. Essentially it does the following:

    yarn && yarn build
    cd src/.vuepress/dist
    git init
    git commit [...]
    git push -f [...]
    

    Other relevant information

    • Output of npx vuepress info in my VuePress project:
    Environment Info:
    
      System:
        OS: macOS 12.6
        CPU: (8) arm64 Apple M1
      Binaries:
        Node: 16.17.0 - ~/tools/planqk/bin/node
        Yarn: 1.22.19 - /opt/homebrew/bin/yarn
        npm: 6.14.17 - /opt/homebrew/opt/node@14/bin/npm
      Browsers:
        Chrome: 108.0.5359.124
        Edge: Not Found
        Firefox: 100.0
        Safari: 16.0
      npmPackages:
        @vuepress/core:  1.9.7
        @vuepress/theme-default:  1.9.7
        vuepress: ^1.5.3 => 1.9.7
      npmGlobalPackages:
        vuepress: Not Found
    
    opened by miwurster 0
  • build(deps): bump express from 4.17.2 to 4.18.2

    build(deps): bump express from 4.17.2 to 4.18.2

    Bumps express from 4.17.2 to 4.18.2.

    Release notes

    Sourced from express's releases.

    4.18.2

    4.18.1

    • Fix hanging on large stack of sync routes

    4.18.0

    ... (truncated)

    Changelog

    Sourced from express's changelog.

    4.18.2 / 2022-10-08

    4.18.1 / 2022-04-29

    • Fix hanging on large stack of sync routes

    4.18.0 / 2022-04-25

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Funinthesun

    Funinthesun

    Feature request

    What problem does this feature solve?

    What does the proposed API look like?

    How should this be implemented in your opinion?

    Are you willing to work on this yourself?

    opened by BETO210 0
  • feat: multi level sidebar

    feat: multi level sidebar

    Summary

    What kind of change does this PR introduce? (check at least one)

    • [ ] Bugfix
    • [x] Feature
    • [ ] Code style update
    • [ ] Refactor
    • [ ] Docs
    • [ ] Build-related changes
    • [ ] Other, please describe:

    If changing the UI of default theme, please provide the before/after screenshot: sidebar

    Does this PR introduce a breaking change? (check one)

    • [ ] Yes
    • [x] No

    If yes, please describe the impact and migration path for existing applications:

    The PR fulfills these requirements:

    • [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

    You have tested in the following browsers: (Providing a detailed version will be better.)

    • [x] Chrome
    • [x] Firefox
    • [ ] Safari
    • [x] Edge
    • [ ] IE

    If adding a new feature, the PR's description includes:

    • [x] A convincing reason for adding this feature
    • [ ] Related documents have been updated
    • [ ] Related tests have been updated

    To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

    Other information: Related issue

    opened by WilsonXinxin 0
  • [Feature] I want to configure multi-level sidebar

    [Feature] I want to configure multi-level sidebar

    Feature request

    What problem does this feature solve?

    Can configure multi-level sidebar

    What does the proposed API look like?

    How should this be implemented in your opinion?

    Modify the method of generating sidebar

    Are you willing to work on this yourself?

    Yes

    opened by WilsonXinxin 0
  • 关于VuePress集成Algolia不生效的咨询

    关于VuePress集成Algolia不生效的咨询

    前言

    大家好,我根据VuePress1.x的文档配置了Algolia,但是搜索时没有出现Algolia搜索框,还是原本的默认的搜索框,经过搜索文档、百度和Google、搜索本仓库的issue,在思否和掘金上提问,仍无果,现求助于各位开发者

    复现

    我复现的步骤如下:

    1. 登录Algolia控制台,可以看到已经有爬虫爬到网站数据了
    2. 根据官网文档配置了Algolia :默认主题配置 | VuePress
    3. 本地启动和部署到服务器上后,都没出现搜索框(还是默认的只能搜索h2等标题)
    4. 我的项目地址:vuepressblog: 个人博客, 由于我的博客配置较多,怀疑是不是主题导致的,因此单独创建了一个新的项目,没使用任何主题,仍不能使用Algolia的搜索功能 vuepress-starter

    关键配置如下:

    module.exports = {
      themeConfig: {
        algolia: {
          appId: 'HFCGE1I7YO',
          apikey: '557697d1f20e77362b502b71ecf41e2a',
          indexName: 'peterjxl'
        },
      }
    }
    

    配置文件地址:

    1. docs/.vuepress/config/themeConfig.ts · - Gitee.com
    2. docs/.vuepress/config.js · -Gitee.com

    Algolia后台截图:能正常生成数据 image

    三个参数就是和Algolia邮件里一样的,邮件截图: image

    已观察控制台和VuePress启动时的命令行,均无报错,请问是否有漏了哪一步?或者应该如何排查?看VuePress源码还是看Algolia的配置,

    版本信息

    node:v16.15.1 "vuepress": "^1.9.7", Windows10专业版 Chrome浏览器

    期待您的回复

    opened by Peter-JXL 0
Releases(v1.9.2)
  • v1.9.2(Dec 23, 2021)

    TS Support for VuePress Plugin and Theme.

    Motivation

    We've announced VuePress 1.9 that takes full TypeScript Support for Config File, while VuePress 1.9.2 ships with TS Support for VuePress Plugin and Theme:

    Quick Start

    In order to make the plugin developer not dependent on VuePress for development, we provide a completely independent type package @vuepress/types:

    npm i @vuepress/types -D
    

    @vuepress/types exports four functions:

    • defineConfig
    • defineConfig4CustomTheme
    • defineTheme
    • definePlugin

    Note that using @vuepress/types is equivalent to using vuepress/config.

    Plugin Type

    If you already have some VuePress plugins written in JS, you can leverage your IDE's intellisense with jsdoc type hints:

    /**
     * @type {import('@vuepress/types').Plugin}
     */
    module.exports = {
      ready() {
        // ...
      }
    };
    

    Alternatively, you can use the defineConfig helper which should provide intellisense without the need for jsdoc annotations:

    import { definePlugin } from "@vuepress/types";
    
    export default definePlugin({
      // ...
    });
    

    Plugin Options Type

    Type of plugin options also supports passing in through generic type:

    import { definePlugin } from "@vuepress/types";
    
    interface Options {
      name: string;
    }
    
    export default definePlugin<Options>((options, ctx) => {
      return {
        ready() {
          return ctx.base + options.name;
        }
      };
    });
    

    Theme Type

    Similar to plugin, the only difference is the type you use, and the define function:

     /**
    - * @type {import('@vuepress/types').Plugin}
    + * @type {import('@vuepress/types').Theme}
      */
    
    -import { definePlugin } from "@vuepress/types";
    +import { defineTheme } from "@vuepress/types";
    
    -export default definePlugin({
    +export default defineTheme({
       // ...
     });
    

    Theme Config Type

    Type of theme config also supports passing in through generic type:

    import { defineTheme } from "@vuepress/types";
    
    interface ThemeConfig {
      lang: string;
    }
    
    export default defineTheme<ThemeConfig>((themeConfig, ctx) => {
      return {
        ready() {
          return ctx.base + themeConfig.lang;
        }
      };
    });
    

    Notes

    It is worth noting that, unlike the site configuration, i.e. .vuepress/config.js, if you use TypeScript to write theme or plugin, you still need to compile it into JavaScript before publishing it to NPM.

    Source code(tar.gz)
    Source code(zip)
  • v1.9.0(Dec 22, 2021)

    TypeScript Support for Config File

    Overview

    VuePress 1.9 introduced full TypeScript Support for Config File, for VuePress 1.x, this is a late key feature:

    1 9-overview

    Features

    Support .vuepress/config.ts

    Previously, VuePress only supported these configurations

    • .vuepress/config.js
    • .vuepress/config.yml
    • .vuepress/config.toml

    From now on, .vuepress/config.ts get officially supported.

    defineConfig helper for config intellisense

    A helper function exposed at vuepress/config, which helps you to have type prompt:

    import { defineConfig } from "vuepress/config";
    
    export default defineConfig({
      title: "VuePress",
      description: "Vue-powered Static Site Generator"
      // ...
    });
    

    Type Inferences for Theme

    By default, defineConfig helper leverages type of Default Theme Config as themeConfig, i.e, type hints for all Default Theme Config is available for now.

    import { defineConfig } from "vuepress/config";
    
    export default defineConfig({
      themeConfig: {
        repo: "vuejs/vuepress",
        editLinks: true,
        docsDir: "packages/docs/docs"
        // Type is `DefaultThemeConfig`
      }
    });
    

    If you use a custom theme, you can use the defineConfig4CustomTheme helper with ability to pass generic type for your theme:

    import { defineConfig4CustomTheme } from "vuepress/config";
    
    interface MyThemeConfig {
      hello: string;
    }
    
    export default defineConfig4CustomTheme<MyThemeConfig>({
      themeConfig: {
        // Type is `MyThemeConfig`
        hello: "vuepress"
      }
    });
    

    Type Inferences for Official Plugins

    From now, you’ll be able to enjoy the type prompt of the official plugins:

    1 9-official-plugin-tuple-usage

    Options of the official plugins certainly have type prompts, Both Tuple Style, Object Style, and Plugin Shorthand support type inference:

    • Tuple Style:
    import { defineConfig } from "vuepress/config";
    
    export default defineConfig({
      plugins: [
        [
          "@vuepress/pwa",
          {
            serviceWorker: true
          }
        ]
      ]
    });
    

    1 9-official-plugin-options

    • Object Style:
    import { defineConfig } from "vuepress/config";
    
    export default defineConfig({
      plugins: {
        "@vuepress/pwa": {
          serviceWorker: true
        }
      }
    });
    

    The illustration snapshot is omitted here, you can try it yourself.

    ISO Language Code

    Type inference supports ISO Language Code

    1 9-lang

    Context API

    VuePress’s configuration can also be a function, while its first parameter is the current app context:

    import { defineConfig } from "vuepress/config";
    
    export default defineConfig(ctx => ({
      // do not execute babel compilation under development
      evergreen: ctx.isProd
    }));
    

    Limitations

    It is worth noting that third-party plugins do not support Plugin Shorthand if you’re using Tuple Style to write your config, this is because from the perspective of the type system, the unknown shortcut is equivalent to string, which results in the failure of type inference.

    By default, only officially maintained and plugins under VuePress Community support shortcut, feel free to submit pull request to add your plugin at this file.

    Credits

    Source code(tar.gz)
    Source code(zip)
  • v1.8.3(Dec 20, 2021)

  • v1.8.2(Feb 18, 2021)

  • v1.8.1(Feb 11, 2021)

  • v1.8.0(Jan 21, 2021)

  • v1.7.1(Oct 15, 2020)

  • v1.7.0(Oct 13, 2020)

  • v1.6.0(Sep 25, 2020)

  • v1.5.4(Aug 23, 2020)

  • v1.5.3(Aug 5, 2020)

    Bug Fixes

    • $theme-default: fix editLink for repos hosted on gitlab.com (#2523) (1c3967c)
    • add toml dependencyt to shared-utils (b858a6e)
    • regular files should not be executable (#2535) (ffb8527)
    • $theme-default: improve last-updated text color contrast (#2282) (7ca9fbc)
    • allows no rel attribute on external links in the nav (#2338) (b343cd3)
    • $core: style loss under build for package that specifies sideEffects: false (fix #2350) (#2471) (7e29900)
    • $markdown: line highlighting not working correctly when importing code snippets (#2441) (d0f2e42)

    Features

    • $theme-default: add initial open group index option (#2408) (465ae40)
    Source code(tar.gz)
    Source code(zip)
  • v1.5.2(Aug 5, 2020)

  • v1.5.1(Aug 5, 2020)

  • v1.5.0(May 11, 2020)

  • v1.4.1(Oct 21, 2020)

  • v1.4.0(Mar 18, 2020)

    Bug Fixes

    • fail to test specific package (#2099) (0aadf05)
    • opencollective postinstall failure not being ignored on Windows(#2177) (a9759c0)
    • $plugin-pwa: work with register-service-worker 1.7.0 (close #2222) (#2229) (604052b)
    • $shared-utils: Slugify em/en dash in urls (#2174) (8d9968d)
    • $theme-default: remove error logs for nested sidebar groups (#2191) (c3a943c)

    Features

    • $core: Improve VuePress build time (#2163) (76da780)
    • $plugin-last-updated: add dateOptions to options (#2192) (369c315)
    • $plugin-search: improve the native search algorithm (#1557) (e9fde5c)
    Source code(tar.gz)
    Source code(zip)
  • v1.3.1(Feb 20, 2020)

  • v1.3.0(Jan 31, 2020)

    Bug Fixes

    • update known command list (#2146) (2b25740)
    • $cli: inferUserDocsDirectory ignore all node_modules (#2137) (df59909)
    • $core: set NODE_ENV before creating app (#1972) (245be8d)
    • $core: temp option in siteConfig has not effect (fix #2038) (#2040) (0bb85a4)
    • $default-theme: deep sidebar links rendenring (#1973) (0e5519a)
    • $docs: Fixed typo (#1997) (7d6e420)
    • $docs: Uniforming VuePress labels in documentation (fix #1998) (6a84126)
    • $markdown: Fix four spaces codeblocks rendering (Closes #1921) (#1958) (7bc5825)
    • $plugin-google-analytics: duplicate tracking of first page (fix #2017) (#2039) (a69df21)
    • $plugin-pwa: no global-ui-component when updatePopup is disabled (#2041) (6f9e478)
    • $shared-utils: Add curly quotes to rSpecial (#1934) (28a0ed9)
    • $theme-default: close dropdown-links when focusout on the last item (close #1948) (#1952) (cd72acc)
    • $theme-default: slots don't allow customization for Sidebar & Page (close: #1950) (#1951) (890e85d)
    • $theme-default: use alias for nested SidebarLinks (close #2049) (ceccca3)
    • $theme-default: wrong algolia search route with base config (#2007) (b00b277)

    Features

    • $cli: Notify users of a newer release (#2121) (7a09a72)
    • $cli: run debug mode without clearing screen (close #2100) (#2116) (c6a3cb5)
    • $core: Add generator meta tag to ssr index.html template (#2133) (2826cd7)
    • add variable to config HomePage width (close #2055) (#2086) (b72d145)
    • remove unnecessary check in moduleResolver.ts (#2068) (bd71e43)
    • $config: Allow overriding badges colors (close #1940) (#1941) (89a4a8d)
    • $markdown: extractHeaders option (close: #1903) (#1945) (d2fef5d)
    • $markdown: Support for Rust file extension (73089a0)
    • $theme-default: allow optional subtitle (#1981) (a28804c)
    • $theme-default: external links in prev/next (close #1962)(#1984) (9f28814)
    • $theme-default: markdown details custom block (close #768) (#2044) (7f2a997)
    • $theme-default: Support configuring target and rel for nav links (close #1353) (#1734) ([770ba72]
    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Oct 11, 2019)

    Bug Fixes

    • $core: optimize error log (close: #1296) (#1413) (51de6cf)
    • $markdown: notify error when not found snippet (close: #1872) (#1910) (6aaa7d7)
    • $theme-default: regression of arrow spacing consistent (close: #1427) (#1907) (dbda574)
    • $theme-default: make dropdown-title's UI consistent with nav-link (#1890) (757e880)
    • $theme-default: make navbar dropdown links accessible (#1837) (a8ce645)
    • $theme-default: regression of custom container default title (#1875) (e0ef407)

    Features

    • $core: config "pattern" of resolved files (close: #1700)(#1705) (1f3e4e2)
    • $core: support async function exported in vuepress config (close: #1185) (#1925) (cdbfd75)
    • $core: Upgrade vue version to 2.6.10 (#1876) (c17c70e)
    • $theme-default: smooth scroll (close #567) (#1881) (2e3efb4)
    • $theme-default:: enable editLink on specific page via frontmatter (close: #1762) (#1825) (0e8a442)
    • $markdown: Highlight kotlin code on snippets import (close: #1831)(#1874) (f913fea)
    • $shared-utils: resolve regularPath when getting permalink (#1786) (c6ce6cf)
    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Sep 14, 2019)

    1.1.0 (2019-09-14)

    Bug Fixes

    • $js-yaml: fix Security issue by bump js yaml version #1845 (#1846) (696717b)
    • $doc-deployment fix Add npm ci instructions for Travis CI (0434f15), closes #1844
    • $theme-default Search box max suggestions (#1728) (ade328f)
    • $docs: Update link to the 0.x documentation (#1852) (c7999cf)
    • $last-updated: use file author time instead of submodule commit time (#1640) (f964391)
    • $theme-default: add text ellipsis to navbar (#1683) (#1840) (74017c5)
    • $theme-default: Expand nested sidebar groups (#1540) (eb231bf)

    Features

    • $config Improve CI process (#1759) (fe7301b)
    • $theme-default renable algolia docSearch #697 (68861f0)
    • $config: make extendPageData async ready without breaking changes (#1546) (543fd6c)
    • $core: better error log for layouts (#1455) (3b68913)
    • $plugin-search: Add support for search hotkeys (#1848) (1ba06ae)
    Source code(tar.gz)
    Source code(zip)
  • v1.0.4(Sep 6, 2019)

A template repository / quick start to build Azure Static Web Apps with a Node.js function. It uses Vue.js v3, Vue Router, Vuex, and Vite.js.

Azure Static Web App Template with Node.js API This is a template repository for creating Azure Static Web Apps that comes pre-configured with: Vue.js

Marc Duiker 6 Jun 25, 2022
Adapter for SvelteKit apps that prerenders your site as a collection of static files for GitHub Pages

svelte-adapter-github Adapter for SvelteKit apps that prerenders your site as a collection of static files for GitHub Pages. Usage Install with npm i

null 36 Sep 20, 2022
Minimal, zero-configuration and fast solution for static site generation in any front-end framework.

Staticit - Introduction Whether you want to increase performance of your web application or improve SEO. Generally you have 2 options, use SSR (Server

Engineerhub 4 Jun 11, 2022
:clipboard: A schema-based form generator component for Vue.js

vue-form-generator A schema-based form generator component for Vue.js. Demo JSFiddle simple example CodePen simple example Features reactive forms bas

VueJS Generators 2.9k Dec 27, 2022
:tada: A magical vue admin https://panjiachen.github.io/vue-element-admin

English | 简体中文 | 日本語 | Spanish SPONSORED BY 活动服务销售平台 客户消息直达工作群 Introduction vue-element-admin is a production-ready front-end solution for admin inter

花裤衩 80.1k Dec 31, 2022
:eyes: Vue in React, React in Vue. Seamless integration of the two. :dancers:

vuera NOTE: This project is looking for a maintainer! Use Vue components in your React app: import React from 'react' import MyVueComponent from './My

Aleksandr Komarov 4k Dec 30, 2022
🎉 基于 vite 2.0 + vue 3.0 + vue-router 4.0 + vuex 4.0 + element-plus 的后台管理系统vue3-element-admin

vue3-element-admin ?? 基于 Vite 2.0 + Vue3.0 + Vue-Router 4.0 + Vuex 4.0 + element-plus 的后台管理系统 简介 vue3-element-admin 是一个后台前端解决方案,它基于 vue3 和 element-plu

雪月欧巴 84 Nov 28, 2022
Jenesius vue modal is simple library for Vue 3 only

Jenesius Vue Modal Jenesius vue modal is simple library for Vue 3 only . Site Documentation Installation npm i jenesius-vue-modal For add modals in yo

Архипцев Евгений 63 Dec 30, 2022
Mosha-vue-toastify - A light weight and fun Vue 3 toast or notification or snack bar or however you wanna call it library.

Mosha Vue Toastify A lightweight and fun Vue 3 toast or notification or snack bar or however you wanna call it library. English | 简体中文 Talk is cheap,

Baidi Liu 187 Jan 2, 2023
A plugin that can help you create project friendly with Vue for @vue/cli 4.5

vue-cli-plugin-patch A plugin that can help you create project friendly with Vue for @vue/cli 4.5. Install First you need to install @vue/cli globally

null 2 Jan 6, 2022
Veloce: Starter template that uses Vue 3, Vite, TypeScript, SSR, Pinia, Vue Router, Express and Docker

Veloce Lightning-fast cold server start Instant hot module replacement (HMR) and dev SSR True on-demand compilation Tech Stack Vue 3: UI Rendering lib

Alan Morel 10 Oct 7, 2022
Modern ThreeJS boilerplate powered by Vite & Typescript

Modern ThreeJS ⚡️ Modern ThreeJS boilerplate powered by Vite & Typescript. Features Powered with Vite ?? GUI controls using Tweakpane ?? Typescript ??

Alvaro Saburido 64 Jan 4, 2023
Rust dbg! in js powered by rollup/vite plugin system

rollup-plugin-dbg This plugin is also compatible with vite use with rollup import { defineConfig } from "rollup"; import config from "./package.json";

Jason 17 Aug 18, 2022
A API documentation generator for Vue3 single file component.

doc-vue A API documentation generator for Vue3 single file component. Table of Contents Installation Write API Description Command Line Usage Programm

annnhan 36 Oct 20, 2022
📓 The UI component explorer. Develop, document, & test React, Vue, Angular, Web Components, Ember, Svelte & more!

Build bulletproof UI components faster Storybook is a development environment for UI components. It allows you to browse a component library, view the

Storybook 75.9k Jan 9, 2023
A Vue.js 2.0 UI Toolkit for Web

A Vue.js 2.0 UI Toolkit for Web. Element will stay with Vue 2.x For Vue 3.0, we recommend using Element Plus from the same team Links Homepage and doc

饿了么前端 53k Jan 3, 2023
The Intuitive Vue Framework

Build your next Vue.js application with confidence using Nuxt: a framework making web development simple and powerful. Links ?? Documentation: https:/

Nuxt 41.8k Jan 5, 2023
🐉 Material Component Framework for Vue

Supporting Vuetify Vuetify is a MIT licensed project that is developed and maintained full-time by John Leider and Heather Leider; with support from t

vuetify 36.2k Jan 3, 2023
🛠️ Standard Tooling for Vue.js Development

Vue CLI Vue CLI is the Standard Tooling for Vue.js Development. Documentation Docs are available at https://cli.vuejs.org/ - we are still working on r

vuejs 29.6k Jan 4, 2023