mavimo/sculpin-editor-bundle

dev-master 2017-05-23 22:15 UTC

This package is auto-updated.

Last update: 2024-04-14 08:00:57 UTC


README

Setup

Add this bundle in your sculpin.json file:

{
    // ...
    "require": {
        // ...
        "mavimo/sculpin-editor-bundle": "@dev"
    }
}

and install this bundle running sculpin update.

Now you can register the bundle in SculpinKernel class available on app/SculpinKernel.php file:

class SculpinKernel extends \Sculpin\Bundle\SculpinBundle\HttpKernel\AbstractKernel
{
    protected function getAdditionalSculpinBundles()
    {
        return array(
           'Mavimo\Sculpin\Bundle\EditorBundle\SculpinEditorBundle'
        );
    }
}

How to use

Content editor can create a new content typing:

sculpin editor:create "New content title"

this generate a new draft content using the current date on the path:

source/_posts/2014-01-04-new-content-title.md

you can also specify a different date using the format "Y-m-d", like:

sculpin editor:create -d 2010-06-10 "New content title"

that genrate file:

source/_posts/2010-06-10-new-content-title.md

You can also create a different content type (WIP, see Sculpin PR 96) using the option type

sculpin editor:create -t project "New content title"

this generate a new draft project in the folder:

source/_projects/2014-01-04-new-content-title.md

TODO

  • Add better file writing procedure
  • Add better support for content type generation after Sculpin PR 96 integration in sculpin core.