mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-24 10:54:04 +08:00
adding meta tags for all pages (#1830)
This commit is contained in:
parent
31ba09aafa
commit
e7e8b6333c
BIN
website/homepage/src/assets/img/guides-meta.png
Normal file
BIN
website/homepage/src/assets/img/guides-meta.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 197 KiB |
BIN
website/homepage/src/assets/img/meta-image.png
Normal file
BIN
website/homepage/src/assets/img/meta-image.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 MiB |
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% with description="Gradio Documentation" %}
|
||||
{% with title="Gradio Docs", url="https://gradio.app/docs", image="/assets/img/meta-image.png", description="Browse Gradio Documentation and Examples" %}
|
||||
{% include "templates/meta.html" %}
|
||||
{% endwith %}
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
|
@ -114,7 +114,7 @@ def build_guides(output_dir, jinja_env):
|
||||
output_folder = os.path.join(output_dir, guide["name"])
|
||||
os.makedirs(output_folder)
|
||||
output_file = os.path.join(output_folder, "index.html")
|
||||
output = template.render(code={}, demos={}, spaces=guide["spaces"])
|
||||
output = template.render(code={}, demos={}, spaces=guide["spaces"], name=guide["name"], pretty_name=guide["pretty_name"])
|
||||
with open(output_file, "w") as index_html:
|
||||
index_html.write(output)
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% with description="Build & Share Delightful Machine Learning Apps" %}
|
||||
{% with title="Gradio Guides", url="https://gradio.app/guides", image="/assets/img/guides-meta.png", description="Step-by-Step Gradio Tutorials" %}
|
||||
{% include "templates/meta.html" %}
|
||||
{% endwith %}
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% with description="Build & Share Delightful Machine Learning Apps" %}
|
||||
{% with title=pretty_name, url="https://gradio.app/" + name, image="/assets/img/meta-image.png", description="A Step-by-Step Gradio Tutorial" %}
|
||||
{% include "templates/meta.html" %}
|
||||
{% endwith %}
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% with description="Build & Share Delightful Machine Learning Apps" %}
|
||||
{% with title="Gradio", url="https://gradio.app/", image="/assets/img/meta-image.png", description="Build & Share Delightful Machine Learning Apps" %}
|
||||
{% include "templates/meta.html" %}
|
||||
{% endwith %}
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
|
@ -12,7 +12,7 @@
|
||||
<meta name="twitter:creator" content="@Gradio">
|
||||
<meta name="twitter:title" content="{{ title }}">
|
||||
<meta name="twitter:description" content="{{ description }}.">
|
||||
<meta name="twitter:image" content="{{ image }}">
|
||||
<meta name="twitter:image" content="https://gradio.app/{{ image }}">
|
||||
|
||||
<link rel="icon" type="image/png" href="/assets/img/logo.png">
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
|
Loading…
Reference in New Issue
Block a user