Skip to content

aguaitech/Elementor_Project_Workflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elementor Data Management

This project provides a structured way to manage Elementor page data downloaded from a WordPress site, facilitating offline editing and updating. This project also includes the corresponding cursor rules for the project.

Directory Structure

  • pages/: Stores the raw page configurations downloaded from WordPress. These files contain the full page data, including metadata like page ID and title.
  • elementor/: Contains the extracted and formatted Elementor configuration data. This is where you should make edits to the Elementor layouts.
  • compress/: Holds the compressed Elementor data, ready for uploading back to WordPress.

All configuration files in these folders are named using the page slug and have a .json extension (e.g., home.json).

Helper Scripts

Two Node.js helper scripts are provided for managing Elementor data:

  1. extract_elementor.js

    • Purpose: Extracts and formats the Elementor data from raw page configuration files in pages/ and saves it to the elementor/ folder.
    • Usage: node extract_elementor.js [optional_arg]
    • optional_arg:
      • Not provided: Extracts data from all files in pages/ and writes them to elementor/.
      • skipExisting: Extracts data only for pages in pages/ that do not already have a corresponding file in elementor/.
      • <filename.json> (e.g., home.json): Extracts data only from the specified file in pages/ to elementor/.
    • When to use: Run this script after downloading or fetching new page data into the pages/ folder to prepare the Elementor data for editing.
  2. compress_elementor.js

    • Purpose: Compresses the edited Elementor data from the elementor/ folder into the compress/ folder, preparing it for upload.
    • Usage: node compress_elementor.js [optional_arg]
    • optional_arg:
      • Not provided: Compresses all files in elementor/ and writes them to compress/.
      • skipExisting: Compresses only the files in elementor/ that do not already exist in compress/.
      • <filename.json> (e.g., home.json): Compresses only the specified file from elementor/ to compress/.
    • When to use: Run this script after making changes to files in the elementor/ folder and before updating the page on the WordPress site.

Workflow Summary

  1. Fetch/Download: Obtain the page data from WordPress and save the full JSON configuration into the pages/ folder (e.g., pages/about-us.json).
  2. Extract: Run node extract_elementor.js [page-slug.json] to extract the Elementor-specific data into the elementor/ folder (e.g., elementor/about-us.json).
  3. Edit: Modify the Elementor JSON data within the corresponding file in the elementor/ directory.
  4. Compress: Run node compress_elementor.js [page-slug.json] to generate the compressed version of your changes in the compress/ folder (e.g., compress/about-us.json).
  5. Update: Use the appropriate tool or method to upload the compressed Elementor data from the file in compress/ back to the WordPress page. The corresponding file in pages/ can be used to retrieve necessary metadata like the pageId for the update operation.

About

Provides a structured way to manage Elementor page data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages