fix: issue #3 slow rendering

This commit is contained in:
2026-07-05 10:26:21 +02:00
parent 1917043c10
commit fcc574428c
11 changed files with 896 additions and 234 deletions

View File

@@ -103,6 +103,13 @@ defmodule BDS.Rendering.Metadata do
order_by: [asc: translation.language]
)
alternate_links_from(post, translations, main_language)
end
@spec alternate_links_from(Post.t() | nil, [Translation.t()], String.t()) :: [map()]
def alternate_links_from(nil, _translations, _main_language), do: []
def alternate_links_from(%Post{} = post, translations, main_language) do
[
%{
href: LinksAndLanguages.post_path(post, nil),