|
| 1 | +# Creative Commons - Chapter WordPress theme |
| 2 | + |
| 3 | +- Contributors: quentinrogers, mackaffinity, cctimidrobot, hugosolar |
| 4 | +- Tags: CreativeCommons |
| 5 | +- Requires at least: 4.5+ |
| 6 | +- Tested up to: 5.0.3 |
| 7 | +- Requires PHP: 7.0 |
| 8 | +- License: GPLv2 or later |
| 9 | +- License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 10 | + |
| 11 | +Creative Commons Chapter site theme (including chapter sites setup, |
| 12 | +taxonomies, and widget code) |
| 13 | + |
| 14 | +## Development Installation |
| 15 | + |
| 16 | +This theme uses npm, gulp, and browserify to manage dependencies. |
| 17 | + |
| 18 | +Versions of node and npm we know work: |
| 19 | + |
| 20 | +- `npm 3.3.12` |
| 21 | +- `node 5.4.1` |
| 22 | + |
| 23 | +To install gulp: |
| 24 | + |
| 25 | +- run `npm install -g gulp` |
| 26 | + |
| 27 | +To build the js/css: |
| 28 | + |
| 29 | +- run `npm install` to download the 3rd party libs in `package.json` |
| 30 | +- during development: |
| 31 | + - run `gulp` in the background, i.e. run `gulp` in a terminal and leave it |
| 32 | + running. It will automatically recompile `css/app.css` files as you edit |
| 33 | + the src files. |
| 34 | +- when preparing for production: |
| 35 | + - run `gulp dist` to create minified `css/app.css` files. |
| 36 | +- also update the CC_CSS_RELEASE_SERIAL_NUMBER at the top of functions.php to |
| 37 | + purge the caches. |
| 38 | + |
| 39 | +## Standalone installation |
| 40 | + |
| 41 | +### Requirements |
| 42 | +- Composer |
| 43 | +- node / npm (yarn also works) |
| 44 | +- git |
| 45 | + |
| 46 | +Clone the repository into your `wp-content/themes` |
| 47 | + |
| 48 | +``` |
| 49 | +> git clone git@github.com:creativecommons/wp-theme-cc-chapter.git |
| 50 | +``` |
| 51 | + |
| 52 | +then, go to the directory (`cd wp-theme-cc-chapter` ) and execute composer install |
| 53 | +``` |
| 54 | +> composer install |
| 55 | +``` |
| 56 | +Composer will install the required dependencies such as |
| 57 | +- Queulat |
| 58 | +- Twentysixteen |
| 59 | + |
| 60 | +Once composer finished to install dependencies a new directory called `queulat` will be created in `wp-content/mu-plugins` |
| 61 | +To enable this plugin you should create a `queulat.php` file in `wp-content/mu-plugins` with the following content: |
| 62 | +```php |
| 63 | +<?php |
| 64 | +/** |
| 65 | + * Plugin Name: Queulat Loader |
| 66 | + * Description: Load Queulat mu-plugin |
| 67 | + */ |
| 68 | + |
| 69 | +// Load Composer autoloader |
| 70 | +require_once __DIR__ .'/../themes/wp-theme-cc-chapter/vendor/autoload.php'; |
| 71 | + |
| 72 | +// Load Queulat main file. |
| 73 | +require_once __DIR__ .'/queulat/queulat.php'; |
| 74 | +``` |
| 75 | +*note: if you chose a different directory name for theme repository you should replace `wp-theme-cc-chapter` for the chosen folder name* |
| 76 | + |
| 77 | +Once queulat ins installed, you should install its `javascript` dependencies by executing |
| 78 | +``` |
| 79 | +> npm install --production |
| 80 | +``` |
| 81 | +or |
| 82 | + |
| 83 | +``` |
| 84 | +> yarn install --prod |
| 85 | +``` |
| 86 | + |
| 87 | +## Zip install |
| 88 | + |
| 89 | +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 |
| 90 | + |
| 91 | +Please unzip the downloaded file and copy/upload directories to the wordpress install in the following order: |
| 92 | + |
| 93 | +- zip > `wp-theme-cc-chapter` > `mu-plugins` -> `wp-content/mu-plugins/` |
| 94 | +- zip > `wp-theme-cc-chapter` > `themes/wp-theme-cc-chapter` -> `wp-content/themes/wp-theme-cc-chapter` |
| 95 | +- zip > `wp-theme-cc-chapter` > `themes/twentysixteen` -> `wp-content/themes/twentysixteen` |
0 commit comments