首页 > 解决方案 > VuePress 没有使用 frontmatter-redirection 插件正确地从旧链接重定向到新链接

问题描述

版本详情

  1. Vuepress : ^1.8.2
  2. vuepress-plugin-redirect-frontmatter : ^1.0.0

问题

在 frontmatter 中添加了 redirectFrom: urls 以添加对旧链接的支持以重定向到新链接,但是它在重定向时因appendChild错误而中断

样本前沿

---
permalink: /codes/2011/link-shortening-script/
redirectFrom: /2011/06/27/Link-Shortening-Script/
---

配置.js

plugins: [
    [
      'redirect-frontmatter'
    ]
]

期待

  1. https://rohansakhale.com/2011/06/27/Link-Shortening-Script/ - 旧链接
  2. https://rohansakhale.com/codes/2011/link-shortening-script/ - 新链接

更新

I thought it would generate the new page, however it managed on JS routing side the redirection part.

However, after redirection the page doesn't load and breaks

标签: vue.jsredirectvuepress

解决方案


推荐阅读