Added instance name customization

This commit is contained in:
Nicolas Constant 2021-01-20 01:13:39 -05:00
parent fa085e4949
commit acad52048a
No known key found for this signature in database
GPG key ID: 1E9F677FB01A5688
4 changed files with 28 additions and 23 deletions

View file

@ -4,9 +4,10 @@ You can configure some of BirdsiteLIVE's settings via environment variables (tho
## Logging ## Logging
* `Logging:Type` set the type of the logging and monitoring system, currently the only type supported is `insights` for *Azure Application Insights* (PR welcome to support other types) * `Logging:Type` (default: none) set the type of the logging and monitoring system, currently the only type supported is `insights` for *Azure Application Insights* (PR welcome to support other types)
* `Logging:InstrumentationKey` the instrumentation key for Azure Application Insights * `Logging:InstrumentationKey` the instrumentation key for Azure Application Insights
## Instance customization ## Instance customization
* `Instance:Name` (default: BirdsiteLIVE) the name of the instance
* `Instance:ResolveMentionsInProfiles` (default: true) to enable or disable mentions parsing in profile's description. Resolving it will consume more User's API calls since newly discovered account can also contain references to others accounts as well. On a big instance it is recommended to disable it. * `Instance:ResolveMentionsInProfiles` (default: true) to enable or disable mentions parsing in profile's description. Resolving it will consume more User's API calls since newly discovered account can also contain references to others accounts as well. On a big instance it is recommended to disable it.

View file

@ -2,6 +2,7 @@
{ {
public class InstanceSettings public class InstanceSettings
{ {
public string Name { get; set; }
public string Domain { get; set; } public string Domain { get; set; }
public string AdminEmail { get; set; } public string AdminEmail { get; set; }
public bool ResolveMentionsInProfiles { get; set; } public bool ResolveMentionsInProfiles { get; set; }

View file

@ -1,9 +1,11 @@
<!DOCTYPE html> @using Microsoft.Extensions.Configuration
@inject IConfiguration Configuration
<!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - BirdsiteLIVE</title> <title>@Configuration.GetSection("Instance")["Name"] - @ViewData["Title"]</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" /> <link rel="stylesheet" href="~/css/site.css" />
<link rel="stylesheet" href="~/css/birdsite.css" /> <link rel="stylesheet" href="~/css/birdsite.css" />
@ -12,7 +14,7 @@
<header> <header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3"> <nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
<div class="container"> <div class="container">
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">BirdsiteLIVE</a> <a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">@Configuration.GetSection("Instance")["Name"]</a>
@*<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent" @*<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation"> aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>

View file

@ -10,6 +10,7 @@
}, },
"AllowedHosts": "*", "AllowedHosts": "*",
"Instance": { "Instance": {
"Name": "BirdsiteLIVE",
"Domain": "domain.name", "Domain": "domain.name",
"AdminEmail": "me@domain.name", "AdminEmail": "me@domain.name",
"ResolveMentionsInProfiles": true "ResolveMentionsInProfiles": true