Site Configuration

The site configuration file contains the primary configuration for Crafter Studio’s behavior. Each site has its own site configuration file that controls its behavior independently of other sites.

To modify the site configuration, click on siteConfig from the bottom of the Sidebar, then click on Configuration and select Site Configuration from the dropdown list.

Configurations - Open Site Configuration

Sample

{REPOSITORY_ROOT}/sites/SITENAME/config/studio/site-config.xml
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<?xml version="1.0" encoding="UTF-8"?>
<site-config>
  <version>7</version>
  <wem-project>mysite</wem-project>
  <display-name>mysite</display-name>
  <default-timezone>EST5EDT</default-timezone>

  <!-- Site URLs. Default to http://localhost:8080 if blank -->
  <site-urls>
    <authoring-url></authoring-url>
    <staging-url></staging-url>
    <live-url></live-url>
  </site-urls>

  <published-repository>
    <enable-staging-environment>false</enable-staging-environment>
  </published-repository>

  <publishing>
    <comments>
      <!-- Global setting would apply to all -->
      <required>false</required>
      <!-- Additional (also optional) specific overrides -->
      <!-- <delete-required/> -->
      <!-- <bulk-publish-required/> -->
      <!-- <publish-by-commit-required/> -->
    </comments>
  </publishing>

  <form-engine>
    <field-name-postfix>true</field-name-postfix>
    <ignore-postfix-fields>
      <field>internal-name</field>
      <field>file-name</field>
      <field>placeInNav</field>
      <field>scripts</field>
      <field>mime-type</field>
      <field>force-https</field>
      <field>navLabel</field>
      <field>expired</field>
      <field>key</field>
      <field>value</field>
      <field>items</field>
      <field>redirect-url</field>
      <field>authorizedRoles</field>
      <field>role</field>
      <field>disabled</field>
    </ignore-postfix-fields>
  </form-engine>

  <!--
  Pattern that Studio will use to load plugin from the site repository
  Required placeholders: ${type}, ${name}
  -->
  <plugin-folder-pattern>/config/studio/plugins/${type}/${name}</plugin-folder-pattern>

  <repository rootPrefix="/site">

    <!-- default inheritance file name -->
    <level-descriptor>crafter-level-descriptor.level.xml</level-descriptor>

    <!-- The section below classifies items into folders for two dashboard widgets:
    - Items Waiting For Approval
    - Approved Scheduled Items

    Items that match the paths specified will be grouped together in the dashboard widget
    -->
    <folders>
      <folder name="Pages" path="/website" read-direct-children="false" attach-root-prefix="true"/>
      <folder name="Components" path="/components" read-direct-children="false" attach-root-prefix="true"/>
      <folder name="Assets" path="/static-assets" read-direct-children="false" attach-root-prefix="false"/>
      <folder name="Templates" path="/templates" read-direct-children="false" attach-root-prefix="false"/>
    </folders>

    <!-- Item Patterns -->
    <patterns>
      <!-- The section below helps determine the type of content based on regex. This shows up in two places:
      - The activity audit log.
      - The UI icon used for the item
      -->

      <pattern-group name="page">
        <pattern>/site/website/([^&lt;]+)\.xml</pattern>
      </pattern-group>

      <pattern-group name="component">
        <pattern>/site/components/([^&lt;]+)\.xml</pattern>
        <pattern>/site/system/page-components/([^&lt;]+)\.xml</pattern>
        <pattern>/site/component-bindings/([^&lt;]+)\.xml</pattern>
        <pattern>/site/indexes/([^&lt;]+)\.xml</pattern>
        <pattern>/site/resources/([^&lt;]+)\.xml</pattern>
      </pattern-group>

      <pattern-group name="asset">
        <pattern>/static-assets/([^&lt;"'\)]+)</pattern>
      </pattern-group>

      <pattern-group name="rendering-template">
        <pattern>/templates/([^&lt;"]+)\.ftl</pattern>
      </pattern-group>

      <pattern-group name="scripts">
        <pattern>/scripts/([^&lt;"]+)\.groovy</pattern>
      </pattern-group>

      <!-- The section below enumerates the mime-types we can preview -->
      <pattern-group name="previewable-mimetypes">
        <pattern>image/(.*)</pattern>
        <pattern>application/pdf</pattern>
        <pattern>video/(.*)</pattern>
        <pattern>application/msword</pattern>
        <pattern>application/vnd.openxmlformats-officedocument.wordprocessingml.document</pattern>
        <pattern>application/vnd.ms-excel</pattern>
        <pattern>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</pattern>
        <pattern>application/vnd.ms-powerpoint</pattern>
      </pattern-group>
    </patterns>

    <!-- The patterns below identify what is allowed to show up in the Dashboard widgets -->
    <display-in-widget-patterns>
        <display-in-widget-pattern>.*</display-in-widget-pattern>
    </display-in-widget-patterns>
  </repository>
  <contentMonitoring>
    <monitor>
      <name>Content Expiring Tomorrow</name>
      <query>expired_dt:[now+1d/d TO now+2d/d]</query>
      <paths>
        <path>
          <name>All Site</name>
          <pattern>/site/.*</pattern>
          <emailTemplate>contentExpiringSoon</emailTemplate>
          <emails>admin@example.com</emails>
          <locale>en</locale>
        </path>
      </paths>
    </monitor>
    <monitor>
      <name>Content Expiring In One Week</name>
      <query>expired_dt:[now+7d/d TO now+8d/d]</query>
      <paths>
        <path>
          <name>All Site</name>
          <pattern>/site/.*</pattern>
          <emailTemplate>contentExpiringSoon</emailTemplate>
          <emails>admin@example.com</emails>
          <locale>en</locale>
        </path>
      </paths>
    </monitor>
    <monitor>
      <name>Content Expiring In One Month</name>
      <query>expired_dt:[now+30d/d TO now+32d/d]</query>
      <paths>
        <path>
          <name>All Site</name>
          <pattern>/site/.*</pattern>
          <emailTemplate>contentExpiringSoon</emailTemplate>
          <emails>admin@example.com</emails>
          <locale>en</locale>
        </path>
      </paths>
    </monitor>
    <monitor>
      <name>Content Expiring In Two Months</name>
      <query>expired_dt:[now+60d/d TO now+62d/d]</query>
      <paths>
        <path>
          <name>All Site</name>
          <pattern>/site/.*</pattern>
          <emailTemplate>contentExpiringSoon</emailTemplate>
          <emails>admin@example.com</emails>
          <locale>en</locale>
        </path>
      </paths>
    </monitor>
  </contentMonitoring>
</site-config>