openhands openhands commited on
Commit
f600f52
·
1 Parent(s): 3792b39

Add Open Graph meta tags for social media previews

Browse files

- Title: OpenHands Index
- Description: A Holistic Benchmark for Software Engineering
- Preview image: OpenHands logo

Co-authored-by: openhands <openhands@all-hands.dev>

Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -39,6 +39,19 @@ logger.info(f"All modules imported (LOCAL_DEBUG={LOCAL_DEBUG})")
39
 
40
  api = HfApi()
41
  LOGO_PATH = "assets/logo.svg"
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  # JavaScripts
43
  scroll_script = """
44
  <script>
@@ -247,7 +260,7 @@ logger.info("Creating Gradio application")
247
  demo = gr.Blocks(
248
  theme=theme,
249
  css=final_css,
250
- head=scroll_script + redirect_script + tooltip_script,
251
  title="OpenHands Index",
252
  )
253
 
 
39
 
40
  api = HfApi()
41
  LOGO_PATH = "assets/logo.svg"
42
+ # Open Graph / Social Media Preview Meta Tags
43
+ og_meta_tags = """
44
+ <meta property="og:title" content="OpenHands Index" />
45
+ <meta property="og:description" content="A Holistic Benchmark for Software Engineering" />
46
+ <meta property="og:image" content="https://index.openhands.dev/file=assets/openhands_logo_color_forwhite.png" />
47
+ <meta property="og:url" content="https://index.openhands.dev" />
48
+ <meta property="og:type" content="website" />
49
+ <meta name="twitter:card" content="summary_large_image" />
50
+ <meta name="twitter:title" content="OpenHands Index" />
51
+ <meta name="twitter:description" content="A Holistic Benchmark for Software Engineering" />
52
+ <meta name="twitter:image" content="https://index.openhands.dev/file=assets/openhands_logo_color_forwhite.png" />
53
+ """
54
+
55
  # JavaScripts
56
  scroll_script = """
57
  <script>
 
260
  demo = gr.Blocks(
261
  theme=theme,
262
  css=final_css,
263
+ head=og_meta_tags + scroll_script + redirect_script + tooltip_script,
264
  title="OpenHands Index",
265
  )
266