Skip to content

Commit 7cbb6af

Browse files
authored
Merge branch 'main' into data_platform_docs_links
2 parents 383d23a + 7b73d4e commit 7cbb6af

43 files changed

Lines changed: 3715 additions & 520 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/copilot-assignment.lock.yml

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/copilot-assignment.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
# GH agentic workflow frontmatter docs:
2+
# GH agentic workflow frontmatter docs:
33
# https://github.github.com/gh-aw/reference/frontmatter-full/#complete-frontmatter-reference
44
# Triggered when the "copilot" label is added to an issue.
55
# Only runs for users with write access (admin, maintainer, write roles).
@@ -10,9 +10,7 @@ on:
1010

1111
if: github.event.label.name == 'copilot'
1212

13-
engine:
14-
id: copilot
15-
model: gpt-5.5
13+
engine: copilot
1614

1715
permissions:
1816
issues: read
@@ -24,7 +22,6 @@ safe-outputs:
2422
assign-to-agent:
2523
name: copilot
2624
target: triggering
27-
model: gpt-5.5
2825
---
2926

3027
Assign the GitHub Copilot coding agent to this issue. The agent will read the issue, implement a solution, and open a pull request for review.

.github/workflows/deploy.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,20 @@ jobs:
6969
yarn install
7070
yarn run build
7171
72+
- name: Pre-generate llms-full.txt
73+
env:
74+
SECRET_KEY: insecure_test_key
75+
APPLICATION_CRYPTO_SECRET_KEY: insecure_test_key
76+
HARVEST_API_KEY: local_development_fake_key
77+
SERVICE_ACCOUNT_EMAIL: test_email@email.com
78+
SERVICE_ACCOUNT_PRIVATE_KEY: test_private_key
79+
run: |
80+
python3 -m venv .venv-llms
81+
.venv-llms/bin/pip install --upgrade pip "setuptools<81"
82+
.venv-llms/bin/pip install -r requirements.txt
83+
.venv-llms/bin/python webapp/llms.py generate
84+
rm -rf .venv-llms
85+
7286
- name: Setup LXD
7387
uses: canonical/setup-lxd@main
7488

@@ -171,12 +185,12 @@ jobs:
171185
run: |
172186
sudo snap install juju --channel=3.6/stable --classic
173187
sudo snap install vault --classic
174-
188+
175189
- name: Download Charm Artifact
176190
uses: actions/download-artifact@v4
177191
with:
178192
name: canonical-com-charm
179-
193+
180194
- name: Configure Vault and Juju
181195
run: |
182196
export VAULT_ADDR=https://vault.admin.canonical.com:8200

.github/workflows/pr.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,27 @@ jobs:
7272
- name: Lint python
7373
run: yarn lint-python
7474

75+
lint-llms:
76+
runs-on: ubuntu-22.04
77+
permissions:
78+
contents: read
79+
80+
steps:
81+
- uses: actions/checkout@v4
82+
with:
83+
persist-credentials: false
84+
85+
- name: Install node dependencies
86+
run: yarn install --immutable
87+
88+
- name: Install python dependencies
89+
run: |
90+
python3 -m pip install --upgrade pip
91+
sudo pip3 install pyyaml
92+
93+
- name: Lint llms.txt and llms.yaml
94+
run: yarn lint-llms
95+
7596
lint-jinja:
7697
runs-on: ubuntu-22.04
7798

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ static/js/modules/
6969
static/js/dist/
7070
*.swp
7171
templates/sitemap_tree.xml
72+
templates/llms-full.txt
7273

7374
# Playwright
7475
/test-results/

AGENTS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
- `templates/sitemap-index.xml` - top-level sitemap index that links to all section sitemaps.
2323
- `templates/sitemap-links.xml`, `templates/careers/sitemap.xml`, `templates/partners/sitemap.xml`, `templates/knowledge/sitemap.xml`, `templates/data/sitemap.xml` - per-section sitemap templates rendered by routes in `webapp/app.py`.
2424
- `templates/sitemap_tree.xml` - generated (git-ignored) full sitemap; the `/sitemap_tree.xml` route (`build_sitemap_tree` in `webapp/app.py`) regenerates it from the `templates/` tree on a `POST` and serves it on `GET`.
25+
- `templates/llms.txt` - manually maintained LLM-friendly site index (https://llmstxt.org/), committed to git (not generated). Edit this file directly to change what AI crawlers see. Combined with `llms.yaml` at app startup (`webapp/llms.py`, `build_llms_txt`) and served by the `/llms.txt` route (`llms_txt` in `webapp/app.py`).
26+
- `templates/llms-full.txt` - generated (git-ignored) full Markdown content of every renderable page linked from `llms.txt` (`webapp/llms.py`, `build_llms_full_txt`). Pre-generated at build time by `python3 webapp/llms.py generate` (run in the `pack-rock` job of `.github/workflows/deploy.yaml` before `rockcraft pack`); the `/llms-full.txt` route (`llms_full_txt` in `webapp/app.py`) serves it read-only from disk, regenerating on demand only if missing (local dev). Deliberately skips pages served live from Discourse (product docs, tutorials, case studies, events - see `DISCOURSE_PATH_PREFIXES` in `webapp/llms.py`), since the build environment has no Discourse API access and shouldn't scrape and redistribute that content.
2527
- `static/js/` - browser JS/TS entrypoints and React code.
2628
- `static/js/career-explorer/` - React/TypeScript careers explorer.
2729
- `static/js/canonical-cla/` - React client for the CLA pages.
@@ -32,6 +34,7 @@
3234
- `navigation.yaml` - primary navigation data source.
3335
- `secondary-navigation.yaml` - secondary nav/page sidebar data source.
3436
- `redirects.yaml` - redirects config.
37+
- `llms.yaml` - docs-team-owned config for extra curated links inserted into `/llms.txt` right after its "Main pages" section (`heading` + `links`, each with `title`/`url`/`description`), read by `webapp/llms.py`. Must be listed in `rockcraft.yaml` so it ships in the image. Formatting of both this file and `templates/llms.txt` is checked by `yarn lint-llms` (`python3 webapp/llms.py lint`), a required PR check (`lint-llms` job in `.github/workflows/pr.yaml`).
3538
- `tests/` - Python unit tests plus JS/Jest and Playwright tests.
3639
- `tests/js/` - Jest tests for browser modules.
3740
- `tests/playwright/` - E2E tests; `tests/playwright/tests/navigation/README.md` explains navigation coverage.

llms.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# =============================================================================
2+
# llms.yaml — extra curated links for /llms.txt
3+
# =============================================================================
4+
#
5+
# WHAT IS THIS FILE?
6+
# ------------------
7+
# templates/llms.txt is the hand-written, canonical version of
8+
# https://canonical.com/llms.txt (see https://llmstxt.org/). This file lets
9+
# you add extra curated links to that page — for example, links to product
10+
# documentation or community sites that live outside this repo — without
11+
# editing templates/llms.txt directly.
12+
#
13+
# Links are grouped into sections. Each section has:
14+
# heading: the section title (e.g. "Documentation")
15+
# links: a list of links, each with:
16+
# title: the link text (required)
17+
# url: the full web address (required)
18+
# description: one short sentence about it (required)
19+
#
20+
# EXAMPLE — this one is live. Copy a link block (the three "- title" lines)
21+
# to add more, and add another "- heading" block to start a new section.
22+
#
23+
extra:
24+
- heading: Documentation
25+
links:
26+
- title: Juju
27+
url: https://canonical.com/juju/docs/juju-cli/page/llms.txt
28+
description: Command reference and documentation for the Juju CLI.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
"lint-python": "flake8 --extend-ignore=E203 webapp tests && black --check --line-length 79 webapp tests",
1313
"lint-scss": "stylelint static/**/*.scss",
1414
"lint-html": "djlint templates/ --lint",
15+
"lint-llms": "python3 webapp/llms.py lint",
1516
"serve": "./entrypoint 0.0.0.0:${PORT}",
1617
"start": "yarn run build && concurrently --raw 'yarn run watch' 'yarn run serve'",
17-
"test": "yarn run lint-scss && yarn run lint-python && yarn run lint-html && yarn run test-python",
18+
"test": "yarn run lint-scss && yarn run lint-python && yarn run lint-html && yarn run lint-llms && yarn run test-python",
1819
"test-python": "python3 -m unittest discover tests",
1920
"test-js": "jest --env=jsdom",
2021
"test-marketo": "python3 -m unittest tests.test_marketo",

redirects.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -659,9 +659,8 @@ mir/doc/md__r_e_a_d_m_e.*: https://github.com/canonical/mir/blob/main/README.md
659659
mir/doc/.*: https://canonical-mir.readthedocs-hosted.com/stable/
660660
mir/tutorials: /mir/docs/tutorials/
661661
mir/tutorials/.*: /mir/docs/tutorials/
662-
legal/ubuntu-pro-description/?: "https://assets.ubuntu.com/v1/f744d687-ubuntu_pro_description_unified.pdf"
663-
legal/ubuntu-pro-description/ja?: "https://assets.ubuntu.com/v1/f744d687-ubuntu_pro_description_unified.pdf"
664-
legal/ubuntu-pro-description/jp?: "https://assets.ubuntu.com/v1/f744d687-ubuntu_pro_description_unified.pdf"
662+
legal/ubuntu-pro-description/ja?: "/legal/ubuntu-pro-description"
663+
legal/ubuntu-pro-description/jp?: "/legal/ubuntu-pro-description"
665664
legal/ubuntu-advantage-service-terms(?P<page>.*)/?: "/legal/ubuntu-pro-service-terms{page}"
666665

667666
# Multipass documentation
@@ -2046,5 +2045,4 @@ blog/cloudify-your-data-centre: https://assets.ubuntu.com/v1/855af1ef-infrastruc
20462045
# Hiring blog redirect
20472046
blog/how-we-hire-at-canonical: /careers/hiring-process
20482047

2049-
2050-
robots.txt?: "/static/files/robots.txt"
2048+
robots.txt?: "/static/files/robots.txt"

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ canonicalwebteam.search==2.1.2
88
canonicalwebteam.form-generator==2.2.0
99
canonicalwebteam.directory-parser==1.2.11
1010
canonicalwebteam.markdown-response==0.2.0
11-
bleach==5.0.1
11+
bleach==6.4.0
1212
markdown==3.8.2
1313
python-slugify==8.0.4
1414
vcrpy-unittest==0.1.7

0 commit comments

Comments
 (0)