Skip to content

Commit 9db2626

Browse files
Update API README to be clearer and contain section on rendering docs. (#1091)
1 parent 1fd0afc commit 9db2626

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

packages/lit-dev-api/README.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
# `lit-dev-api`
22

3-
This package contains the necessary data for generating API documentation on
4-
Lit.dev.
3+
Contains necessary data for generating Lit.dev API docs.
54

6-
## Updating API Documentation
5+
## Update Generated API Documentation
76

8-
1. Locate the configuration file for the relevant package that you want to
9-
update (e.g., `packages/lit-dev-tools-cjs/src/api-docs/configs/lit-2.ts`).
10-
2. Update the `commit` field with the desired commit hash.
11-
3. Run the following command: `npm run build --workspace lit-dev-api`.
7+
1. Update the `commit` field with the desired commit hash, within
8+
`packages/lit-dev-tools-cjs/src/api-docs/configs/lit-2.ts`.
9+
1. Execute `npm run build --workspace lit-dev-api`.
1210

13-
Upon completion, the updated data will be reflected in the `pages.json` and
11+
Updated API documentation will be reflected in the `pages.json` and
1412
`symbols.json` files.
1513

1614
## Archived Documentation
1715

18-
The following directories contain archived documentation and are no longer
19-
automatically updated by the process above:
16+
`lit-html-1` and `lit-element-2` contain archived documentation and are no
17+
longer automatically updated. To update the archived documentation locally,
18+
check out a version of Lit.dev prior to [Pull Request
19+
#1087](https://github.com/lit/lit.dev/pull/1087), and follow the steps listed
20+
above.
2021

21-
- `lit-html-1`
22-
- `lit-element-2`
22+
## How to update Lit.dev API page templates
2323

24-
Both directories include static `pages.json` and `symbols.json` files. To update
25-
the archived documentation locally, check out a version of Lit.dev prior to
26-
[Pull Request #1087](https://github.com/lit/lit.dev/pull/1087), and follow the
27-
steps listed above.
24+
For `lit-html-1` and `lit-element-2`, the data from `pages.json` and
25+
`symbols.json` are used with the `api-v1.html` template to generate the
26+
resulting HTML. Otherwise modify `api.html` for `lit-2`.
27+
28+
Hint: Use `{{ node | dump }}` to debug the structure of the object in
29+
the template.

0 commit comments

Comments
 (0)