_Layout.cshtml file is indeed the equivalent of a master page, which takes care of defining the basic HTML page being served, which includes the links to your stylesheet. But you shouldn't even need to make any changes in there, as long as you make sure your own CSS is called
main.css (if you want to use a fifferent file name, or even multiple, then you can of course also do that and modifly the
As I described in my blog post about DXA HTML design decisions, you can simply follow the following four steps to use an "external" HTML design:
- delete the Publish HTML Design Page (you can also delete the Component on it and its references, but simply unpublishing and deleting this page, makes the HTML design unavailable from the Broker database).
- deploy a
version.json file to the
/system/assets folder of your Web application, which contains the version number which is added to the URLs for static assets, i.e.:
/system/assets folder (as part of the deploy of the web application with its views)
- update the views in case you need the HTML to be non Bootstrap
Step #1 is optional (you can leave it behind as long as you make sure it is not published), but step #2 is mandatory!
This will give you an HTML design which you deploy as part of the web application, while still being able to utilize the browser/client side caching control of the static assets through the