Skip to content

Commit 1232ed6

Browse files
authored
gh-pages: add Dockerfile for local dev/testing (OAI#3201)
Signed-off-by: Mike Ralphson <[email protected]>
1 parent 003ee43 commit 1232ed6

File tree

7 files changed

+163
-2
lines changed

7 files changed

+163
-2
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
_site/
2+
deploy/
3+
node_modules/
4+
scripts/
5+
package-lock.json

CONTRIBUTING.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Contributing
2+
3+
## Building the site
4+
5+
The registy site uses [jekyll](https://jekyllrb.com/), a Ruby based static site generator, with the Dinky theme.
6+
7+
### Docker dev
8+
9+
You can use the following Docker command to build and serve the site:
10+
11+
```shell
12+
docker build . -t oas-spec/latest
13+
docker run -v $(pwd):/site -p 4000:4000 oas-spec/latest
14+
```
15+
16+
### Local Ruby dev
17+
18+
You will need to set up Ruby locally to run the server and see your changes.
19+
20+
``` bash
21+
gem install bundler
22+
bundle install
23+
```
24+
25+
With all the gems (dependencies) installed, you can launch the jekyll server.
26+
27+
``` bash
28+
bundle exec jekyll serve
29+
```
30+
31+
It will show output like this, and you can grab the Server address and open it in your browser.
32+
33+
```
34+
Configuration file: /site/_config.yml
35+
Source: /site
36+
Destination: /site/_site
37+
Incremental build: disabled. Enable with --incremental
38+
Generating...
39+
done in 3.609 seconds.
40+
Auto-regeneration: enabled for '/site'
41+
Server address: http://0.0.0.0:4000
42+
```
43+

Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM bretfisher/jekyll-serve
2+
3+
WORKDIR /site
4+
5+
# install dependencies
6+
COPY Gemfile Gemfile.lock .
7+
RUN bundle install
8+
9+
# install the site
10+
COPY . .
11+
12+
EXPOSE 4000
13+
CMD [ "bundle", "exec", "jekyll", "serve", "--host", "0.0.0.0" ]

Gemfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
gem "jekyll", "~> 4.2"
6+
gem "webrick", "~> 1.7"
7+
gem "jekyll-remote-theme"
8+
gem "jekyll-theme-dinky"
9+
10+
group :jekyll_plugins do
11+
gem "jekyll-sitemap", "~> 1.4"
12+
end

Gemfile.lock

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
addressable (2.8.1)
5+
public_suffix (>= 2.0.2, < 6.0)
6+
colorator (1.1.0)
7+
concurrent-ruby (1.2.2)
8+
em-websocket (0.5.3)
9+
eventmachine (>= 0.12.9)
10+
http_parser.rb (~> 0)
11+
eventmachine (1.2.7)
12+
ffi (1.15.5)
13+
forwardable-extended (2.6.0)
14+
google-protobuf (3.22.2-x86_64-linux)
15+
http_parser.rb (0.8.0)
16+
i18n (1.12.0)
17+
concurrent-ruby (~> 1.0)
18+
jekyll (4.3.2)
19+
addressable (~> 2.4)
20+
colorator (~> 1.0)
21+
em-websocket (~> 0.5)
22+
i18n (~> 1.0)
23+
jekyll-sass-converter (>= 2.0, < 4.0)
24+
jekyll-watch (~> 2.0)
25+
kramdown (~> 2.3, >= 2.3.1)
26+
kramdown-parser-gfm (~> 1.0)
27+
liquid (~> 4.0)
28+
mercenary (>= 0.3.6, < 0.5)
29+
pathutil (~> 0.9)
30+
rouge (>= 3.0, < 5.0)
31+
safe_yaml (~> 1.0)
32+
terminal-table (>= 1.8, < 4.0)
33+
webrick (~> 1.7)
34+
jekyll-remote-theme (0.4.3)
35+
addressable (~> 2.0)
36+
jekyll (>= 3.5, < 5.0)
37+
jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0)
38+
rubyzip (>= 1.3.0, < 3.0)
39+
jekyll-sass-converter (3.0.0)
40+
sass-embedded (~> 1.54)
41+
jekyll-seo-tag (2.8.0)
42+
jekyll (>= 3.8, < 5.0)
43+
jekyll-sitemap (1.4.0)
44+
jekyll (>= 3.7, < 5.0)
45+
jekyll-theme-dinky (0.2.0)
46+
jekyll (> 3.5, < 5.0)
47+
jekyll-seo-tag (~> 2.0)
48+
jekyll-watch (2.2.1)
49+
listen (~> 3.0)
50+
kramdown (2.4.0)
51+
rexml
52+
kramdown-parser-gfm (1.1.0)
53+
kramdown (~> 2.0)
54+
liquid (4.0.4)
55+
listen (3.8.0)
56+
rb-fsevent (~> 0.10, >= 0.10.3)
57+
rb-inotify (~> 0.9, >= 0.9.10)
58+
mercenary (0.4.0)
59+
pathutil (0.16.2)
60+
forwardable-extended (~> 2.6)
61+
public_suffix (5.0.1)
62+
rb-fsevent (0.11.2)
63+
rb-inotify (0.10.1)
64+
ffi (~> 1.0)
65+
rexml (3.2.5)
66+
rouge (4.1.0)
67+
rubyzip (2.3.2)
68+
safe_yaml (1.0.5)
69+
sass-embedded (1.59.2-x86_64-linux-gnu)
70+
google-protobuf (~> 3.21)
71+
terminal-table (3.0.2)
72+
unicode-display_width (>= 1.1.1, < 3)
73+
unicode-display_width (2.4.2)
74+
webrick (1.8.1)
75+
76+
PLATFORMS
77+
x86_64-linux
78+
79+
DEPENDENCIES
80+
jekyll (~> 4.2)
81+
jekyll-remote-theme
82+
jekyll-sitemap (~> 1.4)
83+
jekyll-theme-dinky
84+
webrick (~> 1.7)
85+
86+
BUNDLED WITH
87+
2.4.7

index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: OpenAPI Initiative gh-pages repository
33
description: HTML Spec. and extensible registry
4+
layout: default
45
---
56
# OpenAPI Initiative Registry
67

@@ -13,4 +14,4 @@ This site contains the OpenAPI Initiative Registry and content for the HTML vers
1314
## The Specification
1415

1516
* [Markdown source-of-truth](https://github.com/OAI/OpenAPI-Specification)
16-
* [HTML Specification version](oas/v3.1.0.html)
17+
* [HTML Specification version](oas/latest.html)

registry/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Please raise a [Pull-Request](https://github.com/OAI/OpenAPI-Specification/pulls
1414

1515
#### API access
1616

17-
* [registries.json](./api/registries.json) - Registries meta-registry
17+
* [registries.json](../api/registries.json) - Registries meta-registry
1818
{% for registry in site.collections %}{% unless registry.hidden %}* <a href="../api/{{ registry.slug }}.json">{{ registry.slug }}.json</a>{% endunless %}
1919
{% endfor %}
2020

0 commit comments

Comments
 (0)