gradio/website
Abubakar Abid 4bee781da4
Guides Section and Redesign Parts of the Website (#490)
* added emojis to navbar; added guides main page

* Added guides list

* chatbot tutorial

* chatbot tutorial almost complete

* embedding chatbot

* fixed html rendering inside pre tags issue

* finished guide

* basic search

* search guides content

* design changes

* reading author and date

* sketchpad tutorial

* font change

* added version badge and spaces links

* sketch app

* auto meta images, removed date and author

* removed empty guides

* navbar separate; updated readme

* added navbar; fixed guide

* added flagging guide

* added related spaces to flagging guide

* added tags, small fixes

* footer design

Co-authored-by: Abubakar Abid <aaabid93@gmail.com>
Co-authored-by: Abubakar Abid <a12d@stanford.edu>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>
2022-02-05 01:42:49 +04:00
..
demos Format The Codebase 2022-01-21 16:44:12 +03:00
homepage Guides Section and Redesign Parts of the Website (#490) 2022-02-05 01:42:49 +04:00
upload_notebooks Format The Codebase 2022-01-21 16:44:12 +03:00
.gitignore Website: WIP (#328) 2021-12-13 22:02:19 -08:00
docker-compose.yml Website: WIP (#328) 2021-12-13 22:02:19 -08:00
gradio.nginx.conf fix gradio web embeds 2021-12-22 08:45:23 +00:00
package-lock.json Website: WIP (#328) 2021-12-13 22:02:19 -08:00
README.md Update README.md 2022-01-19 15:37:30 -06:00
reload_website.sh fix website reloader 2021-12-16 19:41:14 -08:00

The Gradio Website

The Gradio website (https://gradio.app) is built from the contents of this folder. The website is tightly coupled with the rest of the repository through several ways:

  • The gradio library used to run the demos throughout the website is built from the library in the gradio folder of this repository
  • The demos are loaded from the gradio/demo folder
  • The guide pages are loaded from the gradio/guides folder
  • The documentation is loaded from the docstrings in the library itself.

The website is launched through the docker-compose.yml file in this directory.

The homepage docker

The homepage folder builds the static content of the website into standalone files, served by nginx in docker. For development purposes, instead of running docker to test changes, follow these steps in the gradio/website/homepage folder.

  • npm install
  • npm run build (or npm run start for automatic reload on change).

The website will be built in the gradio/website/homepage/dist directory. You can run a development server from this directory to launch the homepage, e.g. python -m http.server. See gradio/website/homepage/package.json for build steps.

The demos docker

The demos folder launches all the demos embedded inside the website. The demos are loaded from the gradio/demo folder.

The upload_notebooks folder

The upload_notebooks folder runs a script that uploads the demos within gradio/demo to Google Colab. The links generated from uploading these files are then stored in the docker env file, which is then used by the homepage docker container to link to the Colab notebooks from the documentation.

Auto-Reloading

The website is built from the master branch and automatically reloads on commits to master.