diff --git a/lib/chiya_web/components/layouts/root_public.html.heex b/lib/chiya_web/components/layouts/root_public.html.heex index 022b63c..ab002a2 100644 --- a/lib/chiya_web/components/layouts/root_public.html.heex +++ b/lib/chiya_web/components/layouts/root_public.html.heex @@ -38,7 +38,7 @@ - +
<.site_header user={@current_user} />
diff --git a/lib/chiya_web/indie/micropub_handler.ex b/lib/chiya_web/indie/micropub_handler.ex index 3b85217..01562f1 100644 --- a/lib/chiya_web/indie/micropub_handler.ex +++ b/lib/chiya_web/indie/micropub_handler.ex @@ -83,6 +83,13 @@ defmodule ChiyaWeb.Indie.MicropubHandler do with :ok <- Micropub.verify_token(access_token), {:ok, slug} <- Chiya.Notes.Note.note_slug(url), note <- Chiya.Notes.get_public_note_by_slug_preloaded!(slug) do + properties = %{ + "name" => [note.name], + "content" => [note.content], + "category" => Enum.map(note.tags, fn tag -> tag.name end), + "published" => note.published_at + } + filtered_note = Map.filter(note, fn {key, _val} -> Enum.member?(filter_properties, to_string(key))