mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-27 00:09:35 +00:00
Merge branch 'fix/html-title-load' into 'develop'
Fix title on load of Pleroma HTML, fixes #2281 Closes #2281 See merge request pleroma/pleroma!3125
This commit is contained in:
commit
d77fd6b3d0
|
@ -37,9 +37,11 @@ defmodule Pleroma.Web.Fallback.RedirectController 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 @@ defmodule Pleroma.Web.Fallback.RedirectController 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
|
||||
|
|
Loading…
Reference in a new issue