Git Product home page Git Product logo

acorn-fse-helper's Introduction

Acorn FSE Helper

Latest Stable Version Total Downloads Build Status

Acorn FSE Helper provides an easy way to initialize and work with block templates in themes powered by Acorn.

Requirements

Installation

Install via Composer:

$ composer require roots/acorn-fse-helper

Getting Started

Once installed, begin by initializing full-site editing in your theme using Acorn's CLI:

$ wp acorn fse:init

Initializing ensures your current activated theme supports block-templates as well as provides you with the option to publish initial stubs to get started with.

Usage

Once initialized, any block templates located in templates/ will be given priority over existing Blade views.

Blade Directives

To assist with hybrid theme development, Acorn FSE Helper includes a few useful Blade directives out of the box for working with blocks inside of views.

@blocks

The @blocks directive allows you to render raw block markup inside of a view using do_blocks():

@blocks
  <!-- wp:paragraph {"align":"center"} -->
  <p>Lorem ipsum...</p>
  <!-- /wp:paragraph -->
@endblocks

@blockpart

The @blockpart directive provides a convenient way to render block template parts inside of your views using block_template_part():

@blockpart('header')

To render multiple template parts at once, you may pass an array in the order you wish them to be rendered in:

@blockpart(['header', 'footer'])

Bug Reports

If you discover a bug in Acorn FSE Helper, please open an issue.

Contributing

Contributing whether it be through PRs, reporting an issue, or suggesting an idea is encouraged and appreciated.

License

Acorn FSE Helper is provided under the MIT License.

acorn-fse-helper's People

Contributors

log1x avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.