mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-08-12 02:49:15 +08:00
Merge 14c5adeaf2 into a95d0d3f82
This commit is contained in:
commit
987c59adff
@ -28,6 +28,14 @@ This skill does not include:
|
|||||||
- deciding when to follow child links from broad official guide pages
|
- deciding when to follow child links from broad official guide pages
|
||||||
- rejecting weak results such as shells, landing pages, and third-party summaries
|
- rejecting weak results such as shells, landing pages, and third-party summaries
|
||||||
|
|
||||||
|
## Markdown shortcut (developer.salesforce.com)
|
||||||
|
|
||||||
|
Modern developer-guide pages publish a raw-Markdown twin: swap `.html` → `.md` on the same URL
|
||||||
|
and fetch it with a **plain web fetch** — no Playwright needed. The page's "Copy as Markdown" /
|
||||||
|
"View as Markdown" links expose this. Try it **first** for `developer.salesforce.com/docs/platform/.../guide/*`
|
||||||
|
pages. It does **not** work for legacy `atlas.*` pages (those return an HTML shell), and
|
||||||
|
`help.salesforce.com` still needs the renderer — use the extractor below for those.
|
||||||
|
|
||||||
## Optional utility
|
## Optional utility
|
||||||
|
|
||||||
A tiny wrapper is available for official Salesforce doc URLs:
|
A tiny wrapper is available for official Salesforce doc URLs:
|
||||||
|
|||||||
@ -95,7 +95,19 @@ This is especially important for:
|
|||||||
|
|
||||||
### 5. For `developer.salesforce.com`
|
### 5. For `developer.salesforce.com`
|
||||||
|
|
||||||
Use this playbook:
|
**Try the Markdown variant first — it needs no browser.** Modern developer-guide pages now
|
||||||
|
publish a raw-Markdown twin: swap the `.html` extension for `.md` on the same URL and fetch it
|
||||||
|
with a **plain web fetch** (the "Copy/View as Markdown" links on the page expose this). It returns
|
||||||
|
clean Markdown (headings, fenced code, links) with no JS shell, so it's faster and lighter than
|
||||||
|
Playwright. Example: `…/guide/js-dynamic-components.html` → `…/guide/js-dynamic-components.md`
|
||||||
|
(verified 2026-06-24).
|
||||||
|
- **Scope:** confirmed for modern guide pages under `developer.salesforce.com/docs/platform/.../guide/*`.
|
||||||
|
It does **not** work for legacy **`atlas.*`** pages — `.md` there returns an HTML shell, so fall
|
||||||
|
back to browser-rendered extraction for those.
|
||||||
|
- If the `.md` fetch 404s or returns a shell ("Salesforce Developers" with no body), drop to the
|
||||||
|
Playwright playbook below.
|
||||||
|
|
||||||
|
Otherwise use this playbook:
|
||||||
- start with the most likely official guide root
|
- start with the most likely official guide root
|
||||||
- if the page is JS-heavy, prefer browser-rendered extraction
|
- if the page is JS-heavy, prefer browser-rendered extraction
|
||||||
- check whether the exact concept appears on the page
|
- check whether the exact concept appears on the page
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user