How to make theme changes permanent?

277 views
Skip to first unread message

Night Librarian

unread,
Oct 25, 2022, 11:30:53 PM10/25/22
to DSpace Technical Support
I apologize if it has been answered already, but I am not sure after reading DSpace 7.x Documentation how to make PM2 use the dspace theme that I touched up. 

Following the User Interface Customization instructions, I edited the dspace theme in development and it works fine, showing my introduction text, my organization's banner and an increased (from default 5) number of communities. That is, when I run it from the source directory:

/temp/dspace-angular-dspace-7.4$ sudo yarn start:dev

However, whe I run sudo pm2 start dspace-ui.json, I am shown the vanilla interface.

Following the instructions to set up a theme, I have updated three files in the following directories:

/temp/dspace-angular-dspace-7.4/src/themes/dspace/app/home-page/home-news/home-news.component.html (for introductory text)

/temp/dspace-angular-dspace-7.4/src/themes/dspace/assets/images/banner.jpg (replaced DSpace version with my organization's banner)

/temp/dspace-angular-dspace-7.4/config/config.dev.yml (changed  topLevelCommunityList's pageSize to 40)


Now, these changes are sitting in the temporary src directory.  Should I copy the html and jpg files to /dspace-angular/? If yes, where would they go?  In dist, there are browser and server directories, both with a rather similar structure:

/dspace-angular$ sudo tree

.

├── config

│   └── config.prod.yml

├── dist

│   ├── browser

│   │   ├── assets

│   │   │   ├── config.json

│   │   │   ├── custom

│   │   │   │   └── i18n

│   │   │   ├── dspace

│   │   │   │   └── images

│   │   │   │       ├── banner-half.jpg

│   │   │   │       ├── banner-half.webp

│   │   │   │       ├── banner.jpg

│   │   │   │       ├── banner-tall.jpg

│   │   │   │       ├── banner-tall.webp

│   │   │   │       ├── banner.webp

│   │   │   │       └── favicons

│   │   │   ├── fonts

│   │   │   ├── i18n

│   │   │   └── images

│   │   ├── base-theme.css

│   │   ├── custom-theme.css

│   │   ├── dspace-theme.css

│   │   ├── index.html

│   └── server

│       ├── assets

│       │   ├── custom

│       │   │   └── i18n

│       │   ├── dspace

│       │   │   └── images

│       │   │       ├── banner (copy).jpg

│       │   │       ├── banner-half.jpg

│       │   │       ├── banner-half.webp

│       │   │       ├── banner.jpg

│       │   │       ├── banner-tall.jpg

│       │   │       ├── banner-tall.webp

│       │   │       ├── banner.webp

│       │   │       └── favicons

│       │   ├── fonts

│       │   ├── i18n

│       │   └── images

│       ├── main.js

│       └── robots.txt

└── dspace-ui.json

Should I use the browser directory? 

Also, should I move my config.dev.yml content into /dspace-angular/config.prod.yml?  Is that where PM2 is getting its information?

Thank you in advance!

Night Librarian

unread,
Oct 31, 2022, 12:27:00 AM10/31/22
to DSpace Technical Support
I figured it out.

cd /temp/dspace-angular-dspace-7.4/
sudo yarn build:prod
cp -r dist /dspace-angular/
sudo systemctl restart tomcat9.service 

Reply all
Reply to author
Forward
0 new messages