Make your static site dynamic. Works well with Github Pages and Travis.
This README was generated by Dynamizer on 10 June 2021. The source template can be found here.
- Uses ERB to dynamize your static content
- Includes a sample .travis.yml configuration file for updating content from a Travis build which can be triggered from a Cron Job.
The following command mounts ./examples/templates, ./examples/renderers, ./examples/data and . to the container and runs rake dynamizer:dynamize
.
$ docker run --rm -v $(pwd)/examples/templates:/tmp/dynamizer_templates:ro -v $(pwd)/examples/renderers:/tmp/dynamizer_renderers:ro -v $(pwd)/examples/data:/tmp/dynamizer_data:ro -v $(pwd):/tmp/dynamizer_output dwilkie/dynamize /bin/sh -c "bundle exec rake dynamizer:dynamize"
Dynamizer takes the files in the templates directory and writes the output to . using the renderers.
See the examples for more info. For a more complex example including how to add your own dependencies to the renderers see here
Generate a new SSH Key for Travis and add the public key to the deploy keys for your repo. Remember to select read/write access.
$ ssh-keygen -t rsa -b 4096 -C "deploy@travis-ci.org" -f dynamizer-travis -q -N ""
Encrypt the private key with Travis and add it to the repo. Remove the unencrypted ssh keys
$ travis encrypt-file dynamizer-travis
$ git add dynamizer-travis.enc
$ rm dynamizer-travis dynamizer-travis.pub
Edit your .travis.yml configuration file and replace the following with the output from the step above.
openssl aes-256-cbc -K $encrypted_28362f02a9a2_key -iv $encrypted_28362f02a9a2_iv -in dynamizer_deploy.enc -out deploy_key -d
See also this article
Bug reports and pull requests are welcome on GitHub at https://github.com/dwilkie/dynamizer.
The gem is available as open source under the terms of the MIT License.