This is a reusable theme for Bernie Sanders campaign microsites.
Clone the git repo [email protected]:SandersForPresident/SitesForBernie.git and then rename the directory to the name of your theme or website.
- Install and Activate https://wordpress.org/plugins/advanced-custom-fields/
Vagrant will create a virtual machine for local development. You will need to install three packages:
After setting up these three packages, you will be able to run the following command locally to create your own virutal server:
vagrant upAfter it downloads a linux VM and configures it, you should be able to point your browser at http://192.168.33.10/ and get a local copy of the theme running. The WordPress admin will be setup with a username of admin and a password of secret.
If you want to look around on the server you can vagrant ssh and to shut off the server when you aren't using it you can vagrant halt. If you want to destroy the VM entirey (start fresh, wipe database, etc) you can vagrant destroy.
You can customize the installation a bit by looking at the ansible variables
SandersForPresident uses gulp as a build system and bower as a front end package manager.
Building the theme requires node.js. We recommend you update to the latest version of npm: npm install -g npm@latest.
From the command line:
- Install gulp and bower globally with
npm install -g gulp bower - Run
npm installin the theme directory - Run
bower install
You now have all the necessary dependencies to run the build process.
The following gulp tasks are available:
gulp build-- Build the assetsgulp lint-- Validate the JSgulp watch-- Rebuild the assets when the source files change
Contributions are encouraged and welcome by everyone! We have contributing guidelines to help get you started.