Parse Microdata or JSON-LD in preview to get published date and modified date
Opened this issue ยท 1 comments
sounisi5011 commented
The Netlify preview is like a cache that holds its own past state.
It is more efficient to get the published date and modified date from the deployed preview page itself, rather than a dedicated cache file that is kept or ambiguous.
It is considered common to describe the published date and modified date of pages using Microdata or JSON-LD.
Therefore, I propose the addition of a function to analyze this.
I could find some npm packages that parse Microdata and JSON-LD.
- https://www.npmjs.com/package/web-auto-extractor
- https://www.npmjs.com/package/htmlmetaparser
- https://www.npmjs.com/package/html-metadata
- https://www.npmjs.com/package/page-content
- https://www.npmjs.com/package/scrappy
- https://www.npmjs.com/package/metadata-parser
- https://www.npmjs.com/package/page-content
This attempt should not be impossible.
sounisi5011 commented
I could find some npm packages that parse Microdata and JSON-LD.
- https://www.npmjs.com/package/web-auto-extractor
- https://www.npmjs.com/package/htmlmetaparser
- https://www.npmjs.com/package/html-metadata
- https://www.npmjs.com/package/page-content
- https://www.npmjs.com/package/scrappy
- https://www.npmjs.com/package/metadata-parser
- https://www.npmjs.com/package/page-content
Some packages were tools that depended on another package:
- page-content
Depends on web-auto-extractor package - scrappy
Depends on htmlmetaparser package
And these packages were forked:
- metadata-parser
forked from html-metadata. Older than the original fork
Except for these packages, the remaining candidates are:
- web-auto-extractor
- ๐ It is adopted in many packages.
- ๐ The last publish date is two years ago.
- ๐ There is an old cheerio in dependencies. As with metalsmith-excerpts, there is a risk of encountering security issues.
- htmlmetaparser
- ๐ TypeScript type definition is included.
- ๐ There is only one package in a dependency. I do not struggle with maintenance.
- ๐ The last publish date is one years ago.
- html-metadata
- ๐ Created by Wikimedia.
- ๐ The last publish date is two years ago.