Skip to content

Commit

Permalink
src/app/core: update meta tags for CGSpace
Browse files Browse the repository at this point in the history
We use more DCTERMS than DC.
  • Loading branch information
alanorth committed Oct 13, 2024
1 parent a954880 commit 73fccf3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/app/core/metadata/metadata.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export class MetadataService {
*/
private setDescriptionTag(): void {
// TODO: truncate abstract
const value = this.getMetaTagValue('dc.description.abstract');
const value = this.getMetaTagValue('dcterms.abstract');
this.addMetaTag('description', value);
}

Expand All @@ -222,31 +222,31 @@ export class MetadataService {
* Add <meta name="citation_publication_date" ... > to the <head>
*/
private setCitationPublicationDateTag(): void {
const value = this.getFirstMetaTagValue(['dc.date.copyright', 'dc.date.issued', 'dc.date.available', 'dc.date.accessioned']);
const value = this.getFirstMetaTagValue(['dc.date.copyright', 'dcterms.issued', 'dcterms.available', 'dc.date.accessioned']);
this.addMetaTag('citation_publication_date', value);
}

/**
* Add <meta name="citation_issn" ... > to the <head>
*/
private setCitationISSNTag(): void {
const value = this.getMetaTagValue('dc.identifier.issn');
const value = this.getMetaTagValue('cg.issn');
this.addMetaTag('citation_issn', value);
}

/**
* Add <meta name="citation_isbn" ... > to the <head>
*/
private setCitationISBNTag(): void {
const value = this.getMetaTagValue('dc.identifier.isbn');
const value = this.getMetaTagValue('cg.isbn');
this.addMetaTag('citation_isbn', value);
}

/**
* Add <meta name="citation_language" ... > to the <head>
*/
private setCitationLanguageTag(): void {
const value = this.getFirstMetaTagValue(['dc.language', 'dc.language.iso']);
const value = this.getFirstMetaTagValue(['dcterms.language', 'dc.language.iso']);
this.addMetaTag('citation_language', value);
}

Expand All @@ -262,7 +262,7 @@ export class MetadataService {
* Add dc.publisher to the <head>. The tag name depends on the item type.
*/
private setCitationPublisherTag(): void {
const value = this.getMetaTagValue('dc.publisher');
const value = this.getMetaTagValue('dcterms.publisher');
if (this.isDissertation()) {
this.addMetaTag('citation_dissertation_institution', value);
} else if (this.isTechReport()) {
Expand All @@ -276,7 +276,7 @@ export class MetadataService {
* Add <meta name="citation_keywords" ... > to the <head>
*/
private setCitationKeywordsTag(): void {
const value = this.getMetaTagValuesAndCombine('dc.subject');
const value = this.getMetaTagValuesAndCombine('dcterms.subject');
this.addMetaTag('citation_keywords', value);
}

Expand Down Expand Up @@ -429,7 +429,7 @@ export class MetadataService {
}

private hasType(value: string): boolean {
return this.currentObject.value.hasMetadata('dc.type', { value: value, ignoreCase: true });
return this.currentObject.value.hasMetadata('dcterms.type', { value: value, ignoreCase: true });
}

/**
Expand Down

0 comments on commit 73fccf3

Please sign in to comment.