adding meta tags for all pages (#1830)

This commit is contained in:
Ali Abdalla 2022-07-19 19:08:21 +02:00 committed by GitHub
parent 31ba09aafa
commit e7e8b6333c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 6 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

View File

@ -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">

View File

@ -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)

View File

@ -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">

View File

@ -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">

View File

@ -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">

View File

@ -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">