- Write documentation
- Find bugs and create issues
- Help code and fix issues
- Propose design suggestions and improvements
There are always teams that need help with writing documentation. The Docs Team can help connect you to the people who need the help. Join our discussions in the #docs slack channel on Thursdays from 17:00 - 18:00 UTC and offer your help.
Take a look at the HelpHub site located at wp-helphub.com. If you see any bugs or issues, please create an issue on our GitHub repo here: https://github.com/WordPress/HelpHub/issues.
- Install WordPress locally.
- Rename
wp-content
folder. Later, you will need current Theme files. - Clone this repo as
wp-content
.
$ git clone https://github.com/WordPress/HelpHub.git wp-content
- Copy back your current Theme files from the renamed folder in above Step 2.
- Run
npm install
to compile theme's.scss
files intostyle.css
(see below for more details) - Install and activate the bbPress plugin.
- Activate the WordPress.org Support theme from within
/wp-admin
. - Activate the Support HelpHub plugin from within
/wp-admin
. - Under
Settings -> Permalinks
in the/wp-admin
, change to "Post Name" option, and save changes. - Make sure your
php.ini
file includes these lines below asOn
.
allow_url_fopen = On
allow_url_include = On
Hint: If you are using VVV, follow below steps to locate php.ini
.
$ cd <your-path-to-VVV>/vagrant-local
$ vagrant ssh
$ cd /etc/php/7.0/fpm
For now, we have two ways for importing database from staging site - via Importer and via Duplicator
Database from staging site is located in wp-content/staging-database
folder. There you can find database files for WordPress Importer, Widget Importer & Exporter, Duplicator and UpdraftPlus.
To import the database using the WordPress Importer from within the /wp-admin
of your local site, follow these steps:
- Go to:
Tools -> Import
and click "Install Now" under WordPress at the bottom. This will install the WordPress Importer. - Click "Run Importer"
- Choose the file mentioned above and click the button, "Upload file and import"
- Set all the authors to a user account on your local site.
- Check the box to "Download and import file attachments".
- Click the button to begin. It may take a while to complete. If there are some failed imports, it should still be okay.
This file won't import widgets from staging site. For that, you can use .wie
file, located in wp-content/staging-database/Widget Importer & Exporter
folder. This file is exported with Widget Importer & Exporter plugin and you need this plugin in your local installation in order to import widgets from .wie
file.
In wp-content/staging-database
you'll find Duplicator
folder containing .zip
archive. This archive holds installer-backup.php
and database.sql
files, created on 13th March 2018. You can use it instead of Importer workflow for importing database. Here is a guide for Duplicator.
Once you have a local install of HelpHub up and running, you can contribute with pull requests either from your own fork or after you've added as a contributor directly in this repository. We are using Travis CI for tests on every pull request. You can, also, run these tests locally before pushing your code (more on this later). Development covers work on both, theme and plugins and requires following best practices and WordPress Coding Standards.
HelpHub uses a task runner called Grunt. Grunt contains automated tasks for the project (which can be anything - building svg sprites, minifying css and js files etc). We are using to verify and check the integrity of the CSS, JavaScript, and Sass files within this repository along with compiling the themes Sass files into CSS.
To be able to run Grunt you need npm. We will assume that you already have npm.
First, we need to install dependencies from package.json
file:
npm install
After this command has run in your terminal you'll have another folder in the root, node_modules
. This folder is ignored in .gitignore
and contains all the tools we need for running Grunt tasks, defined in Gruntfile.js
.
The HelpHub theme uses Sass for applying styles as it provides possibility for breaking one large style.css
file into smaller partials and, therefore, reduce possible Git conflicts caused with multiple modifications of the same file in different branches. Maintenance is, also, greatly improved. Once modified, Sass (.scss
) files need to be compiled into style.css
.
The Grunt sass
task compiles all .scss
files into style.css
. This means that every time you run this task style.css
will be overridden with new code from .scss
files, located in the themes sass
folder. Hence, instead modifying style.css
directly, all CSS changes for the HelpHub theme are to be added into appropriate .scss
partial after which you should run compiler in order to see your changes. Compiling is done with running following command in terminal:
grunt sass
If, however, you are adding a lot of CSS changes, instead of running a lot of sass
tasks, you can run watch
task, like so:
grunt watch
This task tells compiler to watch all changes created in .scss
files and rebuild a new style.css
every time you save the file.
While you can use regular CSS syntax in .scss
files (as long as Travis tests are passed), we would like to encourage you to learn and use Sass as much as possible. It's good for you and for the project.
Join our discussions in the #docs slack channel on Mondays from 15:00 - 16:00 UTC - content, design and development discussion. Or submit your ideas on our GitHub repo here.