This PHP script is a simple way of using the API to control the canonical URL - useful for making a static site like this the ‘primary’ for StoryChief.
What is This?
StoryChief.io is a handle content publishing tool:
- write you content once
- publish to multiple sites
- promote on multiple sites
Only one issue for me - it doesn’t support static sites or blogger as the primary canonical source.
So I wrote this.
A simple set of PHP scripts that you can add to your site.
Then configure StoryChief to use the script as an API call.
To work you need to add two custom fields. One for ID and one for URL and when StoryChief, calls your API, the php script reflects these back, allowing you to control the canonical url from StoryChief, and the PHP script always returns 200 so your primary post always deploys.
I use this to:
- make blogger posts canonical
- write content on static sites and republish through StoryChief
You can read more about it in these related blog posts:
Or for up to date information read the code on GitHub.