Page History
...
Configuration File Format
In As of DSpace 7.2 and above, the Configuration format is now YAML and is located at ./config/config.*.yaml
.
...
The "rateLimiter" sub-section can be used to protect against a DOS (denial of service) attack when the UI is processed on the server side (i.e. server-side rendering). Default settings are usually OK. In Angular, server-side rendering occurs to support better Search Engine Optimization (SEO), as well as to support clients which cannot use Javascript. See also Angular's docs on Server-side rendering.
REST API Settings
The "rest" (REST API) section defines which REST API the UI will use. The REST settings MUST correspond to the primary URL of the backend. Usually, this means they must be kept in sync
with the value of dspace.server.url
in the backend's local.cfg
This example is valid if your Backend is publicly available at https://api.mydspace.edu/server/ . Keep in mind that the "port" must always be specified even if it's a standard port (i.e. port 80 for HTTP and port 443 for HTTPS).
Sub-path in frontend URL: When using a subpath (nameSpace) in your UI server base URL (e.g. "http://localhost:4000/mysite/" instead of "http://localhost:4000/"), you must make sure that the URL without the subpath is added to the rest.cors.allowed-origins
list in [dspace]/config/modules/rest.cfg
or the local.cfg
override. The default value used for this configuration assumes that Origin and DSpace URL are identical, but CORS origins do not contain a subpath. Without this change you will see CORS policy errors preventing communication between the frontend and backend servers.
REST API Settings
The "rest" (REST API) section defines which REST API the UI will use. The REST settings MUST correspond to the primary URL of the backend. Usually, this means they must be kept in sync
with the value of dspace.server.url
in the backend's local.cfg
This example is valid if your Backend is publicly available at https://api.mydspace.edu/server/ . Keep in mind that the "port" must always be specified even if it's a standard port (i.e. port 80 for HTTP and port 443 for HTTPS).
Code Block | ||||
---|---|---|---|---|
| ||||
rest:
ssl: | ||||
Code Block | ||||
| ||||
rest:
ssl: true
host: api.mydspace.edu
port: 443
# NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
nameSpace: /server |
...
Cache Settings - Server Side Rendering (SSR)
Info |
---|
Available in 7.5 or later |
Caching options Caching options are also available for the User Interface's "server-side rendering" (which uses Angular Universal). Server-side rendering is used to pre-generate full HTML pages and pass those back to users. This is necessary for Search Engine Optimization (SEO) as some web crawlers cannot use Javascript. It also can be used to immediately show the first HTML page to users while the Javascript app loads in the user's browser.
...
Code Block | ||||
---|---|---|---|---|
| ||||
auth: # Authentication UI settings ui: # the amount of time before the idle warning is shown timeUntilIdle: 900000 # 15 minutes # the amount of time the user has to react after the idle warning is shown before they are logged out. idleGracePeriod: 300000 # 5 minutes # Authentication REST settings rest: # If the rest token expires in less than this amount of time, it will be refreshed automatically. # This is independent from the idle warning. Defaults to automatic refresh when the token will # expire within 2 minutes. Because token expires after 30 minutes by default, this means automatic # refresh would occur every ~28 minutes. timeLeftBeforeTokenRefresh: 120000 # 2 minutes |
...
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 (v5v6.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 # - namevalue: dc.author600 # # NOTE: fontawesome (v5v6.x) icon classes and bootstrap utility classes can be used # style: fatext-usersuccess # - valueicon: 600fa-circle-check # style: text-success - value: 500 style: text-info # NOTE: the class configured in property style is used by default, the icon property could be used in component -# value: 400 configured style: text-warning # default configurationto use a 'icon mode' display (mainly in edit-item page) - value: default600 style: text-muted |
Language Settings
The "defaultLanguage" and "languages" sections allow you to customize which languages to support in your User Interface. See also Multilingual Support.
Code Block | ||||
---|---|---|---|---|
| ||||
# Default Language in which the UI will be rendered if the user's browser language is not an active language
defaultLanguage: 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
- ... |
The DSpace UI requires that a corresponding language pack file (named with the language code and ending in ".json5") be placed in ./src/assets/i18n/
. See also DSpace 7 Translation - Internationalization (i18n) - Localization (l10n) for information about how to create and contribute these files.
Browse By Settings
The "browseBy" section provides basic UI configurations for "Browse by" pages (/browse path). The "Browse by" options that appear in the "All of DSpace" header menu are determined dynamically from the REST API. This allows the UI to change dynamically based on the configured browse indexes in Discovery.
Code Block | ||||
---|---|---|---|---|
| ||||
browseBy:
# Amount of years to display using jumps of one year (current year - oneYearLimit)
oneYearLimit: 10
# Limit for years to display using jumps of five years (current year - fiveYearLimit)
fiveYearLimit: 30
# The absolute lowest year to display in the dropdown (only used when no lowest date can be found for all items)
defaultLowerLimit: 1900
# If true, thumbnail images for items will be added to BOTH search and browse result lists. (default: true)
showThumbnails: true
# The number of entries in a paginated browse results list.
# Rounded to the nearest size in the list of selectable sizes on the settings menu.
pageSize: 20
# NOTE: The "types" section no longer exists, as it is determined dynamically via the REST API |
NOTE: The "pageSize" configuration will always round to the closest "pageSizeOptions" value listed in "page-component-options.model.ts"
Community-List Settings
Info |
---|
Available in 7.4 or later |
The "communityList" section allows you to configure the behavior of the "Communities & Collections" page (/community-list path), which is linked in the header.
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 "defaultLanguage" and "languages" sections allow you to customize which languages to support in your User Interface. See also Multilingual Support.
Code Block | ||||
---|---|---|---|---|
| ||||
# Default Language in which the UI will be rendered if the user's browser language is not an active language
defaultLanguage: 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
- ... |
The DSpace UI requires that a corresponding language pack file (named with the language code and ending in ".json5") be placed in ./src/assets/i18n/
. See also DSpace 7 Translation - Internationalization (i18n) - Localization (l10n) for information about how to create and contribute these files.
Browse By Settings
The "browseBy" section provides basic UI configurations for "Browse by" pages (/browse path). The "Browse by" options that appear in the "All of DSpace" header menu are determined dynamically from the REST API. This allows the UI to change dynamically based on the configured browse indexes in Discovery.
Code Block | ||||
---|---|---|---|---|
| ||||
browseBy:
# Amount of years to display using jumps of one year (current year - oneYearLimit)
oneYearLimit: 10
# Limit for years to display using jumps of five years (current year - fiveYearLimit)
fiveYearLimit: 30
# The absolute lowest year to display in the dropdown (only used when no lowest date can be found for all items)
defaultLowerLimit: 1900
# If true, thumbnail images for items will be added to BOTH search and browse result lists. (default: true)
showThumbnails: true
# The number of entries in a paginated browse results list.
# Rounded to the nearest size in the list of selectable sizes on the settings menu.
pageSize: 20
# NOTE: The "types" section no longer exists, as it is determined dynamically via the REST API |
NOTE: The "pageSize" configuration will always round to the closest "pageSizeOptions" value listed in "page-component-options.model.ts"
Community-List Settings
The "communityList" section allows you to configure the behavior of the "Communities & Collections" page (/community-list path), which is linked in the header.
Code Block | ||||
---|---|---|---|---|
| ||||
communityList:
# Number of communities to list per expansion (i.e. each time you click "show more")
pageSize: 20 |
NOTE: The "pageSize" configuration will always round to the closest "pageSizeOptions" value listed in "page-component-options.model.ts"
Homepage Settings
The "homePage" section allows you to configure the behavior of the DSpace homepage (/ path).
Code Block | ||||
---|---|---|---|---|
| ||||
homePage:
recentSubmissions:
# The number of item showing in recent submissions list. Set to "0" to hide all recent submissions
pageSize: 5
# Date field to use to sort recent submissions
sortField: 'dc.date.accessioned'
topLevelCommunityList:
# Number of communities to list (per page) on the home page
# This will always round to the nearest number from the list of page sizes. e.g. if you set it to 7 it'll use 10
pageSize: 5
# Enable or disable the Discover filters on the homepage
showDiscoverFilters: false | ||||
Code Block | ||||
| ||||
communityList:
# Number of communities to list per expansion (i.e. each time you click "show more")
pageSize: 20 |
NOTE: The "pageSize" configuration will always round to the closest "pageSizeOptions" value listed in "page-component-options.model.ts"
Homepage Settings
Info |
---|
Available in 7.4 or later |
Undo Settings
Both the "item" edit and "collection" edit screens allow you to undo changes within a specific time. This is controlled by these settings:The "homePage" section allows you to configure the behavior of the DSpace homepage (/ path).
Code Block | ||||
---|---|---|---|---|
| ||||
homePageitem: recentSubmissions: # The number of item showing in recent submissions list. Set to "0" to hide all recent submissionsedit: pageSizeundoTimeout: 5 10000 # Date field to use to sort recent submissions sortField: 'dc.date.accessioned' topLevelCommunityList: # Number of communities to list (per page) on the home page # This will always round to the nearest number from the list of page sizes. e.g. if you set it to 7 it'll use 10 pageSize: 5 |
NOTE: The "pageSize" configuration will always round to the closest "pageSizeOptions" value listed in "page-component-options.model.ts"
Undo Settings
10 seconds
collection:
edit:
undoTimeout: 10000 # 10 seconds |
Item Access Labels
Item access labels allow to display for each item in search results if it is Open Access, under embargo, restricted or metadata only (does not contain any file/bitstream). This feature is disabled by default, but can be enabled in your config.*.yml.
Code Block | ||||
---|---|---|---|---|
| ||||
# Item Config
item:
# Show the item access status label in items lists (default=false)
showAccessStatuses: true |
Item Page Settings
The "item" section allows you to configure the behavior of the Item pages. Both the "item" edit and "collection" edit screens allow you to undo changes within a specific time. This is controlled by these settings:
Code Block | ||||
---|---|---|---|---|
| ||||
item: edit: undoTimeout: 10000 # 10 seconds collection: edit: ... bitstream: # Number of entries in the bitstream list in the item view page. undoTimeoutpageSize: 10000 # 10 seconds |
Item Access Labels
Info |
---|
Available in 7.3 or later |
5 |
NOTE: The "pageSize" configuration will always round to the closest "pageSizeOptions" value listed in "page-component-options.model.ts"
Community Page Settings
The "community" section allows you to configure the behavior of the Community pages (Path: /community/[uuid]).Item access labels allow to display for each item in search results if it is Open Access, under embargo, restricted or metadata only (does not contain any file/bitstream). This feature is disabled by default, but can be enabled in your config.*.yml.
Code Block | ||||
---|---|---|---|---|
| ||||
community: # ItemSearch tab Configconfig item searchSection: # Show When set to "true", the search itemfilter sidebar accesswill statusbe labeldisplayed inon itemsthe lists (default=false) showAccessStatuses"Search" tab showSidebar: true |
...
Collection Page Settings
...
...
Available in 7.5 or later
The "itemcollection" section allows you to configure the behavior of the Item pages. Collection pages (Path: /collection/[uuid]).
Code Block | ||||
---|---|---|---|---|
| ||||
itemcollection: ...# Search tab config bitstreamsearchSection: # Number of entries in# theWhen bitstreamset list into "true", the itemsearch viewfilter page. sidebar will be displayed pageSize: 5 |
...
on the "Search" tab
showSidebar: true |
Theme Settings
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 # # # A theme with a handle property will match the community, collection or item with the given # # 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 uuid property will match the community, collection or item with the given # # ID, and all collections and/or items within it # - name: 'custom', # uuid: '0958c910-2037-42a9-81c7-dca80e3892b4' # # # The extends property specifies an ancestor theme (by name). Whenever a themed component is not found # # in the current theme, its ancestor theme(s) will be checked recursively before falling back to default. # - name: 'custom-A', # extends: 'custom-B', # # Any of the matching properties above can be used # handle: '10673/34' # # - name: '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.ico sizes: any - tagName: link attributes: rel: icon href: assets/dspace/images/favicons/favicon.svg type: image/svg+xml - tagName: link attributes: rel: apple-touch-icon href: assets/dspace/images/favicons/apple-touch-icon.png - tagName: link attributes: rel: manifest href: assets/dspace/images/favicons/manifest.webmanifest |
Bundle Settings
The "bundle" section allows you to customize which bundles will be displayed as suggestions whenever you upload a new Bitstream:
Code Block |
---|
bundle:
standardBundles: [ ORIGINAL, THUMBNAIL, LICENSE ] |
Media Viewer Settings
The DSpace UI comes with a basic, out-of-the-box Media Viewer (disabled by default). This media viewer can support any files which have a MIME Type that begins with either "image/*", "video/*", or "audio/*".
...
Toggle end-user agreement and privacy policy
...
The DSpace UI comes with basic end-user agreement and privacy policy functionality. Since release 7.4 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).
...
Settings for rendering Markdown, HTML and MathJax in metadata
Info |
---|
Available in 7.4 or later |
The DSpace UI can support Markdown (using https://commonmark.org/) and MathJax (https://www.mathjax.org) in metadata field values. Both Markdown and MathJax are disabled by default.
HTML is a part of markdown, so enabling the markdown option will ensure HTML tags in metadata field values get rendered as wellas well
Code Block | ||||
---|---|---|---|---|
| ||||
# Whether to enable Markdown (https://commonmark.org/) and MathJax (https://www.mathjax.org/) # display in supported metadata fields. By default, only dc.description.abstract is supported. markdown: enabled: false mathjax: false |
...
Controlled Vocabularies in Search Filters
...
...
Available in 7.5 or later
When using hierarchical controlled vocabularies (e.g. SRSC as described in Authority Control of Metadata Values), it's possible to search using the controlled vocabulary hierarchy via the search filters. To enable this feature, you must specify the filter and vocabulary to enable as follows:
Code Block | ||||
---|---|---|---|---|
| ||||
# Which vocabularies should be used for which search filters # and whether to show the filter in the search sidebar # Take a look at the filter-vocabulary-config.ts file for documentation on how the options are obtained vocabularies: - filter: 'subject' vocabulary: 'srsc' enabled: true |
Keep in mind, the "filter" MUST be a valid search filter (e.g. subject, author) as seen on the "/api/discover/facets" REST API endpoint. The "vocabulary" MUST be a valid controlled vocabulary installed in your DSpace backend (under "[dspace]/config/controlled-vocab/" folder based on the documentation at Authority Control of Metadata Values.
Universal (Server-side Rendering) Settings
Note | ||
---|---|---|
| ||
As of DSpace 7.2, these settings are no longer editable. Universal is automatically enabled at all times to support Search Engine Optimization. |
The "universal" section pertains to enabling/disabling Angular Universal for Server-side rendering. DSpace requires server-side rendering to support Search Engine Optimization. When it's turned off, your site may not be able to be indexed in Google, Google Scholar and other search engines.
When this feature is enabled, you should see a "Browse [filter] tree" link in the search filter on the search results page (and anywhere search filters are shown). This "Browse [filter] tree" link will allow you to select a search filter from within the configured hierarchical vocabulary.
Search settings
The "search" section allows you to customize how the Search page works (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' ] | ||||
Code Block | ||||
| ||||
// Angular Universal settings
universal: {
preboot: true,
async: true,
time: false
}, |
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.
...