Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IA rework to create Develop and Deploy categories #1025

Merged
merged 6 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Do you want to add a new page to the docs?

1. First, decide which section the page should live in (Streamlit Library, Streamlit Community Cloud, or Knowledge Base).

2. Next, navigate to the relevant folder and subfolder within `content/` and create a `.md` file whose filename mirrors the title of the page. E.g. For a page titled "Create a component", navigate to `content/library/components/` and create a file named `create-component.md`.
2. Next, navigate to the relevant folder and subfolder within `content/` and create a `.md` file whose filename mirrors the title of the page. E.g. For a page titled "Create a component", navigate to `content/develop/concepts/custom-components/` and create a file named `create-component.md`.

### Structure of the `.md` file

Expand All @@ -159,12 +159,12 @@ Now that you've decided where the file should live and have named the file, it's

Every `.md` file has front matter at the very top that defines the page title which appears in the browser tab bar, and the URL slug which appears after the slash in `docs.streamlit.io/` and `localhost:3000/`.

E.g. For a page titled "Create a component" that should exist at `docs.streamlit.io/library/components/create`, the front matter at the top of `create-component.md` is:
E.g. For a page titled "Create a component" that should exist at `docs.streamlit.io/develop/concepts/custom-components/create`, the front matter at the top of `create-component.md` is:

```markdown
---
title: Create a Component
slug: /library/components/create
slug: /develop/concepts/custom-components/create
---
```

Expand Down Expand Up @@ -272,27 +272,27 @@ If you need to regenerate all function signatures, across all versions, delete t
Suppose a new Streamlit release includes a `st.my_chart` function that you want to include in the "Chart elements" section of the API Reference:

1. Run `make docstrings`
2. Create Markdown file (`my_chart.md`) in `content/library/api/charts/`
2. Create Markdown file (`my_chart.md`) in `content/develop/api/charts/`
3. Add the following to `my_chart.md`:

```markdown
---
title: st.my_chart
slug: /library/api-reference/charts/st.my_chart
slug: /develop/api-reference/charts/st.my_chart
---

<Autofunction function="streamlit.my_chart" />
```

4. Add the following under the "Chart elements" heading in `content/library/api/api-reference.md`:
4. Add the following under the "Chart elements" heading in `content/develop/api/api-reference.md`:
1. A RefCard MDX function containing the URL slug defined in `my_chart.md` . This is the card that will appear on the API Reference landing page.
2. An Image MDX function containing alt text and the location of the image to be displayed on the card.
3. A bold heading that will appear on the card (`#### Heading`). It appears below the card image.
4. A brief description of the `st.my_chart` . It appears below the card heading.
5. A code block illustrating how to use `st.my_chart`. It appears below the card description and has a Copy icon that when clicked copies the code block to the users' clipboard.

````markdown
<RefCard href="/library/api-reference/charts/st.my_chart">
<RefCard href="/develop/api-reference/charts/st.my_chart">
<Image pure alt="Tux, the Linux mascot" src="/img/data-table.png" />

#### My charts
Expand All @@ -310,7 +310,7 @@ Suppose a new Streamlit release includes a `st.my_chart` function that you want

```YAML
- category: Streamlit Library / API Reference / Chart elements / st.my_chart
url: /library/api-reference/charts/st.my_chart
url: /develop/api-reference/charts/st.my_chart
```

6. Save your changes and refresh the browser tab. If all went well, you should see a new entry in the Menu, a new card in the API Reference, and a new page for `st.my_chart`.
Expand Down
12 changes: 3 additions & 9 deletions components/navigation/navItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,9 @@ const NavItem = ({ page, slug, condensed, className }) => {
if (page.url.startsWith("/")) {
navItem = (
<li className={styles.NavItem} id={page.menu_key}>
{page.url === "/library" ? (
<a href={page.url} className="not-link">
{navBox}
</a>
) : (
<Link className="not-link" href={page.url}>
{navBox}
</Link>
)}
<Link className="not-link" href={page.url}>
{navBox}
</Link>
{subNav}
</li>
);
Expand Down
2 changes: 1 addition & 1 deletion components/summaryTiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const SummaryTiles = () => {
title="API reference"
text="Learn about our APIs, with actionable explanations of specific functions and features."
background="indigo-70"
link="/library/api-reference"
link="/develop/api-reference"
/>

<Tile
Expand Down
35 changes: 35 additions & 0 deletions content/deploy/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: Deploy
slug: /deploy
---

# Deploy

Get all the information you need to deploy your app and share it with your users.

<InlineCalloutContainer>
<InlineCallout
color="lightBlue-70"
icon="book"
bold="Concepts."
href="/deploy/concepts"
>Understand the basics of app deployment.</InlineCallout>
<InlineCallout
color="lightBlue-70"
icon="cloud"
bold="Streamlit Community Cloud."
href="/deploy/streamlit-community-cloud"
>Deploy your app on our free platform and join a community of developers who share their apps around the world.</InlineCallout>
<InlineCallout
color="lightBlue-70"
icon="ac_unit"
bold="Streamlit in Snowflake"
href="https://docs.snowflake.com/developer-guide/streamlit/about-streamlit"
>Deploy your app in Snowflake for a secure, enterprise-grade environment.</InlineCallout>
<InlineCallout
color="lightBlue-70"
icon="bolt"
bold="Other platforms."
href="/develop/quick-reference"
>Learn how to deploy your app on a variety of platforms with our convenient collection of tutorials.</InlineCallout>
</InlineCalloutContainer>
Original file line number Diff line number Diff line change
@@ -1,51 +1,45 @@
---
title: Streamlit Community Cloud
slug: /streamlit-community-cloud
slug: /deploy/streamlit-community-cloud
---

# Welcome to Streamlit Community Cloud

Deploy, manage, and share your Streamlit apps with the world in minutes &mdash; all for free. Your Streamlit Community Cloud account connects directly to your GitHub repository (public or private). Most apps will launch in only a few minutes. Streamlit Community Cloud handles all of the containerization so all you need to worry about is creating the app. Rapidly prototype, explore, and update apps by simply changing your code in GitHub. Most changes appear immediately!

Want to avoid the work of setting up a local development environment? Community Cloud can help you quickly configure a codespace to develop in the cloud. Whether it's your own deployed app or an app deployed from a public repository, it only takes a few clicks to start coding or editing a Streamlit app. See [Edit your app](/streamlit-community-cloud/manage-your-app/edit-your-app).
Want to avoid the work of setting up a local development environment? Community Cloud can help you quickly configure a codespace to develop in the cloud. Whether it's your own deployed app or an app deployed from a public repository, it only takes a few clicks to start coding or editing a Streamlit app. See [Edit your app](/deploy/streamlit-community-cloud/manage-your-app/edit-your-app).

If you haven't built your first Streamlit app yet, you can check out [Get started](/get-started) in our Streamlit library documentation or [Fork and edit a public app](/streamlit-community-cloud/get-started/fork-and-edit-a-public-app) from our <a href="https://streamlit.io/gallery" target="_blank">App gallery</a>. Check out [Community Cloud quickstart](/streamlit-community-cloud/get-started) to speed-run you through creating your account, deploying an example app, and editing it using GitHub Codespaces.
If you haven't built your first Streamlit app yet, you can check out [Get started](/get-started) in our Streamlit library documentation or [Fork and edit a public app](/deploy/streamlit-community-cloud/get-started/fork-and-edit-a-public-app) from our <a href="https://streamlit.io/gallery" target="_blank">App gallery</a>. Check out [Community Cloud quickstart](/deploy/streamlit-community-cloud/get-started) to speed-run you through creating your account, deploying an example app, and editing it using GitHub Codespaces.

<InlineCalloutContainer>
<InlineCallout
color="lightBlue-70"
icon="rocket_launch"
bold="Quickstart."
href="/streamlit-community-cloud/get-started"
>Create your account and deploy an example app as fast as possible. Jump right into coding with GitHub Codespaces.</InlineCallout>
<InlineCallout
color="lightBlue-70"
icon="arrow_forward"
bold="Get started."
href="/streamlit-community-cloud/get-started"
href="/deploy/streamlit-community-cloud/get-started"
>Learn about Streamlit Community Cloud accounts and how to create one.</InlineCallout>
<InlineCallout
color="lightBlue-70"
icon="flight_takeoff"
bold="Deploy your app."
href="/streamlit-community-cloud/deploy-your-app"
href="/deploy/streamlit-community-cloud/deploy-your-app"
>A step-by-step guide on how to get your app deployed.</InlineCallout>
<InlineCallout
color="lightBlue-70"
icon="share"
bold="Share your app."
href="/streamlit-community-cloud/share-your-app"
>Share or embed your app.</InlineCallout>
<InlineCallout
color="lightBlue-70"
icon="settings"
bold="Manage your app."
href="/streamlit-community-cloud/manage-your-app"
href="/deploy/streamlit-community-cloud/manage-your-app"
>Access logs, reboot apps, set favorites, and more. Jump into a GitHub Codespace to edit your app in the cloud.</InlineCallout>
<InlineCallout
color="lightBlue-70"
icon="share"
bold="Share your app."
href="/deploy/streamlit-community-cloud/share-your-app"
>Share or embed your app.</InlineCallout>
<InlineCallout
color="lightBlue-70"
icon="manage_accounts"
bold="Manage your account."
href="/streamlit-community-cloud/manage-your-account"
href="/deploy/streamlit-community-cloud/manage-your-account"
>Update your email, manage connections, or delete your account.</InlineCallout>
</InlineCalloutContainer>
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
---
title: Deploy your app
slug: /streamlit-community-cloud/deploy-your-app
slug: /deploy/streamlit-community-cloud/deploy-your-app
---

# Deploy your app

Streamlit Community Cloud lets you deploy your apps in just one click, and most apps will deploy in only a few minutes. If you don't have an app ready to deploy, fork or clone one from our <a href="https://streamlit.io/gallery" target="_blank">App gallery</a> — you can find apps for machine learning, data visualization, data exploration, A/B testing and more. You can also fork and deploy samples straight from the [New app button](/streamlit-community-cloud/get-started/explore-your-workspace#new-app-button). Once you've deployed your app, check out how you can [Edit your app with GitHub Codespaces](/streamlit-community-cloud/manage-your-app/edit-your-app#edit-your-app-with-github-codespaces).
Streamlit Community Cloud lets you deploy your apps in just one click, and most apps will deploy in only a few minutes. If you don't have an app ready to deploy, fork or clone one from our <a href="https://streamlit.io/gallery" target="_blank">App gallery</a> — you can find apps for machine learning, data visualization, data exploration, A/B testing and more. You can also fork and deploy samples straight from the [New app button](/deploy/streamlit-community-cloud/get-started/explore-your-workspace#new-app-button). Once you've deployed your app, check out how you can [Edit your app with GitHub Codespaces](/deploy/streamlit-community-cloud/manage-your-app/edit-your-app#edit-your-app-with-github-codespaces).

<Note>

If you want to deploy your app on a different cloud service, check out the [Deploy Streamlit apps](/knowledge-base/tutorials/deploy) article in our Knowledge Base.
If you want to deploy your app on a different cloud service, check out the [Deploy Streamlit apps](/deploy/tutorials) article in our Knowledge Base.

</Note>

## Add your app to GitHub

Streamlit Community Cloud launches apps directly from your GitHub repo, so your app code and dependencies need to be on GitHub before you try to deploy your app. For more information on how to specify dependencies, see [App dependencies](/streamlit-community-cloud/deploy-your-app/app-dependencies).
Streamlit Community Cloud launches apps directly from your GitHub repo, so your app code and dependencies need to be on GitHub before you try to deploy your app. For more information on how to specify dependencies, see [App dependencies](/deploy/streamlit-community-cloud/deploy-your-app/app-dependencies).

Your directory structure should look similar to this:

Expand All @@ -25,7 +25,7 @@ your-repository/
└── requirements.txt
```

If you are including any custom [Configuration](/library/advanced-features/configuration) or [Theming](/library/advanced-features/theming), make sure your config file is saved relative to the root of your repo. Within your repo, your config file should be named `.streamlit/config.toml`.
If you are including any custom [Configuration](/develop/concepts/configuration) or [Theming](/develop/concepts/configuration/theming), make sure your config file is saved relative to the root of your repo. Within your repo, your config file should be named `.streamlit/config.toml`.

```
your-repository/
Expand Down Expand Up @@ -61,7 +61,7 @@ Streamlit Community Cloud supports all released [versions of Python that are sti

</Note>

3. (Optional) If you are connecting to a data source or want to specify the Python version for your app, you can do that by clicking "**Advanced settings**" before you deploy the app. Learn more about [Secrets management](/streamlit-community-cloud/deploy-your-app/secrets-management).
3. (Optional) If you are connecting to a data source or want to specify the Python version for your app, you can do that by clicking "**Advanced settings**" before you deploy the app. Learn more about [Secrets management](/deploy/streamlit-community-cloud/deploy-your-app/secrets-management).

![Advanced settings for deploying your app](/images/streamlit-community-cloud/deploy-an-app-advanced.png)

Expand All @@ -73,13 +73,13 @@ Your app is now deploying and you can watch while it launches. Most apps take on

<Note>

The Streamlit Community Cloud logs on the right hand side of your app are only viewable to users with developer access to your repository. These logs help you debug any issues with the app. Learn more about [Streamlit Community Cloud logs](/streamlit-community-cloud/manage-your-app#streamlit-community-cloud-logs).
The Streamlit Community Cloud logs on the right hand side of your app are only viewable to users with developer access to your repository. These logs help you debug any issues with the app. Learn more about [Streamlit Community Cloud logs](/deploy/streamlit-community-cloud/manage-your-app#streamlit-community-cloud-logs).

</Note>

## Your app URL

That's it — you're done! Your app now has a unique subdomain URL that you can share with others. Read more about how to [Share your app](/streamlit-community-cloud/share-your-app) with viewers.
That's it — you're done! Your app now has a unique subdomain URL that you can share with others. Read more about how to [Share your app](/deploy/streamlit-community-cloud/share-your-app) with viewers.

### Unique subdomains

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: App dependencies
slug: /streamlit-community-cloud/deploy-your-app/app-dependencies
slug: /deploy/streamlit-community-cloud/deploy-your-app/app-dependencies
---

# App dependencies
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: Secrets management
slug: /streamlit-community-cloud/deploy-your-app/secrets-management
slug: /deploy/streamlit-community-cloud/deploy-your-app/secrets-management
---

# Secrets management

## Introduction

If you are [connecting to data sources](/knowledge-base/tutorials/databases), you will likely need to handle credentials or secrets. It's generally considered bad practice to store unencrypted secrets in a git repository. If your application needs access to sensitive credentials the recommended solution is to store those credentials in a file that is not committed to the repository and to pass them as environment variables.
If you are [connecting to data sources](/develop/tutorials/databases), you will likely need to handle credentials or secrets. It's generally considered bad practice to store unencrypted secrets in a git repository. If your application needs access to sensitive credentials the recommended solution is to store those credentials in a file that is not committed to the repository and to pass them as environment variables.

Secrets management allows you to store secrets securely and access them in your Streamlit app as environment variables.

Expand Down Expand Up @@ -61,7 +61,7 @@ st.write(

<Tip>

You can access `st.secrets` via attribute notation (e.g. `st.secrets.key`) or key notation (e.g. `st.secrets["key"]`) &mdash; just like [`st.session_state`](/library/api-reference/session-state).
You can access `st.secrets` via attribute notation (e.g. `st.secrets.key`) or key notation (e.g. `st.secrets["key"]`) &mdash; just like [`st.session_state`](/develop/api-reference/caching-and-state/st.session_state).

</Tip>

Expand Down Expand Up @@ -99,7 +99,7 @@ If you need to add or edit your secrets for an app that is already deployed, you

### Develop locally with secrets

When developing your app locally, add a file called `secrets.toml` in a folder called `.streamlit` at the root of your app repo, and copy/paste your secrets into that file. Further instructions are available in the Streamlit library [Secrets management](/library/advanced-features/secrets-management) documentation.
When developing your app locally, add a file called `secrets.toml` in a folder called `.streamlit` at the root of your app repo, and copy/paste your secrets into that file. Further instructions are available in the Streamlit library [Secrets management](/develop/concepts/connections/secrets-management) documentation.

<Important>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Get started
slug: /streamlit-community-cloud/get-started
title: Get started with Streamlit Community Cloud
slug: /deploy/streamlit-community-cloud/get-started
---

# Get started
# Get started with Streamlit Community Cloud

Welcome to Streamlit Community Cloud, where you can share your Streamlit apps with the world! Whether you've already created your first Streamlit app or you're just getting started, you're in the right place.

Expand All @@ -14,14 +14,14 @@ First things first, you need to create your Streamlit Community Cloud account to
icon="rocket_launch"
title="Quickstart"
text="Create your account and deploy an example app as fast as possible. Jump right into coding with GitHub Codespaces."
link="/streamlit-community-cloud/get-started"
link="/deploy/streamlit-community-cloud/get-started"
background="lightBlue-70"
/>
<Tile
icon="person"
title="Create your account"
text="See all the options and get complete explanations as you create your Streamlit Community Cloud account."
link="/streamlit-community-cloud/get-started/create-your-account"
link="/deploy/streamlit-community-cloud/get-started/create-your-account"
background="lightBlue-70"
/>
<Tile
Expand Down
Loading