Repository navigation
Project Foundation Guide
Maria Fisher edited this page Jul 27, 2016
·
20 revisions
#Project Foundation Guide
- Clone ts_build into a new project directory
git clone git@github.com:thinkshout/ts_build.git project_name- Run the bootstrap script to rename ts_build to your new distro name
cd project_name; composer install; ./scripts/bootstrap.sh project_name- Go into the
settings/config.shfile.- Alter ‘PROJECT=ts_build' to match your project’s name ‘PROJECT=project_name'.
- Add module version information to
project_name.makefile. - Add .gitignore file to repo and include appropriate
librariesandmoduledirectories to be ignored. - In
project_name, create a folder called themes/custom. Add https://www.drupal.org/project/basic to the custom folder and where needed, change "basic" and "Basic" to whatever you want to call your custom them. Consider naming this to avoid conflicts withproject_name.
- In
project_name,rm -rf .gitandgit initand commit what you've done so far. - On the ThinkShout GitHub account, create a new repository.
- Push to the new repo you created on GitHub.
- Make a new MySQL database called
project_name. - In
project_name,./scripts/build.sh ~/Sites/project_name mysql_user mysql_pass project_name. The script will generate a username and password for your first login. - In
~/Sites/project_name, modify .htaccess to uncommentRewriteBase /. - If you've lost the login info, you can
drush uli --uri=project_name.dev.
- Make a
project_commonFeature module.- Add site wide configurations here.
- Create a “Page” Content type, for Basic Pages.
- Create a
project_fieldsFeature module to store field bases. - Create a
project_pageFeature module to store field instances.
- Create a
- Add Menus, if necessary.
- Export new custom menus into
project_commonmodule
- Export new custom menus into
- Copy a content spreadsheet for your migration.
- On Google spreadsheets, go to
File > Publish to the web…and make sure your migration has access to the data. - Add a
site_migratemodule. (Model after another TS project, like reDesign)- Configure to your project's name and mappings.
- In the site_content.module file (where
SITE_MIGRATE_SOURCE_URLis defined), replace the tokenized portion of your google spreadsheet url with the one that currently exists.
- Create an
includesdirectory inside of yoursite_migratemodule.- Create a migration for Basic Pages, i.e.
MigrateBasicPages.inc.- Add appropriate mapping
- Go to path
admin/content/migratein your local dev environment, and migrate Basic Pages.
- Create a migration for Menu Links, i.e.
MigrateMenuLinks.inc.- Use a previous projects code to add proper mapping.
- Go back to your local environment and migrate the menu links.
- Create a migration for Basic Pages, i.e.
- If you’re using a migration, you can use it to create a basic 404 page. Or, you can create a new item with the “page” content type. Either way, set the URL to something like 404 or 404-error.
- After you've created a page that maps to the URL "404" (or similar), go into
admin/config/system/site-information. - Add "404" (or the URL you used) to the default 404 settings.
- Export
site_404toproject_commonfeature module.
- If you’re using a migration, you can use the “Menu Links” migration to create a front page. Or, you can create a new “Home” menu item with as the Path.
- Export
site_frontpagetoproject_commonfeature module.
-
Go into admin/appearance.
- Select “Enable and set default” on custom theme.
- Disable Bartik theme, if necessary.
-
Export
admin_theme,theme_default, andnode_admin_themestrongarm variables toproject_commonfeature module. -
Go into the
project_name.installfile.- Add this to the bottom, just above
minimal_install():
- Add this to the bottom, just above
// Set default theme.
theme_enable(array('project_theme'));
theme_disable(array('bartik'));- Go into the
project_name.installfile.- Look for
// Set the timezoneand change the value, as necessary.
- Look for
- Export
date_default_timezonestrongarm variable toproject_commonfeature module.
- Add ckeditor (revision 32f0973) by adding the following to to drupal-org.make:
; ckeditor
;projects[ckeditor][version] = "1.17"
; use latest dev commit due to https://www.drupal.org/node/2455391
projects[ckeditor][download][type] = git
projects[ckeditor][download][branch] = 7.x-1.x
projects[ckeditor][download][revision] = 32f0973
projects[ckeditor][subdir] = contrib
- In
admin/config/content/formats, add the rich_text format. - At
admin/config/content/linkit, add a linkit profile that will act on the rich_text format-enable node and taxonomy term search plugins. Choose "aliased". - Create a Content Authoring feature and save the WYSIWYG settings to that (check Strongarm variables).
- Configure the ckeditor bar to include reasonable options.
- Add media and media_ckeditor modules to embed media images and files into the WYSIWYG.
Directions (in progress).