Skip to content

Commit

Permalink
add standalone install notes & fix composer.json issues
Browse files Browse the repository at this point in the history
  • Loading branch information
hugosolar committed Aug 7, 2019
1 parent 1bd4e6b commit 1e8ff97
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 4 deletions.
95 changes: 95 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Creative Commons - Chapter WordPress theme

- Contributors: quentinrogers, mackaffinity, cctimidrobot, hugosolar
- Tags: CreativeCommons
- Requires at least: 4.5+
- Tested up to: 5.0.3
- Requires PHP: 7.0
- License: GPLv2 or later
- License URI: https://www.gnu.org/licenses/gpl-2.0.html

Creative Commons Chapter site theme (including chapter sites setup,
taxonomies, and widget code)

## Development Installation

This theme uses npm, gulp, and browserify to manage dependencies.

Versions of node and npm we know work:

- `npm 3.3.12`
- `node 5.4.1`

To install gulp:

- run `npm install -g gulp`

To build the js/css:

- run `npm install` to download the 3rd party libs in `package.json`
- during development:
- run `gulp` in the background, i.e. run `gulp` in a terminal and leave it
running. It will automatically recompile `css/app.css` files as you edit
the src files.
- when preparing for production:
- run `gulp dist` to create minified `css/app.css` files.
- also update the CC_CSS_RELEASE_SERIAL_NUMBER at the top of functions.php to
purge the caches.

## Standalone installation

### Requirements
- Composer
- node / npm (yarn also works)
- git

Clone the repository into your `wp-content/themes`

```
> git clone [email protected]:creativecommons/wp-theme-cc-chapter.git
```

then, go to the directory (`cd wp-theme-cc-chapter` ) and execute composer install
```
> composer install
```
Composer will install the required dependencies such as
- Queulat
- Twentysixteen

Once composer finished to install dependencies a new directory called `queulat` will be created in `wp-content/mu-plugins`
To enable this plugin you should create a `queulat.php` file in `wp-content/mu-plugins` with the following content:
```php
<?php
/**
* Plugin Name: Queulat Loader
* Description: Load Queulat mu-plugin
*/

// Load Composer autoloader
require_once __DIR__ .'/../themes/wp-theme-cc-chapter/vendor/autoload.php';

// Load Queulat main file.
require_once __DIR__ .'/queulat/queulat.php';
```
*note: if you chose a different directory name for theme repository you should replace `wp-theme-cc-chapter` for the chosen folder name*

Once queulat ins installed, you should install its `javascript` dependencies by executing
```
> npm install --production
```
or

```
> yarn install --prod
```

## Zip install

You can download the zip of this theme and dependencies in the [last release](https://github.com/creativecommons/wp-theme-cc-chapter/releases) in the repository

Please unzip the downloaded file and copy/upload directories to the wordpress install in the following order:

- zip > `wp-theme-cc-chapter` > `mu-plugins` -> `wp-content/mu-plugins/`
- zip > `wp-theme-cc-chapter` > `themes/wp-theme-cc-chapter` -> `wp-content/themes/wp-theme-cc-chapter`
- zip > `wp-theme-cc-chapter` > `themes/twentysixteen` -> `wp-content/themes/twentysixteen`
10 changes: 9 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
"type":"vcs",
"url":"https://github.com/creativecommons/queulat",
"no-api":true
},
{
"type":"composer",
"url":"https://wpackagist.org"
}
],
"require": {
Expand All @@ -34,7 +38,11 @@
"wpackagist-theme/twentysixteen":"1.9"
},
"extra": {
"installer-name":"cc-chapter"
"installer-name":"cc-chapter",
"installer-paths" : {
"../../mu-plugins/{$name}" : ["type:wordpress-muplugin"],
"../../themes/{$name}" : ["wpackagist-theme/twentysixteen"]
}
},
"scripts": {
"compat":"phpcs -p --standard=PHPCompatibility --runtime-set testVersion 7.0 -n . --extensions=php --cache",
Expand Down
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Release serial number - Used to bust the cache. Please update
* any time you change CSS or JS.
*/
define( 'CC_CSS_RELEASE_SERIAL_NUMBER', 'v2019.6.2' );
define( 'CC_CSS_RELEASE_SERIAL_NUMBER', 'v2019.8.1' );
/**
* Include telated files
*/
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "CC Chapters theme",
"version": "v2019.6.2",
"name": "cc-chapters-theme",
"version": "v2019.8.1",
"description": "Creative Commons Chapter websites WordPress theme",
"directories": {},
"author": "Creative Commons",
Expand Down

0 comments on commit 1e8ff97

Please sign in to comment.