Skip to content

thoemmi/Pretzel.RedirectFrom

Repository files navigation

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.

About

A plugin for Pretzel, mimicing the JekyllRedirectFrom gem.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published