[ netlify ] mercury parser / AMP converter

=== mercury parser ===

Dependencies

npm install @postlight/mercury-parser

Usage ( test.mjs )

import Mercury from "@postlight/mercury-parser";

const url="https://trackchanges.postlight.com/building-awesome-cms-f034344d8ed";
Mercury.parse(url).then(result => console.log(result));

Run

node --experimental-modules test.mjs

 

=== AMP converter ===

https://mercury.postlight.com/amp?url=http://www.example.com/sample-article.html

 

ref : https://mercury.postlight.com/web-parser/, https://mercury.postlight.com/amp-converter/

[ test ] contentfulClient host

test host: “whatever.netlify.com”

output request : https://whatever.netlify.com/spaces/space_id/environments/develop/entries?content_type=post&fields.publishDate%5Blt%5D=2019-02-15T07%3A00%3A00.000Z&fields.videoID%5Bexists%5D=false&fields.gallery%5Bexists%5D=true&fields.categories%5B0%5D=entertainment&limit=1&order=-fields.publishDate

test host: “whatever.netlify.com/api/” or “whatever.netlify.com/api”

output request : https://whatever.netlify.com/api/:443/spaces/space_id/environments/develop/entries?content_type=post&fields.publishDate%5Blt%5D=2019-02-15T07%3A00%3A00.000Z&fields.videoID%5Bexists%5D=false&fields.gallery%5Bexists%5D=true&fields.categories%5B0%5D=entertainment&limit=1&order=-fields.publishDate

ref : https://www.npmjs.com/package/contentful