lesersokerbok / lsb-wpengine

1 stars 2 forks source link
non-profit wordpress

Websites for Leser søker bok

Leser søker bok has three main websites:

This repository contains the code for the two first sites, the third runs on wordpress.com.

Testing

There is also a test site lsbtest.wpengine.com.

Themes

There is one theme:

The theme is based on roots.io.

Plugins

There are several plugins:

In addition there is a public plugin to be used by libraries and organizations to add a Boksøk search widget in their sidebar.

Issues

Issues are tracked with GitHub Issues, but can also be viewed as a kanban board through Huboard.

Huboard is a kanban webservice for GitHub issues. Sign in using your GitHub account.

Issue process

Never push an issue into the next lane when you are done.

Development

The projects uses the GitHub Flow.

All work is done in a seperate branch and added to the master branch using pull requests.

Initial Setup

Development

To build assets while developing use: (cd wp-content/themes/lsb-base-theme/ && grunt dev)

Testing

Before a pull request is accepted it should be testet at the lsbtest origin.

(cd wp-content/themes/lsb-base-theme/ && grunt build)
git commit -a -m "Assets built"
git push lsbtest

Accepting a pull request

Pull request are accepted and merged using the squash and merge option.

Deploying

After a pull request is accepted the master branch should be deployed as soon as possible.

git checkout master
git pull
git push lsbprod

Localization

Norwegian is used as the base language and all strings shuld be ready for translations. This is also true for backend code.

Debugging

Add / modify the following to wp-config.php:

define('WP_DEBUG',         true);  // Turn debugging ON
define('WP_DEBUG_DISPLAY', false); // Turn forced display OFF
define('WP_DEBUG_LOG',     true);  // Turn logging to wp-content/debug.log
define('WP_ENV', 'development');

Now you can use the _log(String) function, and monitor output in wp-content/debug.log:

// In some php file:
<?php _log("I'm debugging!"); ?>

// In terminal:
$ tail -f wp-content/debug.log
[06-Aug-2014 10:46:30 UTC] I'm debugging!

The debug.log file is ignored by git.