summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-05-24 10:50:36 -0400
committerMichael <[email protected]>2017-05-24 10:50:36 -0400
commitc4a2dd41f0ae69a2f9b67ee213c6a7194f9eaa83 (patch)
tree7b77985578b0c3a898911538bf3d2001dd6a5351
parentc6788eac2c69876240646061cd95e39f47ea3e5f (diff)
downloadproject-unite-c4a2dd41f0ae69a2f9b67ee213c6a7194f9eaa83.tar.gz
project-unite-c4a2dd41f0ae69a2f9b67ee213c6a7194f9eaa83.tar.bz2
project-unite-c4a2dd41f0ae69a2f9b67ee213c6a7194f9eaa83.zip
Apply SEO for ShiftOS skins
-rw-r--r--Project-Unite/Controllers/SkinsController.cs1
-rw-r--r--Project-Unite/Models/Skin.cs4
-rw-r--r--Project-Unite/Views/Shared/_Layout.cshtml8
-rw-r--r--Project-Unite/Views/Skins/ViewSkin.cshtml2
4 files changed, 14 insertions, 1 deletions
diff --git a/Project-Unite/Controllers/SkinsController.cs b/Project-Unite/Controllers/SkinsController.cs
index 3f8da3c..33fc61e 100644
--- a/Project-Unite/Controllers/SkinsController.cs
+++ b/Project-Unite/Controllers/SkinsController.cs
@@ -61,6 +61,7 @@ namespace Project_Unite.Controllers
skin.PostedAt = DateTime.Now;
skin.FullDescription = model.LongDescription;
skin.UserId = User.Identity.GetUserId();
+ skin.Keywords = model.Keywords;
skin.VersionId = "";
string repoFolder = $"~/Uploads/{ACL.UserNameRaw(skin.UserId)}/SkinFiles";
string screenshotFolder = $"~/Uploads/{ACL.UserNameRaw(skin.UserId)}/Screenshots";
diff --git a/Project-Unite/Models/Skin.cs b/Project-Unite/Models/Skin.cs
index b860518..521fc54 100644
--- a/Project-Unite/Models/Skin.cs
+++ b/Project-Unite/Models/Skin.cs
@@ -17,7 +17,7 @@ namespace Project_Unite.Models
public string DownloadUrl { get; set; }
public string ScreenshotUrl { get; set; }
public DateTime PostedAt { get; set; }
-
+ public string Keywords { get; set; }
public Like[] Likes
{
get
@@ -57,6 +57,8 @@ namespace Project_Unite.Models
[MinLength(5, ErrorMessage = "You need to supply a valuable title.")]
public string Title { get; set; }
+ public string Keywords { get; set; }
+
[Required]
[MaxLength(500, ErrorMessage ="Your short description may not contain more than 500 characters.")]
public string ShortDescription { get; set; }
diff --git a/Project-Unite/Views/Shared/_Layout.cshtml b/Project-Unite/Views/Shared/_Layout.cshtml
index 353b7b3..3a1430d 100644
--- a/Project-Unite/Views/Shared/_Layout.cshtml
+++ b/Project-Unite/Views/Shared/_Layout.cshtml
@@ -27,7 +27,15 @@
<script src="@Url.Action("jquery.datetimepicker.js", "Scripts")"></script>
<link rel="stylesheet" href="~/Content/datetimepicker.css" />
@RenderSection("scripts", required: false)
+
<title>@ViewBag.Title &bull; ShiftOS</title>
+
+ <meta name="description" content="@ViewBag.Description" />
+ <meta name="keywords" content="@Model.Keywords" />
+ <meta property="og:title" content="@ViewBag.Title" />
+ <meta property="og:description" content="@ViewBag.Description" />
+
+
@Styles.Render("~/Content/css")
@Styles.Render("~/Content/bootstrap-theme.css")
@Styles.Render("~/Content/Site.css")
diff --git a/Project-Unite/Views/Skins/ViewSkin.cshtml b/Project-Unite/Views/Skins/ViewSkin.cshtml
index 996d02e..96dd541 100644
--- a/Project-Unite/Views/Skins/ViewSkin.cshtml
+++ b/Project-Unite/Views/Skins/ViewSkin.cshtml
@@ -1,6 +1,8 @@
@model Project_Unite.Models.Skin
@{
ViewBag.Title = Model.Name + " - Skin Repository";
+ ViewBag.Description = Model.ShortDescription;
+ ViewBag.Keywords = "shiftos, shift, shifting, shifted, shifter, " + Model.Keywords;
}
<h2>@Model.Name</h2>