Poosh plugin that generates location HTTP headers from HTML content
With the following options:
{
plugins: ["header-location-from-html"],
each: [{
match : "**/*.html",
headers : { location: { fromContent: true } }
}]
}
A local file looking like that:
<!DOCTYPE html>
<html>
<head>
<link rel="canonical" href="http://mysite.tld/posts/my-original-url"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta http-equiv="refresh" content="0;url=http://mysite.tld/posts/my-original-url"/>
</head>
</html>
Will be uploaded with a location
HTTP header set to http://mysite.tld/posts/my-original-url
.