Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Configuration File Format

As of DSpace 7.2, the Configuration The configuration format is now YAML and is located at at ./config/config.*.yaml.

In DSpace 7.1 and 7.0, the Configuration format was a Typescript file and was located at ./src/environments/environment.*.ts.  The structure of this file was essentially a JSON like format.

If you are upgrading from 7.0 or 7.1 to 7.2 (or later), you will either need to migrate your old configuration file (from Typescript to YAML) or start fresh.  You can migrate your old (7.0 or 7.1) "environment.*.ts" configuration file to the new "config.*.yml" format (see the v7 UI configuration documentation).

Configuration Override

The UI configuration files reside in the ./config/ folder in the Angular UI source code.  The default configuration is provided in config.yml.

To change the default configuration values, you simply create (one or more) local files that override the parameters you need to modify. You can use  config.example.yml  as a starting point.

Configuration Override

The UI configuration files reside in the ./config/ folder in the Angular UI source code.  The default configuration is provided in config.yml.

To change the default configuration values, you simply create (one or more) local files that override the parameters you need to modify. You can use  config.example.yml  as a starting point.

  • For example, create a new  config.dev.yml  file in  config/  for a  development  environment;
  • For example, create a new  config.prod.yml  file in config/  
  • For example, create a new  config.dev.yml  file in  config/  for a  development  environment;
  • For example, create a new  config.prod.yml  file in config/  for a  production  environment;

...

  • Using Environment variables. All environment variables MUST (1) be prefixed with "DSPACE_", (2) use underscores as separators (no dots allowed), and (3) use all uppercase.  Some examples are below:

    Code Block
    # "ui" settings environment variables
    ui.host => DSPACE_UI_HOST # The host name 
    ui.port => DSPACE_UI_PORT # The port number 
    ui.nameSpace => DSPACE_UI_NAMESPACE # The namespace
    ui.ssl => DSPACE_UI_SSL # Whether the angular application uses SSL [true/false]
    
    # "rest" settings environment variables
    rest.host => DSPACE_REST_HOST # The host name of the REST application
    rest.port => DSPACE_REST_PORT # The port number of the REST application
    rest.nameSpace => DSPACE_REST_NAMESPACE # The namespace of the REST application
    rest.ssl => DSPACE_REST_SSL # Whether the angular REST uses SSL [true/false]
    
    # Other examples
    defaultLanguagefallbackLanguage => DSPACE_DEFAULTLANGUAGEFALLBACKLANGUAGE
    mediaViewer.video => DSPACE_MEDIAVIEWER_VIDEO
    
    # Multi-valued setting examples
    # If a setting can have multiple values (e.g. theme names), then use an index number (starting with zero)
    # to specify the multiple values.
    # The below example is equivalent to:
    # themes:
    #   - name: 'dspace'
    #   - name: 'mytheme'
    #     handle: '10673/123'
    DSPACE_THEMES_0_NAME = 'dspace'
    DSPACE_THEMES_1_NAME = 'mytheme'
    DSPACE_THEMES_1_HANDLE = '10673/123'


  • Or, by creating a .env (environment) file in the project root directory and setting the environment variables in that location.

...

Code Block
languageyaml
titleconfig.*.yml
ssr:
  # Whether to tell Angular to inline "critical" styles into the server-side rendered HTML.
  # Determining which styles are critical is a relatively expensive operation; this option is
  # disabled (false) by default to boost server performance at the expense of loading smoothness.
  inlineCriticalCss: false
  # (8.1 and later) Path prefixespatterns to *exclude* enablefrom SSR for. By default, theseexcludes are limited to paths of primary DSpace objects listed in the DSpace sitemap.
  # Paths are matched based on whether they "start with" a string in this configuration.  Wildcards are not supportedcommunity and collection browse, global browse, 
  # global search, community list, statistics and various administrative tools.
  # The defined patterns will be run as regexes against the path of the page to check if SSR is allowed.
  # ToIf disablethe thispath feature,matches specifyany [of '/' ], as thatthe regexes it will resultbe inserved alldirectly pathsin beingCSR enabled(client forside SSRrendering).
  paths# NOTE: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/' ]
  # (8.1 and later) Whether to enable rendering of Search component in SSR.
  # If set to true the component will be included in the HTML returned from the server side rendering.
  # If set to false the component will not be included in the HTML returned from the server side rendering.
  enableSearchComponent: false
  # (8.1 and later) Whether to enable rendering of Browse component on SSR.
  # If set to true the component will be included in the HTML returned from the server side renderingThis configuration *replaces* the "paths" setting that existed in versions 7.6.3 and 8.1.
  excludePathPatterns:
    - pattern: "^/communities/[a-f0-9-]{36}/browse(/.*)?$"
      flag: "i"
    - pattern: "^/collections/[a-f0-9-]{36}/browse(/.*)?$"
      flag: "i"
    - pattern: "^/browse/"
    - pattern: "^/search$"
    - pattern: "^/community-list$"
    - pattern: "^/admin/"
    - pattern: "^/processes/?"
    - pattern: "^/notifications/"
    - pattern: "^/statistics/?"
    - pattern: "^/access-control/"
    - pattern: "^/health$"
  # Whether to enable rendering of Search component in SSR.
  # If set to falsetrue the component will not be included in the HTML returned from the server side rendering.
  enableBrowseComponent:# If set to false
  # (8.1 and later) Enable state transfer from the server-side application to the client-side application. (Defaults to true)the component will not be included in the HTML returned from the server side rendering.
  enableSearchComponent: false
  # Note:Whether Whento usingenable anrendering externalof applicationBrowse cachecomponent layer, it's recommended noton SSR.
  # If set to transfertrue the statecomponent towill avoidbe cachingincluded it.
in the #HTML Disablingreturned itfrom ensuresthe thatserver dynamicside staterendering.
 information is# notIf inadvertentlyset cached,to whichfalse canthe improvecomponent securitywill and
not be #included ensurein thatthe usersHTML alwaysreturned usefrom the most up-to-date stateserver side rendering.
  transferStateenableBrowseComponent: truefalse
  # # (8.1 and later) When a different REST base URL is used for Enable state transfer from the server-side application, to the generated state contains references toclient-side application. (Defaults to true)
  # Note: When RESTusing resourcesan withexternal theapplication internalcache URL configured. By default, these internal URLs are replaced with public URLslayer, it's recommended not to transfer the state to avoid caching it.
  # DisableDisabling thisit settingensures tothat avoiddynamic URLstate replacementinformation duringis SSR.not Ininadvertently thiscached, thewhich statecan isimprove notsecurity transferredand
 to avoid# securityensure issues.
that users replaceRestUrl:always true
use  # Enable request performance profiling data collection and printing the results in the server console.
  # Defaults to false. Enabling in production is NOT recommended
  enablePerformanceProfiler: falsethe most up-to-date state.
  transferState: true
  # When a different REST base URL is used for the server-side application, the generated state contains references to
  # REST resources with the internal URL configured. By default, these internal URLs are replaced with public URLs.
  # Disable this setting to avoid URL replacement during SSR. In this the state is not transferred to avoid security issues.
  replaceRestUrl: true
  # Enable request performance profiling data collection and printing the results in the server console.
  # Defaults to false. Enabling in production is NOT recommended
  enablePerformanceProfiler: false

The "paths" setting defines which DSpace pages The "paths" setting defines which DSpace pages will be processed in server-side rendering.  For proper Search Engine Optimization, you should ensure this "paths" setting includes all URL paths that you want to be indexed by search engine bots.  Any paths not listed in this setting will be inaccessible to most bots/crawlers (at least any that cannot process Javascript).  The default "paths" settings are listed above, and they correspond to every page which is listed in the Sitemaps or may be of interest to search engines. DSpace purposefully does not add "/search" or "/browse" pages to these paths because bot requests to those pages may result in performance issues or require a larger amount of CPU to process the SSR.  Keep in mind that values of "paths" are matched against the start of a path, so "/items/" will match every Item page in the system.

...

Code Block
languageyml
titleconfig.*.yml
rest:
  ssl: true
  host: mydspace.edu
  port: 443
  # NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
  nameSpace: /server
  # (8.1 and later) OPTIONAL: OPTIONAL: Provide a different REST API URL to be used during SSR execution. 
  # It must contain the whole URL including protocol, server port and server namespace
  ssrBaseUrl: http://localhost:8080/server

...

Code Block
languageyml
titleconfig.*.yml
form:
  # (7.5 and above) Whether to enable "spellcheck" attribute of textareas in forms.
  spellCheck: true
  # NOTE: Map server-side validators to comparative Angular form validators
  validatorMap:
    required: required
    regex: pattern

...

Code Block
languageyml
titleconfig.*.yml
submission:
  autosave:
    # NOTE: which metadata trigger an autosave
    metadata: []
    # NOTE: after how many time (milliseconds) submission is saved automatically
    # eg. timer: 300000 # 5 minutes
    timer: 0
  icons:
    metadata:
      # NOTE: example of configuration
      #   # NOTE: metadata name
      # - name: dc.author
      #   # NOTE: fontawesome (v6.x) icon classes and bootstrap utility classes can be used
      #   style: fas fa-user
      - name: dc.author
        style: fas fa-user
      # default configuration
      - name: default
        style: ''
    authority:
      confidence:
        # NOTE: example of configuration
        #   # NOTE: confidence value
        # - value: 600
        #   # NOTE: fontawesome (v6.x) icon classes and bootstrap utility classes can be used
        #   style: text-success
        #   icon: fa-circle-check
        #   # NOTE: the class configured in property style is used by default, the icon property could be used in component
        #           configured to use a 'icon mode' display (mainly in edit-item page)
        - value: 600
          style: text-success
          icon: fa-circle-check
        - value: 500
          style: text-info
          icon: fa-gear
        - value: 400
          style: text-warning
          icon: fa-circle-question
        - value: 300
          style: text-muted
          icon: fa-thumbs-down
        - value: 200
          style: text-muted
          icon: fa-circle-exclamation
        - value: 100
          style: text-muted
          icon: fa-circle-stop
        - value: 0
          style: text-muted
          icon: fa-ban
        - value: -1
          style: text-muted
          icon: fa-circle-xmark
        # default configuration
        - value: default
          style: text-muted
          icon: fa-circle-xmark

Language Settings

The "defaultLanguagefallbackLanguage" and "languages" sections allow you to customize which languages to support in your User Interface.  See also Multilingual Support.

Code Block
languageyml
titleconfig.*.yml
# Fallback or Defaultdefault Language in which the UI will be rendered if the user's browser language is not an active language
# NOTE: in DSpace 7.x-9.1 this was called "defaultLanguage". It was renamed to "fallbackLanguage" in 9.2+
fallbackLanguage: en

# Languages. DSpace Angular holds a message catalog for each of the following languages.
# When set to active, users will be able to switch to the use of this language in the user interface.
# All out of the box language packs may be found in the ./src/assets/i18n/ directory
languages:
  - code: en
    label: English
    active: true
  - code: cs
    label: Čeština
    active: true
  - code: de
    label: Deutsch
    active: true
  - ...

...

Code Block
languageyml
titleconfig.*.yml
item:
  ...
  bitstream:
    # Number of entries in the bitstream list in the item view page.
    pageSize: 5
    # Show the bitstream access status label on the item page (default=false)
    # When enabled, embargoed bitstreams will show their embargo date in a label.
    showAccessStatuses: false

NOTE: The "pageSize" configuration will always round to the closest "pageSizeOptions" value listed in "page-NOTE: The "pageSize" configuration will always round to the closest "pageSizeOptions" value listed in "page-component-options.model.ts"

...

Uploading video captioning files

As of 7.5 (or later), the The Video viewer also supports WebVTT (or VTT) Captioning.  Video captioning requires that a WebVTT Caption file (.vtt) be uploaded into the DSpace Item (DSpace is not able to create or generate these .vtt files).  Here's an example of how to setup captioning:

...

The DSpace UI comes with basic end-user agreement and privacy policy functionality. Since release 7.4 these These features can be disabled in a configuration file. More information on what disabling on of these features results in is documented in the default app configuration (see code snippet below).

...

Code Block
languageyml
titleconfig.*.yml
search:
  # Settings to enable/disable or configure Advanced Search filters.
  advancedFilters:
    enabled: false
    # List of filters to enable in "Advanced Search" dropdown
    filter: [ 'title', 'author', 'subject', 'entityType' ] or configure Advanced Search filters.
  advancedFilters:
    enabled: false
    # List of filters to enable in "Advanced Search" dropdown
    filter: [ 'title', 'author', 'subject', 'entityType' ]

Geospatial map viewer settings

The "geospatialMapViewer" section allows you to enable the display of geospatial maps on item pages, search result views, and as a "browse by" page.  These maps are driven by Leaflet.js with the OpenStreetMaps Mapnik tile provider (by default).

Take note of the default field used for geospatial metadata - this may need to be changed to fit your specific repository metadata usage.

Code Block
languageyaml
titleconfig.*.yml
# Geospatial Map display options
geospatialMapViewer:
  # Which fields to use for parsing as geospatial points in search maps
  # (note, the item page field component allows any field(s) to be used
  # and is set as an input when declaring the component)
  spatialMetadataFields:
    - 'dcterms.spatial'
  # Which discovery configuration to use for 'geospatial search', used
  # in the browse map
  spatialFacetDiscoveryConfiguration: 'geospatial'
  # Which filter / facet name to use for faceted geospatial search
  # used in the browse map
  spatialPointFilterName: 'point'
  # Whether item page geospatial metadata should be displayed
  # (assumes they are wrapped in a test for this config in the template as
  # per the default templates supplied with DSpace for untyped-item and publication)
  enableItemPageFields: false
  # Whether the browse map should be enabled and included in the browse menu
  enableBrowseMap: false
  # Whether a 'map view' mode should be included alongside list and grid views
  # in search result pages
  enableSearchViewMode: false
  # The tile provider(s) to use for the map tiles drawn in the leaflet maps.
  # (see https://leaflet-extras.github.io/leaflet-providers/preview/) for a full list
  tileProviders:
    - 'OpenStreetMap.Mapnik'
  # Starting centre point for the map, as lat and lng coordinates. This is useful
  # to set the centre of the map when the map is first loaded and if there are no
  # points, shapes or markers to display.
  # Defaults to the centre of Istanbul
  defaultCentrePoint:
    lat: 41.015137
    lng: 28.979530

Additional information about this feature can be found at https://github.com/kshepherd/dspace-geospatial-maps-doc/blob/main/README.md

Debug Settings

The "debug" property allows you to turn on debugging in the Angular UI.  When enabled, your environment and all Redux actions/transfers are logged to the console.  This is only ever needed if you are debugging a tricky issue.

...