Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@gravity-ui/blog-constructor
Advanced tools
npm install @gravity-ui/blog-constructor
Blog-constructor
is a library based on the Page-constructor library for creating blog format web pages. Blog-constructor uses the custom
prop from page-constructor to add the components needed for the blog.
The blog-constructor has both client components and server components for import. The blog pages is imported as a React component. To make sure it runs properly, wrap it in BlogConstructorProvider
:
import {BlogPage, BlogConstructorProvider} from '@gravity-ui/blog-constructor';
// Main blog page
<BlogConstructorProvider {...providerProps}>
<BlogPage
content={content}
posts={posts}
tags={tags}
getPosts={handleGetPosts}
settings={settings}
/>
</BlogConstructorProvider>
---
import {BlogPostPage, BlogConstructorProvider} from '@gravity-ui/blog-constructor';
// Post page
<BlogConstructorProvider {...providerProps}>
<BlogPostPage
content={content}
post={post}
suggestedPosts={suggestedPosts}
settings={settings}
shareOptions={shareOptions}
/>
</BlogConstructorProvider>
Documentation about providerProps.
Also blog-constructor have server components to help you transform your data if you need
import {
transformPost,
sanitizeMeta,
createReadableContent,
transformPageContent,
} from '@gravity-ui/blog-constructor/server';
The blog-constructor
is a uikit-based
library, and we use an instance of i18n
from uikit. To set up internationalization, you just need to use the configure
from uikit:
import {configure} from '@gravity-ui/uikit';
configure({
lang: 'ru',
});
npm ci
npm run dev
FAQs
Gravity UI Blog Constructor
The npm package @gravity-ui/blog-constructor receives a total of 7 weekly downloads. As such, @gravity-ui/blog-constructor popularity was classified as not popular.
We found that @gravity-ui/blog-constructor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.