defmodule MicrowavepropWeb.AlgoLive do @moduledoc "Renders `algo.md` as HTML at `/algo` — documents the scoring algorithm." use MicrowavepropWeb, :live_view @external_resource "algo.md" @algo_html "algo.md" |> File.read!() |> Microwaveprop.Markdown.to_html!() @impl true def mount(_params, _session, socket) do {:ok, assign(socket, page_title: "Algorithm", content: @algo_html)} end @impl true def render(assigns) do ~H"""
{raw(@content)}
""" end end