The URN WordPress theme, in use up until end of life in 2021. This is no longer being developed, only maintained as we transition to the new site design, as found on the URN Github.
Note: The following presumes that you already have a mysql and apache server installed locally.
- Install Node.js from https://nodejs.org/en/ then run
npm install
from the command line at the project root - Run
npm install -g grunt-cli
to install grunt and grunt plugins - Install Ruby for your OS and make sure to check the option to add it to your PATH variable if on Windows
- Run
gem update --system
- Run
gem install scss_lint
- Run
npm install grunt-scss-lint
- Run
gem install compass
- Run
npm install grunt-contrib-compass
- Run
grunt
from the command line within the project directory to start watching the project - Grunt should now compile your CSS as you edit the SCSS files
Presuming you're running a linux system, get a complete mirror of the live WordPress database locally.
- Have
urn
ssh alias set - Set the
$URNLOCAL
environment variable to the local development url (e.g.http://localhost
orhttp://urn.local
) - Local MySQL username:
root
- Local MySQL password:
password
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)
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
.
<?php echo shell_exec('../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>';