Source control
Source control
When dealing with a Coveo for Sitecore Project, it’s easy to lose track of all the custom changes made. It’s particularly important to track your created and modified files when upgrading Coveo for Sitecore, as new releases are frequent.
Files to include in source control
Here is a list of files that we recommend you include for version control.
Custom .cshtml
files
Typically found under:
-
<SITECORE_INSTANCE_ROOT>\layouts\Coveo Hive\
-
<SITECORE_INSTANCE_ROOT>\Coveo\Hive\templates\
-
<SITECORE_INSTANCE_ROOT>\Coveo\Hive\init\
-
<SITECORE_INSTANCE_ROOT>\Coveo\Hive\search box init\
Learn more about creating a unique search experience (see Style the search experience).
Custom .config
files
Typically found under <SITECORE_INSTANCE_ROOT>\App_Config\Include\Coveo\
.
These files are easily recognizable by their file name which ends with Custom.config
and are used to patch the default configuration and behavior of Coveo for Sitecore.
Note
The proper handling of the |
Learn more about configuration files (see Introduction to the Coveo configuration files).
Your code files
You should include whatever code files you have written (for example, custom processors).
Custom CSS, JS, and image files
Learn more about inserting custom CSS in your search experience (see Style the search experience).
Custom serialized Sitecore items
Learn more about serialized items using Unicorn or Team Development for Sitecore (TDS) (see Unicorn vs Hedgehog TDS for Sitecore. Hmm what to choose).
Files to exclude from source control
Many version control tools offer the ability of adding an ignore file to exclude certain files from your source control.
The following list includes files that shouldn’t be included in your source control as they’re included in every Coveo for Sitecore package and can be updated with a new release.
Default .config
files
Typically found under <SITECORE_INSTANCE_ROOT>\App_Config\Modules\Coveo\
.
Default Coveo layouts, templates, and renderings
Typically found under:
-
<SITECORE_INSTANCE_ROOT>\Views\Coveo Hive\
-
<SITECORE_INSTANCE_ROOT>\layouts\Coveo Hive\
-
<SITECORE_INSTANCE_ROOT>\Coveo\Hive\templates\
Default CSS, JS, and image files
Typically found under:
-
<SITECORE_INSTANCE_ROOT>\Coveo\Hive\css\
-
<SITECORE_INSTANCE_ROOT>\Coveo\Hive\js\
-
<SITECORE_INSTANCE_ROOT>\Coveo\Hive\image\
Handling files containing an organization ID, organization name, API key, or SearchAPI key
When Coveo for Sitecore is activated, the <SITECORE_INSTANCE_ROOT>\App_Config\Include\Coveo\Coveo.CloudPlatformClient.Custom.config
file is created with these parameters.
Depending on your use case, you may or may not want to include the Coveo.CloudPlatformClient.Custom.config
file.
For example, if you’re using source control to deploy Coveo for Sitecore with post-activation configuration files to your content management (CM) and content delivery (CD) servers, then you would need to include this file (see Scaling guide).