ubermanu/magento2-static-cms

This package is abandoned and no longer maintained. No replacement package was suggested.

Tool for creating static pages and blocks for Magento 2

v1.0.6 2022-03-11 17:54 UTC

This package is auto-updated.

Last update: 2022-09-11 18:48:53 UTC


README

Tool for creating static pages and blocks for Magento 2.

Install

composer require ubermanu/magento2-static-cms

Format

The file contains 2 parts: header and content.

Page

---
is_active: 1
identifier: home
---
<p>An updated home page.</p>

Block

---
is_active: 1
title: My Block
identifier: block-1
---
<p>This is the content of a block.</p>

Usage

Import a page with static content:

php bin/magento cms:static:import --type page <file>

FrontMatter

The FrontMatter part of the file is optional.
But it's recommended to use it to set the model properties.

---
is_active: 1
title: Home page
content_heading: Home Page
identifier: home
page_layout: 1column
---
<p>CMS homepage content goes here.</p>

Import directories

It's possible using xargs, remember to split your files by type:

find <your-dir> -type f -print0 | xargs -l -0 php bin/magento cms:static:import --type page