vuepress / core

Vue-Powered Static Site Generator
https://vuepress.vuejs.org
MIT License
2.29k stars 926 forks source link

[Bug report] Define permalink into Markdown broken #114

Closed JulioJu closed 3 years ago

JulioJu commented 3 years ago

Bug report

Description

Define permalink into Markown as defined in dev mode or in prod mode https://vuepress2.netlify.app/reference/frontmatter.html#permalink or https://vuepress.vuejs.org/guide/permalinks.html#configure-permalinks is broken .

Steps to reproduce

Prepare

In Dev

In prod

Expected behavior

permalink frontmatter should work

Environment info

$ yarn vuepress info
yarn run v1.22.10
$ /tmp/essai/node_modules/.bin/vuepress info

  System:
    OS: Linux 5.10 Arch Linux
    CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
    Memory: 886.16 MB / 7.53 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 15.14.0 - /tmp/yarn--1618162335393-0.27195924212408906/node
    Yarn: 1.22.10 - /tmp/yarn--1618162335393-0.27195924212408906/yarn
    npm: 7.8.0 - /usr/bin/npm
  Utilities:
    Git: 2.31.1 - /usr/bin/git
  Browsers:
    Chrome: Not Found
    Firefox: 87.0
  npmPackages:
    @vuepress/bundler-vite: Not Found
    @vuepress/bundler-webpack:  2.0.0-beta.8
    @vuepress/cli:  2.0.0-beta.8
    @vuepress/client:  2.0.0-beta.8
    @vuepress/core:  2.0.0-beta.8
    @vuepress/markdown:  2.0.0-beta.8
    @vuepress/plugin-active-header-links:  2.0.0-beta.8
    @vuepress/plugin-back-to-top:  2.0.0-beta.8
    @vuepress/plugin-container:  2.0.0-beta.8
    @vuepress/plugin-debug: Not Found
    @vuepress/plugin-docsearch: Not Found
    @vuepress/plugin-git:  2.0.0-beta.8
    @vuepress/plugin-google-analytics: Not Found
    @vuepress/plugin-medium-zoom:  2.0.0-beta.8
    @vuepress/plugin-nprogress:  2.0.0-beta.8
    @vuepress/plugin-palette:  2.0.0-beta.8
    @vuepress/plugin-pwa: Not Found
    @vuepress/plugin-pwa-popup: Not Found
    @vuepress/plugin-theme-data:  2.0.0-beta.8
    @vuepress/shared:  2.0.0-beta.7
    @vuepress/theme-default:  2.0.0-beta.8
    @vuepress/theme-vue: Not Found
    @vuepress/utils:  2.0.0-beta.8
    vue:  3.0.11
    vue-loader:  16.2.0
    vue-router:  4.0.6
    vuepress: ^2.0.0-beta.8 => 2.0.0-beta.8
    vuepress-vite: Not Found

Done in 1.08s.
meteorlxy commented 3 years ago

The reason is your permalink does not end with '.html' nor '/'.

If you check the dist directory, there will be a file named test2, which is expected to be test2.html or test2/index.html