Accomplishment This Week
In order to work collaboratively with Cynthia and Beverley, we are going to set up a repository for our FYP in GitHub. Creating a repository and adding them as collaborators are fairly easy, but understanding the terminology used in GitHub and the how it works behind is really difficult. So I went through the Lynda.com course GitHub for Web Designers with James Williamson. It also provides a useful website Learning GitHub.
GitHub is a web-based hosting platform for Git repositories and Git is a distributed version control system (VCS). There is also a local desktop client called GitHub that can implement most of the commands easily without writing commands in command shell.
The workflow many people use is to create a remote repository on GitHub site and pull that down locally. I followed that workflow and created a repository FYP-OSS on GitHub site.
In the repository, I can create a .gitignore file which has a template for WordPress development. So that when we make commits, GitHub will ignore the files stated inside. I just simply used this template because I have no idea what I can add to this file list.
Understanding the GitHub Flow is important and useful. The general flow cited below is from GitHub Flow by Scott Chacon and this website further illustrate about each step with examples:
- Anything in the
masterbranch is deployable
- To work on something new, create a descriptively named branch off of
- Commit to that branch locally and regularly push your work to the same named branch on the server
- When you need feedback or help, or you think the branch is ready for merging, open a pull request
- After someone else has reviewed and signed off on the feature, you can merge it into master
- Once it is merged and pushed to ‘master’, you can and should deploy immediately
I think I have understood the main ideas about GitHub and I am ready to make use of it. For the long form website project next week, we will make use of it and I can be more familiar with it.
Solve Problems for the developed theme
I went back to the reports for the last two weeks and solved those pending problems. I replied to my post with the solutions so that it’s easier for later reference.
Lesson learnt: When I was trying to solve these problems last two weeks, I really spent long time on each of this but didn’t get the result I wanted. When I came back this week, I am more relaxed and it turns out to be a lot more efficient. So for later learning and development, I will not spend whole day all doing this. I will cross-study other courses and refresh my mind.
We planned to have our live server setup by this Friday. However, Prof Chua didn’t reply us after we emailed him the common available slots for us. We will have to postpone it to the next week.
I am reading the Professional WordPress, Design and Development, chapter 3 Code Overview this week. It talks about some core files in root directory like wp-config.php and .htaccess.
As suggested in the book and in the codes, I set the WP_DEBUG to be true in wp-config.php. Then all PHP errors, notices and warnings will be displayed during development.
/** * For developers: WordPress debugging mode. * * Change this to true to enable the display of notices during development. * It is strongly recommended that plugin and theme developers use WP_DEBUG * in their development environments. */ define('WP_DEBUG', true);
The .htaccess file is used primarily for creating pretty permalinks and keyword injected URLs for your web site.
When setting URLs with content keywords, it’s more likely for search engines to allocate a good position for the website in searching results.