Guidelines to help you align a microsite, partner website, or other affiliate content served to an audience under the MIT brand.
Content templates are located under /public/views/, the Elements template uses /public/views/index.twig.
- Home Brew (Mac):
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"thenbrew doctor - Node.js:
brew install nodeor by downloading an installing from Nodejs.com - Bower for client-side package management:
npm install -g bower
- Open up the command line and change to a directory where you want to install the app:
cd ~/Sites - Clone the repo to your machine:
git clone git@github.com:technologyreview/style-guide.git; cd style-guide - Install Gulp:
npm install -g gulp - Run the
gulpcommand to build the project. This will install package dependencies usingnpmandbowers, and then start the local server - Open the browser to
http://localhost:9999
The production version of this style guide is hosted at Heroku and has two environments that can be deployed to using Git, staging and production.
- Development: localhost:9999 - Served locally by Gulp + Nodemon
- Staging: mittr-styleguide-staging.herokuapp.com
- Production: mittr-styleguide.herokuapp.com
To configure easy command-line deployment:
cdto the repo directory on your machine:~/Sites/mittr-styleguide- Download and install the Heroku Toolbelt
- Login to Heroku:
heroku loginwith emailInfrastructure@TechnologyReview.comand passwordtechRev1w0293057* - Add the
stagingremote to Git for deploying changes to the staging Heroku environment:git remote add staging git@heroku.com:mittr-styleguide-staging.git - Commit your changes, or merge them from another banch into master, and deploy them to Heroku staging:
git push staging master - Add the
productionremote to Git for deploying changes to the production Heroku environment:git remote add production git@heroku.com:mittr-styleguide.git - Commit your changes, or merge them from another banch into master, and deploy them to Heroku production:
git push production master
Notes on the tools and systems used.
- Gulp is used to automate build and compile processes
- Node.js is used for generating a micro HTTP server that serves routes and server-side JavaScript
- Express is a Node web app framework used for MVC routing
- Nodemon will monitor for any changes in your node.js application and automatically restart the server
- LiveReload is loaded by Gulp, and is used to for injecting CSS updates into the browser when a
/public/less/*.lessfile is saved - Backbone.js
- Require.js for AMD
- Swig templating
- GitHub Flavored Markdown is automatically compiled when used in templates