diff --git a/.gitignore b/.gitignore index f77c4dd5..a0462bc6 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ /docs/c2patool/*.md /docs/c2patool/docs/*.md /docs/c2pa-node/*.md +/docs/c2pa-node-v2/*.md /docs/c2pa-node-example/*.md /docs/c2pa-node/docs/*.md /docs/c2pa-python/*.md diff --git a/docs/c2pa-node/docs/.gitkeep b/c2pa-node-v2/.gitkeep similarity index 100% rename from docs/c2pa-node/docs/.gitkeep rename to c2pa-node-v2/.gitkeep diff --git a/docs/c2pa-node-v2/.gitkeep b/docs/c2pa-node-v2/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/docs/nodejs.md b/docs/nodejs.md new file mode 100644 index 00000000..870a6e0e --- /dev/null +++ b/docs/nodejs.md @@ -0,0 +1,10 @@ +--- +id: node-landing +title: Node.js library +--- + +**Sept 2025**: A new Node.js library has been released. We are working on adding documentation for the new library. Please bear with us! + +:::note +You can continue to [install and use the old library](c2pa-node/readme.md) the same as before, but it will no longer be updated or supported. +::: \ No newline at end of file diff --git a/scripts/fetch-readme.js b/scripts/fetch-readme.js index 6c34dcf9..ca5c9f8d 100644 --- a/scripts/fetch-readme.js +++ b/scripts/fetch-readme.js @@ -105,32 +105,23 @@ const readmes = [ repo: 'contentauth/c2pa-service-example', path: 'README.md', }, - // Node.js lib + // Old Node.js lib { dest: resolve(__dirname, '../docs/c2pa-node/readme.md'), repo: 'contentauth/c2pa-node', path: 'README.md', }, + // Node.js lib { - dest: resolve(__dirname, '../docs/c2pa-node/docs/usage.md'), - repo: 'contentauth/c2pa-node', - path: 'docs/usage.md', + dest: resolve(__dirname, '../docs/c2pa-node-v2/readme.md'), + repo: 'contentauth/c2pa-node-v2', + path: 'README.md', }, { - dest: resolve(__dirname, '../docs/c2pa-node/docs/supported-formats.md'), + dest: resolve(__dirname, '../docs/c2pa-node-v2/supported-formats.md'), repo: 'contentauth/c2pa-rs', path: 'docs/supported-formats.md', }, - { - dest: resolve(__dirname, '../docs/c2pa-node/docs/release-notes.md'), - repo: 'contentauth/c2pa-node', - path: 'docs/release-notes.md', - }, - { - dest: resolve(__dirname, '../docs/c2pa-node-example/readme.md'), - repo: 'contentauth/c2pa-node-example', - path: 'README.md', - }, // Python lib { dest: resolve(__dirname, '../docs/c2pa-python/readme.md'), diff --git a/sidebars.js b/sidebars.js index 068c9d3f..27485e04 100644 --- a/sidebars.js +++ b/sidebars.js @@ -152,33 +152,44 @@ const sidebars = { { type: 'category', label: 'Node.js', - link: { type: 'doc', id: 'c2pa-node/readme' }, + link: { type: 'doc', id: 'node-landing' }, collapsed: true, items: [ { - type: 'doc', - id: 'c2pa-node/docs/usage', - label: 'Using the Node library', - }, - { - type: 'doc', - id: 'c2pa-node/docs/supported-formats', - label: 'Supported media formats', - }, - { - type: 'doc', - id: 'c2pa-node/docs/release-notes', - label: 'Release notes', + type: 'category', + label: 'New Node.js library', + link: { type: 'doc', id: 'c2pa-node-v2/readme' }, + collapsed: true, + items: [ + { + type: 'doc', + id: 'c2pa-node-v2/supported-formats', + label: 'Supported media formats', + }, + { + type: 'link', + label: 'API documentation', + href: 'https://github.com/contentauth/c2pa-node-v2/blob/main/docs/README.md', + }, + { + type: 'link', + label: 'GitHub', + href: 'https://github.com/contentauth/c2pa-node-v2/tree/main', + }, + ], }, { - type: 'doc', - label: 'C2PA Node example', - id: 'c2pa-node-example/readme', - }, - { - type: 'link', - label: 'GitHub', - href: 'https://github.com/contentauth/c2pa-node', + type: 'category', + label: 'Legacy Node.js library', + link: { type: 'doc', id: 'c2pa-node/readme' }, + collapsed: true, + items: [ + { + type: 'link', + label: 'GitHub', + href: 'https://github.com/contentauth/c2pa-node', + }, + ], }, ], },