Drupal 10 Drupal build for Yukon.ca. This repository was prepared so it's sources can be built via CI to deploy to Pantheon.
[[TOC]]
For local environment setup, please check detailed instructions here.
Layout Builder: The current standard choice for components implementation is Layout Builder, so Paragraphs should normally map to Block types, exceptions apart.
TODO
: list components from Audit
TODO
: Document SSO solution here.
Every new development should be pushed to a development branch. The advice is to keep the names short: due to Pantheon's limitation, multidev cannot use longer branch names, so in case we want to use it, we should avoid the long names.
Upon pushing to a branch, you can create a Pull Request for EW to review. Branches are pushed to Pantheon so you can also spin a Multidev environment to demonstrate before merging.
- Git Repo -
TODO
Add git repo URL here. - Cloud subscription -
TODO
Add URL here. - Dev site -
TODO
Add dev site URL here. - Stage site -
TODO
Add stage site URL here. - Prod site -
TODO
Add prod site URL here.
The first step of upgrading the Druapl 7 vesrion to Drupal 10 is setting up a blank Drupal 10 website by using the following steps:
- Setup a web server
- Copy the file system from the master branch
- Run composer install
- Create database and assign user
- Enter the database credentails in the sites/default/settings.php file
Automatically generated include for settings managed by ddev.
$ddev_settings = dirname(__FILE__) . '/settings.ddev.php';
if (getenv('IS_DDEV_PROJECT') == 'true' && is_readable($ddev_settings)) {
require $ddev_settings;
}
-
Hit the website URL to complete the installation process
-
Please note that while setting up the website, we need to select "minimal" profile. Selecting other profiles will generate issues.
-
Go to the terminal >> public_html and run this command to get the UUID (copy the UUID)
./vendor/bin/drush cget "system.site" uuid
-
Once UUID is copied, go to config/default/system.site.yml and the replace the existing with the copied one.
-
Go to the terminal >> public_html and run this command (select yes on prompt). Ignore the first error and run it again. After it gets completed, run it for the 3rd/4th time until only two files are left for the update.
./vendor/bin/drush cim
-
Clear cache >>
./vendor/bin/drush cr
-
Theme setup. Go to the terminal >>
cd public_html/docroot/themes/custom/yukonca_glider/
-
Assuming that the correct node version is already installed run >>
npm run build
-
Go to the terminal >> public_html and clear cache >>
./vendor/bin/drush cr
-
Import French translations by hitting /admin/config/regional/translate/import. On this admim interface, select the fr.po file, select "French" in the dropdown, check the three boxes and click upload.
-
Clear cache
/docroot/themes/custom/yukonca_glider/patterns/organisms/footer/scss/styles.scss Line 6 >> remove /docroot
/docroot/themes/custom/yukonca_glider/src/js/custom.js Line 18 >> remove /docroot
Node Installation followed by theme setup:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash nvm --version nvm install 16 nvm install 18
Theme setup nvm use v16.16.0 npm install nvm use v18 npm run build
- Local
drush locale-export fr --type=customized > config/translations/fr.customized.po
- Pantheon
drush locale-export fr --type=customized > /code/config/translations/fr.customized.po
- Local
drush locale-import fr --type=customized /var/www/html/config/translations/fr.customized.po
- Pantheon
drush locale-import fr --type=customized /code/config/translations/fr.customized.po
- Local
drush locale-import fr --type=customized --override=customized /var/www/html/config/translations/fr.customized.po
- Pantheon
drush locale-import fr --type=customized --override=customized /code/config/translations/fr.customized.po