gatsby-plugin-excerpts
Version:
A powerful way to extract excerpts from content
48 lines (44 loc) • 1.2 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var IExcerptSourceConfigurationBase =
/** @class */
function () {
function IExcerptSourceConfigurationBase() {}
return IExcerptSourceConfigurationBase;
}();
exports.IExcerptSourceConfigurationBase = IExcerptSourceConfigurationBase;
/*
const example: IExcerptsPluginConfiguration = {
sources: {
"excerptElement": {
type: "htmlQuery",
sourceField: "html",
excerptSelector: ".custom-block.excerpt .custom-block-body",
stripSelector: "a"
},
"default": {
type: "htmlQuery",
sourceField: "html",
excerptSelector: "html > *",
ignoreSelector: "img, .custom-block.iconBox, .custom-block.aside, details, .gatsby-highlight",
stripSelector: "a"
}
},
sourceSets: {
"markdownHtml": [
"excerptElement",
"default"
]
},
excerpts: {
snippet: {
type: "html",
nodeTypeSourceSet: {
"MarkdownRemark": "markdownHtml"
}
}
}
};
*/