Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
_site
.sass-cache
.jekyll-cache
.jekyll-metadata
vendor
Gemfile.lock
25 changes: 25 additions & 0 deletions docs/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
permalink: /404.html
layout: base
---

<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>

<div class="container">
<h1>404</h1>

<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>
34 changes: 34 additions & 0 deletions docs/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
# gem "jekyll", "~> 4.3.4"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.5"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins

# If you have any plugins, put them here!
group :jekyll_plugins do
gem "github-pages", "~> 232"
end

# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
platforms :mingw, :x64_mingw, :mswin, :jruby do
gem "tzinfo", ">= 1", "< 3"
gem "tzinfo-data"
end

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1", :platforms => [:mingw, :x64_mingw, :mswin]

# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
# do not have a Java counterpart.
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]
8 changes: 4 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# @contentauth/c2pa-node

## Classes
## [Classes](classes/index.md)

- [Builder](classes/Builder.md)
- [CallbackCredentialHolder](classes/CallbackCredentialHolder.md)
Expand All @@ -15,7 +15,7 @@
- [Reader](classes/Reader.md)
- [Trustmark](classes/Trustmark.md)

## Interfaces
## [Interfaces](interfaces/index.md)

- [BuilderInterface](interfaces/BuilderInterface.md)
- [CallbackCredentialHolderInterface](interfaces/CallbackCredentialHolderInterface.md)
Expand All @@ -35,7 +35,7 @@
- [TrustmarkInterface](interfaces/TrustmarkInterface.md)
- [VerifyConfig](interfaces/VerifyConfig.md)

## Type Aliases
## [Type Aliases](type-aliases/index.md)

- [CallbackSignerConfig](type-aliases/CallbackSignerConfig.md)
- [ClaimVersion](type-aliases/ClaimVersion.md)
Expand All @@ -54,7 +54,7 @@
- [TrustmarkVariant](type-aliases/TrustmarkVariant.md)
- [TrustmarkVersion](type-aliases/TrustmarkVersion.md)

## Functions
## [Functions](functions/index.md)

- [getCawgTrustConfig](functions/getCawgTrustConfig.md)
- [getSettingsJson](functions/getSettingsJson.md)
Expand Down
32 changes: 32 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
title: C2PA Node.js library
description: >- # this means to ignore newlines until "baseurl:"
API documentation for the Content Authenticity Initiative Node.js library.
baseurl: "/c2pa-node-v2" # the subpath of your site, e.g. /blog
url: "https://contentauth.github.io" # the base hostname & protocol for your site, e.g. http://example.com

# Build settings
remote_theme: "jekyll/minima@1e8a445"
#theme: minima


defaults:
- scope:
path: "classes"
type: "pages"
values:
layout: "page"
- scope:
path: "functions"
type: "pages"
values:
layout: "page"
- scope:
path: "interfaces"
type: "pages"
values:
layout: "page"
- scope:
path: "type-aliases"
type: "pages"
values:
layout: "page"
1 change: 1 addition & 0 deletions docs/_includes/custom-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<link id="main-stylesheet" rel="stylesheet" href="{{ '/assets/css/cai-custom.css' | relative_url }}">
29 changes: 29 additions & 0 deletions docs/_includes/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<link id="fa-stylesheet" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css">

<footer class="site-footer h-card">
<data class="u-url" value="{{ '/' | relative_url }}"></data>

<div class="wrapper">

<div class="footer-col-wrapper">
<div class="footer-col">
{%- if site.author %}
<ul class="contact-list">
{% if site.author.name -%}
<li class="p-name">{{ site.author.name | escape }}</li>
{% endif -%}
{% if site.author.email -%}
<li><a class="u-email" href="mailto:{{ site.author.email }}">{{ site.author.email }}</a></li>
{%- endif %}
</ul>
{%- endif %}
</div>
<div class="footer-col">
<p>{{ site.description | escape }}</p>
</div>
</div>


</div>

</footer>
10 changes: 10 additions & 0 deletions docs/_includes/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{%- seo -%}
<link id="main-stylesheet" rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">

{%- include custom-head.html -%}

</head>
16 changes: 16 additions & 0 deletions docs/_includes/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<header class="site-header">

<div class="wrapper">
{%- assign default_paths = site.pages | map: "path" -%}
{%- assign page_paths = site.minima.nav_pages | default: default_paths -%}
{%- assign page_titles = site.pages | map: 'title' | compact %}
<a class="site-title" rel="author" href="{{ '/' | relative_url }}">{{ site.title | escape }}</a>

{%- unless page_titles == empty %}
<nav class="site-nav">

{% include nav-items.html paths = page_paths %}
</nav>
{%- endunless %}
</div>
</header>
8 changes: 8 additions & 0 deletions docs/_includes/nav-items.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div class="nav-items">
{%- for path in include.paths -%}
{%- assign hyperpage = site.pages | where: "path", path | first -%}
{%- if hyperpage.title %}
<a class="nav-item" href="{{ hyperpage.url | relative_url }}">{{ hyperpage.title | escape }}</a>
{%- endif -%}
{%- endfor %}
</div>
11 changes: 11 additions & 0 deletions docs/_includes/sidebar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{%- assign readme_page = site.pages | where: "path", "README.md" | first -%}
{%- if readme_page -%}
<nav class="sidebar-content">
{%- assign _c = readme_page.content -%}
{%- assign _c = _c | replace: "This is API documentation for the C2PA Node.js library.", "" -%}
{%- assign _c = _c | replace: "# @contentauth/c2pa-node", "" -%}
{{ _c | strip | markdownify }}
</nav>
{%- endif -%}


4 changes: 4 additions & 0 deletions docs/_includes/sub-footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% comment %}
Use this to insert markup before the closing body tag.
For example, scripts that need to be executed after the document has finished loading.
{% endcomment %}
29 changes: 29 additions & 0 deletions docs/_layouts/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: 'en' }}">

{%- include head.html -%}

<body>

{%- include header.html -%}

<main class="page-content" aria-label="Content">

<div class="wrapper site-layout">
<aside class="sidebar">
{%- include sidebar.html -%}
</aside>
<div class="site-main">
{{ content }}
</div>
</div>

</main>

{%- include footer.html -%}

{%- include sub-footer.html -%}

</body>

</html>
12 changes: 12 additions & 0 deletions docs/_layouts/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: base
---

<div class="home">
{%- if page.title -%}
<h1 class="page-heading">{{ page.title }}</h1>
{%- endif -%}

{{ content }}

</div>
10 changes: 10 additions & 0 deletions docs/_layouts/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
layout: base
---
<article class="post">

<div class="post-content">
{{ content }}
</div>

</article>
53 changes: 53 additions & 0 deletions docs/assets/css/cai-custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
.site-layout {
display: grid;
grid-template-columns: minmax(220px, 320px) 1fr;
gap: 2rem;
}
.wrapper.site-layout { max-width: 1200px; }
.sidebar {
position: sticky;
top: 1rem;
max-height: calc(100vh - 2rem);
overflow: auto;
padding-right: 0.75rem;
border-right: 1px solid #eaecef;
max-width: 320px;
}
.sidebar-content { font-size: 0.95em; line-height: 1.45; }
.sidebar-content h1 { font-size: 1.1rem; margin-top: 1rem; }
.sidebar-content h2 { font-size: 1rem; margin-top: 0.9rem; }
.sidebar-content h3 { font-size: 0.95rem; margin-top: 0.8rem; }
.sidebar-content ul { list-style: none; padding-left: 0; }
.sidebar-content li { margin: 0.25rem 0; }
.site-main { min-width: 0; }

/* Left-align site header with small padding */
.site-header > .wrapper {
max-width: none;
margin: 0;
padding-left: 12px;
padding-right: 12px;
}

.nav-item {
margin-left: 0.25rem;
margin-right: 0.25rem;
}

/* Hide top link to README and following hr generated by typedoc markdown in pages and sidebar */
.post-content > p:first-child { display: none; }
.post-content hr { display: none; }
.post-content h1 { margin-bottom: 1.5rem; }

/* Hide text and hr in home page too */
.home > p:first-child { display: none; }
.home hr { display: none; }


.sidebar-content > p:first-child { display: none; }
.sidebar-content hr { display: none; }

@media (max-width: 900px) {
.site-layout { grid-template-columns: 1fr; }
.sidebar { display: none; }
}
10 changes: 10 additions & 0 deletions docs/classes/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Classes

- [Builder](Builder.md)
- [CallbackCredentialHolder](CallbackCredentialHolder.md)
- [CallbackSigner](CallbackSigner.md)
- [IdentityAssertionBuilder](IdentityAssertionBuilder.md)
- [IdentityAssertionSigner](IdentityAssertionSigner.md)
- [LocalSigner](LocalSigner.md)
- [Reader](Reader.md)
- [Trustmark](Trustmark.md)
15 changes: 15 additions & 0 deletions docs/functions/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Functions

- [getCawgTrustConfig](getCawgTrustConfig.md)
- [getSettingsJson](getSettingsJson.md)
- [getTrustConfig](getTrustConfig.md)
- [getVerifyConfig](getVerifyConfig.md)
- [isActionsAssertion](isActionsAssertion.md)
- [loadC2paSettings](loadC2paSettings.md)
- [loadC2paSettingsToml](loadC2paSettingsToml.md)
- [loadCawgTrustConfig](loadCawgTrustConfig.md)
- [loadSettingsFromFile](loadSettingsFromFile.md)
- [loadSettingsFromUrl](loadSettingsFromUrl.md)
- [loadTrustConfig](loadTrustConfig.md)
- [loadVerifyConfig](loadVerifyConfig.md)
- [patchVerifyConfig](patchVerifyConfig.md)
19 changes: 19 additions & 0 deletions docs/interfaces/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Interfaces

- [BuilderInterface](BuilderInterface.md)
- [CallbackCredentialHolderInterface](CallbackCredentialHolderInterface.md)
- [CallbackSignerInterface](CallbackSignerInterface.md)
- [DestinationBufferAsset](DestinationBufferAsset.md)
- [FileAsset](FileAsset.md)
- [HashedUri](HashedUri.md)
- [IdentityAssertionBuilderInterface](IdentityAssertionBuilderInterface.md)
- [IdentityAssertionSignerInterface](IdentityAssertionSignerInterface.md)
- [JsCallbackSignerConfig](JsCallbackSignerConfig.md)
- [LocalSignerInterface](LocalSignerInterface.md)
- [ReaderInterface](ReaderInterface.md)
- [SignerPayload](SignerPayload.md)
- [SourceBufferAsset](SourceBufferAsset.md)
- [TrustConfig](TrustConfig.md)
- [TrustmarkConfig](TrustmarkConfig.md)
- [TrustmarkInterface](TrustmarkInterface.md)
- [VerifyConfig](VerifyConfig.md)
18 changes: 18 additions & 0 deletions docs/type-aliases/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Type Aliases

- [CallbackSignerConfig](CallbackSignerConfig.md)
- [ClaimVersion](ClaimVersion.md)
- [DestinationAsset](DestinationAsset.md)
- [ManifestAssertionKind](ManifestAssertionKind.md)
- [NeonBuilderHandle](NeonBuilderHandle.md)
- [NeonCallbackCredentialHolderHandle](NeonCallbackCredentialHolderHandle.md)
- [NeonCallbackSignerHandle](NeonCallbackSignerHandle.md)
- [NeonIdentityAssertionBuilderHandle](NeonIdentityAssertionBuilderHandle.md)
- [NeonIdentityAssertionSignerHandle](NeonIdentityAssertionSignerHandle.md)
- [NeonLocalSignerHandle](NeonLocalSignerHandle.md)
- [NeonReaderHandle](NeonReaderHandle.md)
- [NeonTrustmarkHandle](NeonTrustmarkHandle.md)
- [SigningAlg](SigningAlg.md)
- [SourceAsset](SourceAsset.md)
- [TrustmarkVariant](TrustmarkVariant.md)
- [TrustmarkVersion](TrustmarkVersion.md)