matrixcreate/craft-simple-seo-import
Composer 安装命令:
composer require matrixcreate/craft-simple-seo-import
包简介
Import SEO metadata from CSV files and automatically create entries, with SEOmatic integration.
README 文档
README
A Craft CMS plugin for importing SEO metada from CSV files and automatically creating entries, with an intuitive drag-and-drop field mapping interface and SEOmatic integration.
Features
- 🎯 Flexible CSV Processing: Accepts any column names - no rigid header validation
- 📊 Visual Field Mapping: Drag-and-drop interface with double-click convenience and remove buttons
- 🌳 Hierarchical Import: Automatic parent-child relationships based on URL structure
- 🔄 Entry Duplication: Uses existing entries as templates with field serialization
- 🎨 Enhanced Preview: Tree-structured hierarchy display with visual depth indicators
- 📋 Complete CSV Preview: Scrollable table with sticky headers showing all data
- 🔧 SEOmatic Integration: Automatically populates SEO meta descriptions
- ⚡ Skip Homepage Option: Checkbox to exclude homepage entries from import
- ✅ Success Messaging: Clear feedback with enhanced visual indicators
Requirements
- Craft CMS 5.0+
- PHP 8.2+
- SEOmatic plugin (optional, for SEO field mapping)
Installation
Via Composer (Recommended)
composer require matrixcreate/craft-simple-seo-import
Manual Installation
- Download the plugin files
- Copy to your
plugins/directory - Add to your project's composer.json:
{
"repositories": [
{
"type": "path",
"url": "./plugins/simple-seo-import"
}
],
"require": {
"matrixcreate/craft-simple-seo-import": "*"
}
}
- Run
composer install - Install the plugin through the Craft control panel
CSV Format
The plugin is completely flexible with column names. You can use any column headers - the field mapping step handles all variations.
Example CSV Structure
URL,Slug,Page Title,Hero Text,Description https://site.com/services,services,Services,Our services,Welcome to Services https://site.com/services/dental,dental,Dental Services,Dental care,Quality Dental Care https://site.com/services/dental/cleaning,cleaning,Teeth Cleaning,Professional cleaning,Professional Teeth Cleaning
Hierarchical Structure
The plugin automatically detects parent-child relationships based on URL structure:
/services→ Top level entry/services/dental→ Child of "services"/services/dental/cleaning→ Child of "dental"
Usage
1. Upload CSV
Navigate to Simple SEO Import in the control panel and upload your CSV file. Any column names are accepted.
2. Select Base Entry & Configure
- Choose an existing entry to use as a template
- Optionally check "Skip first row" to exclude homepage entries
3. Map Fields
Use the visual interface to map CSV columns to entry fields:
- Drag and drop CSV fields to target fields
- Double-click CSV fields for auto-mapping convenience
- Red X buttons to quickly remove mappings
4. Preview Hierarchy
Review the complete hierarchical structure with:
- Visual depth indicators and color coding
- Parent-child relationships clearly displayed
- Complete CSV data preview with scrollable table
5. Import
Perform the final import with automatic parent-child relationship creation.
Field Mapping Options
The plugin supports these target fields:
hierarchy.address→ URL field for hierarchy detection (not saved to entries)entry.slug→ Entry's URL slugentry.title→ Entry's title fieldentry.heroTitle→ Custom Rich Text/CKEditor fieldseomatic.meta.description→ SEOmatic meta description field
Advanced Features
Hierarchical Processing
- Import Order: Parents created first, then children
- Preview Order: Tree structure with proper nesting
- Depth Indicators: Visual levels (Top Level, Level 2, Level 3, etc.)
- Color Coding: Different colors per depth level
Enhanced UX
- Multi-step Wizard: Clear progression through upload → map → preview → import
- Real-time Validation: Contextual error messages
- Dual Navigation: Top and bottom action buttons
- Complete Data Display: No artificial preview limits
Technical Architecture
- Field Serialization: Reliable entry duplication using Craft's native methods
- URL Parsing: Intelligent parent-child detection from URL structure
- Session Management: Secure data handling throughout the import process
Supported Field Types
✅ Confirmed Working
- Plain Text fields
- Rich Text/CKEditor fields
- Lightswitch fields
- Asset fields
- SEOmatic fields
❌ Known Limitations
- Content Block fields (due to architectural restrictions)
Development
Built with modern web technologies:
- Enhanced JavaScript: Multi-step wizard with drag-and-drop
- CSS Grid & Flexbox: Responsive layouts
- AJAX Integration: Seamless user experience
- PHP 8.4: Modern PHP features and type declarations
Plugin Structure
src/
├── Plugin.php # Main plugin class
├── controllers/
│ └── ImportController.php # Import workflow endpoints
├── services/
│ ├── CsvParserService.php # Flexible CSV parsing
│ ├── EntryDuplicatorService.php # Entry creation with hierarchy
│ └── HierarchyService.php # URL parsing and relationships
└── templates/
└── index.twig # Complete wizard interface
Support
- Issues: GitHub Issues
- Documentation: GitHub README
- Developer: Matrix Create
License
MIT License - see LICENSE file for details.
Changelog
See CHANGELOG.md for version history and updates.
matrixcreate/craft-simple-seo-import 适用场景与选型建议
matrixcreate/craft-simple-seo-import 是一款 基于 Twig 开发的 Composer 扩展包,目前已累计 282 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 07 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「csv」 「plugin」 「import」 「cms」 「seo」 「hierarchy」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 matrixcreate/craft-simple-seo-import 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 matrixcreate/craft-simple-seo-import 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 matrixcreate/craft-simple-seo-import 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
CakePHP 4.x AdminLTE Theme.
Parse use statements for a reflection object
Tool for copying data from a production database to a dev database. Also useful for making backups of production databases.
A fork of konnco/filament-import with support of Laravel 11 since the default importer of Filament 3 is nonsense for basic use case.
laravel facade to read/write csv file
Collection of tools to use the full power of the Enyalius framework
统计信息
- 总下载量: 282
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-07-09