Skip to content

willnjl/acf-layout-gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 git@github.com: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'

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages