{"id":24755178,"url":"https://github.com/gravity-ui/blog-constructor","last_synced_at":"2025-10-11T01:31:29.106Z","repository":{"id":148384245,"uuid":"583618733","full_name":"gravity-ui/blog-constructor","owner":"gravity-ui","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-14T10:34:05.000Z","size":13248,"stargazers_count":13,"open_issues_count":9,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-14T11:37:11.555Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gravity-ui.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-30T10:42:56.000Z","updated_at":"2024-12-04T09:22:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"c57661d3-8cad-47d3-b01b-badb8e75cd26","html_url":"https://github.com/gravity-ui/blog-constructor","commit_stats":null,"previous_names":[],"tags_count":80,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gravity-ui%2Fblog-constructor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gravity-ui%2Fblog-constructor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gravity-ui%2Fblog-constructor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gravity-ui%2Fblog-constructor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gravity-ui","download_url":"https://codeload.github.com/gravity-ui/blog-constructor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236017830,"owners_count":19081984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-28T12:36:50.610Z","updated_at":"2025-10-11T01:31:27.632Z","avatar_url":"https://github.com/gravity-ui.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @gravity-ui/blog-constructor \u0026middot; [![npm package](https://img.shields.io/npm/v/@gravity-ui/blog-constructor)](https://www.npmjs.com/package/@gravity-ui/blog-constructor) [![CI](https://img.shields.io/github/actions/workflow/status/gravity-ui/blog-constructor/ci.yml?branch=main\u0026label=CI)](https://github.com/gravity-ui/blog-constructor/actions/workflows/ci.yml?query=branch:main) [![CI](https://img.shields.io/github/actions/workflow/status/gravity-ui/blog-constructor/release.yml?branch=main\u0026label=Release)](https://github.com/gravity-ui/blog-constructor/actions/workflows/release.yml?query=branch:main) [![storybook](https://img.shields.io/badge/Storybook-deployed-ff4685)](https://preview.gravity-ui.com/blog-constructor/)\n\n## Install\n\n```shell\nnpm install @gravity-ui/blog-constructor\n```\n\n## Blog-constructor\n\n`Blog-constructor` is a library based on the [Page-constructor](https://github.com/gravity-ui/page-constructor) library for creating blog format web pages. Blog-constructor uses the [`custom`](https://github.com/gravity-ui/page-constructor#custom-blocks) prop from page-constructor to add the components needed for the blog.\n\n### Documentation - [storybook](https://preview.gravity-ui.com/blog-constructor/)\n\n### Getting started\n\nThe 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`:\n\n```jsx\nimport {BlogPage, BlogConstructorProvider} from '@gravity-ui/blog-constructor';\n\n// Main blog page\n\u003cBlogConstructorProvider {...providerProps}\u003e\n    \u003cBlogPage\n        content={content}\n        posts={posts}\n        tags={tags}\n        getPosts={handleGetPosts}\n        settings={settings}\n    /\u003e\n\u003c/BlogConstructorProvider\u003e\n\n---\n\nimport {BlogPostPage, BlogConstructorProvider} from '@gravity-ui/blog-constructor';\n\n// Post page\n\u003cBlogConstructorProvider {...providerProps}\u003e\n    \u003cBlogPostPage\n        content={content}\n        post={post}\n        suggestedPosts={suggestedPosts}\n        settings={settings}\n        shareOptions={shareOptions}\n    /\u003e\n\u003c/BlogConstructorProvider\u003e\n\n```\n\nDocumentation about [providerProps](./src/constructor/README.md).\n\nAlso blog-constructor have server components to help you transform your data if you need\n\n```jsx\nimport {\n  transformPost,\n  sanitizeMeta,\n  createReadableContent,\n  transformPageContent,\n} from '@gravity-ui/blog-constructor/server';\n```\n\nThe `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:\n\n```typescript\nimport {configure} from '@gravity-ui/uikit';\n\nconfigure({\n  lang: 'ru',\n});\n```\n\n## Development\n\n```bash\nnpm ci\nnpm run dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgravity-ui%2Fblog-constructor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgravity-ui%2Fblog-constructor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgravity-ui%2Fblog-constructor/lists"}