1.0.6 • Published 5 years ago
bloggify-page v1.0.6
bloggify-page
The Bloggify page class.
:cloud: Installation
# Using npm
npm install --save bloggify-page
# Using yarn
yarn add bloggify-page:clipboard: Example
const BloggifyPage = require("bloggify-page");
const home = new BloggifyPage({
title: "Home"
, content: "Hey there!"
, metadata: {
customField: "Hello Mars!"
}
});
console.log(home);
// BloggifyPage {
// title: 'Home',
// slug: 'Home',
// url: '/Home',
// content: 'Hey there!',
// customField: 'Hello Mars!',
// raw_content: 'Hey there!' }:question: Get Help
There are few ways to get help:
- Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
- For bug reports and feature requests, open issues. :bug:
:memo: Documentation
bloggifyPage(data)
BloggifyPage The Bloggify page class.
Params
- Object
data: The page data:metadata(Object):title(String): The page title.slug(String): The page slug.url(String): The page url.main_image(String): The recommended image.
title(String): The page title. If provided, has greater priority than themetadata.title.slug(String): The page slug. If provided, has greater priority than themetadata.slug.url(String): The page url. If provided, has greater priority than themetadata.url.content(String): The page content.html(String): The page html.markdown(String): The page content.rawContent(String): The page raw content.
Additional keys passed in the metadata or in the main object, they will be merged in the result object.
:yum: How to contribute
Have an idea? Found a bug? See how to contribute.
:dizzy: Where is this library used?
If you are using this library in one of your projects, add it in this list. :sparkles:
bloggify-viewerbloggify-article