From 7ec71fc75ccdf7128e4c4861f297671ed9927813 Mon Sep 17 00:00:00 2001 From: Rand McKinney Date: Wed, 6 May 2026 12:32:49 -0700 Subject: [PATCH 1/3] Change layout of fetched JS docs so links are the same in GH and here --- .gitignore | 3 ++- docs/c2pa-js/packages/c2pa-types/.gitkeep | 0 docs/c2pa-js/packages/c2pa-wasm/.gitkeep | 0 docs/c2pa-js/packages/c2pa-web/.gitkeep | 0 docs/introduction.mdx | 2 +- docs/js-sdk/js-landing.mdx | 2 +- remote-docs.json | 12 ++++++++---- 7 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 docs/c2pa-js/packages/c2pa-types/.gitkeep create mode 100644 docs/c2pa-js/packages/c2pa-wasm/.gitkeep create mode 100644 docs/c2pa-js/packages/c2pa-web/.gitkeep diff --git a/.gitignore b/.gitignore index 82e61128..e19652bc 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,8 @@ /docs/js-sdk/examples/quickstart/*.ts /docs/js-sdk/examples/view-manifest/*.ts /docs/js-sdk/examples/view-manifest/*.html -/docs/c2pa-js/*.md +/docs/c2pa-js/**/*.md +/docs/c2pa-js/packages/*.md /docs/c2pa-js/docs/*.md /docs/c2patool/readme*.md /docs/c2patool/docs/*.md diff --git a/docs/c2pa-js/packages/c2pa-types/.gitkeep b/docs/c2pa-js/packages/c2pa-types/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/docs/c2pa-js/packages/c2pa-wasm/.gitkeep b/docs/c2pa-js/packages/c2pa-wasm/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/docs/c2pa-js/packages/c2pa-web/.gitkeep b/docs/c2pa-js/packages/c2pa-web/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/docs/introduction.mdx b/docs/introduction.mdx index e76c3ea4..003d171d 100644 --- a/docs/introduction.mdx +++ b/docs/introduction.mdx @@ -22,7 +22,7 @@ The CAI open-source SDK consist of: - Display a report of JSON manifest data attached to an asset. - Attach a manifest data to an asset. - Add a manifest to to the associated manifest store if the asset already has an associated manifest data. -- [**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). +- [**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). - **[C/C++](c2pa-cpp/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. - [**Mobile libraries**](mobile.md) that enable mobile applications for iOS and Android to to read and generate manifest data. - [**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. diff --git a/docs/js-sdk/js-landing.mdx b/docs/js-sdk/js-landing.mdx index 4e8d9c5c..1acb7eb8 100644 --- a/docs/js-sdk/js-landing.mdx +++ b/docs/js-sdk/js-landing.mdx @@ -11,6 +11,6 @@ For video walkthroughs on using the JavaScript SDK, see the following from the C - [Formatting C2PA data for L1 - L3 disclosures](https://learn.contentauthenticity.org/formatting-c2pa-data-for-display) ::: -import Readme from '../c2pa-js/readme.md'; +import Readme from '../c2pa-js/README.md'; null }} /> diff --git a/remote-docs.json b/remote-docs.json index 9abd4053..1038feea 100644 --- a/remote-docs.json +++ b/remote-docs.json @@ -382,25 +382,29 @@ { "_comment": "JavaScript library" }, { "repo": "contentauth/c2pa-js", + "branch": "fix-broken-links", "path": "README.md", - "dest": "docs/c2pa-js/readme.md" + "dest": "docs/c2pa-js/README.md" }, { "repo": "contentauth/c2pa-js", + "branch": "fix-broken-links", "path": "packages/c2pa-web/README.md", - "dest": "docs/c2pa-js/c2pa-web-readme.md", + "dest": "docs/c2pa-js/packages/c2pa-web/README.md", "sidebar": { "category": "c2pa-js", "label": "c2pa-web", "order": 1 } }, { "repo": "contentauth/c2pa-js", + "branch": "fix-broken-links", "path": "packages/c2pa-types/README.md", - "dest": "docs/c2pa-js/c2pa-types-readme.md", + "dest": "docs/c2pa-js/packages/c2pa-types/README.md", "sidebar": { "category": "c2pa-js", "label": "c2pa-types", "order": 2 } }, { "repo": "contentauth/c2pa-js", + "branch": "fix-broken-links", "path": "packages/c2pa-wasm/README.md", - "dest": "docs/c2pa-js/c2pa-wasm-readme.md", + "dest": "docs/c2pa-js/packages/c2pa-wasm/README.md", "sidebar": { "category": "c2pa-js", "label": "c2pa-wasm", "order": 3 } }, From 76d3d1572bbd42563e8cc2d9dac6d55ec6341841 Mon Sep 17 00:00:00 2001 From: Rand McKinney Date: Thu, 7 May 2026 09:31:12 -0700 Subject: [PATCH 2/3] Move js landing page --- docs/js-landing.mdx | 24 ++++++++++++++++++++++++ docs/js-sdk/js-landing.mdx | 16 ---------------- remote-docs.json | 13 +++++-------- sidebars.js | 2 +- 4 files changed, 30 insertions(+), 25 deletions(-) create mode 100644 docs/js-landing.mdx delete mode 100644 docs/js-sdk/js-landing.mdx diff --git a/docs/js-landing.mdx b/docs/js-landing.mdx new file mode 100644 index 00000000..95d4c283 --- /dev/null +++ b/docs/js-landing.mdx @@ -0,0 +1,24 @@ +--- +id: js-landing +title: JavaScript library +--- + +:::warning As of Oct 2025 +The old, deprecated `c2pa-js` repository is now in [c2pa-js-legacy](https://github.com/contentauth/c2pa-js-legacy). If you need to work with C2PA metadata in the browser, use the libraries in this repository instead of the old library. +::: + +The [c2pa-js](c2pa-js/README.md) repository is a monorepo containing the following libraries published for production use: + + +- [**c2pa-web**](c2pa-js/packages/c2pa-web/README.md): Library for C2PA metadata in the browser. Import and use this package in browser client JavaScript code. +- [**c2pa-wasm**](c2pa-js/packages/c2pa-wasm/README.md): WebAssembly bindings for c2pa-rs, built with wasm-bindgen. They power c2pa-web; most applications should use c2pa-web instead of calling the bindings directly. +- [**c2pa-types**](c2pa-js/packages/c2pa-types/README.md): TypeScript types generated from c2pa-rs structs for use by c2pa-web and c2pa-node-v2. + + +For video walkthroughs on using the JavaScript SDK, see the following lessons from the Content Credentials Foundations course: + +- [Reading and validating C2PA data with Javascript in the browser](https://learn.contentauthenticity.org/reading-and-validating-content-credentials) +- [Formatting C2PA data for L1 - L3 disclosures](https://learn.contentauthenticity.org/formatting-c2pa-data-for-display) + + + diff --git a/docs/js-sdk/js-landing.mdx b/docs/js-sdk/js-landing.mdx deleted file mode 100644 index 1acb7eb8..00000000 --- a/docs/js-sdk/js-landing.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -id: js-landing -title: JavaScript library -custom_edit_path: c2pa-js/edit/main/README.md ---- - -:::tip -For video walkthroughs on using the JavaScript SDK, see the following from the Content Credentials Foundations course: - -- [Reading and validating C2PA data with Javascript in the browser](https://learn.contentauthenticity.org/reading-and-validating-content-credentials) -- [Formatting C2PA data for L1 - L3 disclosures](https://learn.contentauthenticity.org/formatting-c2pa-data-for-display) - ::: - -import Readme from '../c2pa-js/README.md'; - - null }} /> diff --git a/remote-docs.json b/remote-docs.json index 1038feea..076b661f 100644 --- a/remote-docs.json +++ b/remote-docs.json @@ -382,30 +382,27 @@ { "_comment": "JavaScript library" }, { "repo": "contentauth/c2pa-js", - "branch": "fix-broken-links", "path": "README.md", - "dest": "docs/c2pa-js/README.md" + "dest": "docs/c2pa-js/README.md", + "sidebar": { "category": "c2pa-js", "label": "c2pa-js", "order": 1 } }, { "repo": "contentauth/c2pa-js", - "branch": "fix-broken-links", "path": "packages/c2pa-web/README.md", "dest": "docs/c2pa-js/packages/c2pa-web/README.md", - "sidebar": { "category": "c2pa-js", "label": "c2pa-web", "order": 1 } + "sidebar": { "category": "c2pa-js", "label": "c2pa-web", "order": 2 } }, { "repo": "contentauth/c2pa-js", - "branch": "fix-broken-links", "path": "packages/c2pa-types/README.md", "dest": "docs/c2pa-js/packages/c2pa-types/README.md", - "sidebar": { "category": "c2pa-js", "label": "c2pa-types", "order": 2 } + "sidebar": { "category": "c2pa-js", "label": "c2pa-types", "order": 3 } }, { "repo": "contentauth/c2pa-js", - "branch": "fix-broken-links", "path": "packages/c2pa-wasm/README.md", "dest": "docs/c2pa-js/packages/c2pa-wasm/README.md", - "sidebar": { "category": "c2pa-js", "label": "c2pa-wasm", "order": 3 } + "sidebar": { "category": "c2pa-js", "label": "c2pa-wasm", "order": 4 } }, { "_comment": "Node.js library" }, diff --git a/sidebars.js b/sidebars.js index 7f61a1ba..2d225ed8 100644 --- a/sidebars.js +++ b/sidebars.js @@ -267,7 +267,7 @@ const sidebars = { { type: 'category', label: 'JavaScript library', - link: { type: 'doc', id: 'js-sdk/js-landing' }, + link: { type: 'doc', id: 'js-landing' }, collapsed: true, items: [ ...getRemoteSidebarItems('c2pa-js'), From 3d7ceab90534e54c784c51184bbfde5fdb119769 Mon Sep 17 00:00:00 2001 From: Rand McKinney Date: Thu, 7 May 2026 09:41:39 -0700 Subject: [PATCH 3/3] Fix links and dups from merge conflict resolution --- docs/introduction.mdx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/introduction.mdx b/docs/introduction.mdx index bbf17e85..75dd6cb8 100644 --- a/docs/introduction.mdx +++ b/docs/introduction.mdx @@ -18,16 +18,15 @@ For a series of educational videos on using the CAI open source SDK, see [**Cont The CAI open-source SDK consist of: +- [**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. - [**C2PA Tool**](c2patool/readme.md), a command-line tool for working with manifests and media. This tool is a wrapper around the Rust SDK and provides most of the same capabilities that it does. C2PA Tool can: - Display a report of JSON manifest data attached to an asset. - Attach a manifest data to an asset. - Add a manifest to to the associated manifest store if the asset already has an associated manifest data. -- [**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). -- **[C/C++](c2pa-cpp/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. -- [**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). +- [**JavaScript library**](js-landing.mdx) 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). - **[C/C++](c2pa-cpp/readme.md), [Python](c2pa-python/readme.md), [Node.js](c2pa-node-v2/readme.md) libraries** that enable applications to read and validate manifest data, create and sign manifest data, and embed it supported asset files. - [**Mobile libraries**](mobile.md) that enable mobile applications for iOS and Android to to read and generate manifest data. -- [**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. + The following diagram provides a high-level view of the SDK.