Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

Commit ab1ecae

Browse files
committed
tp26712 docs: Remove generic blocks and components from readme
1 parent 41dd39e commit ab1ecae

File tree

1 file changed

+0
-113
lines changed

1 file changed

+0
-113
lines changed

README.md

Lines changed: 0 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ This package is based on [Gutenberg v3.2.0](https://github.com/WordPress/gutenbe
2323
* [Registering Custom Blocks](#registering-custom-blocks)
2424
* [Customize your Gutenberg](#customize-your-gutenberg)
2525
* [Events](#events)
26-
* [Gutenberg-js Lib](#gutenberg-js-lib)
27-
* [Post block](#post-block)
28-
* [Row block](#row-block)
29-
* [Section block](#section-block)
30-
* [PostsPanel component](#postspanel-component)
3126

3227
## Installation
3328

@@ -380,111 +375,3 @@ window.customGutenberg = {
380375
```
381376

382377
[↑ Go up to Table of contents](#table-of-contents)
383-
384-
## Gutenberg-js Lib
385-
386-
The Gutenberg JS library contains a bunch of blocks and components to complement and simplify your Gutenberg experience.
387-
388-
```js
389-
import { lib } from '@frontkom/gutenberg-js';
390-
391-
console.log('blocks', lib.blocks);
392-
console.log('components', lib.components);
393-
```
394-
395-
[↑ Go up to Table of contents](#table-of-contents)
396-
397-
### Post block
398-
399-
The **Post Block** is another kind of blocks created by **gutenberg-js** which is composed by a cover image and a title.
400-
401-
```js
402-
import {
403-
blocks,
404-
lib,
405-
} from '@frontkom/gutenberg-js';
406-
407-
const postBlock = lib.blocks.post;
408-
409-
blocks.registerBlockType(postBlock.name, postBlock.settings);
410-
```
411-
412-
We are trying to provide new types of blocks: **auto posts** and **hand-picked posts** which are experimental for now. Theose blocks are dynamic and the render must be implemented server-side.
413-
414-
[↑ Go up to Table of contents](#table-of-contents)
415-
416-
### Row block
417-
418-
Rows work like columns but they could be slipt in spots with different widths.
419-
420-
```js
421-
import {
422-
blocks,
423-
lib,
424-
} from '@frontkom/gutenberg-js';
425-
426-
const rowBlock = lib.blocks.row;
427-
428-
blocks.registerBlockType(rowBlock.name, rowBlock.settings);
429-
```
430-
431-
[↑ Go up to Table of contents](#table-of-contents)
432-
433-
### Section block
434-
435-
**Section** is a row with just one column. You can add blocks inside and add classes to style that section.
436-
437-
```js
438-
import {
439-
blocks,
440-
lib,
441-
} from '@frontkom/gutenberg-js';
442-
443-
const sectionBlock = lib.blocks.section;
444-
445-
blocks.registerBlockType(sectionBlock.name, sectionBlock.settings);
446-
```
447-
448-
After register the block and initialize the editor, you can set **Section** as default block:
449-
450-
```
451-
import {
452-
data,
453-
lib,
454-
} from '@frontkom/gutenberg-js';
455-
456-
data.dispatch('core/blocks').setDefaultBlockName(lib.blocks.section.name);
457-
```
458-
459-
[↑ Go up to Table of contents](#table-of-contents)
460-
461-
### PostsPanel component
462-
463-
The **Posts Panel** contains a list of posts which could be filtered by category and/or searched be name. Posts can be added to your page as (Post block)[#post-block] by drag and drop.
464-
465-
```js
466-
import {
467-
editPost,
468-
plugins,
469-
lib,
470-
} from '@frontkom/gutenberg-js';
471-
472-
const { PluginDocumentSidebarPanel } = editPost;
473-
const { PostsPanel } = lib.components;
474-
475-
const MyPluginDocumentSidebarPanel = () => (
476-
<PluginDocumentSidebarPanel
477-
className="my-plugin-post-publish-panel"
478-
title={ 'My Stories' }
479-
initialOpen={ true }
480-
>
481-
<PostsPanel />
482-
</PluginDocumentSidebarPanel>
483-
);
484-
485-
plugins.registerPlugin('plugin-document-sidebar', {
486-
render: MyPluginDocumentSidebarPanel,
487-
});
488-
```
489-
490-
[↑ Go up to Table of contents](#table-of-contents)

0 commit comments

Comments
 (0)