Package management via Drush
Site Studio Sync module provides the following Drush commands which are available to use within your terminal application.
sitestudio:package:list - List sync packages.
sitestudio:package:export - Export Site studio package files to a specified or default directory.
sitestudio:package:import - Import Site Studio packages from specified or default directory.
Package list command
This Drush command outputs list of package names and IDs:
Package list command has no options. Adding -h as option will output "List sync packages." message.
Here's the example of using the command and a sample output with single package "Blog feature" (id: pack_blog_feature):
$ drush sitestudio:package:list Available Site Studio packages: Blog feature - id: pack_blog_feature
Managing images via Package files
It is possible to edit and update or completely replace images in located in exported Site Studio package. Even if the metadata in site_studio_package_files.json has not been updated, import command will detect the change and import the updated image.
However, while Site Studio supports editing and updating of existing images via package import, Drupal image style caching mechanisms will not automatically refresh. If image already has existing versions of it based on "image styles", Drupal image style flush will be required in order to regenerate image styles based on updated image. More information is available here.
Depending on the users browser, old image also might be cached until such time that the browser cache expires or is cleared.
Here's an example of Package import and partial rebuild:
drush sitestudio:package:import' on lightning No non-config files were imported or updated during sync. [notice] Synchronized configuration: create cohesion_custom_styles.cohesion_custom_style.6d265e77. [notice] Synchronized configuration: create cohesion_elements.cohesion_component.cpt_aco_1020. [notice] Synchronized configuration: create cohesion_elements.cohesion_component.coh_component_hero_shallow. [notice] Finalizing configuration synchronization. [success] The configuration was imported successfully. Doing partial rebuild. > [notice] Building cohesion_custom_style - Heading 1 size - 6d265e77 > [notice] Building cohesion_component - Hero - shallow - coh_component_hero_shallow > [notice] Building cohesion_component - ACO-1020 - cpt_aco_1020 > [notice] Securing twig template directory. > [notice] Flushing render cache. > [notice] Message: Entities in use have been rebuilt. > Rebuild complete.
Legacy Drush commands
The legacy package management methods described below will be removed in a future version of Site Studio.
If Site Studio sync is enabled, you can use the following commands.
drush sync:export - Exports all Site Studio configuration to the sync folder as a .yml_ file.
drush sync:export --filename-prefix=myfilenamehere - Exports all Site Studio configuration to the sync folder as a .yml_ file with a custom file name rather than using the websites name.
drush sync:import --overwrite-all - Imports all Site Studio packages from the sync folder and overwrite existing Site Studio configuration.
drush sync:import --keep-all - Imports all Site Studio configuration from the sync folder and keeps existing Site Studio configuration and only imports new configuration.