All Projects → studioespresso → craft3-seeder

studioespresso / craft3-seeder

Licence: MIT license
Seeder is the easiest way to quickly create placeholder content while you're building out a website. Create your sections & fields and then let Seeder make entries for you.

Programming Languages

PHP
23972 projects - #3 most used programming language
Twig
543 projects

Projects that are alternatives of or similar to craft3-seeder

Buttonbox
A collection of utility field types for Craft
Stars: ✭ 94 (+213.33%)
Mutual labels:  craft, craft-plugin, craft3
craft-entry-instructions
A simple fieldtype to add instructions.
Stars: ✭ 16 (-46.67%)
Mutual labels:  craft, craft-plugin, craft3
craft-plugin-mix
Helper plugin for Laravel Mix in Craft CMS templates
Stars: ✭ 50 (+66.67%)
Mutual labels:  craft, craft-plugin, craft3
Craft Preparse Field
Field type that parses twig when an element is saved.
Stars: ✭ 103 (+243.33%)
Mutual labels:  craft, craft-plugin, craft3
Simplemap
A beautifully simple map field type for Craft CMS.
Stars: ✭ 136 (+353.33%)
Mutual labels:  craft, craft-plugin, craft3
craft-audit
Audit log for Craft 3
Stars: ✭ 18 (-40%)
Mutual labels:  craft, craft-plugin, craft3
Seo
SEO utilities including a unique field type, sitemap & redirect manager
Stars: ✭ 210 (+600%)
Mutual labels:  craft, craft-plugin, craft3
tablemaker
A user-definable table field type for Craft CMS
Stars: ✭ 39 (+30%)
Mutual labels:  craft, craft-plugin, craft3
craft-wheelform
Craft CMS 4 Form with Database integration
Stars: ✭ 64 (+113.33%)
Mutual labels:  craft, craft-plugin
snipcart-craft-plugin
Craft e-commerce in a day.
Stars: ✭ 20 (-33.33%)
Mutual labels:  craft-plugin, craft3
padstone
Padstone is a Craft CMS starter kit with a curated configuration, Boilerplate templates, and handpicked plugins.
Stars: ✭ 18 (-40%)
Mutual labels:  craft, craft3
anchors
Add anchor links to headings in your Craft CMS website content.
Stars: ✭ 47 (+56.67%)
Mutual labels:  craft-plugin, craft3
overflow.craft-plugin
A plain text Craft field type, with a soft or hard character limit.
Stars: ✭ 13 (-56.67%)
Mutual labels:  craft, craft-plugin
craft-grid
A field that lets you content manage CSS Grid in Craft CMS.
Stars: ✭ 18 (-40%)
Mutual labels:  craft-plugin, craft3
seomate
SEO, mate! It's important. That's why SEOMate provides the tools you need to craft all the meta tags, sitemaps and JSON-LD microdata you need - in one highly configurable, open and friendly package - with a super-light footprint.
Stars: ✭ 31 (+3.33%)
Mutual labels:  craft-plugin, craft3
craft.patrol
Patrol simplifies SSL and maintenance routing for sites built with Craft
Stars: ✭ 90 (+200%)
Mutual labels:  craft, craft-plugin
oembed
A simple plugin to extract media information from websites, like youtube videos, twitter statuses or blog articles.
Stars: ✭ 34 (+13.33%)
Mutual labels:  craft, craft-plugin
contact-form-honeypot
Add a honeypot captcha to your Craft CMS contact form.
Stars: ✭ 24 (-20%)
Mutual labels:  craft-plugin, craft3
craft-plugin-patrol
Patrol for Craft 3
Stars: ✭ 28 (-6.67%)
Mutual labels:  craft-plugin, craft3
craft-bulkedit
Bulk edit any set of elements
Stars: ✭ 22 (-26.67%)
Mutual labels:  craft, craft3

Seeder plugin for Craft CMS 3.x

Seeder

Usage

Seeder allows you to quickly create dummy entries through the command line. And you can just as easily remove the dummy data when you're done building the site. With the plugin installed, running ./craft help seeder/generate will show you which commands are available

Since the plugin is only usefull during the development and not on a live site, charging money for it would be stupid (you could just free trial it every time). Instead you can download it for free and if you want to support future development, you can support it on beerpay.io. Thanks!

Beerpay

Installation

To install the plugin, follow these instructions.

  1. Open your terminal and go to your Craft project:

     cd /path/to/project
    
  2. Then tell Composer to load the plugin:

     composer require studioespresso/craft-seeder
    
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for "Seeder".

Usage

Entries (Section ID/handle, siteId, count)

Use the command below, followed by the --section option and the --number of entries you want to create (defaults to 20 if ommited). This command works with both section ID and handle.

You can also add a siteId parameter to seed entries for a specific site. This will use the default site as a fallback.

./craft seeder/generate/entries --section=news --count=15

Categories (Category group ID/handle, count)

./craft seeder/generate/categories --group=labels --count=10

Users (Usergroup ID/handle, count)

./craft seeder/generate/users --group=editors --count=5

Clean up

Once you're done building out the site, the plugin gives you an easy way to remove the dummy data (entries, assets, categories and users). This can be done through the CP (click the Seeder section the sidebar) or through the command line with the following command:

./craft seeder/clean-up/all

Configuration options

eachMatrixBlock - Seed all blocktypes in a matrix field

For a matrix, the plugin will get a random set of block types within the minimum & maximum amounts of blocks the field allows.

With this setting set to true, we'll generate a block of each blocktype once in a random order. This is a good way to test pagebuilder/contentbuilder-like fields.

useLocalAssets - Use assets already in your site to seed asset fields

'useLocalAssets' => [
    'volumeId' => 1,
    'path' => 'test/'
]

Add the array above to config/seeder.php to seed using assets from volume 1 and folder test/.

fields - Basic field configuration

'fields' => [
    "sessions" => "ignore",
    "radioField" => [
        'value' => 'value2',
    ],
    "category" => [
        'mode' => 'random',
        'value' => [152, 153]
    ]
]

These are some basic examples of how you can defined seeding settings per field. The field handle should be the key in the array and the options are available right now:

  • "ignore" => skip the field when seeding
  • ["value" => "some string" ] => Works to set a fixed value for plain text fields, checkboxes, radio buttons.
  • ["mode" => "random", "value" => [1, 2] ] => Works with entries and category fields, values should be ids of those entries.

Troubleshooting

The most common problem with the plugins is getting the following error:

Unknown command: seeder/generate/entries

If you have the plugin installed in the CP and are seeing this message, craft can not connect to your database through the command line. Your site probably works correctly but CLI commands won't.

If you're running MAMP/XAMP, you should use 127.0.0.1 as hostname instead of localhost.

Roadmap

Core elements

  • Entries
  • Categories
  • Users
  • Entry fields

Core fields

  • Title
  • Plain text
  • Email
  • Url
  • Color
  • Date
  • Entries
  • Categories
  • Dropdown
  • Checkboxes
  • Radio buttons
  • Multi select
  • Assets
  • Matrix
  • Lightswitch
  • Table
  • Tags
  • Users

Plugin elements

  • Commerce products & variants

Plugin fields

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].