This repo contains the source code and content to generate the https://opensource.contentauthenticity.org/ website. This site is built using Docusaurus 3, a modern static site generator, and deployed on Netlify.
The docs sub-directory contains documentation content (in markdown or .mdx format) in the following sub-directories:
includes: Markdown content imported (transcluded) into other files.static: Additional assets such as images.manifest: Content for the Understanding manifests section.- Various other sub-directories for content sections, e.g.
durable-cr,manifest,signing, etc.
Additionally, the scripts/fetch-readme.js script dynamically downloads documentation files (sometimes just the README.md but often other markdown files, too) from other repos in the SDK. See Running the fetch script.
This table summarizes the content that this script fetches from other repos.
| Sub-directory | Content fetched from... | Description |
|---|---|---|
c2pa-c |
c2pa-c | C library docs. |
c2pa-ios |
c2pa-ios | Mobile iOS library docs. |
c2pa-android |
c2pa-android | Android library docs. |
c2pa-node-v2 |
c2pa-node | Node library docs. |
c2pa-node-example |
c2pa-node-example | Node example app. |
c2pa-python |
c2pa-python | Python library docs. |
c2pa-python example |
c2pa-python-example | Python example app. |
c2patool |
c2pa-rs cli directory | C2PA Tool docs. |
js-sdk |
c2pa-js | JavaScript library docs. |
rust-sdk |
c2pa-rs | Rust library docs. |
trustmark |
adobe/trustmark | Trustmark docs |
After cloning the repo, install dependencies as follows:
$ cd opensource.contentauth.org
$ npm install
Build the site locally:
$ git clone [email protected]:contentauth/c2pa-js.git
$ cd opensource.contentauth.org
$ npm start
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
The /scripts/fetch-readme.js script pulls markdown files from other repos (e.g. c2pa-rs). To rerun this script for local build, enter this command:
npm run docs:fetch-readme
NOTE: If you need to get markdown files from a new repo that you added, then you need to manually add the sub-directory, add a .gitkeep file to it, and then commit it to this repository.
$ npm run build
This command generates static content into the build directory and can be served using any static contents hosting service.
Deployments are handled automatically by Netlify. Please open up a pull request with any changes and a preview site will be created automatically so you can share what the rendered site will look like before merging.
To rebuild the site when one of the SDK/tool repos hasn't been versioned, simply make any change to the main branch of this repo. This is a workaround until a manual site rebuild capability is added.
This work is licensed under a Creative Commons Attribution 4.0 International License.
