Skip to content

Conversation

@sfc-gh-tteixeira
Copy link
Contributor

@sfc-gh-tteixeira sfc-gh-tteixeira commented Sep 16, 2025

📚 Context

llms.txt is an up-and-coming standard that aims to make it easier for LLMs to consume websites. See https://llmstxt.org/ for more.

This PR introduces an llms.txt for Streamlit's docs, which gets autogenerated when the site is published.

You can view the autogenerated llms.txt in this PR's deploy preview:
https://deploy-preview-1338--streamlit-docs.netlify.app/llms.txt

🧠 Description of Changes

  • Adds a script generate_llms_txt.py to generate /public/llms.txt
    • Adds a new property to markdown frontmatter:
      • description: a string description of the menu item, to be shown in llms.txt
    • Adds a few properties to menu.md:
      • description: a string description of the menu item, to be shown in llms.txt if the markdown frontmatter doesn't already have a description.
      • visible_to_llms: if present, then this menu item will only appear in llms.txt if this is True. If not present, then visible dictates whether the item appears.
  • Removes generate_content_catalog.py since that's no longer needed for the AI assistant demo (https://demo-ai-assistant.streamlit.app/).

💥 Impact

Size:

  • Small
  • Not small

🌐 References

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

Also removes `generate_content_catalog.py` since that's no longer needed
for the AI assistant demo (https://demo-ai-assistant.streamlit.app/).
@sfc-gh-tteixeira sfc-gh-tteixeira marked this pull request as ready for review September 16, 2025 00:44
@sfc-gh-tteixeira sfc-gh-tteixeira requested a review from a team as a code owner September 16, 2025 00:44
@sfc-gh-dmatthews
Copy link
Contributor

I would prefer not to introduce duplicate information by putting meta data in menu.md. I have branch I'm reviewing that will update all MD files to have description and keywords in their frontmatter. (I've generated descriptions for everything except the knowledge base and am reading through all of them to tweak.) It's not as good for maintenance to separate the description from the page contents, so I'd like to pull the description from the frontmatter instead of menu.md.

@sfc-gh-tteixeira
Copy link
Contributor Author

Ok, now the script supports having description: in the markdown frontmatter. If not present, then the description field from menu.md will be used (if present).

@sfc-gh-dmatthews
Copy link
Contributor

I took the liberty of tweaking the format of the header lines so the result looks pretty if you view it as Markdown.

@sfc-gh-dmatthews sfc-gh-dmatthews merged commit acc0676 into main Sep 19, 2025
4 checks passed
@sfc-gh-dmatthews sfc-gh-dmatthews deleted the llms-txt-gen branch September 19, 2025 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants