@frontmatter/extensibility
Advanced tools
Comparing version 0.0.9 to 0.0.10
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19765
253