43 lines
2.0 KiB
C#
43 lines
2.0 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using PlotLine.Models;
|
|
using PlotLine.Services;
|
|
using System.Diagnostics;
|
|
|
|
namespace PlotLine.Controllers
|
|
{
|
|
[AllowAnonymous]
|
|
public class HomeController(IConfiguration configuration) : Controller
|
|
{
|
|
[HttpGet("/", Name = PublicRouteNames.Home)]
|
|
public IActionResult Index()
|
|
{
|
|
const string description = "PlotDirector helps authors organise characters, plot threads, timelines, story assets, relationships, and continuity so they can finish complex novels with confidence.";
|
|
var canonicalUrl = PublicSeo.AbsoluteUrl(configuration, "/");
|
|
ViewData["SeoTitle"] = "PlotDirector | Novel Planning Software for Authors";
|
|
ViewData["SeoDescription"] = description;
|
|
ViewData["SeoKeywords"] = "novel planning software, writing software, story planning app, author tools, plot tracking, character tracking, story timeline, novel organisation, fiction writing software, series writing software, continuity tracking, plot threads, story bible";
|
|
ViewData["CanonicalUrl"] = canonicalUrl;
|
|
ViewData["StructuredData"] = new[]
|
|
{
|
|
PublicSeo.JsonLd(new Dictionary<string, object?>
|
|
{
|
|
["@context"] = "https://schema.org",
|
|
["@type"] = "WebSite",
|
|
["name"] = "PlotDirector",
|
|
["url"] = PublicSeo.BaseUrl(configuration),
|
|
["description"] = "Novel planning and story organisation software for authors."
|
|
}),
|
|
PublicSeo.WebPageJsonLd(configuration, "WebPage", "PlotDirector", "/", description)
|
|
};
|
|
return View();
|
|
}
|
|
|
|
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
|
public IActionResult Error()
|
|
{
|
|
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
|
|
}
|
|
}
|
|
}
|