If you use Amazon servers to host your Shorthand stories you can sync up your Shorthand account to push directly to a bucket on that server – removing the need to manually download and upload export files.

SFTP works almost exactly the same way, except instead of using s3, you enter the SFTP details of your own server.  This is useful if you have your own server infrastructure and do not use s3.

Setup

The workspace owner can set up the hosting via the Workspace Settings page.
Under 'Publishing' click to 'Add a new publishing configuration'.



Here you will need to enter:

  • PROVIDER (s3)
  • NAME - This is what users will see when choosing to publish to this host
  • ACCESS KEY - The AWS account ACCESS KEY
  • BUCKET NAME - The bucket the story will be published to (you can also put subdirectories in here to publish to a subfolder within the bucket)
  • SECRET KEY - The AWS account SECRET KEY
  • S3 REGION - The region that the s3 bucket was created with
  • URL BASE PATH - (Only used to provide a quick link to the published story).
    The URL that the s3 Bucket corresponds to, with a trailing slash (e.g. http://s3-ap-southeast-1.amazonaws.com/bucket/ or http://shorthand.myorganisation.com/). For more information setting up s3 custom URLs, please see here

Once set up, the workspace owner can add the server as a publishing option per-team and they and team leaders can choose to enable individual team members to publish to that location.  

Publishing to the server can then be achieved with the 'Publish' button in the story editor without the need to download a ZIP folder or export files.

Note: Your bucket must be configured to 'enable website hosting', and also be set up with a bucket policy that allows your AWS credentials to push details.  This policy will follow the pattern outlined below (replace anything within []):


<style> p.bucket { 	font-family: monospace; white-space: pre; font-size: 60% !important; } </style> <p class="bucket"> { 	"Version": "2008-10-17", 	"Statement": [ 		{ 			"Sid": "PublicReadForGetBucketObjects", 			"Effect": "Allow", 			"Principal": { 				"AWS": "*" 			}, 			"Action": "s3:GetObject", 			"Resource": "arn:aws:s3:::[BUCKET_NAME]/*" 		}, 		{ 			"Sid": "", 			"Effect": "Allow", 			"Principal": { 				"AWS": "arn:aws:iam::[IAM_DETAILS]" 			}, 			"Action": "s3:*", 			"Resource": [ 				"arn:aws:s3:::[BUCKET_NAME]", 				"arn:aws:s3:::[BUCKET_NAME]/*" 			] 		} 	] } </p>


To publish your story to your S3 or SFTP location:

  1. Find the story on your Shorthand dashboard
  2. Click Edit
  3. In the story editor, click Publish
  4. Choose the publishing option that shows your S3 or SFTP location
  5. Enter a directory name for the story. This will be part of the URL at which the story and its assets are hosted.  A lowercase, underscore-separated version of the story title is good choice ( eg the_feature_story_of_the_year ).  You will be shown the full URL that you can use to link to your story.
  6. Click Publish

Your story will now be available at the URL shown.