Skip to content

The Mittnett Relume Import is a WordPress plugin designed to automate the creation of pages and structured sections within a WordPress block theme by parsing CSV files generated by the Relume.io sitemap/wireframe AI builder. This plugin leverages WordPress core functions and Gutenberg blocks to ensure seamless integration.

Notifications You must be signed in to change notification settings

jaidevel/mittnett-relume-import

Repository files navigation

Mittnett Relume Sitemap Importer

A WordPress plugin that automates page and section creation from a CSV file, ideal for generating structured site layouts using Gutenberg blocks. The primary purpose of this plugin is to import a sitemap from a Relume project (generated using Relume.io) into WordPress, creating corresponding pages and blocks automatically.

Features

  • CSV Parsing: Reads a CSV file to generate pages with structured sections.
  • Page Creation: Automatically creates pages based on CSV entries.
  • Section Generation: Adds sections to each page using Group, Heading, and Paragraph blocks.
  • Alternating Background Colors: Adds alternating gray backgrounds to sections for a clean, readable layout.
  • Navigation Menu: Creates a navigation menu from generated pages.

Example CSV Structure

Page Name Section Section Description
Home Hero Welcome to our site!
Features Key features of our product.
About Our Story Information about our journey.
Team Meet our dedicated team.
  • Rows with a "Page Name" specify a new page.
  • Rows with an empty "Page Name" continue adding sections to the last defined page.

Installation

  1. Download or clone this repository into your wp-content/plugins directory.
  2. Run composer install in the plugin's root directory to set up autoloading and dependencies.
  3. Activate the plugin through the Plugins menu in WordPress.
  4. Go to Sitemap Importer in the WordPress admin sidebar to upload your CSV file.

Usage

  1. Prepare Your CSV: Ensure the CSV matches the expected structure.
  2. Upload CSV: In the Sitemap Importer admin page, upload your CSV file.
  3. View Generated Pages: The plugin will create pages and sections with alternating gray backgrounds in the Gutenberg editor.

Development

Prerequisites

  • PHP 7.4+
  • WordPress 5.0+ (supports Gutenberg blocks)

Folder Structure

mittnett-relume-import/
├── mittnett-relume.php
├── src/
│   ├── Admin/
│   ├── Import/
│   ├── Logs/
│   ├── Utilities/
│   └── assets/
├── vendor/
└── templates/

Core Files

  • ``: Main plugin file, initializes the plugin.
  • ``: Manages dependencies and sets up autoloading using Composer.
  • ``: Contains Composer dependencies and autoload files.
  • ``: Handles page and section creation.
  • ``: Manages CSV upload and import functionality.

Future Work/Functionality

  • Better Block Theme Support: Add global patterns such as a navigation bar and footer for better integration with block themes.
  • Advanced Section Handling: Add logic to select appropriate blocks/patterns for each section, instead of using a single simple pattern for all sections.
  • Template Creation: Support the creation of complete page templates for better reuse and design consistency.
  • Wireframe Import: Extend functionality to import and generate pages and blocks from Relume wireframes rather than just sitemaps.

Contributing

  1. Fork the repo.
  2. Create a new branch (feature/new-feature).
  3. Commit changes.
  4. Push to the branch.
  5. Create a Pull Request.

License

MIT License.

About

The Mittnett Relume Import is a WordPress plugin designed to automate the creation of pages and structured sections within a WordPress block theme by parsing CSV files generated by the Relume.io sitemap/wireframe AI builder. This plugin leverages WordPress core functions and Gutenberg blocks to ensure seamless integration.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages