-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Describe the bug
When I create a website and recursively add the entire directory as content, the content-type of static files such as JS and CSS in the web server response is incorrect.
To Reproduce
When I create a website using the following command and recursively add the entire directory as content, the content-type of static files such as JS and CSS in the web server response is incorrect.
websites add-content --website portal-site --web-path / --content ./portal-site --recursive
This will cause the websites to fail to display the desired page layout:
The main file that affects the front-end rendering is /css/style.css.
Under normal circumstances, the content-type of these two types of files in a web response should be:
- css: "text/css; charset=utf-8"
- js: "text/javascript; charset=utf-8"
After I modified the content-type of /css/style.css using the following command, the front-end display worked correctly:
websites add-content --website portal-site --web-path /css/style.css --content ./portal-site/css/style.css --content-type "text/css; charset=utf-8"
However, sometimes I have many static CSS files, and I can't possibly modify their content-type one by one. So, could you please help me fix this?
Thank you!