Skip to content

Commit fc65359

Browse files
authored
Merge pull request #269 from contentauth/js-doc-reorg
Move legacy JS docs, add new readmes
2 parents fccb30b + b0097a2 commit fc65359

19 files changed

+137
-263
lines changed

docs/getting-started/verify.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The [example-assets](https://contentauth.github.io/example-assets/) repository c
6161
The code for the Verify site is open source and is available at https://github.com/contentauth/verify-site/.
6262

6363
:::warning Warning
64-
Verify uses the [legacy JavaScript library](js-sdk/getting-started/overview.mdx), which is deprecated and unsupported. For new projects, use the [new JavaScript library](c2pa-js/readme.md) instead.
64+
Verify uses the [legacy JavaScript library](../legacy-js-sdk/overview.mdx), which is deprecated and unsupported. For new projects, use the [new JavaScript library](c2pa-js/readme.md) instead.
6565
:::
6666

6767
## Information displayed

docs/introduction.mdx

Lines changed: 4 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,11 @@ The CAI open-source SDK consist of:
2222
- Display a report of JSON manifest data attached to an asset.
2323
- Attach a manifest data to an asset.
2424
- Add a manifest to to the associated manifest store if the asset already has an associated manifest data.
25-
- [**JavaScript library**](c2pa-js/readme.md) that enables web pages to verify and read manifest data using client JavaScript. Use it to add user interface elements to your website that display manifest data while following the [C2PA user experience recommendations](https://c2pa.org/specifications/specifications/1.0/ux/UX_Recommendations.html).
26-
- **[C/C++](c2pa-c/readme.md), [Python](c2pa-python/readme.md), [Node.js](c2pa-node/readme.md) libraries** that enable applications to read and validate manifest data, create and sign manifest data and embed it supported asset files.
25+
- [**JavaScript library**](c2pa-js/readme.md) that enables web pages to to read, validate, create, and sign manifest data, and embed it in supported asset files using client JavaScript. Use it to add user interface elements to your website that display manifest data while following the [C2PA user experience recommendations](https://c2pa.org/specifications/specifications/1.0/ux/UX_Recommendations.html).
26+
- **[C/C++](c2pa-c/readme.md), [Python](c2pa-python/readme.md), [Node.js](c2pa-node/readme.md) libraries** that enable applications to read and validate manifest data, create and sign manifest data, and embed it supported asset files.
2727
- [**Mobile libraries**](mobile.md) that enable mobile applications for iOS and Android to to read and generate manifest data.
2828
- [**The Rust library**](rust-sdk/readme.md) that generates the other language bindings and can also be used directly to read and generate manifest data. The Rust library is the fundamental system underlying everything else.
2929

30-
To see a summary of what each tool and library can do, see [Which tool is right for you?](#which-tool-is-right-for-you).
31-
3230
The following diagram provides a high-level view of the SDK.
3331

3432
<img src={cai_open_source} width="800" />
@@ -37,8 +35,7 @@ The following diagram provides a high-level view of the SDK.
3735

3836
Applications can use the CAI SDK in several different ways:
3937

40-
- Web pages can use the JavaScript library to display Content Credentials.
41-
- Applications written in C++, Python, or Node.js can use the corresponding language libraries to:
38+
- Applications written in C++, Python, Node.js, or client JavaScript can use the corresponding language libraries to:
4239
- Create, modify, and sign manifests.
4340
- Embed manifests into media files.
4441
- Parse and validate manifests.
@@ -47,111 +44,7 @@ Applications can use the CAI SDK in several different ways:
4744

4845
Native applications can also use Rust's _Foreign Function Interface_ (FFI) to call functions in the Rust library. The FFI enables interoperability between Rust and code written in other languages. For example, a Windows application can use the FFI to call Rust functions from languages such as C++ or C#. For an example, see the [c2c2pa repository](https://github.com/contentauth/c2c2pa).
4946

50-
An embedded application can use the Rust FFI (foreign function interface) to call Rust functions from languages such as C or C++, similarly to a native application. Embedded applications have unique constraints tied to the devices on which they run, including small memory footprint, low-powered hardware, intermittent network access, unique operating systems, or the lack of an operating system OS (running on bare metal). For these reasons, if you want to develop a CAI-enabled embedded application, please contact the CAI team directly.
51-
52-
## Which tool is right for you?
53-
54-
import green_check from '@site/static/img/green_check.png';
55-
56-
<table>
57-
<thead>
58-
<tr>
59-
<th style={{ textAlign: 'left' }}>Use To...</th>
60-
<th style={{ textAlign: 'left' }}>JavaScript Library </th>
61-
<th style={{ textAlign: 'left' }}>C2PA Tool</th>
62-
<th style={{ textAlign: 'left' }}>Python, C++, and Node.js Libraries </th>
63-
<th style={{ textAlign: 'left' }}>Rust Library</th>
64-
</tr>
65-
</thead>
66-
<tbody>
67-
<tr>
68-
<td style={{ textAlign: 'left' }}>
69-
Display C2PA data on your site or app
70-
</td>
71-
<td style={{ textAlign: 'center' }}>
72-
<img src={green_check} width="30" />
73-
</td>
74-
<td style={{ textAlign: 'center' }}>
75-
<img src={green_check} width="30" />
76-
</td>
77-
<td style={{ textAlign: 'center' }}>
78-
<img src={green_check} width="30" />
79-
</td>
80-
<td style={{ textAlign: 'center' }}>
81-
<img src={green_check} width="30" />
82-
</td>
83-
</tr>
84-
<tr>
85-
<td style={{ textAlign: 'left' }}>
86-
Link C2PA data displayed on your site to Verify
87-
</td>
88-
<td style={{ textAlign: 'center' }}>
89-
<img src={green_check} width="30" />
90-
</td>
91-
<td style={{ textAlign: 'center' }}>
92-
<img src={green_check} width="30" />
93-
</td>
94-
<td style={{ textAlign: 'center' }}>
95-
<img src={green_check} width="30" />
96-
</td>
97-
<td style={{ textAlign: 'center' }}>
98-
<img src={green_check} width="30" />
99-
</td>
100-
</tr>
101-
<tr>
102-
<td style={{ textAlign: 'left' }}>Write C2PA data into files</td>
103-
<td style={{ textAlign: 'center' }}></td>
104-
<td style={{ textAlign: 'center' }}>
105-
<img src={green_check} width="30" />
106-
</td>
107-
<td style={{ textAlign: 'center' }}>
108-
<img src={green_check} width="30" />
109-
</td>
110-
<td style={{ textAlign: 'center' }}>
111-
<img src={green_check} width="30" />
112-
</td>
113-
</tr>
114-
<tr>
115-
<td style={{ textAlign: 'left' }}>
116-
Quickly create and inspect C2PA data
117-
</td>
118-
<td style={{ textAlign: 'center' }}></td>
119-
<td style={{ textAlign: 'center' }}>
120-
<img src={green_check} width="30" />
121-
</td>
122-
<td style={{ textAlign: 'center' }}>
123-
<img src={green_check} width="30" />
124-
</td>
125-
<td style={{ textAlign: 'center' }}>
126-
<img src={green_check} width="30" />
127-
</td>
128-
</tr>
129-
<tr>
130-
<td style={{ textAlign: 'left' }}>
131-
Customize displaying and creating C2PA data
132-
</td>
133-
<td style={{ textAlign: 'center' }}></td>
134-
<td style={{ textAlign: 'center' }}></td>
135-
<td style={{ textAlign: 'center' }}>
136-
<img src={green_check} width="30" />
137-
</td>
138-
<td style={{ textAlign: 'center' }}>
139-
<img src={green_check} width="30" />
140-
</td>
141-
</tr>
142-
<tr>
143-
<td style={{ textAlign: 'left' }}>Deploy on web, mobile, and desktop</td>
144-
<td style={{ textAlign: 'center' }}></td>
145-
<td style={{ textAlign: 'center' }}></td>
146-
<td style={{ textAlign: 'center' }}>
147-
<img src={green_check} width="30" />
148-
</td>
149-
<td style={{ textAlign: 'center' }}>
150-
<img src={green_check} width="30" />
151-
</td>
152-
</tr>
153-
</tbody>
154-
</table>
47+
An embedded application can use the Rust FFI (foreign function interface) to call Rust functions from languages such as C or C++, similarly to a native application. Embedded applications have unique constraints tied to the devices on which they run, including small memory footprint, low-powered hardware, intermittent network access, unique operating systems, or the lack of an operating system OS (running on bare metal). For these reasons, if you want to develop an embedded application, please contact the CAI team directly.
15548

15649
## More information
15750

docs/js-sdk/deprecation-notice.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/js-sdk/js-landing.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/js-sdk/js-landing.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
id: js-landing
3+
title: JavaScript library
4+
---
5+
6+
import Readme from '../c2pa-js/readme.md';
7+
8+
**Sept 2025**: The new JavaScript library, [c2pa-js](https://github.com/contentauth/c2pa-js) has been released. You're encouraged to move to the new library as soon as possible.
9+
10+
:::note
11+
The legacy JavaScript library has been moved to the [c2pa-js-legacy](https://github.com/contentauth/c2pa-js-legacy) repository.
12+
13+
You can continue to install and use the old library, but it will no longer be updated or supported. The [Legacy JavaScript library documentation](../legacy-js-sdk/overview.mdx) is also still available for reference.
14+
:::
15+
16+
<Readme components={{ h1: () => null }} />
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
:::danger Warning
2+
This is documentation for the deprecated legacy JavaScript library, [c2pa-js-legacy](https://github.com/contentauth/c2pa-js-legacy). **This library is no longer maintained or supported**. Instead use the [new JavaScript web library](/docs/js-sdk/js-landing.mdx).
3+
:::
4+
5+
6+
:::note Legacy JavaScript library documentation
7+
- [Quick start](/docs/legacy-js-sdk/getting-started/quick-start)
8+
- [Architecture](/docs/legacy-js-sdk/getting-started/architecture.mdx)
9+
- [Examples](/docs/legacy-js-sdk/guides/examples.mdx)
10+
- [Hosting assets](/docs/legacy-js-sdk/guides/hosting.mdx)
11+
- [Viewing manifest data](/docs/legacy-js-sdk/guides/viewing-provenance.mdx)
12+
- [Selectors](/docs/legacy-js-sdk/guides/selectors.mdx)
13+
- [Validation](/docs/legacy-js-sdk/guides/validation.mdx)
14+
:::

docs/js-sdk/getting-started/architecture.mdx renamed to docs/legacy-js-sdk/getting-started/architecture.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: architecture
3-
title: Architecture
3+
title: 'Legacy JavaScript library: Architecture'
44
hide_table_of_contents: true
55
---
66

docs/js-sdk/getting-started/legacy-js-sdk-redirect.mdx renamed to docs/legacy-js-sdk/getting-started/legacy-js-sdk-redirect.mdx

File renamed without changes.

docs/js-sdk/getting-started/quick-start.mdx renamed to docs/legacy-js-sdk/getting-started/quick-start.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: quick-start
3-
title: Quick start
3+
title: 'Legacy JavaScript library: Quick start'
44
---
55

66
import Tabs from '@theme/Tabs';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: examples
3-
title: JavaScript examples
3+
title: Legacy JavaScript examples
44
---
55

66
import Deprecation from '../deprecation-notice.md';

0 commit comments

Comments
 (0)