Git Product home page Git Product logo

acf-layout-gen's Introduction

ACF Layout Gen

Overview

ACF Layout Gen is command-line tool written in rust. It is designed to make the proccess creating layouts for ACF flexible content quick and easy by automatically generating the templates and populating them with the associated fields.

It takes the JSON file automatically generated by ACF, identifies the flex content fields and generates template-parts for the associated layouts.

The ACF Field Generator CLI is at tool for generating boilerplate PHP templates from a JSON representation created by Advanced Custom Fields (ACF).

...

Note: This tool is unofficial and not affiliated with Advanced Custom Fields (ACF)

...

Features

  • JSON to PHP Conversion: Converts ACF field configurations stored in JSON format into corresponding wordpress boilerplate.

  • Automatic Flex Content Layouts Create the template parts for your layouts with all the fieldsin the right place.

  • Overwrite Flag Files will not be overwritten unless specified in the command

Options

Options

  • --src, -s: Path to the input JSON file containing ACF field configurations.

  • --dest, -d: Path where the generated code will be created.

  • --overwrite, -o: If true, existing files will be overwritten. False by default.

Usage

  1. clone repository
    git clone [email protected]:willnjl/acf-layout-gen.git
  1. install executable (Unix)
    cargo build && sudo cp target/debug/acf-layout-gen /usr/local/bin
  1. Run your Rust CLI app from anywhere on your machine.
   acf-layout-gen --src inc/acf-json/group_654b6e4a8a06e.json --dest ./wp-content/themes/wordpress-theme

Development

cargo watch -s 'cargo run -- --src "json/*.json" --dest ./output -o'

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.