Socket
Socket
Sign inDemoInstall

@frontmatter/extensibility

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frontmatter/extensibility - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

2

package.json
{
"name": "@frontmatter/extensibility",
"version": "0.0.9",
"version": "0.0.10",
"description": "Front Matter CMS extensibility library",

@@ -5,0 +5,0 @@ "type": "module",

@@ -15,5 +15,15 @@ <p align="center">

- Card image
- Card footer
Card extensibility points:
- Image
- Footer
*Extension version 8.5.0 and higher*:
- Draft status
- Date
- Title
- Description
- Tags
### Panel

@@ -59,2 +69,77 @@

### Registering the card draft status
```js
import { registerCardStatus } from "https://cdn.jsdelivr.net/npm/@frontmatter/extensibility/+esm";
/**
* @param {string} filePath - The path of the file
* @param {object} data - The metadata of the file
* @returns {string} - The HTML to be rendered in the card footer
*/
registerCardStatus(async (filePath, metadata) => {
return `<span>Your HTML</span>`;
});
```
### Registering the card date
```js
import { registerCardDate } from "https://cdn.jsdelivr.net/npm/@frontmatter/extensibility/+esm";
/**
* @param {string} filePath - The path of the file
* @param {object} data - The metadata of the file
* @returns {string} - The HTML to be rendered in the card footer
*/
registerCardDate(async (filePath, metadata) => {
return `<span>Your HTML</span>`;
});
```
### Registering the card title
```js
import { registerCardTitle } from "https://cdn.jsdelivr.net/npm/@frontmatter/extensibility/+esm";
/**
* @param {string} filePath - The path of the file
* @param {object} data - The metadata of the file
* @returns {string} - The HTML to be rendered in the card footer
*/
registerCardTitle(async (filePath, metadata) => {
return `<span>Your HTML</span>`;
});
```
### Registering the card description
```js
import { registerCardDescription } from "https://cdn.jsdelivr.net/npm/@frontmatter/extensibility/+esm";
/**
* @param {string} filePath - The path of the file
* @param {object} data - The metadata of the file
* @returns {string} - The HTML to be rendered in the card footer
*/
registerCardDescription(async (filePath, metadata) => {
return `<span>Your HTML</span>`;
});
```
### Registering the card tags
```js
import { registerCardTags } from "https://cdn.jsdelivr.net/npm/@frontmatter/extensibility/+esm";
/**
* @param {string} filePath - The path of the file
* @param {object} data - The metadata of the file
* @returns {string} - The HTML to be rendered in the card footer
*/
registerCardTags(async (filePath, metadata) => {
return `<span>Your HTML</span>`;
});
```
### Registering a card footer

@@ -61,0 +146,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc