Skip to content

windchime-yk/deno_ogp_parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deno_ogp_parser

codecov
OGP Parser for Deno

Usage

import { parsedMeta } from "https://deno.land/x/ogp_parser/mod.ts"

const result = parsedMeta("https://example.com")
console.log(result.title) // -> "Example Domain"

If you want to restrict the allowed origins, use the allowOrigins option.

import { parsedMeta } from "https://deno.land/x/ogp_parser/mod.ts"

const result = parsedMeta("https://example.com", {
  allowOrigins: ["https://example.com"],
});
console.log(result.title) // -> "Example Domain"

Recommends

Since metadata does not change frequently, we recommend caching the retrieved results in Deno KV.