Merge remote-tracking branch 'github/main' into DS-8408

This commit is contained in:
aroman-arvo
2023-02-13 11:31:03 +01:00
450 changed files with 21630 additions and 4069 deletions

View File

@@ -20,6 +20,7 @@ import { InfoConfig } from './info-config.interface';
import { CommunityListConfig } from './community-list-config.interface';
import { HomeConfig } from './homepage-config.interface';
import { MarkdownConfig } from './markdown-config.interface';
import { FilterVocabularyConfig } from './filter-vocabulary-config';
import { DiscoverySortConfig } from './discovery-sort.config';
export class DefaultAppConfig implements AppConfig {
@@ -67,11 +68,34 @@ export class DefaultAppConfig implements AppConfig {
msToLive: {
default: 15 * 60 * 1000 // 15 minutes
},
control: 'max-age=60', // revalidate browser
// Cache-Control HTTP Header
control: 'max-age=604800', // revalidate browser
autoSync: {
defaultTime: 0,
maxBufferSize: 100,
timePerMethod: { [RestRequestMethod.PATCH]: 3 } as any // time in seconds
},
// In-memory cache of server-side rendered content
serverSide: {
debug: false,
// Cache specific to known bots. Allows you to serve cached contents to bots only.
// Defaults to caching 1,000 pages. Each page expires after 1 day
botCache: {
// Maximum number of pages (rendered via SSR) to cache. Setting max=0 disables the cache.
max: 1000,
// Amount of time after which cached pages are considered stale (in ms)
timeToLive: 24 * 60 * 60 * 1000, // 1 day
allowStale: true,
},
// Cache specific to anonymous users. Allows you to serve cached content to non-authenticated users.
// Defaults to caching 0 pages. But, when enabled, each page expires after 10 seconds (to minimize anonymous users seeing out-of-date content)
anonymousCache: {
// Maximum number of pages (rendered via SSR) to cache. Setting max=0 disables the cache.
max: 0, // disabled by default
// Amount of time after which cached pages are considered stale (in ms)
timeToLive: 10 * 1000, // 10 seconds
allowStale: true,
}
}
};
@@ -190,6 +214,7 @@ export class DefaultAppConfig implements AppConfig {
// When set to active, users will be able to switch to the use of this language in the user interface.
languages: LangConfig[] = [
{ code: 'en', label: 'English', active: true },
{ code: 'ca', label: 'Català', active: true },
{ code: 'cs', label: 'Čeština', active: true },
{ code: 'de', label: 'Deutsch', active: true },
{ code: 'es', label: 'Español', active: true },
@@ -387,6 +412,17 @@ export class DefaultAppConfig implements AppConfig {
mathjax: false,
};
// 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: FilterVocabularyConfig[] = [
{
filter: 'subject',
vocabulary: 'srsc',
enabled: false
}
];
// Configuration that determines the metadata sorting of community and collection edition and creation when there are not a search query.
collectionSelectionSort: DiscoverySortConfig = {
sortMetadata:"dc.title",