1
0
mirror of https://github.com/mxpv/podsync.git synced 2024-05-11 05:55:04 +00:00

Improve SEO

This commit is contained in:
Maksym Pavlenko
2016-12-22 13:51:02 -08:00
parent ddc1cdf4b3
commit e40becede6
5 changed files with 39 additions and 5 deletions

View File

@@ -0,0 +1,25 @@
using System;
using Microsoft.AspNetCore.Mvc;
namespace Podsync.Helpers
{
public static class UrlExtensions
{
/// <summary>
/// Generates a fully qualified URL to the specified content by using the specified content path.
/// Converts a virtual (relative) path to an application absolute path.
/// See http://stackoverflow.com/questions/30755827/getting-absolute-urls-using-asp-net-core-mvc-6
/// </summary>
/// <param name="url"></param>
/// <param name="contentPath"></param>
/// <returns></returns>
public static string AbsoluteContent(this IUrlHelper url, string contentPath)
{
var request = url.ActionContext.HttpContext.Request;
var baseUri = new Uri($"{request.Scheme}://{request.Host.Value}");
var fullUri = new Uri(baseUri, url.Content(contentPath));
return fullUri.ToString();
}
}
}

View File

@@ -2,10 +2,10 @@
<div class="title">
<h1>Podsync</h1>
<p>
<h2>
Simple and free service that lets you listen to any YouTube or
Vimeo channels, playlists or user videos in podcast format.
</p>
</h2>
<div class="login-block">
<h5>Login to unlock Patreon features <i class="fa fa-question-circle" aria-hidden="true"></i></h5>
@@ -52,7 +52,7 @@
<div>
<a href="https://www.patreon.com/podsync" target="_blank">
<img class="patreon shadow" width="400" src="img/become_patreon.png" />
<img class="patreon shadow" width="400" src="img/become_patreon.png" alt="Become my patron on Patreon" />
</a>
</div>

View File

@@ -1,10 +1,17 @@
<!DOCTYPE html>
@using Podsync.Helpers
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
<meta charset="utf-8"/>
<title>Podsync - Turn YouTube channels into podcast feeds</title>
<meta property="og:title" content="Podsync - turn YouTube channels into podcast feeds" />
<meta property="og:description" content="Simple and free service that lets you listen to any YouTube or Vimeo channels, playlists or user videos in podcast format" />
<meta property="og:locale" content="en_US" />
<meta property="og:image" content="@Url.AbsoluteContent("~/img/og_image.png")" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Simple and free service that lets you listen to any YouTube or Vimeo channels, playlists or user videos in podcast format"/>
<environment Names="Development">
<link rel="stylesheet" href="css/site.css" asp-append-version="true" />

View File

@@ -57,8 +57,10 @@ a {
margin: 0;
}
.title p {
.title h2 {
max-width: 500px;
font-weight: normal;
font-size: 1em;
}
.login-block {

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB