mirror of
https://github.com/yawaflua/yaflay.ru.git
synced 2026-04-25 17:20:38 +03:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 24bb5cf21a | |||
| ebc91f07da | |||
| b3b570f56e | |||
| 5471ad08ba | |||
| 0fa9a491ae | |||
| 11cc55256f | |||
| 998d697622 | |||
| 6ff6867b70 |
@@ -1,12 +1,6 @@
|
|||||||
using Microsoft.AspNetCore.Hosting.StaticWebAssets;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Http;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using System.Net;
|
|
||||||
using System.Net.Http.Headers;
|
|
||||||
using System.Text;
|
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Text.Json.Nodes;
|
using System.Text.Json.Nodes;
|
||||||
using System.Xml.Schema;
|
|
||||||
|
|
||||||
namespace yaflay.ru.Новая_папка
|
namespace yaflay.ru.Новая_папка
|
||||||
{
|
{
|
||||||
@@ -40,11 +34,12 @@ namespace yaflay.ru.Новая_папка
|
|||||||
public async Task<IActionResult> fromGitHub(string? uri)
|
public async Task<IActionResult> fromGitHub(string? uri)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (uri == "Robots.txt") { return Ok("User-Agent: * \n Disallow: \"/*\""); }
|
if (uri == "Robots.txt") { return Ok("User-Agent: * \n Disallow: /*"); }
|
||||||
|
|
||||||
|
|
||||||
string? url = await getUrlFromGit(uri);
|
string? url = await getUrlFromGit(uri);
|
||||||
|
await Console.Out.WriteLineAsync(url == null ? "Null" : $"notNull {url}");
|
||||||
return Redirect(url != null ? url : uri);
|
return Redirect(url ?? "https://yaflay.ru/");
|
||||||
}
|
}
|
||||||
|
|
||||||
// GET: HomeController/Create
|
// GET: HomeController/Create
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
@page
|
||||||
|
@{
|
||||||
|
Layout = null;
|
||||||
|
this.Response.ContentType = "text/plain";
|
||||||
|
}
|
||||||
|
# /robots.txt file for http://www.hanselman.com/
|
||||||
|
User-agent: *
|
||||||
|
<environment include="Development,Staging">Disallow: /</environment>
|
||||||
|
<environment include="Production">Disallow: /* </environment>
|
||||||
@@ -6,7 +6,17 @@
|
|||||||
<title>@ViewData["Title"] - yaflay.ru</title>
|
<title>@ViewData["Title"] - yaflay.ru</title>
|
||||||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
|
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
|
||||||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
|
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
|
||||||
<link rel="stylesheet" href="~/yaflay.ru.styles.css" asp-append-version="true" />
|
<!-- <link rel="stylesheet" href="~/yaflay.ru.styles.css" asp-append-version="true" /> --!/>
|
||||||
|
<link type="application/json+oembed" href="~/json/oembed.json" />
|
||||||
|
<meta property="og:title" content="YaFlay ReadMe" />
|
||||||
|
<meta property="og:type" content="profile" />
|
||||||
|
<meta property="og:url" content="https://yaflay.ru/" />
|
||||||
|
<meta property="og:image" content="https://avatars.githubusercontent.com/u/93622229?v=4" />
|
||||||
|
<meta property="og:description"
|
||||||
|
content="Here you can learn about YaFlay: social networks, programming languages that he knows and his projects." />
|
||||||
|
<meta property="og:locale" content="en_US" />
|
||||||
|
<meta property="og:site_name" content="yaflay_readme" />
|
||||||
|
<meta property="profile:username" content="YaFlay" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
|
|||||||
+7
-2
@@ -1,5 +1,4 @@
|
|||||||
using Microsoft.Extensions.Options;
|
|
||||||
|
|
||||||
namespace yaflay.ru
|
namespace yaflay.ru
|
||||||
{
|
{
|
||||||
public class Startup
|
public class Startup
|
||||||
@@ -11,12 +10,18 @@ namespace yaflay.ru
|
|||||||
.AddEnvironmentVariables(prefix: "m.")
|
.AddEnvironmentVariables(prefix: "m.")
|
||||||
.AddJsonFile("appsettings.json", optional: true)
|
.AddJsonFile("appsettings.json", optional: true)
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
}
|
}
|
||||||
public void ConfigureServices(IServiceCollection services)
|
public void ConfigureServices(IServiceCollection services)
|
||||||
{
|
{
|
||||||
services.AddControllers();
|
services.AddControllers();
|
||||||
services.AddRouting();
|
services.AddRouting();
|
||||||
services.AddRazorPages();
|
services.AddRazorPages();
|
||||||
|
services.AddMvc()
|
||||||
|
.AddRazorPagesOptions(options =>
|
||||||
|
{
|
||||||
|
options.Conventions.AddPageRoute("/robots.txt", "/RobotsTxt");
|
||||||
|
});
|
||||||
//services.AddDirectoryBrowser();
|
//services.AddDirectoryBrowser();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,4 +7,6 @@
|
|||||||
"storespw": "https://github.com/PoopStore-Team",
|
"storespw": "https://github.com/PoopStore-Team",
|
||||||
"gh-team": "https://github.com/PoopStore-Team",
|
"gh-team": "https://github.com/PoopStore-Team",
|
||||||
"twitch": "https://twitch.tv/bebra_yaflay",
|
"twitch": "https://twitch.tv/bebra_yaflay",
|
||||||
|
"patreon": "https://patreon.com/yaflay",
|
||||||
|
"steam": "https://steamcommunity.com/id/bebra_YaFlay/"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"embeds": [
|
||||||
|
{
|
||||||
|
"type": "rich",
|
||||||
|
"url": "https://yaflay.ru/",
|
||||||
|
"title": "YaFlay ReadMe",
|
||||||
|
"description": "Here you can learn about YaFlay: social networks, programming languages that he knows and his projects.",
|
||||||
|
"thumbnail": {
|
||||||
|
"url": "https://avatars.githubusercontent.com/u/93622229?v=4",
|
||||||
|
"proxy_url": "https://avatars.githubusercontent.com/u/93622229?v=4",
|
||||||
|
"width": 1200,
|
||||||
|
"height": 1200
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
+1
-1
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||||||
# Visual Studio Version 17
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 17.6.33723.286
|
VisualStudioVersion = 17.6.33723.286
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "yaflay.ru", "yaflay.ru.csproj", "{3AA2FE9B-D1AF-4B12-B090-7E4529BA40E0}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "yaflay.ru", "yaflay.ru.csproj", "{3AA2FE9B-D1AF-4B12-B090-7E4529BA40E0}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
|||||||
Reference in New Issue
Block a user