Baseline Settings for Sitecore

This is a very brief post just capturing some config settings that I’ve found to be helpful to set at the very beginning of a project.

<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
     <sitecore>
          <linkManager defaultProvider="sitecore">
               <providers>
                    <add name="sitecore"
                         set:lowercaseUrls="true"
                         set:languageEmbedding="never"
                         set:alwaysIncludeServerUrl="false"
                         set:addAspxExtension="false" />
               </providers>
          </linkManager>

          <settings>
               <!--   ALLOW DUPLICATE ITEM NAMES ON THE SAME LEVEL
          Specifies whether the duplicate item names are allowed on the same level in the content tree.
          Default value: false
     -->
               <setting name="AllowDuplicateItemNamesOnSameLevel" set:value="false"/>

               <!--   CONTENT EDITOR SORT LANGUAGES
          Indicates whether the Content Editor show languages in the language selection dropdown
          in the same order as /sitecore/system/Languages child items.
          Default value: false
     -->
               <setting name="ContentEditor.SortLanguages" set:value="true"/>

               <!--   START DOCUMENT
            The document that will be shown first when entering the Sitecore client.
            Path is rooted in /sitecore/content and must start with /.
       -->
               <setting name="DefaultItem" set:value="/home"/>

               <!--   LAYOUT FILE
            The path to the layout file to use for items that do not specify a layout file themselves.
            Default value: ""
       -->
               <setting name="DefaultLayoutFile" set:value=""/>

               <!--   HTML EDITOR DEFAULT PROFILE
            Path to the default html editor profile.
            Default value: /sitecore/system/Settings/Html Editor Profiles/Rich Text Default
       -->
               <setting name="HtmlEditor.DefaultProfile" set:value="/sitecore/system/Settings/Html Editor Profiles/Rich Text Default"/>

               <!--   INVALID CHARS
            Characters that are invalid in an item name
       -->
               <setting name="InvalidItemNameChars" set:value="\/:?&quot;&lt;&gt;|[]-" />

               <!--   MAIL SERVER
            SMTP server used for sending mails by the Sitecore server
            Is used by MainUtil.SendMail()
            Default value: ""
       -->
               <setting name="MailServer" set:value=""/>

               <!--   MAIL SERVER USER
            If the SMTP server requires login, enter the user name in this setting
       -->
               <setting name="MailServerUserName" set:value=""/>

               <!--   MAIL SERVER PASSWORD
            If the SMTP server requires login, enter the password in this setting
       -->
               <setting name="MailServerPassword" set:value=""/>

               <!--   MAIL SERVER PORT
            If the SMTP server requires a custom port number, enter the value in this setting.
            The default value is: 25
       -->
               <setting name="MailServerPort" set:value="25"/>

               <!--   MAIL SERVER SSL
            If the SMTP server requires SSL, set the value to true.
            The default value is: false
     -->
               <setting name="MailServerUseSsl" set:value="false"/>

               <!--   WEB SITE STYLESHEET
            CSS file for HTML content of Sitecore database.
            The file pointed to by WebStylesheet setting is automatically included in Html and Rich Text fields.
            By using it, you can make the content of HTML fields look the same as the actual Web Site
       -->
               <setting name="WebStylesheet" set:value="/default.css"/>
          </settings>
     </sitecore>
</configuration>

In addition, make sure to always create custom search indexes for the site you’re building.

<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:search="http://www.sitecore.net/xmlconfig/search/">
  <sitecore role:require="Standalone or ContentManagement" search:require="solr">
    <contentSearch>
      <configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch">
        <indexes hint="list:AddIndex">
          <index id="my_site_master_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="name">$(id)</param>
            <param desc="core">$(id)</param>
            <param desc="propertyStore" ref="contentSearch/indexConfigurations/databasePropertyStore" param1="$(id)" />
            <configuration ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration">
              <enableReadAccessIndexing>true</enableReadAccessIndexing>
            </configuration>
            <strategies hint="list:AddStrategy">
              <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/manual" role:require="ContentManagement and !Indexing" />
              <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/intervalAsyncMaster" role:require="Standalone or (ContentManagement and Indexing)" />
            </strategies>
            <locations hint="list:AddCrawler">
              <crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
                <Database>master</Database>
                <Root>/sitecore/content/My Site</Root>
              </crawler>
            </locations>
            <enableItemLanguageFallback>false</enableItemLanguageFallback>
            <enableFieldLanguageFallback>false</enableFieldLanguageFallback>
          </index>

          <index id="my_site_web_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="name">$(id)</param>
            <param desc="core">$(id)</param>
            <param desc="propertyStore" ref="contentSearch/indexConfigurations/databasePropertyStore" param1="$(id)" />
            <configuration ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration" />
            <strategies hint="list:AddStrategy">
              <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/manual" role:require="(ContentManagement and !Indexing) or (ContentDelivery and !Indexing)" />
              <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/onPublishEndAsyncSingleInstance" role:require="Standalone or (ContentManagement and Indexing) or (ContentDelivery and Indexing)" />
            </strategies>
            <locations hint="list:AddCrawler">
              <crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
                <Database>web</Database>
                <Root>/sitecore/content/My Site</Root>
              </crawler>
            </locations>
            <enableItemLanguageFallback>false</enableItemLanguageFallback>
            <enableFieldLanguageFallback>false</enableFieldLanguageFallback>
          </index>
        </indexes>
      </configuration>
    </contentSearch>
  </sitecore>
</configuration>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s