Skip to content

thomkrupa/penthouse-lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Penthouse Lambda

Run penthouse as a serverless function on Vercel.

Deploy to Vercel

Usage

Make a post request to <domain>/api/penthouse with following body:

{
  "url": "<absolute url to page you want you want extract CSS>",
  "cssPath": "<absolute path to css file>"
}

Alternatively, you can post HTML and CSS as strings instead of absolute paths.

{
  "html": "<valid html string>",
  "cssString": "<full css string>"
}

The function will return an object with critical CSS as follows:

{
  "criticalCss": "<critical css string>"
}

About

Extract Critical CSS through serverless function.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published