Replies: 2 comments 2 replies
-
Yeah, I personally combine the two all the time. There's essentially two modes you might want to do this in:
In both cases, the solution setup looks similar: two projects, one for the ASP.NET Core site and another for Statiq. If code should be shared between the two (which I often do), a third library project to put the common code in helps as well. Then, depending on whether Statiq is solely responsible for the front-end (as in the first scenario above) or contributing static resources to an existing ASP.NET Core MVC site (as in the second), you can adjust the output folder where Statiq places the results of generation. For example, when using it to generate part of an ASP.NET Core MVC site, you might set the Statiq output directory to the static assets folder that ASP.NET MVC uses. Note that Statiq can also using files from other locations as well by setting up additional input paths (which all get "layered"). In that way you can have Statiq use the same Razor layouts and partials that you might be using for the dynamically generated ASP.NET Core MVC pages to keep everything consistent. |
Beta Was this translation helpful? Give feedback.
-
Does either of you have an example of this? I'm pretty new to web development and thus would love to see an example for better understanding this? |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm building a website with ASP.NET Core MVC, but apart from dynamic pages, there's gonna be quite a lot of pages that are just fine being static.
Since I'm new to this, I wanted to ask if it's possible (and if it's a good idea) to somehow incorporate Statiq into this to handle the static pages and let MVC do its thing.
Is it practical to try this, or is it a waste of time?
Beta Was this translation helpful? Give feedback.
All reactions