22 Commits

Author SHA1 Message Date
Дмитрий Шиманский 24bb5cf21a add opengraph 2023-10-22 13:29:29 +03:00
Дмитрий Шиманский ebc91f07da delete oembed and fix robots.txt 2023-10-22 13:13:17 +03:00
Дмитрий Шиманский b3b570f56e rework oembed, because he didn`t work as well 2023-10-22 13:10:43 +03:00
Дмитрий Шиманский 5471ad08ba add providers to oembed, add robots.txt 2023-10-22 01:51:58 +03:00
Дмитрий Шиманский 0fa9a491ae Merge branch 'master' of https://github.com/YaFlay/yaflay.ru 2023-10-22 01:38:17 +03:00
Дмитрий Шиманский 11cc55256f make oembed 2023-10-22 01:38:12 +03:00
Dima YaFlay 998d697622 Update redirect_uris.json 2023-10-21 13:16:12 +03:00
Dima YaFlay 6ff6867b70 Update redirect_uris.json 2023-10-20 18:29:42 +03:00
Dima YaFlay 8b5b7cd352 Update redirect_uris.json 2023-10-20 18:20:17 +03:00
Дмитрий Шиманский 83b8c22acf Merge branch 'master' of https://github.com/YaFlay/yaflay.ru 2023-10-20 18:19:48 +03:00
Дмитрий Шиманский abdf1da3d5 Fix bug 2023-10-20 18:19:44 +03:00
Dima YaFlay 489633a7a6 Update redirect_uris.json 2023-10-20 18:11:26 +03:00
Dima YaFlay 820d8b8f8b Update redirect_uris.json 2023-10-20 18:10:36 +03:00
Dima YaFlay 22851d0465 Update redirect_uris.json 2023-10-20 18:09:20 +03:00
Dima YaFlay a894a2e89e Change env to secrets for worked file 2023-10-20 17:59:45 +03:00
Dima YaFlay c113ce00fe Update docker-image.yml 2023-10-20 17:57:14 +03:00
Дмитрий Шиманский 94003f20e1 Create autosave readme from github readme 2023-10-20 17:54:24 +03:00
Dima YaFlay 6a899555c6 Update README.md 2023-10-20 17:30:28 +03:00
Dima YaFlay b7db39fd90 Update redirect_uris.json 2023-10-19 23:30:32 +03:00
Dima YaFlay 36380be715 Update docker-image.yml 2023-10-19 23:00:33 +03:00
Dima YaFlay b0f0d58dcd Update docker-image.yml 2023-10-19 22:59:14 +03:00
Dima YaFlay c7eff1632f Update docker-image.yml 2023-10-19 22:57:20 +03:00
10 changed files with 85 additions and 68 deletions
+6 -2
View File
@@ -3,6 +3,10 @@ name: Publish Docker image
on: on:
release: release:
types: [published] types: [published]
push:
types: [latest]
pull_request:
types: [latest]
jobs: jobs:
push_to_registries: push_to_registries:
@@ -16,13 +20,13 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Log in to Docker Hub - name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a uses: docker/login-action@v2
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry - name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 uses: docker/login-action@v2
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
+10 -11
View File
@@ -1,11 +1,6 @@
using Microsoft.AspNetCore.Hosting.StaticWebAssets; using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Http; using System.Text.Json;
using Microsoft.AspNetCore.Mvc;
using System.Net;
using System.Net.Http.Headers;
using System.Text;
using System.Text.Json.Nodes; using System.Text.Json.Nodes;
using System.Xml.Schema;
namespace yaflay.ru.Новая_папка namespace yaflay.ru.Новая_папка
{ {
@@ -21,7 +16,10 @@ namespace yaflay.ru.Новая_папка
HttpClient client = new(); HttpClient client = new();
HttpResponseMessage getter = await client.GetAsync("https://raw.githubusercontent.com/YaFlay/yaflay.ru/master/redirect_uris.json"); HttpResponseMessage getter = await client.GetAsync("https://raw.githubusercontent.com/YaFlay/yaflay.ru/master/redirect_uris.json");
await Console.Out.WriteLineAsync(await getter.Content.ReadAsStringAsync()); await Console.Out.WriteLineAsync(await getter.Content.ReadAsStringAsync());
JsonNode allFile = JsonNode.Parse(await getter.Content.ReadAsStringAsync()); JsonNodeOptions jsonNodeOptions = new ();
JsonDocumentOptions jsonDocumentOptions = new();
jsonDocumentOptions.AllowTrailingCommas = true;
JsonNode allFile = JsonNode.Parse(await getter.Content.ReadAsStringAsync(), jsonNodeOptions, jsonDocumentOptions);
return (string?)allFile[baseUrl]; return (string?)allFile[baseUrl];
} }
catch (Exception except) catch (Exception except)
@@ -36,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
+8 -47
View File
@@ -1,53 +1,14 @@
@page @page
@model IndexModel @model IndexModel
@using System.Net.Http;
@{ @{
ViewData["Title"] = "YaFlay"; ViewData["Title"] = "YaFlay";
} }
<h3 align="left" class="readme" >README.md</h3>
<div class="text">
<p align='center'>
<img src='https://user-images.githubusercontent.com/5713670/87202985-820dcb80-c2b6-11ea-9f56-7ec461c497c3.gif' width='200'>
</p>
<h1 align="center">Hi there, I'm <a href="https://yaflay.ru/shitpost" target="_blank">YaFlay</a>
<img src="https://github.com/blackcater/blackcater/raw/main/images/Hi.gif" height="32"/></h1>
<h3 align="center"> .NET / Py backend-developer from Russian capital - Moscow 🇷🇺</h3>
<p align="left"> I use this frameworks and apps: </p>
<p align="center">
<img src="https://img.shields.io/badge/postgres-%23316192.svg?style=for-the-badge&logo=postgresql&logoColor=white">
<img src="https://img.shields.io/badge/.NET-5C2D91?style=for-the-badge&logo=.net&logoColor=white">
<img src="https://img.shields.io/badge/django-%23092E20.svg?style=for-the-badge&logo=django&logoColor=white">
<img src="https://img.shields.io/badge/flask-%23000.svg?style=for-the-badge&logo=flask&logoColor=white">
<img src="https://img.shields.io/badge/jquery-%230769AD.svg?style=for-the-badge&logo=jquery&logoColor=white">
<img src="https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white">
<img src="https://img.shields.io/badge/nginx-%23009639.svg?style=for-the-badge&logo=nginx&logoColor=white">
</p>
<p align="left">I use or know these languages:</p>
<p align="center">
<img src="https://img.shields.io/badge/c%23-%23239120.svg?style=for-the-badge&logo=c-sharp&logoColor=white">
<img src="https://img.shields.io/badge/c++-%2300599C.svg?style=for-the-badge&logo=c%2B%2B&logoColor=white">
<img src="https://img.shields.io/badge/java-%23ED8B00.svg?style=for-the-badge&logo=openjdk&logoColor=white">
<img src="https://img.shields.io/badge/javascript-%23323330.svg?style=for-the-badge&logo=javascript&logoColor=white">
<img src="https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=white">
</p>
<p align="left">My social networks:</p>
<p align="center">
<a href="https://discord.gg/bump-1119294432949325955"><img src="https://img.shields.io/badge/Discord-%235865F2.svg?style=for-the-badge&logo=discord&logoColor=white"></a>
<a href="https://t.me/yaflay_shitposts"><img src="https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white"></a>
<a href="https://twitch.tv/bebra_yaflay"><img src="https://img.shields.io/badge/Twitch-%239146FF.svg?style=for-the-badge&logo=Twitch&logoColor=white"></a>
<a href="https://github.com/YaFlay" class="hiden"><img src="https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white" /></a>
<a href="https://github.com/PoopStore-Team" class="overflow-hidden"><img src="https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white" /> <span class="visually-hidden-focusable">StoreSpw</span></a>
</p> <h3 align="left" class="readme" >README.md</h3>
<p align="left">For support me:</p> @{
<p align="center"> <a href="https://boosty.to/yaflay" align="left"><img src="https://img.shields.io/badge/sponsor-30363D?style=for-the-badge&logo=GitHub-Sponsors&logoColor=#EA4AAA" ></a></p> HttpClient client = new();
<p align="left"> My stats: </p> string Github_readme = client.GetStringAsync("https://raw.githubusercontent.com/YaFlay/YaFlay/master/README.md").Result;
<p align="center" class="stats streak"><a href="https://git.io/streak-stats" ><img src="http://github-readme-streak-stats.herokuapp.com?user=YaFlay&theme=dark&hide_border=true&locale=ru&date_format=j%20M%5B%20Y%5D&sideLabels=EB5454" alt="GitHub Streak" class="stats" align="middle" /></a></p> <div class="text"> @Html.Raw(Github_readme) </div>
<p align="left"> My top-using languages: </p> }
<p align="center" class="stats github"> <img src="https://github-readme-stats.vercel.app/api?username=YaFlay&layout=compact&bg_color=22272E&text_color=9F9F9F" class="stats"></p>
<p align="center" class="stats top_language"> <img src="https://github-readme-stats.vercel.app/api/top-langs/?username=YaFlay&layout=compact&bg_color=22272E&text_color=9F9F9F" class="stats" ></p>
<p align="center">
🌱 Im currently learning Java and wanna learn Front-end(CSS, React)
</p><p align="center">
📫 If u wanna help, contact me in Discord: <a href="https://discord.com/users/945317832290336798">YaFlay</a>
</p>
</div>
+9
View File
@@ -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>
+11 -1
View File
@@ -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>
+2
View File
@@ -1,2 +1,4 @@
# Hello, there! # Hello, there!
This is my custom redirector, used in my profile, with url: [yaflay.ru](https://yaflay.ru/) This is my custom redirector, used in my profile, with url: [yaflay.ru](https://yaflay.ru/)
![Docker release](https://img.shields.io/docker/v/yaflay/yaflay.ru/latest?style=for-the-badge&logo=docker&color=%235865F2)
+7 -2
View File
@@ -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();
+12 -1
View File
@@ -1 +1,12 @@
{ "github": "https://github.com/YaFlay" } {
"github": "https://github.com/YaFlay",
"gh": "https://github.com/YaFlay",
"bump": "https://discord.gg/bump-1119294432949325955",
"shitpost": "https://t.me/yaflay_shitposts",
"boosty": "https://boosty.to/yaflay",
"storespw": "https://github.com/PoopStore-Team",
"gh-team": "https://github.com/PoopStore-Team",
"twitch": "https://twitch.tv/bebra_yaflay",
"patreon": "https://patreon.com/yaflay",
"steam": "https://steamcommunity.com/id/bebra_YaFlay/"
}
+16
View File
@@ -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
View File
@@ -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