All Versions
- DSpace 7.x (Current Release)
- DSpace 8.x (Unreleased)
- DSpace 6.x (EOL)
- DSpace 5.x (EOL)
- More Versions...
...
In the "themes" section of your config/config.*.yml
configuration file, add (one or more) "headTags", pointing at the favicon file you want to use. For example:
Code Block |
---|
themes: # The default dspace theme - 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: # Insert <link rel="icon" href="assets/dspace/images/favicons/favicon.ico" sizes="any"/> into the <head> of the page. - tagName: link attributes: rel: icon href: assets/dspace/images/favicons/favicon.ico sizes: any # Insert <link rel="icon" href="assets/dspace/images/favicons/favicon.svg" type="image/svg+xml"/> into the <head> of the page. - tagName: link attributes: rel: icon href: assets/dspace/images/favicons/favicon.svg type: image/svg+xml # Insert <link rel="apple-touch-icon" href="assets/dspace/images/favicons/apple-touch-icon.png"/> into the <head> of the page. - tagName: link attributes: rel: apple-touch-icon href: assets/dspace/images/favicons/apple-touch-icon.png # Insert <link rel="manifest" href="assets/dspace/images/favicons/manifest.webmanifest"/> into the <head> of the page. - tagName: link attributes: rel: manifest href: assets/dspace/images/favicons/manifest.webmanifest |
headTags
section.The primary Home page content is all included in the source code under "src/app/home-page". The News section is specifically under "src/app/home-page/home-news".
Edit your theme's app/home-page/home-news/home-news.component.ts
file. Swap the "templateUrl" and "styleUrls" properties, based on which you want to modify in your theme.
Code Block | ||
---|---|---|
| ||
@Component({ selector: 'ds-home-news', // If you want to modify styles, then... // Uncomment the styleUrls which references the "home-news.component.scss" file in your theme's directory // and comment out the one that references the default "src/app/home-page/home-news/home-news.component.scss" styleUrls: ['./home-news.component.scss'], //styleUrls: ['../../../../../app/home-page/home-news/home-news.component.scss'], // If you want to modify HTML, then... // Uncomment the templateUrl which references the "home-news.component.html" file in your theme's directory // and comment out the one that references the default "src/app/home-page/home-news/home-news.component.html" templateUrl: './home-news.component.html' //templateUrl: '../../../../../app/home-page/home-news/home-news.component.html' }) |
home-news.component.html
or home-news.component.scss
or both.home-news.component.html
file will be empty by default. Copy over the default HTML code from src/app/home-page/home-news/home-news.component.html
into your version of this file.home-news.component.scss
file will be empty by default. Copy over the default Sass code from src/app/home-page/home-news/home-news.component.scss
into your version of this file.assets/images
folder. Then reference them at the /assets/[theme-name]/images/
URL path.The "simple" Item page is the default display for an Item (when you visit any item via a URL like [dspace.ui.url]/items/[uuid]). If you want to modify the metadata fields displayed on that page by default, that can be done quite easily.
src/app/item-page/simple/item-types/untyped-item/
" src/app/item-page/simple/item-types/publication/
"Here's the basics of modifying this page. The below examples assume you are working with a normal Item. But the same logic would work for modifying the Publication pages (you'd just need to modify it's HTML/CSS instead)
src/app/item-page/simple/item-types/untyped-item/untyped-item.component.html
" in your theme. This is where you place your changes.src/app/item-page/simple/item-types/untyped-item/untyped-item.component.scss
" in your theme. This is where you place your changes.Edit your theme's app/item-page/simple/item-types/untyped-item/untyped-item.component.ts
file. Swap the "templateUrl" and "styleUrls" properties, based on which you want to modify in your theme. Also, MAKE SURE the "@listableObjectComponent" is using your theme... the last parameter should be the name of your theme!
Code Block | ||
---|---|---|
| ||
// MAKE SURE that the final parameter here is the name of your theme. This one assumes your theme is named "custom".
@listableObjectComponent(Item, ViewMode.StandalonePage, Context.Any, 'custom')
@Component({
selector: 'ds-untyped-item',
// If you want to modify styles, then...
// Uncomment the styleUrls which references the "untyped-item.component.scss" file in your theme's directory
// and comment out the one that references the default in "src/app/"
styleUrls: ['./untyped-item.component.scss'],
//styleUrls: ['../../../../../../../app/item-page/simple/item-types/untyped-item/untyped-item.component.scss'],
// If you want to modify HTML, then...
// Uncomment the templateUrl which references the "untyped-item.component.html" file in your theme's directory
// and comment out the one that references the default "src/app/"
templateUrl: './untyped-item.component.html',
//templateUrl: '../../../../../../../app/item-page/simple/item-types/untyped-item/untyped-item.component.html',
}) |
untyped-item.component.html
or untyped-item.component.scss
or both.untyped-item
.component.html
file may be empty by default. Copy over the default HTML code from src/item-page/simple/item-types/untyped-item/untyped-item.component.html
into your version of this file.untyped-item
.component.scss
file may be empty by default. Copy over the default Sass code from src/item-page/simple/item-types/untyped-item/untyped-item.component
.scss
into your version of this file<ds-generic-item-page-field>
- This tag can be used to display the value of any metadata field (as a string). src/assets/i18n/en.json5
" file (or corresponding file depending on your language)<ds-item-page-uri-field>
- This tag can be used to display the value of any metadata field as an HTML link. (The value must already be a URL)<ds-generic-item-page-field>
above.<ds-item-page-date-field>
and <ds-item-page-abstract-field>
). These are currently separate components under "src/app/item-page/simple/field-components/specific-field/
" directories. They are hardcoded to use a specific metadata field and label, but you could customize the components in that location.NOTE: If your changes to the simple item page don't appear to be working, make sure that you have updated the eager-theme.module.ts
to load your custom theme as described in the "Getting Started" section above! This small change is REQUIRED for the untyped-item component to work in a custom theme. You also may wish to restart your dev server to ensure nothing is being cached.
...