Skip to main content
All CollectionsPersonal websitesCraft CMS
Connect your Craft CMS website
Connect your Craft CMS website
Gregory Claeyssens avatar
Written by Gregory Claeyssens
Updated over 2 months ago

Is your website running on Craft CMS? Great! With our Craft CMS plugin you can publish your article to your website. This is how it works:

Before you get started

Download & unzip the plugin and place the StoryChief directory into your craft/plugins directory. Install the plugin in the Craft Control Panel under Settings > Plugins. (Craft CMS 3).


Start connecting your Craft CMS

Step 1. Visit your channel page by expanding the top-right menu and clicking on Integrations. ๐Ÿ‘‰ Quick link.

Step 2. Select "Craft CMS" in the Personal Website section and click on "Add New Destination" button to link your Craft CMS website to StoryChief.

Step 3. Enter the URL of your Craft installation below (ex: http://example.com).

Step 4. Copy the Encryption key and click the "Save settings" button below

Go to the StoryChief config page on your Craft CMS website.

Step 5. Paste the encryption key in the corresponding field and press "Save configuration".

Step 6. Choose the entry type StoryChief should use to create articles and map the StoryChief fields to your entry fields.ย Click on "Save configuration"

๐ŸŽ‰ You're done, grab a coffee, you deserve it!

Check out the next steps below for more in-depth guides or follow-up actions.


Multi-language

If you want to publish in multiple languages, ensure that the languages that you create inside StoryChief use the same language code as in Craft.

Propagation

The default propagation settings of a Craft setup can cause translations of articles to be published to the same language version. To avoid this, we recommend to change the propagation settings:

Csrf Protection

If you have CSRF checks enabled, Craft needs the CSRF token to be present on all inbound post requests to controllers. Because StoryChief is posting to the site externally, and can't include that token as part of their request, Craft will reject the inbound calls.

Because the cause of the issue is part of the Craft core, and there's no direct way to override the checks at the controller level, instead we have to fix it at the config level.

Fix

You must create an exception for the route in your general config. In general.php, where you're setting the enableCsrfProtection, update it to the following:

'enableCsrfProtection' => (!isset($_SERVER['REQUEST_URI']) || $_SERVER['REQUEST_URI'] != '/storychief/webhook'),

๐ŸŽ‰ You're done, grab a coffee, you deserve it!

Check out the next steps below for more in-depth guides or follow-up actions.


๐Ÿ“š Next steps

Did this answer your question?