Why don't people who create blogs with Phoenix, just use the HEEx templates to write blog posts?

I was converting your blog post to a LiveBook:

# One-to-Many LiveView Form

## Interactive Example

<!-- [KobrakaiWeb.OneToManyForm] -->

## The schema

To start from the beginning – we'll need a schema to power our form. There
are schemaless changesets, but the `Phoenix.HTML.Form` implementation for
changesets don't support nested forms using schemaless changesets. Given 
the example shown here is in memory only we'll be using an embedded schema,
but a database-backed schema works just as well.

Phoenix 1.7 added support for plain maps powering forms, which seems like a 
viable alternative as well. That option won't be discussed here as part 
of updating this blog post though.

defmodule GroceriesList do
  use Ecto.Schema

  embedded_schema do
    field(:email, :string)

    embeds_many :lines, Line, on_replace: :delete do
      field(:item, :string)
      field(:amount, :integer)
    end
  end
end

It gave similar output to the .md file, however, the metadata was getting removed or I have to put it in some markdown block, which placed it away from the top of the file.

---
title: "Unnest for runtime sorted results"
tags: 
  - blog
  - programmierung
language: EN
excerpt: |
  How to get a dynamic list of items into an ecto query without storing it in the database.
---

I don’t know if Nimble Publisher can read this metadata if those values are placed anywhere else.

Oh no, I won’t dare to do that yet.

I was just thinking if I can do basic live component integration like you have done.
And perhaps later we can have Kino-based Smart Cell to enable blog editor-like features.

The format I’m using doesn’t do anything in Livebook. I’m also using yaml based frontmatter due to the conversion from a previous static page system.

Generally I don’t think there’s a good livebook workflow around developing live view or live components atm. At some point I setup phoenix.livemd · GitHub, but that would be a lot nicer if setup as a smart cell and doesn’t deal with assets or any core_components one might want to use.

phoenix_storybook it currently a better tool to foster liveview development and iteration.

1 Like

In terms of static sites, blogs, etc., I have fallen in love with Eleventy/11ty. It’s versatile enough that it can do pretty much anything I throw at it (except talk to a database :wink: ).

For blog posts specifically, you can can use Markdown templates. There is even headless CMS integration so it can be used by non-programmer types. (I haven’t gone down that road yet, but I know it’s there!)

It’s a really great tool and I can’t recommend it enough.