mirror of
https://github.com/mxpv/podsync.git
synced 2024-05-11 05:55:04 +00:00
Improve SEO
This commit is contained in:
25
src/Podsync/Helpers/UrlExtensions.cs
Normal file
25
src/Podsync/Helpers/UrlExtensions.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -57,8 +57,10 @@ a {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.title p {
|
||||
.title h2 {
|
||||
max-width: 500px;
|
||||
font-weight: normal;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.login-block {
|
||||
|
||||
BIN
src/Podsync/wwwroot/img/og_image.png
Normal file
BIN
src/Podsync/wwwroot/img/og_image.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 89 KiB |
Reference in New Issue
Block a user