diff --git a/docs/.gitignore b/docs/.gitignore index 0084ce753..c4bc24727 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,3 +1,4 @@ /.jekyll* +/.ruby* /_site /lab/fonts diff --git a/docs/Gemfile b/docs/Gemfile index 0e6f09ed8..9d14e8b7c 100644 --- a/docs/Gemfile +++ b/docs/Gemfile @@ -32,4 +32,6 @@ gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin] # do not have a Java counterpart. gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] -gem "webrick", "~> 1.7" +gem "jekyll-redirect-from" + +gem "webrick" diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 39b1511ca..3631e2bca 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -1,8 +1,8 @@ GEM remote: https://rubygems.org/ specs: - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) colorator (1.1.0) concurrent-ruby (1.1.10) em-websocket (0.5.3) @@ -12,7 +12,7 @@ GEM ffi (1.15.5) forwardable-extended (2.6.0) http_parser.rb (0.8.0) - i18n (1.10.0) + i18n (1.12.0) concurrent-ruby (~> 1.0) jekyll (4.2.2) addressable (~> 2.4) @@ -31,6 +31,8 @@ GEM terminal-table (~> 2.0) jekyll-feed (0.16.0) jekyll (>= 3.7, < 5.0) + jekyll-redirect-from (0.16.0) + jekyll (>= 3.3, < 5.0) jekyll-sass-converter (2.2.0) sassc (> 2.0.1, < 3.0) jekyll-seo-tag (2.8.0) @@ -52,12 +54,12 @@ GEM jekyll-seo-tag (~> 2.1) pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (4.0.7) - rb-fsevent (0.11.1) + public_suffix (5.0.0) + rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) rexml (3.2.5) - rouge (3.28.0) + rouge (3.30.0) safe_yaml (1.0.5) sassc (2.4.0) ffi (~> 1.9) @@ -67,17 +69,18 @@ GEM webrick (1.7.0) PLATFORMS - arm64-darwin-21 + x86_64-darwin-19 DEPENDENCIES http_parser.rb (~> 0.6.0) jekyll (~> 4.2.2) jekyll-feed (~> 0.12) + jekyll-redirect-from minima (~> 2.5) tzinfo (~> 1.2) tzinfo-data wdm (~> 0.1.1) - webrick (~> 1.7) + webrick BUNDLED WITH - 2.3.14 + 2.3.22 diff --git a/docs/Makefile b/docs/Makefile index e332f0006..9dae0e45a 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -6,13 +6,22 @@ export PATH := $(BIN):$(PATH) default: @echo "Please specify a target: build, serve or dist" >&2 -build: +build: .ruby-bundle rm -rf _site bundle exec jekyll build -serve: +serve: .ruby-bundle ./_scripts/serve.sh +.ruby-bundle: Gemfile Gemfile.lock + @if ! (command -v bundle >/dev/null && command -v jekyll >/dev/null); then \ + echo "Please install Ruby bundle and jekyll: gem install bundler jekyll" >&2; \ + exit 1; \ + fi + bundle update + bundle install + touch .ruby-bundle + # ----------------------------------------------------------------------- dist: fonts info diff --git a/docs/_includes/preload-font-files.html b/docs/_includes/preload-font-files.html index ef3f393d4..cbeaab35c 100644 --- a/docs/_includes/preload-font-files.html +++ b/docs/_includes/preload-font-files.html @@ -5,5 +5,5 @@ assign url_root = "/" %}{% else %}{% assign url_root = "/inter/" %}{% endif %}{% assign font_v = site.data.fontinfo[0].version -%} - \ No newline at end of file +%} + \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 28ab65822..4b41ea1d4 100644 --- a/docs/index.html +++ b/docs/index.html @@ -84,19 +84,17 @@ endfor
Using Inter is as easy as
downloading & installing
- the font files. If you're making a web thing, you can use the following CSS.
-
+ the font files.
+ If you're making a web thing, you can use the following HTML and CSS:
<link rel="preconnect" href="https://rsms.me/"> -<link rel="stylesheet" href="https://rsms.me/inter/inter.css">-
html { - font-family: 'Inter', sans-serif; -} +<!-- HTML in your document's head --> +<link rel="preconnect" href="https://rsms.me/"> +<link rel="stylesheet" href="https://rsms.me/inter/inter.css"> +/* CSS */ +:root { font-family: 'Inter', sans-serif; } @supports (font-variation-settings: normal) { - html { - font-family: 'Inter var', sans-serif; - } + :root { font-family: 'Inter var', sans-serif; } }