Skip to content

Commit d9cbcf2

Browse files
authored
Merge pull request #186 from contentauth/os-instructions
Expand README
2 parents 44d55d7 + a9a2e14 commit d9cbcf2

File tree

3 files changed

+41
-12
lines changed

3 files changed

+41
-12
lines changed

README.md

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,38 @@
22

33
[![Netlify Status](https://api.netlify.com/api/v1/badges/c2fe0e49-4596-48e8-8e1a-9cf62d56bca2/deploy-status)](https://app.netlify.com/sites/contentauth/deploys)
44

5-
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator, and deployed
6-
on [Netlify](https://www.netlify.com/).
5+
## Overview
6+
7+
This repo contains the source code and content to generate the <https://opensource.contentauthenticity.org/> website. This site is built using [Docusaurus 2](https://docusaurus.io/), a modern static site generator, and deployed on [Netlify](https://www.netlify.com/).
8+
9+
### Directory structure
10+
11+
The `docs` sub-directory contains documentation content (in markdown or `.mdx` format) in the following sub-directories:
12+
- [`js-sdk/api`](./docs/js-sdk/api): [API documentation](https://opensource.contentauthenticity.org/docs/js-sdk/api/) for the JavaScript library generated from the source code; see [Generating JavaScript API docs](#generating-javascript-sdk-api-docs).
13+
- [`js-sdk`](./docs/js-sdk/): [Other documentation](https://opensource.contentauthenticity.org/docs/js-sdk/getting-started/overview) for the JavaScript library.
14+
(./scripts/generate-api-docs/index.js)
15+
- `includes`: Markdown content imported (transcluded) into other files.
16+
- `manifest`: Content for the [Understanding manifests](https://opensource.contentauthenticity.org/docs/manifest/understanding-manifest) section.
17+
- `static`: Additional assets such as images.
18+
19+
Additionally, the [scripts/fetch-readme.js](./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](#running-fetch-script).
20+
21+
This table summarizes the content that this script fetches from other repos.
22+
23+
| Sub-directory | Content fetched from... | Description |
24+
|-----------|-------------------------|-------------|
25+
| `c2pa-c` | [c2pa-c](https://github.com/contentauth/c2pa-c) | C library docs. |
26+
| `c2pa-min` | [c2pa-min](https://github.com/contentauth/c2pa-min) | Minimal Rust example app. |
27+
| `c2pa-node` | [c2pa-node](https://github.com/contentauth/c2pa-node) | Node library docs. |
28+
| `c2pa-node-example` | [c2pa-node-example](https://github.com/contentauth/c2pa-node-example) | Node example app.|
29+
| `c2pa-python` | [c2pa-python](https://github.com/contentauth/c2pa-python) | Python library docs. |
30+
| `c2pa-python example` | [c2pa-python-example](https://github.com/contentauth/c2pa-python-example) | Python example app. |
31+
| `c2pa-service-example` | [c2patool-service-example](https://github.com/contentauth/c2patool-service-example) | C2PA Tool service example app. |
32+
| `c2patool` | [c2pa-rs cli directory](https://github.com/contentauth/c2pa-rs/cli) | C2PA Tool docs. |
33+
| `js-sdk` | [c2pa-js](https://github.com/contentauth/c2pa-js) | JavaScript library docs. |
34+
| `rust-sdk` | [c2pa-rs](https://github.com/contentauth/c2pa-rs) | Rust library docs. |
35+
36+
The [Manifest store reference](https://opensource.contentauthenticity.org/docs/manifest/manifest-ref) is an HTML file generated by the [json-manifest-reference](https://github.com/contentauth/json-manifest-reference) repository and imported manually.
737

838
## Installation
939

@@ -16,7 +46,7 @@ $ npm install
1646

1747
## Local development
1848

19-
**Prerequisite**: To build the site locally, you must first check out the JavaScript library in a sibling directory and build the API docs there. In the parent directory of `opensource.contentauth.org`, enter these commands:
49+
**Prerequisite**: To build the site locally, you must first check out the JavaScript library in a sibling directory and build the API docs there. In the parent directory of the `opensource.contentauth.org` directory, enter these commands:
2050

2151
```
2252
$ git clone [email protected]:contentauth/c2pa-js.git
@@ -34,23 +64,23 @@ This command starts a local development server and opens up a browser window. Mo
3464

3565
### Running fetch script
3666

37-
The `/scripts/fetch-readme.js` script pulls markdown files from other repos (e.g. `c2patool`). To rerun this script for local build, enter this command:
67+
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:
3868

3969
```
4070
npm run docs:fetch-readme
4171
```
4272

43-
NOTE: If you added a **new** repo to get .md files from, then you need to manually add the directory, add a `.gitkeep` file to it, and then commit it to Git.
73+
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.
4474

45-
### Generate JavaScript SDK API docs
75+
### Generating JavaScript SDK API docs
4676

47-
The `/scripts/generate-api-docs/index.js` script generates API docs for the JS SDK. To run this script for local build, enter this command:
77+
The `/scripts/generate-api-docs/index.js` script generates API docs for the JS SDK (assuming you've checked it out in a sibling directory). To run this script for local build, enter this command:
4878

4979
```
5080
npm run docs:generate-api-docs
5181
```
5282

53-
## Build
83+
### Building
5484

5585
```
5686
$ npm run build
@@ -60,8 +90,7 @@ This command generates static content into the `build` directory and can be serv
6090

6191
### Deployment
6292

63-
Deployments are handled automatically by Netlify. Please open up a pull request with any changes and a preview site
64-
should be created automatically so that the preview can be shared before merging.
93+
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.
6594

6695
### Forcing a site rebuild
6796

docs/manifest/understanding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: understanding-manifest
3-
title: Working with manifests
3+
title: Understanding manifests
44
---
55

66
## Overview

sidebars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const sidebars = {
2424
},
2525
{
2626
type: 'category',
27-
label: 'Working with manifests',
27+
label: 'Understanding manifests',
2828
link: { type: 'doc', id: 'manifest/understanding-manifest' },
2929
collapsed: true,
3030
items: [

0 commit comments

Comments
 (0)