All Versions
DSpace Documentation
...
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).
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.
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.
config.dev.yml file in config/ for a development environment;config.prod.yml file in config/ config.dev.yml file in config/ for a development environment;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' |
.env (environment) file in the project root directory and setting the environment variables in that location....
| Code Block | ||||
|---|---|---|---|---|
| ||||
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 enable*exclude* from 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. # If Tothe disablepath thismatches feature,any specifyof [the '/' ], as that will resultregexes it will be served directly in allCSR paths(client being enabled for SSRside rendering). 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. # If set enableBrowseComponent: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 not to transferon SSR. # If set to true 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 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 | ||||
|---|---|---|---|---|
| ||||
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 | ||||
|---|---|---|---|---|
| ||||
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 | ||||
|---|---|---|---|---|
| ||||
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 |
The "defaultLanguagefallbackLanguage" and "languages" sections allow you to customize which languages to support in your User Interface. See also Multilingual Support.
| Code Block | ||||
|---|---|---|---|---|
| ||||
# 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 | ||||
|---|---|---|---|---|
| ||||
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 "pageNOTE: The "pageSize" configuration will always round to the closest "pageSizeOptions" value listed in "page-component-options.model.ts"
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
community:
# Search tab config
searchSection:
# When set to "true", the search filter sidebar will be displayed on the "Search" tab
showSidebar: true |
The "collection" section allows you to configure the behavior of the Collection pages (Path: /collection/[uuid]).
| Code Block | ||||
|---|---|---|---|---|
| ||||
collection:
# Search tab config
searchSection:
# When set to "true", the search filter sidebar will be displayed on the "Search" tab
showSidebar: true |
The "themes" section allows you to configure which theme(s) are enabled for your DSpace site (with the default theme being the "dspace" one). You can enable a single theme across all pages, and/or enable specific alternative themes based on a specific Community, Collection or Item (by UUID or Handle), or based on a Regex match of a URL pattern. This allows you fine grained control over how your site looks, including the ability to customize it per Community or Collection or even per specific pages in the site. See User Interface Customization for details of how to create a new, custom theme.
# Default tab to be shown when browsing a Community. Valid values are: comcols, search, or browse_<field>
# <field> must be any of the configured "browse by" fields, e.g., dateissued, author, title, or subject
# When the default tab is not the 'search' tab, the search tab is moved to the last position
defaultBrowseTab: search |
The "collection" section allows you to configure the behavior of the Collection pages (Path: /collection/[uuid]).
| Code Block | |||
|---|---|---|---|
| |||
| |||
themescollection: # AddSearch additionaltab themesconfig here. InsearchSection: the case where multiple# themesWhen matchset ato route"true", the firstsearch one filter sidebar #will inbe thisdisplayed liston willthe get priority. It is advisable to always have a theme that matches # every route as the last one #"Search" tab showSidebar: true # Default tab to be shown when browsing a Collection. Valid values are: search, or browse_<field> # #<field> Amust themebe withany aof handlethe propertyconfigured will"browse matchby" the communityfields, e.g., collectiondateissued, orauthor, itemtitle, withor the givensubject # When the default tab is not the 'search' tab, the search tab is moved to the last position defaultBrowseTab: search |
The "themes" section allows you to configure which theme(s) are enabled for your DSpace site (with the default theme being the "dspace" one). You can enable a single theme across all pages, and/or enable specific alternative themes based on a specific Community, Collection or Item (by UUID or Handle), or based on a Regex match of a URL pattern. This allows you fine grained control over how your site looks, including the ability to customize it per Community or Collection or even per specific pages in the site. See User Interface Customization for details of how to create a new, custom theme.
| Code Block | ||
|---|---|---|
| ||
themes: # Add additional themes here. In the case where multiple themes match a route, the first one # in this list will get priority. It is advisable to always have a theme that matches # every route as the last one# handle, and all collections and/or items within it # - name: 'custom', # handle: '10673/1233' # # # A theme with a regex property will match the route using a regular expression. If it # # matches the route for a community or collection it will also apply to all collections # # and/or items within it # - name: 'custom', # regex: 'collections\/e8043bc2.*' # # # A theme with a uuidhandle property will match the community, collection or item with the given # # IDhandle, and all collections and/or items within it # - name: 'custom', # uuidhandle: '0958c910-2037-42a9-81c7-dca80e3892b410673/1233' # # # A Thetheme extendswith propertya specifiesregex anproperty ancestorwill themematch (by name). Wheneverthe route using a themedregular componentexpression. isIf not foundit # # inmatches the route for currenta theme,community itsor ancestor theme(s)collection it will be checked recursively before falling back to default. also apply to all collections # # and/or items within it # - name: 'custom-A', # extendsregex: 'custom-B',collections\/e8043bc2.*' # # # AnyA theme ofwith thea matchinguuid propertiesproperty abovewill canmatch bethe used community, collection #or item with handle: '10673/34' # # - name: 'custom-B',the given # # ID, and all collections and/or items within it # - extendsname: 'custom', # handleuuid: '10673/120958c910-2037-42a9-81c7-dca80e3892b4' # # # AThe themeextends withproperty onlyspecifies aan nameancestor willtheme match every route # name: 'custom' #(by name). Whenever a themed component is not found # # in Thisthe current theme, willits use the default bootstrap styling for DSpace componentsancestor theme(s) will be checked recursively before falling back to default. # - name: BASE_THEME_NAME'custom-A', # - nameextends: dspace'custom-B', ## Whenever this theme# isAny active,of the matching followingproperties tagsabove willcan be injectedused into the# <head> of the page.handle: '10673/34' # # Example- use casename: set the favicon based on the active theme. headTags: - tagName: link attributes: rel: icon href: assets/dspace/images/favicons/favicon.ico sizes: any - tagName: link attributes: rel: icon href: 'custom-B', # extends: 'custom', # handle: '10673/12' # # # A theme with only a name will match every route # name: 'custom' # # # This theme will use the default bootstrap styling for DSpace components # - name: BASE_THEME_NAME # - name: dspace # Whenever this theme is active, the following tags will be injected into the <head> of the page. # Example use case: set the favicon based on the active theme. headTags: - tagName: link attributes: rel: icon href: assets/dspace/images/favicons/favicon.svgico typesizes: image/svg+xmlany - tagName: link attributes: rel: apple-touch-icon href: assets/dspace/images/favicons/apple-touch-icon.pngfavicon.svg type: image/svg+xml - tagName: link attributes: rel: manifestapple-touch-icon href: assets/dspace/images/favicons/apple-touch-icon.png - tagName: link attributes: rel: manifest href: assets/dspace/images/favicons/manifest.webmanifest |
...
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).
...
The "search" section allows you to customize how the Search page works (Path: /search)
...
| language | yml |
|---|---|
| title | config.*.yml |
...
Path: /search)
| Code Block | ||||
|---|---|---|---|---|
| ||||
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' ] |
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 | ||||
|---|---|---|---|---|
| ||||
# 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
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.
...