Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 1.04 KB

README.md

File metadata and controls

26 lines (17 loc) · 1.04 KB

Pretzel.RedirectFrom

This is a plugin for Pretzel, a static site generation tool following (more or less) the same conventions as Jekyll. It mimics the JekyllRedirectFrom gem 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.

Build status

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.