diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index 8e8299dcc..000000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.4.2 diff --git a/Gemfile b/Gemfile deleted file mode 100644 index ba2062243..000000000 --- a/Gemfile +++ /dev/null @@ -1,4 +0,0 @@ -source "https://rubygems.org" -gem "jekyll" -gem "jekyll-redirect-from" -gem "jekyll-seo-tag" diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index e36d36a04..000000000 --- a/Gemfile.lock +++ /dev/null @@ -1,69 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - addressable (2.5.2) - public_suffix (>= 2.0.2, < 4.0) - colorator (1.1.0) - concurrent-ruby (1.0.5) - em-websocket (0.5.1) - eventmachine (>= 0.12.9) - http_parser.rb (~> 0.6.0) - eventmachine (1.2.5) - ffi (1.9.18) - forwardable-extended (2.6.0) - http_parser.rb (0.6.0) - i18n (0.9.1) - concurrent-ruby (~> 1.0) - jekyll (3.7.0) - addressable (~> 2.4) - colorator (~> 1.0) - em-websocket (~> 0.5) - i18n (~> 0.7) - jekyll-sass-converter (~> 1.0) - jekyll-watch (~> 2.0) - kramdown (~> 1.14) - liquid (~> 4.0) - mercenary (~> 0.3.3) - pathutil (~> 0.9) - rouge (>= 1.7, < 4) - safe_yaml (~> 1.0) - jekyll-redirect-from (0.13.0) - jekyll (~> 3.3) - jekyll-sass-converter (1.5.1) - sass (~> 3.4) - jekyll-seo-tag (2.4.0) - jekyll (~> 3.3) - jekyll-watch (2.0.0) - listen (~> 3.0) - kramdown (1.16.2) - liquid (4.0.0) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) - mercenary (0.3.6) - pathutil (0.16.1) - forwardable-extended (~> 2.6) - public_suffix (3.0.1) - rb-fsevent (0.10.2) - rb-inotify (0.9.10) - ffi (>= 0.5.0, < 2) - rouge (3.1.0) - ruby_dep (1.5.0) - safe_yaml (1.0.4) - sass (3.5.4) - sass-listen (~> 4.0.0) - sass-listen (4.0.0) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - -PLATFORMS - ruby - -DEPENDENCIES - jekyll - jekyll-redirect-from - jekyll-seo-tag - -BUNDLED WITH - 1.16.1 diff --git a/docs/.editorconfig b/docs/.editorconfig new file mode 100644 index 000000000..1aabdd3fa --- /dev/null +++ b/docs/.editorconfig @@ -0,0 +1,13 @@ +[*] +end_of_line = lf +charset = utf-8 +max_line_length = 80 +trim_trailing_whitespace = true +insert_final_newline = false + +[*.{html,js,sh,sass,md,mmark}] +indent_style = space +indent_size = 2 + +[Makefile] +indent_style = tab diff --git a/docs/.gitignore b/docs/.gitignore index fd582e5a6..4322a87a9 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,8 +1,6 @@ **/.DS_Store **/desktop.ini -.bundle/** -.jekyll-metadata -_site/** -.sass-cache/** CNAME -Gemfile.lock \ No newline at end of file + +# Hugo-generated content +public/ diff --git a/docs/Dockerfile b/docs/Dockerfile index 93e438dfe..979170769 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -15,4 +15,4 @@ FROM nginx -COPY _site /usr/share/nginx/html +COPY public /usr/share/nginx/html diff --git a/docs/hooks/pre_build b/docs/Makefile old mode 100755 new mode 100644 similarity index 73% rename from docs/hooks/pre_build rename to docs/Makefile index c65cef387..7c0c01abe --- a/docs/hooks/pre_build +++ b/docs/Makefile @@ -1,5 +1,3 @@ -#!/bin/bash - # Copyright The containerd Authors. # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,13 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. +HUGO = hugo +BASE_URL = https://containerd.io -echo "=> Building the binary" -docker run --privileged \ - -v $(pwd):/usr/src/app \ - -v /var/run/docker.sock:/var/run/docker.sock \ - starefossen/github-pages jekyll build -echo $(pwd) -ls -la -ls -la _site +clean: + rm -rf public +build: clean + $(HUGO) \ + --baseURL $(BASE_URL) + +build-preview: clean + $(HUGO) + +dev: clean + $(HUGO) server \ + --disableFastRender \ + --ignoreCache diff --git a/docs/README.md b/docs/README.md index 03521e21f..aa5034833 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,10 +1,12 @@ # Containerd website -The containerd website is built using Jekyll and published to Github pages. +The containerd website at https://containerd.io is built using [Hugo](https://gohugo.io) and published to [Netlify](https://netlify.com). -In order to build and test locally: -``` -docker run -it -v "$PWD":/usr/src/app -p "4000:4000" starefossen/github-pages -``` -Then browser to localhost:4000 to see the rendered site. The site autorefreshes when you modify files locally. +To develop the site locally in "watch" mode (using Docker): + +```bash +$ docker run -it -v $(pwd):/src -p "1313:1313" -e HUGO_WATCH=true jojomi/hugo +``` + +You can then open up your browser to localhost:1313 to see the rendered site. The site auto-refreshes when you modify files locally. diff --git a/docs/_config.yml b/docs/_config.yml deleted file mode 100644 index b995e943a..000000000 --- a/docs/_config.yml +++ /dev/null @@ -1,23 +0,0 @@ -markdown: kramdown -kramdown: - input: GFM - html_to_native: true - hard_wrap: false - syntax_highlighter: rouge -incremental: true -permalink: pretty -safe: false -lsi: false -exclude: [README.md] - -plugins: - - jekyll-redirect-from - - jekyll-seo-tag - -defaults: - - - scope: - path: "" - type: "pages" - values: - layout: default diff --git a/docs/_includes/footer.html b/docs/_includes/footer.html deleted file mode 100644 index 7a5fddefc..000000000 --- a/docs/_includes/footer.html +++ /dev/null @@ -1,21 +0,0 @@ -
- - - - -