Merge pull request #555 from gradio-app/aliabd/fixing-guides-url

Fixing guides url
This commit is contained in:
Abubakar Abid 2022-02-07 16:52:20 -05:00 committed by GitHub
commit 06ea64621e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -68,6 +68,9 @@ def render_guides_main():
with open("src/guides_main_template.html", encoding='utf-8') as template_file:
template = Template(template_file.read())
output_html = template.render(guides=guides, navbar_html=navbar_html)
os.makedirs(os.path.join("generated", "guides"), exist_ok=True)
with open(os.path.join("generated", "guides", "index.html"), "w", encoding='utf-8') as generated_template:
generated_template.write(output_html)
with open(os.path.join("generated", "guides.html"), "w", encoding='utf-8') as generated_template:
generated_template.write(output_html)

View File

@ -5,7 +5,7 @@
<nav class="flex gap-12 sm:gap-16">
<a class="link" href="/getting_started">⚡ Getting Started</a>
<a class="link" href="/docs">✍️ Docs</a>
<a class="link" href="/guides.html">💡 Guides</a>
<a class="link" href="/guides">💡 Guides</a>
<div class="group relative cursor-pointer font-semibold flex items-center gap-1" onClick="document.querySelector('.help-menu').classList.toggle('flex'); document.querySelector('.help-menu').classList.toggle('hidden');">
🖐 Community
<svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">