mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-25 02:19:31 +00:00
Fix title on load of Pleroma HTML
This commit is contained in:
parent
294628d981
commit
e4a21084f0
|
@ -37,9 +37,11 @@ defmodule Pleroma.Web.Fallback.RedirectController do
|
||||||
|
|
||||||
tags = build_tags(conn, params)
|
tags = build_tags(conn, params)
|
||||||
preloads = preload_data(conn, params)
|
preloads = preload_data(conn, params)
|
||||||
|
title = "<title>#{Pleroma.Config.get([:instance, :name])}</title>"
|
||||||
|
|
||||||
response =
|
response =
|
||||||
index_content
|
index_content
|
||||||
|
|> String.replace(~r/<title>.+?<\/title>/, title)
|
||||||
|> String.replace("<!--server-generated-meta-->", tags <> preloads)
|
|> String.replace("<!--server-generated-meta-->", tags <> preloads)
|
||||||
|
|
||||||
conn
|
conn
|
||||||
|
@ -54,9 +56,11 @@ defmodule Pleroma.Web.Fallback.RedirectController do
|
||||||
def redirector_with_preload(conn, params) do
|
def redirector_with_preload(conn, params) do
|
||||||
{:ok, index_content} = File.read(index_file_path())
|
{:ok, index_content} = File.read(index_file_path())
|
||||||
preloads = preload_data(conn, params)
|
preloads = preload_data(conn, params)
|
||||||
|
title = "<title>#{Pleroma.Config.get([:instance, :name])}</title>"
|
||||||
|
|
||||||
response =
|
response =
|
||||||
index_content
|
index_content
|
||||||
|
|> String.replace(~r/<title>.+?<\/title>/, title)
|
||||||
|> String.replace("<!--server-generated-meta-->", preloads)
|
|> String.replace("<!--server-generated-meta-->", preloads)
|
||||||
|
|
||||||
conn
|
conn
|
||||||
|
|
Loading…
Reference in a new issue