Deploy expanding iframe interactives to S3.
Run the following from terminal.
> grunt clone git@github.com:GuardianInteractive/expando.git
> cd expando
> npm install
You can see a demo of the iframe running locally at http://localhost:9001/ by running:
> grunt
Include <base>
tag in the <head>
with a target
attribute of _top
. This will force links
to load in the parent page.
<!-- HTML page that is being embedded in the iframe -->
<head>
...
<base target="_top" />
...
</head>
All the interactive settings are stores in src/settings.json
these are:
{
"launchImage": "path to image that is clicked to launch the iframe",
"iframeURL": "URL to the iframed page",
"S3NextGenPath": "S3 after /next-gen/ eg. /world/ng-interactive/apr/example/"
}
To test you setting run the interactive locally
> grunt
To test the deploy run:
> grunt test-deploy
To deploy to S3:
> grunt deploy
The build folder will contain a file called r2_code_block.html
. The contents
of this file can be pasted in to the R2 page.