Skip to content

Commit 999a867

Browse files
authored
Merge pull request #236 from contentauth/node-v2
Deprecate old Node lib, add new one
2 parents 4601416 + 95cfc19 commit 999a867

File tree

6 files changed

+50
-37
lines changed

6 files changed

+50
-37
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
/docs/c2patool/*.md
1919
/docs/c2patool/docs/*.md
2020
/docs/c2pa-node/*.md
21+
/docs/c2pa-node-v2/*.md
2122
/docs/c2pa-node-example/*.md
2223
/docs/c2pa-node/docs/*.md
2324
/docs/c2pa-python/*.md
File renamed without changes.

docs/c2pa-node-v2/.gitkeep

Whitespace-only changes.

docs/nodejs.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
id: node-landing
3+
title: Node.js library
4+
---
5+
6+
**Sept 2025**: A new Node.js library has been released. We are working on adding documentation for the new library. Please bear with us!
7+
8+
:::note
9+
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.
10+
:::

scripts/fetch-readme.js

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -105,32 +105,23 @@ const readmes = [
105105
repo: 'contentauth/c2pa-service-example',
106106
path: 'README.md',
107107
},
108-
// Node.js lib
108+
// Old Node.js lib
109109
{
110110
dest: resolve(__dirname, '../docs/c2pa-node/readme.md'),
111111
repo: 'contentauth/c2pa-node',
112112
path: 'README.md',
113113
},
114+
// Node.js lib
114115
{
115-
dest: resolve(__dirname, '../docs/c2pa-node/docs/usage.md'),
116-
repo: 'contentauth/c2pa-node',
117-
path: 'docs/usage.md',
116+
dest: resolve(__dirname, '../docs/c2pa-node-v2/readme.md'),
117+
repo: 'contentauth/c2pa-node-v2',
118+
path: 'README.md',
118119
},
119120
{
120-
dest: resolve(__dirname, '../docs/c2pa-node/docs/supported-formats.md'),
121+
dest: resolve(__dirname, '../docs/c2pa-node-v2/supported-formats.md'),
121122
repo: 'contentauth/c2pa-rs',
122123
path: 'docs/supported-formats.md',
123124
},
124-
{
125-
dest: resolve(__dirname, '../docs/c2pa-node/docs/release-notes.md'),
126-
repo: 'contentauth/c2pa-node',
127-
path: 'docs/release-notes.md',
128-
},
129-
{
130-
dest: resolve(__dirname, '../docs/c2pa-node-example/readme.md'),
131-
repo: 'contentauth/c2pa-node-example',
132-
path: 'README.md',
133-
},
134125
// Python lib
135126
{
136127
dest: resolve(__dirname, '../docs/c2pa-python/readme.md'),

sidebars.js

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -152,33 +152,44 @@ const sidebars = {
152152
{
153153
type: 'category',
154154
label: 'Node.js',
155-
link: { type: 'doc', id: 'c2pa-node/readme' },
155+
link: { type: 'doc', id: 'node-landing' },
156156
collapsed: true,
157157
items: [
158158
{
159-
type: 'doc',
160-
id: 'c2pa-node/docs/usage',
161-
label: 'Using the Node library',
162-
},
163-
{
164-
type: 'doc',
165-
id: 'c2pa-node/docs/supported-formats',
166-
label: 'Supported media formats',
167-
},
168-
{
169-
type: 'doc',
170-
id: 'c2pa-node/docs/release-notes',
171-
label: 'Release notes',
159+
type: 'category',
160+
label: 'New Node.js library',
161+
link: { type: 'doc', id: 'c2pa-node-v2/readme' },
162+
collapsed: true,
163+
items: [
164+
{
165+
type: 'doc',
166+
id: 'c2pa-node-v2/supported-formats',
167+
label: 'Supported media formats',
168+
},
169+
{
170+
type: 'link',
171+
label: 'API documentation',
172+
href: 'https://github.com/contentauth/c2pa-node-v2/blob/main/docs/README.md',
173+
},
174+
{
175+
type: 'link',
176+
label: 'GitHub',
177+
href: 'https://github.com/contentauth/c2pa-node-v2/tree/main',
178+
},
179+
],
172180
},
173181
{
174-
type: 'doc',
175-
label: 'C2PA Node example',
176-
id: 'c2pa-node-example/readme',
177-
},
178-
{
179-
type: 'link',
180-
label: 'GitHub',
181-
href: 'https://github.com/contentauth/c2pa-node',
182+
type: 'category',
183+
label: 'Legacy Node.js library',
184+
link: { type: 'doc', id: 'c2pa-node/readme' },
185+
collapsed: true,
186+
items: [
187+
{
188+
type: 'link',
189+
label: 'GitHub',
190+
href: 'https://github.com/contentauth/c2pa-node',
191+
},
192+
],
182193
},
183194
],
184195
},

0 commit comments

Comments
 (0)