diff --git a/website/build.py b/website/build.py index f434e85c..611c3952 100644 --- a/website/build.py +++ b/website/build.py @@ -394,6 +394,7 @@ def build_llms_txt( *, readme_text: str, subtitle: str, + build_date: str, stars_data: dict[str, dict], downloads_data: dict[str, int], categories: Sequence[ParsedSection], @@ -411,6 +412,7 @@ def build_llms_txt( text_env = Environment(autoescape=False, trim_blocks=True, lstrip_blocks=True) rendered = text_env.from_string(template_text).render( subtitle=subtitle, + build_date=build_date, site_url=SITE_URL, github_repo_url="https://github.com/vinta/awesome-python", contributing_url="https://github.com/vinta/awesome-python/blob/master/CONTRIBUTING.md", @@ -763,6 +765,7 @@ def build(repo_root: Path) -> None: llms_template, readme_text=readme_text, subtitle=subtitle, + build_date=build_date.strftime("%Y/%m/%d"), stars_data=stars_data, downloads_data=downloads_data, categories=categories, diff --git a/website/templates/llms.txt b/website/templates/llms.txt index e199bd27..c29782d8 100644 --- a/website/templates/llms.txt +++ b/website/templates/llms.txt @@ -2,7 +2,7 @@ {{ subtitle }} -{{ total_entries }} projects across {{ total_categories }} {% if total_categories == 1 %}category{% else %}categories{% endif %}. +{{ total_entries }} projects across {{ total_categories }} {% if total_categories == 1 %}category{% else %}categories{% endif %}, updated on {{ build_date }}. Scan the category index, then jump to the matching section for direct project links and short descriptions. Entries end with `PyPI downloads/month: N` (last 30 days, mirrors and CI included) and `GitHub stars: N` notes in parentheses where known; treat both as popularity context, not a quality guarantee. Use the homepage for project context outside the shortlist. diff --git a/website/tests/test_build.py b/website/tests/test_build.py index 587f16a6..e93ca3ce 100644 --- a/website/tests/test_build.py +++ b/website/tests/test_build.py @@ -348,7 +348,7 @@ class TestBuild: assert '' in index_html assert llms_txt.startswith("# Awesome Python\n\nIntro.\n") - assert "2 projects across 1 category." in llms_txt + assert "2 projects across 1 category, updated on " in llms_txt assert "Scan the category index" in llms_txt assert "Homepage: https://awesome-python.com/" in llms_txt assert "Markdown homepage" not in llms_txt