https://github.com/thoemmi/pretzel.redirectfrom
A plugin for Pretzel, mimicing the JekyllRedirectFrom gem.
https://github.com/thoemmi/pretzel.redirectfrom
jekyllredirectfrom-gem plugin pretzel redirects
Last synced: 10 months ago
JSON representation
A plugin for Pretzel, mimicing the JekyllRedirectFrom gem.
- Host: GitHub
- URL: https://github.com/thoemmi/pretzel.redirectfrom
- Owner: thoemmi
- License: ms-pl
- Created: 2015-06-28T17:06:58.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-12-29T22:20:16.000Z (about 9 years ago)
- Last Synced: 2025-01-17T06:44:30.406Z (12 months ago)
- Topics: jekyllredirectfrom-gem, plugin, pretzel, redirects
- Language: PowerShell
- Size: 5.26 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## Pretzel.RedirectFrom
This is a plugin for [Pretzel](https://github.com/Code52/pretzel), a static site generation tool following (more or less) the same conventions as [Jekyll](https://github.com/mojombo/jekyll). It mimics the [JekyllRedirectFrom gem](https://github.com/jekyll/jekyll-redirect-from) for Jekyll.
Sometimes when migrating a site to Pretzel, you may change the structure of your site. This plugin helps to redirect old URLs to new locations.
[](https://ci.appveyor.com/project/thoemmi/pretzel-redirectfrom/branch/master)
### Installation
Copy `Pretzel.RedirectFrom.csx` to the `_plugin` folder at the root of your site folder.
### Usage
Add the old URL to the front-matter of your post or page:
```
---
title: Awesome page
redirect_from:
- /pages/old-awesome-url.html
---
...
```
This will generate a new file `index.html` in the folder `\pages\old-awesome-url.html\` with an HTTP-REFRESH meta tag which redirects to the new page URL.