1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-12-25 04:53:06 +00:00

Fix title on load of Pleroma HTML

This commit is contained in:
Sean King 2020-11-08 16:16:20 -07:00
parent 294628d981
commit e4a21084f0

View file

@ -37,9 +37,11 @@ def redirector_with_meta(conn, params) do
tags = build_tags(conn, params)
preloads = preload_data(conn, params)
title = "<title>#{Pleroma.Config.get([:instance, :name])}</title>"
response =
index_content
|> String.replace(~r/<title>.+?<\/title>/, title)
|> String.replace("<!--server-generated-meta-->", tags <> preloads)
conn
@ -54,9 +56,11 @@ def redirector_with_preload(conn, %{"path" => ["pleroma", "admin"]}) do
def redirector_with_preload(conn, params) do
{:ok, index_content} = File.read(index_file_path())
preloads = preload_data(conn, params)
title = "<title>#{Pleroma.Config.get([:instance, :name])}</title>"
response =
index_content
|> String.replace(~r/<title>.+?<\/title>/, title)
|> String.replace("<!--server-generated-meta-->", preloads)
conn