Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Include external files (not libraries) in a project in Intellij

I have a project ‘P’ in directory ‘P’. I want the use a css file in ‘P’ but the css file is not in directory ‘P’. It is at one level above ‘P’. Could I still include/use the css file in ‘P’ without changing the directory structure or making a copy of the css file?

like image 662
Manu Chadha Avatar asked Nov 28 '25 18:11

Manu Chadha


1 Answers

Yes, you can add directories outside of the root project directory:

Project Structure → Modules → Sources → Add content root

enter image description here

Then after adding a directory, you can see it under your project root.

enter image description here

like image 58
Vojtech Ruzicka Avatar answered Dec 01 '25 08:12

Vojtech Ruzicka