@@ -9,14 +9,14 @@ let subnav_tabs
9
9
let first_section = List.hd sections in
10
10
let breadcrumb_options current =
11
11
let selected_option section = if section = current then "selected" else "" in
12
- let options_list option =
12
+ let options_list option =
13
13
<option value="<%s url_of_section option %>" <%s selected_option option %>>
14
14
<%s title_of_section option %>
15
- </option>
15
+ </option>
16
16
in
17
17
<nav aria-label="breadcrumbs" class="px-4 flex bg-title dark:bg-[#111827] text-white dark:text-dark-title md:hidden">
18
18
<ul>
19
- <li class="inline-block">
19
+ <li class="inline-block">
20
20
<a href="<%s url_of_section first_section %>" class="flex items-center px-2 py-2 border-transparent border-2 border-b-4"> <%s title %>
21
21
<span> <%s! Icons.chevron_right "w-3 h-3 ml-2" %> </span> </a>
22
22
</li>
@@ -47,13 +47,20 @@ let base
47
47
?(use_swiper=false)
48
48
?(banner = false)
49
49
?description
50
+ ?social_media_image
50
51
?styles
51
52
~title
52
53
?canonical
53
54
?alternate
54
55
?(active_top_nav_item: Header.nav_item option)
55
56
?(footer_html = "")
56
57
inner =
58
+ let social_media_image_url =
59
+ "https://ocaml.org" ^
60
+ match social_media_image with
61
+ | None -> Ocamlorg_static.Asset.url "ocaml_org_social_media.png"
62
+ | Some path -> path
63
+ in
57
64
<!DOCTYPE html>
58
65
<html lang="en">
59
66
<head id="htmx-head">
@@ -66,14 +73,14 @@ inner =
66
73
<% (match description with | Some description -> %>
67
74
<meta name="twitter:description" content="<%s description %>">
68
75
<% | None -> ()); %>
69
- <meta name="twitter:image" content="https://ocaml.org <%s Ocamlorg_static.Asset.url "ocaml_org_social_media.png" %>">
76
+ <meta name="twitter:image" content="<%s social_media_image_url %>">
70
77
<meta property="og:site_name" content="OCaml">
71
78
<meta property="og:type" content="object">
72
79
<meta property="og:title" content="<%s title %>">
73
80
<% (match description with | Some description -> %>
74
81
<meta property="og:description" content="<%s description %>">
75
82
<% | None -> ()); %>
76
- <meta name="og:image" content="https://ocaml.org <%s Ocamlorg_static.Asset.url "ocaml_org_social_media.png" %>">
83
+ <meta name="og:image" content="<%s social_media_image_url %>">
77
84
<meta name="theme-color" content="#fff" >
78
85
<meta name="color-scheme" content="white">
79
86
<% (match canonical with | Some canonical -> %>
0 commit comments