Skip to content

Commit e192a86

Browse files
authored
Merge pull request #4 from internetarchive/webcomponent
Add README for the Web Component
2 parents b6864f9 + e7b0420 commit e192a86

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/npm_dist.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ jobs:
2020
node-version: "16.x"
2121
registry-url: "https://registry.npmjs.org"
2222
- name: Publish package on NPM
23-
run: npm publish --access public webcomponent
23+
run: cd webcomponent && npm publish --access public
2424
env:
2525
NODE_AUTH_TOKEN: ${{ secrets.NPM_PASSWORD }}

webcomponent/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# CDX Summary Web Component
2+
3+
Assuming that a CDX Summary JSON file is generated from CDX files or WARC collections using the `cdxsummary` [CLI tool](https://github.com/internetarchive/cdx-summary), use the following Web Component to render it as an interactive HTML markup.
4+
5+
```html
6+
<cdx-summary src="CDX_SUMMARY_JSON_URL"></cdx-summary>
7+
```
8+
9+
Alternatively, render a summary from a `web` collection/item of Internet Archive's Petabox, if a corresponding summary file is generated already.
10+
11+
```html
12+
<cdx-summary item="PETABOX_ITEM_OR_COLLECTION_ID"></cdx-summary>
13+
```

0 commit comments

Comments
 (0)