示例#1
0
        public IActionResult RebuildBlog(string id, string d, [FromServices] dbContext context) // call using e.g. : /Home/RebuildBlog/blog1?d=portfolio
        {
            var pageData = new JsonData(context);

            pageData.currentHost = HttpContext.Request.Host.Host;
            pageData.LoadJsonForPage("Index", _appEnvironment.ContentRootPath + "/wwwroot", null, d);

            BlogPage blogPage = new BlogPage();

            blogPage.RebuildBlog(_appEnvironment.ContentRootPath + "/wwwroot", id, pageData.currentSite.siteTag);

            return(View());
        }