Skip to content

dmd-web-and-mobile/ationframework

develop
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
css
 
 
 
 
env
 
 
 
 
img
 
 
js
 
 
www
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ationframework

[![Build Status](http://ci.digitalmediauconn.org:8080/buildStatus/icon?job=ATION Site - Staging)](http://ci.digitalmediauconn.org:8080/job/ATION Site - Staging)

Putting this into wordpress.

Vagrant/Docker

Choices for local development are Docker and Vagrant.

# Replace {env} with your desired environment, most likely "local"
docker-compose -f docker-compose-{env}.yml up -d

Wordpress development on Vagrant

vagrant box add ubuntu/trusty64
vagrant up

The above will create a local site at http://ation.local that points to the www folder.

Development

Development started with node v5, and also utilizes composer.

cd www/wp-content/themes/ation2016
npm install
composer install

Then use gulp to develop, it watches the src/images/, src/styles/, and src/scripts/ folders and compiles their production version to the static/ directory.

Navigating the Code

This site is based off the Timber (Twig x Wordpress) library. It seems a bit daunting at first but it is significantly easier than writing native Wordpress code into theme files. Any questions about Timber functionality can be answered in their docs or in their github wiki.

Our relevant project structure is as follows:

/ationframework
    /docker-compose-{env}.yml       # Docker Compose Files per environment
    /www
        /wp-env                     # Holds environment specific wordpress variables (db)
        /wp-content
            /themes
                /ation2016          # Holds all relevant theme files
                    /page.php       # All logic for pages held here
                    /functions.php  # Theme specific options, video shortcode, script loading
                    /package.json   # Holds information for npm dependencies
                    /gulpfile.js    # Holds information for gulp build tasks
                    /src            # Asset images, styles, scripts for development
                    /static         # Everything from /src gets compiled here for production
                    /templates      # All twig page templates and partials
                    /views          # Additional pluggable partials

Syncing Media

From local machine to remote (replacing SSHALIAS with your ssh alias or user@host):

cd uploads/directory
# For mac/linux
rsync -avz --rsh=ssh ./ SSHALIAS:/var/www/ation.develop.digitalmediauconn.org/public_html/www/wp-content/uploads

From remote to local machine (replacing SSHALIAS with your ssh alias or user@host):

cd uploads/directory
# For mac/linux
rsync -avz --rsh=ssh SSHALIAS:/var/www/ation.develop.digitalmediauconn.org/public_html/www/wp-content/uploads/* .
# For windows
scp -r SSHALIAS:/var/www/ation.develop.digitalmediauconn.org/public_html/www/wp-content/uploads /path/to/local/ationframework/www/wp-content

Builds

We use BUILDKITE for managing deployments. See https://buildkite.com.

Contact

bk@uconn.edu