Compare commits

..

No commits in common. "e371cdedcbbd7a143a3ec08d1fb644efdeefea97" and "a3c94eef9f04724f604d89efde00dee14dcf07f0" have entirely different histories.

8 changed files with 48 additions and 87 deletions

View File

@ -1,3 +0,0 @@
Dockerfile
Makefile
_site

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "_vendor/jekyll-theme-console"]
path = _vendor/jekyll-theme-console
url = https://github.com/b2a3e8/jekyll-theme-console

View File

@ -1,14 +1,12 @@
FROM ruby:3.2.2-alpine AS builder FROM jekyll/minimal:3.8
LABEL stage=distrust-co-builder
RUN apk update && apk add g++ make git git-lfs RUN apk update && apk add g++ make
RUN mkdir -p /home RUN mkdir -p /home
COPY Gemfile /home COPY Gemfile /home
COPY Gemfile.lock /home COPY Gemfile.lock /home
COPY _vendor /home/_vendor RUN chmod -R 777 /home
WORKDIR /home WORKDIR /home
RUN bundle install RUN bundle install
COPY . /home
RUN jekyll build
FROM nginx CMD ["jekyll", "serve"]
COPY --from=builder /home/_site /usr/share/nginx/html

View File

@ -1,2 +1,5 @@
source "https://rubygems.org" source "https://rubygems.org"
gem "jekyll-theme-console", path: "./_vendor/jekyll-theme-console" gem "jekyll", "~> 3.8"
gem "jekyll-theme-console"
gem "sassc", "~> 2.1.0"
gem "kramdown-parser-gfm"

View File

@ -1,47 +1,39 @@
PATH
remote: _vendor/jekyll-theme-console
specs:
jekyll-theme-console (0.4.0)
jekyll (>= 3.5)
jekyll-seo-tag
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
addressable (2.8.4) addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0) public_suffix (>= 2.0.2, < 6.0)
colorator (1.1.0) colorator (1.1.0)
concurrent-ruby (1.2.2) concurrent-ruby (1.2.0)
em-websocket (0.5.3) em-websocket (0.5.3)
eventmachine (>= 0.12.9) eventmachine (>= 0.12.9)
http_parser.rb (~> 0) http_parser.rb (~> 0)
eventmachine (1.2.7) eventmachine (1.2.7)
ffi (1.15.5) ffi (1.15.5)
forwardable-extended (2.6.0) forwardable-extended (2.6.0)
google-protobuf (3.23.4-x86_64-linux)
http_parser.rb (0.8.0) http_parser.rb (0.8.0)
i18n (1.14.1) i18n (0.9.5)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
jekyll (4.3.2) jekyll (3.9.2)
addressable (~> 2.4) addressable (~> 2.4)
colorator (~> 1.0) colorator (~> 1.0)
em-websocket (~> 0.5) em-websocket (~> 0.5)
i18n (~> 1.0) i18n (~> 0.7)
jekyll-sass-converter (>= 2.0, < 4.0) jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 2.0) jekyll-watch (~> 2.0)
kramdown (~> 2.3, >= 2.3.1) kramdown (>= 1.17, < 3)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0) liquid (~> 4.0)
mercenary (>= 0.3.6, < 0.5) mercenary (~> 0.3.3)
pathutil (~> 0.9) pathutil (~> 0.9)
rouge (>= 3.0, < 5.0) rouge (>= 1.7, < 4)
safe_yaml (~> 1.0) safe_yaml (~> 1.0)
terminal-table (>= 1.8, < 4.0) jekyll-sass-converter (1.5.2)
webrick (~> 1.7) sass (~> 3.4)
jekyll-sass-converter (3.0.0)
sass-embedded (~> 1.54)
jekyll-seo-tag (2.8.0) jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0) jekyll (>= 3.8, < 5.0)
jekyll-theme-console (0.4.0)
jekyll (>= 3.5)
jekyll-seo-tag
jekyll-watch (2.2.1) jekyll-watch (2.2.1)
listen (~> 3.0) listen (~> 3.0)
kramdown (2.4.0) kramdown (2.4.0)
@ -52,28 +44,32 @@ GEM
listen (3.8.0) listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3) rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10) rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0) mercenary (0.3.6)
pathutil (0.16.2) pathutil (0.16.2)
forwardable-extended (~> 2.6) forwardable-extended (~> 2.6)
public_suffix (5.0.3) public_suffix (5.0.1)
rb-fsevent (0.11.2) rb-fsevent (0.11.2)
rb-inotify (0.10.1) rb-inotify (0.10.1)
ffi (~> 1.0) ffi (~> 1.0)
rexml (3.2.5) rexml (3.2.5)
rouge (4.1.2) rouge (3.30.0)
safe_yaml (1.0.5) safe_yaml (1.0.5)
sass-embedded (1.64.1-x86_64-linux-musl) sass (3.7.4)
google-protobuf (~> 3.23) sass-listen (~> 4.0.0)
terminal-table (3.0.2) sass-listen (4.0.0)
unicode-display_width (>= 1.1.1, < 3) rb-fsevent (~> 0.9, >= 0.9.4)
unicode-display_width (2.4.2) rb-inotify (~> 0.9, >= 0.9.7)
webrick (1.8.1) sassc (2.1.0)
ffi (~> 1.9)
PLATFORMS PLATFORMS
x86_64-linux-musl ruby
DEPENDENCIES DEPENDENCIES
jekyll-theme-console! jekyll (~> 3.8)
jekyll-theme-console
kramdown-parser-gfm
sassc (~> 2.1.0)
BUNDLED WITH BUNDLED WITH
2.4.10 2.1.4

View File

@ -3,20 +3,15 @@ build:
# Build Docker image # Build Docker image
docker build -t distrust-co . docker build -t distrust-co .
.PHONY: fullclean # Export site to _site directory
fullclean: clean docker run -v $(shell pwd):/home -it distrust-co jekyll build
docker rmi distrust-co -f
docker image prune --filter label=stage=distrust-co-builder
.PHONY: clean
clean:
rm -r _site
_site: build
mkdir -p _site
docker run distrust-co tar c -C /usr/share/nginx/html . | tar x -C _site
.PHONY: serve .PHONY: serve
serve: serve:
# Run Docker container with listener for current dir and port mapping # Run Docker container with listener for current dir and port mapping
docker run --rm -p 0.0.0.0:4000:80 -it distrust-co docker run -v $(shell pwd):/home -p 0.0.0.0:4000:4000 -it distrust-co
.PHONY: clean
clean:
# Remove _site directory
rm -rf _site

View File

@ -4,37 +4,13 @@ Web page source.
## Instructions ## Instructions
0. If the repo was not cloned with submodules:
```shell
$ git submodule update --init --recursive
```
1. Install `make`. 1. Install `make`.
2. Install `docker` 2. Install `docker`
3. Build (export) site to `_site` directory: 3. Build (export) site to `_site` directory:
```shell ```shell
$ make build $ make build
``` ```
4. Serve site at `0.0.0.0:4000`: 4. Serve site at `0.0.0.0:4000`:
```shell ```shell
$ make serve $ make serve
``` ```
### Generate Static Files
1. Output static files in `_site` directory:
```shell
$ make _site
```
### Cleanup
1. Remove all build artifacts:
```shell
$ make fullclean
```

@ -1 +0,0 @@
Subproject commit 76983908faa6f06ffd87b70165f2632790d36687