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
2
2
use ComponentsGuideWeb , :controller
3
3
4
4
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" )
6
8
end
7
9
8
10
@ articles [ "testing" , "forms" ]
Original file line number Diff line number Diff line change 9
9
< link rel = "stylesheet " href = "<%= Routes.static_path(@conn, " /css /app.css ") % > "/>
10
10
< link rel = "stylesheet " href = "https://cdn.jsdelivr.net/gh/RoyalIcing/tela@2d421cafc1ea99fab91aa4fcbf3b554160bcada5/tela.css " />
11
11
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 %> " >
13
22
14
23
< script defer type = "text/javascript " src = "<%= Routes.static_path(@conn, " /js /app.js ") % > "> </ script >
15
24
16
25
<!-- <script type="module" src="http://localhost:3000/js/app.js"></script>-->
17
26
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 %>
19
30
</ head >
20
31
< body >
21
32
<%= render ComponentsGuideWeb.LayoutView , "_banner.html" , path_info: @ conn . path_info %>
You can’t perform that action at this time.
0 commit comments