File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
apps/components_guide_web/lib/components_guide_web Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,9 @@ defmodule ComponentsGuideWeb.ReactTypescriptController do
22 use ComponentsGuideWeb , :controller
33
44 def index ( conn , _params ) do
5- render ( conn , "index.html" , article: "tips" )
5+ conn
6+ |> assign ( :page_title , "React and TypeScript" )
7+ |> render ( "index.html" , article: "tips" )
68 end
79
810 @ articles [ "testing" , "forms" ]
Original file line number Diff line number Diff line change 99 < link rel = "stylesheet " href = "<%= Routes.static_path(@conn, " /css /app.css ") % > "/>
1010 < link rel = "stylesheet " href = "https://cdn.jsdelivr.net/gh/RoyalIcing/tela@2d421cafc1ea99fab91aa4fcbf3b554160bcada5/tela.css " />
1111
12- < meta property = "og:image " content = "https://stamp.vercel.app/api/poster?source=Components.Guide " >
12+ <%
13+ stamp_query = case assigns[:page_title] do
14+ nil - >
15+ "source = Components.Guide "
16+
17+ title - >
18+ URI.encode_query(source: "Components.Guide ", headline: title)
19+ end
20+ %>
21+ < meta property = "og:image " content = "https://stamp.vercel.app/api/poster?<%= stamp_query %> " >
1322
1423 < script defer type = "text/javascript " src = "<%= Routes.static_path(@conn, " /js /app.js ") % > "> </ script >
1524
1625 <!-- <script type="module" src="http://localhost:3000/js/app.js"></script>-->
1726
18- < script src = "https://cdn.usefathom.com/script.js " site = "LYHMLVID " defer > </ script >
27+ <%= if Mix . env ( ) == :prod do %>
28+ < script src = "https://cdn.usefathom.com/script.js " site = "LYHMLVID " defer > </ script >
29+ <% end %>
1930 </ head >
2031 < body >
2132 <%= render ComponentsGuideWeb.LayoutView , "_banner.html" , path_info: @ conn . path_info %>
You can’t perform that action at this time.
0 commit comments