ajgl/redirector-spress-plugin

无缝指定您页面和帖子多个重定向URL

0.1.0 2016-03-31 17:10 UTC

This package is auto-updated.

Last update: 2024-09-10 20:43:57 UTC


README

AjglRedirectorSpressPlugin 组件允许您使用 Spress 无缝地指定您页面和帖子的多个重定向URL

Latest Stable Version Latest Unstable Version Total Downloads Montly Downloads Daily Downloads License

安装

要安装此组件的最新稳定版本,请打开控制台并执行以下命令

$ composer require ajgl/redirector-spress-plugin

用法

redirect_from 属性添加到具有旧URL路径的项目中,您希望将其重定向到当前项的URL。

---
layout: "post"
title: "Welcome to Spress"
redirect_from: /old/url.html
---

清洁URL

如果 redirect_from 值以斜杠 / 结尾,它将在内部包含 index.html 文件的目录中生成。

---
layout: "post"
title: "Welcome to Spress"
redirect_from: /old/url/
---

这将生成在 /old/url/index.html 中重定向的页面。

多个重定向

如果您想生成多个重定向,可以添加多个 redirect_from 值。

---
layout: "post"
title: "Welcome to Spress"
redirect_from:
  - /old/url/
  - /other/old/url/
---

许可证

此组件采用 MIT 许可证。有关完整的许可证信息,请参阅 LICENSE 文件。

报告问题或功能请求

问题和功能请求在 Github问题跟踪器 中进行跟踪。

作者信息

Antonio J. García Lagar 用♥开发。

如果您认为这个组件很有用,请在 GitHub仓库页面 和/或 Packagist软件包页面 中添加★。