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.
- 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
, andParagraph
blocks. - Alternating Background Colors: Adds alternating gray backgrounds to sections for a clean, readable layout.
- Navigation Menu: Creates a navigation menu from generated pages.
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.
- Download or clone this repository into your
wp-content/plugins
directory. - Run
composer install
in the plugin's root directory to set up autoloading and dependencies. - Activate the plugin through the Plugins menu in WordPress.
- Go to Sitemap Importer in the WordPress admin sidebar to upload your CSV file.
- Prepare Your CSV: Ensure the CSV matches the expected structure.
- Upload CSV: In the Sitemap Importer admin page, upload your CSV file.
- View Generated Pages: The plugin will create pages and sections with alternating gray backgrounds in the Gutenberg editor.
- PHP 7.4+
- WordPress 5.0+ (supports Gutenberg blocks)
mittnett-relume-import/
├── mittnett-relume.php
├── src/
│ ├── Admin/
│ ├── Import/
│ ├── Logs/
│ ├── Utilities/
│ └── assets/
├── vendor/
└── templates/
- ``: 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.
- 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.
- Fork the repo.
- Create a new branch (
feature/new-feature
). - Commit changes.
- Push to the branch.
- Create a Pull Request.
MIT License.