Skip to content

Commit 064973d

Browse files
authored
Merge pull request #28 from crandmck/main
feat: Create Jekyll site for API reference docs
2 parents 9e2fb33 + 2e40920 commit 064973d

File tree

20 files changed

+346
-4
lines changed

20 files changed

+346
-4
lines changed

docs/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
_site
2+
.sass-cache
3+
.jekyll-cache
4+
.jekyll-metadata
5+
vendor
6+
Gemfile.lock

docs/404.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
permalink: /404.html
3+
layout: base
4+
---
5+
6+
<style type="text/css" media="screen">
7+
.container {
8+
margin: 10px auto;
9+
max-width: 600px;
10+
text-align: center;
11+
}
12+
h1 {
13+
margin: 30px 0;
14+
font-size: 4em;
15+
line-height: 1;
16+
letter-spacing: -1px;
17+
}
18+
</style>
19+
20+
<div class="container">
21+
<h1>404</h1>
22+
23+
<p><strong>Page not found :(</strong></p>
24+
<p>The requested page could not be found.</p>
25+
</div>

docs/Gemfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
source "https://rubygems.org"
2+
# Hello! This is where you manage which Jekyll version is used to run.
3+
# When you want to use a different version, change it below, save the
4+
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
5+
#
6+
# bundle exec jekyll serve
7+
#
8+
# This will help ensure the proper Jekyll version is running.
9+
# Happy Jekylling!
10+
# gem "jekyll", "~> 4.3.4"
11+
# This is the default theme for new Jekyll sites. You may change this to anything you like.
12+
gem "minima", "~> 2.5"
13+
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
14+
# uncomment the line below. To upgrade, run `bundle update github-pages`.
15+
# gem "github-pages", group: :jekyll_plugins
16+
17+
# If you have any plugins, put them here!
18+
group :jekyll_plugins do
19+
gem "github-pages", "~> 232"
20+
end
21+
22+
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
23+
# and associated library.
24+
platforms :mingw, :x64_mingw, :mswin, :jruby do
25+
gem "tzinfo", ">= 1", "< 3"
26+
gem "tzinfo-data"
27+
end
28+
29+
# Performance-booster for watching directories on Windows
30+
gem "wdm", "~> 0.1", :platforms => [:mingw, :x64_mingw, :mswin]
31+
32+
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
33+
# do not have a Java counterpart.
34+
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

docs/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# @contentauth/c2pa-node
66

7-
## Classes
7+
## [Classes](classes/index.md)
88

99
- [Builder](classes/Builder.md)
1010
- [CallbackCredentialHolder](classes/CallbackCredentialHolder.md)
@@ -15,7 +15,7 @@
1515
- [Reader](classes/Reader.md)
1616
- [Trustmark](classes/Trustmark.md)
1717

18-
## Interfaces
18+
## [Interfaces](interfaces/index.md)
1919

2020
- [BuilderInterface](interfaces/BuilderInterface.md)
2121
- [CallbackCredentialHolderInterface](interfaces/CallbackCredentialHolderInterface.md)
@@ -35,7 +35,7 @@
3535
- [TrustmarkInterface](interfaces/TrustmarkInterface.md)
3636
- [VerifyConfig](interfaces/VerifyConfig.md)
3737

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

4040
- [CallbackSignerConfig](type-aliases/CallbackSignerConfig.md)
4141
- [ClaimVersion](type-aliases/ClaimVersion.md)
@@ -54,7 +54,7 @@
5454
- [TrustmarkVariant](type-aliases/TrustmarkVariant.md)
5555
- [TrustmarkVersion](type-aliases/TrustmarkVersion.md)
5656

57-
## Functions
57+
## [Functions](functions/index.md)
5858

5959
- [getCawgTrustConfig](functions/getCawgTrustConfig.md)
6060
- [getSettingsJson](functions/getSettingsJson.md)

docs/_config.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
title: C2PA Node.js library
2+
description: >- # this means to ignore newlines until "baseurl:"
3+
API documentation for the Content Authenticity Initiative Node.js library.
4+
baseurl: "/c2pa-node-v2" # the subpath of your site, e.g. /blog
5+
url: "https://contentauth.github.io" # the base hostname & protocol for your site, e.g. http://example.com
6+
7+
# Build settings
8+
remote_theme: "jekyll/minima@1e8a445"
9+
#theme: minima
10+
11+
12+
defaults:
13+
- scope:
14+
path: "classes"
15+
type: "pages"
16+
values:
17+
layout: "page"
18+
- scope:
19+
path: "functions"
20+
type: "pages"
21+
values:
22+
layout: "page"
23+
- scope:
24+
path: "interfaces"
25+
type: "pages"
26+
values:
27+
layout: "page"
28+
- scope:
29+
path: "type-aliases"
30+
type: "pages"
31+
values:
32+
layout: "page"

docs/_includes/custom-head.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<link id="main-stylesheet" rel="stylesheet" href="{{ '/assets/css/cai-custom.css' | relative_url }}">

docs/_includes/footer.html

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<link id="fa-stylesheet" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css">
2+
3+
<footer class="site-footer h-card">
4+
<data class="u-url" value="{{ '/' | relative_url }}"></data>
5+
6+
<div class="wrapper">
7+
8+
<div class="footer-col-wrapper">
9+
<div class="footer-col">
10+
{%- if site.author %}
11+
<ul class="contact-list">
12+
{% if site.author.name -%}
13+
<li class="p-name">{{ site.author.name | escape }}</li>
14+
{% endif -%}
15+
{% if site.author.email -%}
16+
<li><a class="u-email" href="mailto:{{ site.author.email }}">{{ site.author.email }}</a></li>
17+
{%- endif %}
18+
</ul>
19+
{%- endif %}
20+
</div>
21+
<div class="footer-col">
22+
<p>{{ site.description | escape }}</p>
23+
</div>
24+
</div>
25+
26+
27+
</div>
28+
29+
</footer>

docs/_includes/head.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<head>
2+
<meta charset="utf-8">
3+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
4+
<meta name="viewport" content="width=device-width, initial-scale=1">
5+
{%- seo -%}
6+
<link id="main-stylesheet" rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
7+
8+
{%- include custom-head.html -%}
9+
10+
</head>

docs/_includes/header.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<header class="site-header">
2+
3+
<div class="wrapper">
4+
{%- assign default_paths = site.pages | map: "path" -%}
5+
{%- assign page_paths = site.minima.nav_pages | default: default_paths -%}
6+
{%- assign page_titles = site.pages | map: 'title' | compact %}
7+
<a class="site-title" rel="author" href="{{ '/' | relative_url }}">{{ site.title | escape }}</a>
8+
9+
{%- unless page_titles == empty %}
10+
<nav class="site-nav">
11+
12+
{% include nav-items.html paths = page_paths %}
13+
</nav>
14+
{%- endunless %}
15+
</div>
16+
</header>

docs/_includes/nav-items.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<div class="nav-items">
2+
{%- for path in include.paths -%}
3+
{%- assign hyperpage = site.pages | where: "path", path | first -%}
4+
{%- if hyperpage.title %}
5+
<a class="nav-item" href="{{ hyperpage.url | relative_url }}">{{ hyperpage.title | escape }}</a>
6+
{%- endif -%}
7+
{%- endfor %}
8+
</div>

0 commit comments

Comments
 (0)