Skip to content
Branch: master
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
js
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

URN-Material

The URN WordPress theme

Theme preview

Quick Start

Note: The following presumes that you already have a mysql and apache server installed locally.

  1. Install Node.js from https://nodejs.org/en/ then run npm install from the command line at the project root
  2. Run npm install -g grunt-cli to install grunt and grunt plugins
  3. Install Ruby for your OS and make sure to check the option to add it to your PATH variable if on Windows
  4. Run gem update --system
  5. Run gem install scss_lint
  6. Run npm install grunt-scss-lint
  7. Run gem install compass
  8. Run npm install grunt-contrib-compass
  9. Run grunt from the command line within the project directory to start watching the project
  10. Grunt should now compile your CSS as you edit the SCSS files

Grunt

grunt mirror

Presuming you're running a linux system, get a complete mirror of the live WordPress database locally.

Requirements:
  • Have urn ssh alias set
  • Set the $URNLOCAL environment variable to the local development url (e.g. http://localhost or http://urn.local)
  • Local MySQL username: root
  • Local MySQL password: password

grunt --force

Keep tasks running even if the SCSS lint fails (useful for development when CSS is still in-progress but make sure the linter passes before committing any SASS)

Hooks

In order for pushes to this repository (and child theme repositories) to automatically update the live version of the site, a webhook is used to send a POST request to http://urn1350.net/hook.php when commits are pushed. The hook.php script then executes /var/www/pull.sh.

hook.php

<?php echo shell_exec('../pull.sh');

pull.sh

#!/bin/sh

cd /var/www/html/wp-content/themes/urn-material;
git checkout master;
git pull 2>&1;

echo '<br>';

cd /var/www/html/wp-content/themes/urn-material-su-elections;
git checkout master;
git pull 2>&1;

echo '<br>';

cd /var/www/html/wp-content/themes/urn-material-varsity;
git checkout master;
git pull 2>&1;

echo '<br>';
You can’t perform that action at this time.