Skip to content

Commit cc27594

Browse files
committed
Customize Jekyll site
1 parent 1fa120a commit cc27594

File tree

14 files changed

+289
-0
lines changed

14 files changed

+289
-0
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/_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: "" # the subpath of your site, e.g. /blog
5+
url: "https://crandmck.github.io/c2pa-node-v2/" # 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: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{% comment %}
2+
Placeholder to allow defining custom head, in principle, you can add anything here, e.g. favicons:
3+
4+
1. Head over to https://realfavicongenerator.net/ to add your own favicons.
5+
2. Customize default _includes/custom-head.html in your source directory and insert the given code snippet.
6+
{% endcomment %}
7+
<style>
8+
.site-layout {
9+
display: grid;
10+
grid-template-columns: minmax(220px, 320px) 1fr;
11+
gap: 2rem;
12+
}
13+
.wrapper.site-layout { max-width: 1200px; }
14+
.sidebar {
15+
position: sticky;
16+
top: 1rem;
17+
max-height: calc(100vh - 2rem);
18+
overflow: auto;
19+
padding-right: 0.75rem;
20+
border-right: 1px solid #eaecef;
21+
max-width: 320px;
22+
}
23+
.sidebar-content { font-size: 0.95em; line-height: 1.45; }
24+
.sidebar-content h1 { font-size: 1.1rem; margin-top: 1rem; }
25+
.sidebar-content h2 { font-size: 1rem; margin-top: 0.9rem; }
26+
.sidebar-content h3 { font-size: 0.95rem; margin-top: 0.8rem; }
27+
.sidebar-content ul { list-style: none; padding-left: 0; }
28+
.sidebar-content li { margin: 0.25rem 0; }
29+
.site-main { min-width: 0; }
30+
/* Left-align site header with small padding */
31+
.site-header > .wrapper {
32+
max-width: none;
33+
margin: 0;
34+
padding-left: 12px;
35+
padding-right: 12px;
36+
}
37+
/* Hide top link to README and following hr generated by typedoc markdown in pages and sidebar */
38+
39+
.post-content > p:first-child { display: none; }
40+
.post-content hr { display: none; }
41+
42+
.sidebar-content > p:first-child { display: none; }
43+
.sidebar-content hr { display: none; }
44+
45+
@media (max-width: 900px) {
46+
.site-layout { grid-template-columns: 1fr; }
47+
.sidebar { display: none; }
48+
}
49+
</style>

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: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
<input type="checkbox" id="nav-trigger" />
12+
<label for="nav-trigger">
13+
<span class="menu-icon"></span>
14+
</label>
15+
16+
{% include nav-items.html paths = page_paths %}
17+
</nav>
18+
{%- endunless %}
19+
</div>
20+
</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>

docs/_includes/sidebar.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{%- assign readme_page = site.pages | where: "path", "README.md" | first -%}
2+
{%- if readme_page -%}
3+
<nav class="sidebar-content">
4+
{%- assign _c = readme_page.content -%}
5+
{%- assign _c = _c | replace: "This is API documentation for the C2PA Node.js library.", "" -%}
6+
{%- assign _c = _c | replace: "# @contentauth/c2pa-node", "" -%}
7+
{{ _c | strip | markdownify }}
8+
</nav>
9+
{%- endif -%}
10+
11+

0 commit comments

Comments
 (0)