Compare commits

..

2 Commits

Author SHA1 Message Date
Matt Wang
ef215b6586 Replace sass lighten() and darken() with color.adjust() 2024-10-09 01:02:50 -07:00
Matt Wang
a0724c4370 Run bundle update (to force deprecation warnings) 2024-10-09 00:55:03 -07:00
24 changed files with 531 additions and 697 deletions

View File

@@ -15,54 +15,54 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
jekyll-version: [3.9, 4.3] jekyll-version: [3.9, 4.3]
os: [ubuntu-latest, macos-latest, windows-latest] os: [ ubuntu-latest, macos-latest, windows-latest ]
ruby-version: ["3.1", "3.2", "3.3", "3.4"] ruby-version: ["3.1", "3.2", "3.3"]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Setup Ruby ${{ matrix.ruby-version }} - name: Setup Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1 uses: ruby/setup-ruby@v1
with: with:
ruby-version: ${{ matrix.ruby-version }} ruby-version: ${{ matrix.ruby-version }}
bundler-cache: false bundler-cache: false
- name: Bundle Install (Jekyll ${{ matrix.jekyll-version }}) - name: Bundle Install (Jekyll ${{ matrix.jekyll-version }})
run: bundle install run: bundle install
env: env:
BUNDLE_GEMFILE: fixtures/Gemfile-jekyll-${{ matrix.jekyll-version }} BUNDLE_GEMFILE: fixtures/Gemfile-jekyll-${{ matrix.jekyll-version }}
- name: Init Search - name: Init Search
run: bundle exec rake search:init run: bundle exec rake search:init
env: env:
BUNDLE_GEMFILE: fixtures/Gemfile-jekyll-${{ matrix.jekyll-version }} BUNDLE_GEMFILE: fixtures/Gemfile-jekyll-${{ matrix.jekyll-version }}
- name: Build Site - name: Build Site
run: bundle exec jekyll build run: bundle exec jekyll build
env: env:
BUNDLE_GEMFILE: fixtures/Gemfile-jekyll-${{ matrix.jekyll-version }} BUNDLE_GEMFILE: fixtures/Gemfile-jekyll-${{ matrix.jekyll-version }}
github-pages-build: github-pages-build:
name: Build (github-pages gem) name: Build (github-pages gem)
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Setup Ruby - name: Setup Ruby
uses: ruby/setup-ruby@v1 uses: ruby/setup-ruby@v1
with: with:
ruby-version: "3.4" ruby-version: "3.2"
bundler-cache: false bundler-cache: false
- name: Bundle Install - name: Bundle Install
run: bundle install run: bundle install
env: env:
BUNDLE_GEMFILE: fixtures/Gemfile-github-pages BUNDLE_GEMFILE: fixtures/Gemfile-github-pages
- name: Build Site - name: Build Site
run: bundle exec jekyll build run: bundle exec jekyll build
env: env:
BUNDLE_GEMFILE: fixtures/Gemfile-github-pages BUNDLE_GEMFILE: fixtures/Gemfile-github-pages
validate: validate:
name: Validate HTML name: Validate HTML
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
ruby-version: ["3.4"] ruby-version: ["3.2"]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -86,7 +86,7 @@ jobs:
with: with:
config: fixtures/html5validator-config.yml config: fixtures/html5validator-config.yml
- name: Test with html-proofer - name: Test with html-proofer
run: bundle exec htmlproofer _site --ignore-urls "/github.com/,/web.archive.org/,/flickr.com/" run: bundle exec htmlproofer _site --ignore-urls "/github.com/,/web.archive.org/"
env: env:
NOKOGIRI_USE_SYSTEM_LIBRARIES: true NOKOGIRI_USE_SYSTEM_LIBRARIES: true
@@ -96,13 +96,13 @@ jobs:
strategy: strategy:
matrix: matrix:
node-version: [22.x] node-version: [18.x]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- run: npm install - run: npm install
- run: npm test - run: npm test

View File

@@ -34,7 +34,7 @@ jobs:
- name: Setup Ruby - name: Setup Ruby
uses: ruby/setup-ruby@v1 uses: ruby/setup-ruby@v1
with: with:
ruby-version: "3.4" ruby-version: "3.3"
bundler-cache: true # runs 'bundle install' and caches installed gems automatically bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems cache-version: 0 # Increment this number if you need to re-download cached gems
- name: Setup Pages - name: Setup Pages
@@ -47,9 +47,7 @@ jobs:
JEKYLL_ENV: production JEKYLL_ENV: production
- name: Upload artifact - name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default # Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v3 uses: actions/upload-pages-artifact@v2
with:
path: _site
# Deployment job # Deployment job
deploy: deploy:
@@ -61,4 +59,4 @@ jobs:
steps: steps:
- name: Deploy to GitHub Pages - name: Deploy to GitHub Pages
id: deployment id: deployment
uses: actions/deploy-pages@v4 uses: actions/deploy-pages@v2

View File

@@ -1,6 +1,7 @@
name: Publish Ruby Gem name: Publish Ruby Gem
on: workflow_dispatch on:
workflow_dispatch
jobs: jobs:
build: build:
@@ -8,23 +9,23 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Setup Ruby 3.4 - name: Setup Ruby 3.3
uses: ruby/setup-ruby@v1 uses: ruby/setup-ruby@v1
with: with:
ruby-version: "3.4" ruby-version: "3.3"
- name: Publish to GPR - name: Publish to GPR
run: | run: |
mkdir -p $HOME/.gem mkdir -p $HOME/.gem
touch $HOME/.gem/credentials touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials chmod 0600 $HOME/.gem/credentials
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec gem build *.gemspec
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
env: env:
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}" GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
OWNER: ${{ github.repository_owner }} OWNER: ${{ github.repository_owner }}
# Disabled as this does not handle 2FA # Disabled as this does not handle 2FA
# - name: Publish to RubyGems # - name: Publish to RubyGems

View File

@@ -23,35 +23,6 @@ Docs changes made since the latest release:
- N/A - N/A
## Release v0.10.1
Hi folks! This patch fixes two bugs related to generated navigation elements and improves our docs.
This release should be a straightforward upgrade for all users of Just the Docs. Thank you for your continued support!
### Bugfixes
- Fixed: `back_to_top` not displaying when no other footer variables are set by [@mattxwang] in [#1461]
- Fixed: auto-generated child navigation (TOC) by [@pdmosses] in [#1590]
### Documentation
- Fixed: incorrect docs for example with minimal layout parent, default layout child by [@janbrasna] in [#1540]
- Fixed: unclear docs on using in-page table of contents by [@sebjameswml] in [#1551]
### New Contributors
- [@janbrasna] made their first contribution in [#1540]
- [@sebjameswml] made their first contribution in [#1551]
[@janbrasna]: https://github.com/janbrasna
[@sebjameswml]: https://github.com/sebjameswml
[#1461]: https://github.com/just-the-docs/just-the-docs/pull/1461
[#1540]: https://github.com/just-the-docs/just-the-docs/pull/1540
[#1551]: https://github.com/just-the-docs/just-the-docs/pull/1551
[#1590]: https://github.com/just-the-docs/just-the-docs/pull/1590
## Release v0.10.0 ## Release v0.10.0
Hi folks! This minor release adds one of our most-requested features: unlimited multi-level navigation (also known as recursive navigation). Huge thanks to [@pdmosses] for his wonderful work in implementing this feature! Hi folks! This minor release adds one of our most-requested features: unlimited multi-level navigation (also known as recursive navigation). Huge thanks to [@pdmosses] for his wonderful work in implementing this feature!

12
Dockerfile Normal file
View File

@@ -0,0 +1,12 @@
FROM ruby:2.7
ENV LC_ALL C.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
WORKDIR /usr/src/app
COPY Gemfile just-the-docs.gemspec ./
RUN gem install bundler && bundle install
EXPOSE 4000

View File

@@ -1,9 +1,6 @@
source "https://rubygems.org" source "https://rubygems.org"
gemspec gemspec
gem "base64"
gem "csv"
gem "jekyll-github-metadata", ">= 2.15" gem "jekyll-github-metadata", ">= 2.15"
gem "jekyll-include-cache", group: :jekyll_plugins gem "jekyll-include-cache", group: :jekyll_plugins

View File

@@ -1,7 +1,7 @@
PATH PATH
remote: . remote: .
specs: specs:
just-the-docs (0.10.1) just-the-docs (0.10.0)
jekyll (>= 3.8.5) jekyll (>= 3.8.5)
jekyll-include-cache jekyll-include-cache
jekyll-seo-tag (>= 2.0) jekyll-seo-tag (>= 2.0)
@@ -10,50 +10,48 @@ PATH
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
Ascii85 (2.0.1) Ascii85 (1.1.1)
addressable (2.8.7) addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0) public_suffix (>= 2.0.2, < 7.0)
afm (0.2.2) afm (0.2.2)
async (2.23.0) async (2.17.0)
console (~> 1.29) console (~> 1.26)
fiber-annotation fiber-annotation
io-event (~> 1.9) io-event (~> 1.6, >= 1.6.5)
metrics (~> 0.12) bigdecimal (3.1.8)
traces (~> 0.15)
base64 (0.2.0)
bigdecimal (3.1.9)
colorator (1.1.0) colorator (1.1.0)
concurrent-ruby (1.3.5) concurrent-ruby (1.3.4)
console (1.29.3) console (1.27.0)
fiber-annotation fiber-annotation
fiber-local (~> 1.1) fiber-local (~> 1.1)
json json
csv (3.3.3)
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)
ethon (0.16.0) ethon (0.16.0)
ffi (>= 1.15.0) ffi (>= 1.15.0)
eventmachine (1.2.7) eventmachine (1.2.7)
faraday (2.9.0) faraday (2.12.0)
faraday-net_http (>= 2.0, < 3.2) faraday-net_http (>= 2.0, < 3.4)
faraday-net_http (3.1.0) json
logger
faraday-net_http (3.3.0)
net-http net-http
ffi (1.17.1-arm64-darwin) ffi (1.17.0-arm64-darwin)
ffi (1.17.1-x86_64-linux-gnu) ffi (1.17.0-x86_64-linux-gnu)
fiber-annotation (0.2.0) fiber-annotation (0.2.0)
fiber-local (1.1.0) fiber-local (1.1.0)
fiber-storage fiber-storage
fiber-storage (1.0.0) fiber-storage (1.0.0)
forwardable-extended (2.6.0) forwardable-extended (2.6.0)
google-protobuf (4.29.3-arm64-darwin) google-protobuf (4.28.2-arm64-darwin)
bigdecimal bigdecimal
rake (>= 13) rake (>= 13)
google-protobuf (4.29.3-x86_64-linux) google-protobuf (4.28.2-x86_64-linux)
bigdecimal bigdecimal
rake (>= 13) rake (>= 13)
hashery (2.1.2) hashery (2.1.2)
html-proofer (5.0.10) html-proofer (5.0.9)
addressable (~> 2.3) addressable (~> 2.3)
async (~> 2.1) async (~> 2.1)
nokogiri (~> 1.13) nokogiri (~> 1.13)
@@ -63,23 +61,20 @@ GEM
yell (~> 2.0) yell (~> 2.0)
zeitwerk (~> 2.5) zeitwerk (~> 2.5)
http_parser.rb (0.8.0) http_parser.rb (0.8.0)
i18n (1.14.7) i18n (1.14.6)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
io-event (1.9.0) io-event (1.7.1)
jekyll (4.4.1) jekyll (4.3.4)
addressable (~> 2.4) addressable (~> 2.4)
base64 (~> 0.2)
colorator (~> 1.0) colorator (~> 1.0)
csv (~> 3.0)
em-websocket (~> 0.5) em-websocket (~> 0.5)
i18n (~> 1.0) i18n (~> 1.0)
jekyll-sass-converter (>= 2.0, < 4.0) jekyll-sass-converter (>= 2.0, < 4.0)
jekyll-watch (~> 2.0) jekyll-watch (~> 2.0)
json (~> 2.6)
kramdown (~> 2.3, >= 2.3.1) kramdown (~> 2.3, >= 2.3.1)
kramdown-parser-gfm (~> 1.0) kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0) liquid (~> 4.0)
mercenary (~> 0.3, >= 0.3.6) mercenary (>= 0.3.6, < 0.5)
pathutil (~> 0.9) pathutil (~> 0.9)
rouge (>= 3.0, < 5.0) rouge (>= 3.0, < 5.0)
safe_yaml (~> 1.0) safe_yaml (~> 1.0)
@@ -98,30 +93,30 @@ GEM
jekyll (>= 3.7, < 5.0) jekyll (>= 3.7, < 5.0)
jekyll-watch (2.2.1) jekyll-watch (2.2.1)
listen (~> 3.0) listen (~> 3.0)
json (2.10.2) json (2.7.2)
kramdown (2.5.1) kramdown (2.4.0)
rexml (>= 3.3.9) rexml
kramdown-parser-gfm (1.1.0) kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0) kramdown (~> 2.0)
liquid (4.0.4) liquid (4.0.4)
listen (3.9.0) listen (3.9.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)
logger (1.6.1)
mercenary (0.4.0) mercenary (0.4.0)
metrics (0.12.1)
net-http (0.4.1) net-http (0.4.1)
uri uri
nokogiri (1.18.4-arm64-darwin) nokogiri (1.16.7-arm64-darwin)
racc (~> 1.4) racc (~> 1.4)
nokogiri (1.18.4-x86_64-linux-gnu) nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4) racc (~> 1.4)
octokit (6.1.1) octokit (6.1.1)
faraday (>= 1, < 3) faraday (>= 1, < 3)
sawyer (~> 0.9) sawyer (~> 0.9)
pathutil (0.16.2) pathutil (0.16.2)
forwardable-extended (~> 2.6) forwardable-extended (~> 2.6)
pdf-reader (2.14.1) pdf-reader (2.12.0)
Ascii85 (>= 1.0, < 3.0, != 2.0.0) Ascii85 (~> 1.0)
afm (~> 0.2.1) afm (~> 0.2.1)
hashery (~> 2.0) hashery (~> 2.0)
ruby-rc4 ruby-rc4
@@ -133,38 +128,35 @@ GEM
rb-fsevent (0.11.2) rb-fsevent (0.11.2)
rb-inotify (0.11.1) rb-inotify (0.11.1)
ffi (~> 1.0) ffi (~> 1.0)
rexml (3.4.0) rexml (3.3.8)
rouge (4.5.1) rouge (4.4.0)
ruby-rc4 (0.1.5) ruby-rc4 (0.1.5)
safe_yaml (1.0.5) safe_yaml (1.0.5)
sass-embedded (1.83.4-arm64-darwin) sass-embedded (1.79.4-arm64-darwin)
google-protobuf (~> 4.29) google-protobuf (~> 4.27)
sass-embedded (1.83.4-x86_64-linux-gnu) sass-embedded (1.79.4-x86_64-linux-gnu)
google-protobuf (~> 4.29) google-protobuf (~> 4.27)
sawyer (0.9.2) sawyer (0.9.2)
addressable (>= 2.3.5) addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3) faraday (>= 0.17.3, < 3)
terminal-table (3.0.2) terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3) unicode-display_width (>= 1.1.1, < 3)
traces (0.15.2)
ttfunk (1.8.0) ttfunk (1.8.0)
bigdecimal (~> 3.1) bigdecimal (~> 3.1)
typhoeus (1.4.1) typhoeus (1.4.1)
ethon (>= 0.9.0) ethon (>= 0.9.0)
unicode-display_width (2.6.0) unicode-display_width (2.6.0)
uri (0.13.2) uri (0.13.1)
webrick (1.9.1) webrick (1.8.2)
yell (2.2.2) yell (2.2.2)
zeitwerk (2.7.2) zeitwerk (2.6.18)
PLATFORMS PLATFORMS
arm64-darwin arm64-darwin
x86_64-linux-gnu x86_64-linux-gnu
DEPENDENCIES DEPENDENCIES
base64
bundler (>= 2.3.5) bundler (>= 2.3.5)
csv
html-proofer (~> 5.0) html-proofer (~> 5.0)
jekyll-github-metadata (>= 2.15) jekyll-github-metadata (>= 2.15)
jekyll-include-cache jekyll-include-cache

View File

@@ -32,7 +32,7 @@ More specifically, the created site:
Other than that, you're free to customize sites that you create with the template, however you like. You can easily change the versions of `just-the-docs` and Jekyll it uses, as well as adding further plugins. Other than that, you're free to customize sites that you create with the template, however you like. You can easily change the versions of `just-the-docs` and Jekyll it uses, as well as adding further plugins.
### Use as a Ruby Gem ### Use RubyGems
Alternatively, you can install the theme as a Ruby Gem, without creating a new site. Alternatively, you can install the theme as a Ruby Gem, without creating a new site.
@@ -48,11 +48,17 @@ And add this line to your Jekyll site's `_config.yml`:
theme: just-the-docs theme: just-the-docs
``` ```
And then install all relevant dependencies: And then execute:
```shell $ bundle
$ bundle
``` Or install it yourself as:
$ gem install just-the-docs
Alternatively, you can run it inside Docker while developing your site
$ docker-compose up
## Usage ## Usage

View File

@@ -11,14 +11,14 @@
{%- if page.url != "/" and page.parent and page.title -%} {%- if page.url != "/" and page.parent and page.title -%}
{%- capture site_nav -%}
{%- include_cached components/site_nav.html all=true -%}
{%- endcapture -%}
{%- capture nav_list_link -%} {%- capture nav_list_link -%}
<a href="{{ page.url | relative_url }}" class="nav-list-link"> <a href="{{ page.url | relative_url }}" class="nav-list-link">
{%- endcapture -%} {%- endcapture -%}
{%- capture site_nav -%}
{%- include_cached components/site_nav.html all=true -%}
{%- endcapture -%}
{%- capture nav_list_simple -%} {%- capture nav_list_simple -%}
<ul class="nav-list"> <ul class="nav-list">
{%- endcapture -%} {%- endcapture -%}

View File

@@ -11,24 +11,23 @@
{%- comment -%} {%- comment -%}
Whether a page has any children is checked efficiently by inspecting the cached Whether a page has any children is checked efficiently by inspecting the cached
site_nav. If the page has no children, nav_children is set to an empty array; site_nav. If the page has no children, nav_children is set to an empty array;
otherwise nav_children is left unset. (The site_nav is rendered the first time otherwise nav_children is left unset.
it is included, and that may overwrite various variables.)
{%- endcomment -%} {%- endcomment -%}
{%- if page.has_children == false -%} {%- if page.has_children == false -%}
{%- assign nav_children = "" | split: "" -%} {%- assign nav_children = "" | split: "" -%}
{%- else -%} {%- else -%}
{%- capture site_nav -%}
{%- include_cached components/site_nav.html all=true -%}
{%- endcapture -%}
{%- assign nav_children = nil -%} {%- assign nav_children = nil -%}
{%- capture nav_list_link -%} {%- capture nav_list_link -%}
<a href="{{ page.url | relative_url }}" class="nav-list-link"> <a href="{{ page.url | relative_url }}" class="nav-list-link">
{%- endcapture -%} {%- endcapture -%}
{%- capture site_nav -%}
{%- include_cached components/site_nav.html all=true -%}
{%- endcapture -%}
{%- capture nav_list_simple -%} {%- capture nav_list_simple -%}
<ul class="nav-list"> <ul class="nav-list">
{%- endcapture -%} {%- endcapture -%}

View File

@@ -1,7 +1,7 @@
{% capture footer_custom %} {% capture footer_custom %}
{%- include footer_custom.html -%} {%- include footer_custom.html -%}
{% endcapture %} {% endcapture %}
{% if footer_custom != "" or site.last_edit_timestamp or site.gh_edit_link or site.back_to_top %} {% if footer_custom != "" or site.last_edit_timestamp or site.gh_edit_link %}
<hr> <hr>
<footer> <footer>
{% if site.back_to_top %} {% if site.back_to_top %}

View File

@@ -20,10 +20,6 @@
- The other two rules ensure that all folding collections are expanded. - The other two rules ensure that all folding collections are expanded.
{%- endcomment -%} {%- endcomment -%}
{%- capture site_nav -%}
{%- include_cached components/site_nav.html -%}
{%- endcapture -%}
{%- capture activation_no_nav_link %} {%- capture activation_no_nav_link %}
.site-nav ul li a { .site-nav ul li a {
background-image: none; background-image: none;
@@ -43,6 +39,10 @@
<a href="{{ page.url | relative_url }}" class="nav-list-link"> <a href="{{ page.url | relative_url }}" class="nav-list-link">
{%- endcapture -%} {%- endcapture -%}
{%- capture site_nav -%}
{%- include_cached components/site_nav.html -%}
{%- endcapture -%}
{%- if site_nav contains nav_list_link -%} {%- if site_nav contains nav_list_link -%}
{%- capture nav_list -%} {%- capture nav_list -%}

View File

@@ -1,6 +1,8 @@
// Buttons and things that look like buttons // Buttons and things that look like buttons
// stylelint-disable color-named // stylelint-disable color-named
@use "sass:color";
.btn { .btn {
display: inline-block; display: inline-block;
box-sizing: border-box; box-sizing: border-box;
@@ -35,7 +37,7 @@
&:hover, &:hover,
&.zeroclipboard-is-hover { &.zeroclipboard-is-hover {
color: darken($link-color, 2%); color: color.adjust($link-color, $lightness: -2%);
} }
&:hover, &:hover,
@@ -43,19 +45,19 @@
&.zeroclipboard-is-hover, &.zeroclipboard-is-hover,
&.zeroclipboard-is-active { &.zeroclipboard-is-active {
text-decoration: none; text-decoration: none;
background-color: darken($base-button-color, 1%); background-color: color.adjust($base-button-color, $lightness: -1%);
} }
&:active, &:active,
&.selected, &.selected,
&.zeroclipboard-is-active { &.zeroclipboard-is-active {
background-color: darken($base-button-color, 3%); background-color: color.adjust($base-button-color, $lightness: -3%);
background-image: none; background-image: none;
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
} }
&.selected:hover { &.selected:hover {
background-color: darken(#dcdcdc, 5%); background-color: color.adjust(#dcdcdc, $lightness: -5%);
} }
&:disabled, &:disabled,
@@ -80,7 +82,7 @@
&:active, &:active,
&.zeroclipboard-is-hover, &.zeroclipboard-is-hover,
&.zeroclipboard-is-active { &.zeroclipboard-is-active {
color: darken($link-color, 4%); color: color.adjust($link-color, $lightness: -4%);
text-decoration: none; text-decoration: none;
background-color: transparent; background-color: transparent;
box-shadow: inset 0 0 0 3px $grey-lt-300; box-shadow: inset 0 0 0 3px $grey-lt-300;

View File

@@ -1,3 +1,5 @@
@use "sass:color";
$color-scheme: dark; $color-scheme: dark;
$body-background-color: $grey-dk-300; $body-background-color: $grey-dk-300;
$body-heading-color: $grey-lt-000; $body-heading-color: $grey-lt-000;
@@ -9,7 +11,7 @@ $base-button-color: $grey-dk-250;
$btn-primary-color: $blue-200; $btn-primary-color: $blue-200;
$code-background-color: #31343f; // OneDarkJekyll default for syntax-one-dark-vivid $code-background-color: #31343f; // OneDarkJekyll default for syntax-one-dark-vivid
$code-linenumber-color: #dee2f7; // OneDarkJekyll .nf for syntax-one-dark-vivid $code-linenumber-color: #dee2f7; // OneDarkJekyll .nf for syntax-one-dark-vivid
$feedback-color: darken($sidebar-color, 3%); $feedback-color: color.adjust($sidebar-color, $lightness: -3%);
$table-background-color: $grey-dk-250; $table-background-color: $grey-dk-250;
$search-background-color: $grey-dk-250; $search-background-color: $grey-dk-250;
$search-result-preview-color: $grey-dk-000; $search-result-preview-color: $grey-dk-000;

View File

@@ -1,3 +1,5 @@
@use "sass:color";
$color-scheme: light !default; $color-scheme: light !default;
$body-background-color: $white !default; $body-background-color: $white !default;
$body-heading-color: $grey-dk-300 !default; $body-heading-color: $grey-dk-300 !default;
@@ -8,7 +10,7 @@ $sidebar-color: $grey-lt-000 !default;
$base-button-color: #f7f7f7 !default; $base-button-color: #f7f7f7 !default;
$btn-primary-color: $purple-100 !default; $btn-primary-color: $purple-100 !default;
$code-background-color: $grey-lt-000 !default; $code-background-color: $grey-lt-000 !default;
$feedback-color: darken($sidebar-color, 3%) !default; $feedback-color: color.adjust($sidebar-color, $lightness: -3%) !default;
$table-background-color: $white !default; $table-background-color: $white !default;
$search-background-color: $white !default; $search-background-color: $white !default;
$search-result-preview-color: $grey-dk-000 !default; $search-result-preview-color: $grey-dk-000 !default;

View File

@@ -1,9 +1,11 @@
// Colored button // Colored button
@use "sass:color";
@mixin btn-color($fg, $bg) { @mixin btn-color($fg, $bg) {
color: $fg; color: $fg;
background-color: darken($bg, 2%); background-color: color.adjust($bg, $lightness: -2%);
background-image: linear-gradient(lighten($bg, 5%), darken($bg, 2%)); background-image: linear-gradient(color.adjust($bg, $lightness: 5%), color.adjust($bg, $lightness: -2%));
box-shadow: box-shadow:
0 1px 3px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0, 0, 0, 0.25),
0 4px 10px rgba(0, 0, 0, 0.12); 0 4px 10px rgba(0, 0, 0, 0.12);
@@ -11,19 +13,19 @@
&:hover, &:hover,
&.zeroclipboard-is-hover { &.zeroclipboard-is-hover {
color: $fg; color: $fg;
background-color: darken($bg, 4%); background-color: color.adjust($bg, $lightness: -4%);
background-image: linear-gradient((lighten($bg, 2%), darken($bg, 4%))); background-image: linear-gradient((color.adjust($bg, $lightness: 2%), color.adjust($bg, $lightness: -4%)));
} }
&:active, &:active,
&.selected, &.selected,
&.zeroclipboard-is-active { &.zeroclipboard-is-active {
background-color: darken($bg, 5%); background-color: color.adjust($bg, $lightness: -5%);
background-image: none; background-image: none;
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
} }
&.selected:hover { &.selected:hover {
background-color: darken($bg, 10%); background-color: color.adjust($bg, $lightness: -10%);
} }
} }

14
docker-compose.yml Normal file
View File

@@ -0,0 +1,14 @@
version: "3.5"
services:
jekyll:
build:
context: ./
ports:
- 4000:4000
volumes:
- .:/usr/src/app
stdin_open: true
tty: true
command: bundle exec jekyll serve -H 0.0.0.0 -t

View File

@@ -5,6 +5,6 @@ parent: A minimal layout page
grand_parent: Layout grand_parent: Layout
--- ---
# Default layout child page # A minimal layout page
This is a child page that uses the `default` layout as compared to its parent page (which uses the `minimal` layout). This is a child page that uses the same minimal layout as its parent page.

View File

@@ -19,27 +19,6 @@ To support in-page navigation, you can generate a *Table of Contents* (TOC) with
To generate a *Table of Contents* in a page, you use Kramdown's `{:toc}` method, immediately after the start of a list. This will automatically generate a list of anchor links to various sections of the page, based on headings and heading levels. To generate a *Table of Contents* in a page, you use Kramdown's `{:toc}` method, immediately after the start of a list. This will automatically generate a list of anchor links to various sections of the page, based on headings and heading levels.
{: .note }
`{:toc}` can be used only once on each page.
You **must** have a list immediately preceding the table of contents. The type of list determines the style of your table of contents.
For an *ordered* table of contents, use the following markdown code:
```md
1. TOC
{:toc}
```
The `{:toc}` line *must* follow the `1. TOC` line, which begins a list.
For an *unordered* table of contents, instead use the following markdown code:
```
- TOC
{:toc}
```
## Omitting Heading from Table of Contents ## Omitting Heading from Table of Contents
If you want to omit a particular heading from the TOC, follow it immediately by `{: .no_toc }` (possibly together with other CSS class names). If you want to omit a particular heading from the TOC, follow it immediately by `{: .no_toc }` (possibly together with other CSS class names).
@@ -57,6 +36,8 @@ If you want to omit a particular heading from the TOC, follow it immediately by
This example omits the top-level heading (`In-Page Navigation`) from the TOC, as well as the heading for the *Table of Contents* itself. This example omits the top-level heading (`In-Page Navigation`) from the TOC, as well as the heading for the *Table of Contents* itself.
To get an unordered list, replace `1. TOC` by `- TOC` in the above example.
## Collapsible Table of Contents (with `<details>` and `<summary>`) ## Collapsible Table of Contents (with `<details>` and `<summary>`)
You can make the Table of Contents collapsible using the `<details>` and `<summary>` elements, as in the following example. You can make the Table of Contents collapsible using the `<details>` and `<summary>` elements, as in the following example.
@@ -74,6 +55,9 @@ You can make the Table of Contents collapsible using the `<details>` and `<summa
The attribute `open` (which expands the Table of Contents by default) and the styling (here with `text-delta`) are optional. The attribute `open` (which expands the Table of Contents by default) and the styling (here with `text-delta`) are optional.
{: .note }
`{:toc}` can be used only once on each page.
## Back to Top {#back-to-top-doc} ## Back to Top {#back-to-top-doc}
{: .warning } {: .warning }

View File

@@ -2,10 +2,6 @@ source "https://rubygems.org"
gem "jekyll", "~> 3.9" gem "jekyll", "~> 3.9"
gem "base64"
gem "bigdecimal"
gem "csv"
gem "jekyll-seo-tag", ">= 2.0" gem "jekyll-seo-tag", ">= 2.0"
gem "rake", ">= 12.3.1" gem "rake", ">= 12.3.1"

View File

@@ -2,9 +2,6 @@ source "https://rubygems.org"
gem "jekyll", "~> 4.3" gem "jekyll", "~> 4.3"
gem "base64"
gem "csv"
gem "jekyll-seo-tag", ">= 2.0" gem "jekyll-seo-tag", ">= 2.0"
gem "rake", ">= 12.3.1" gem "rake", ">= 12.3.1"

View File

@@ -2,7 +2,7 @@
Gem::Specification.new do |spec| Gem::Specification.new do |spec|
spec.name = "just-the-docs" spec.name = "just-the-docs"
spec.version = "0.10.1" spec.version = "0.10.0"
spec.authors = ["Patrick Marsceill", "Matthew Wang"] spec.authors = ["Patrick Marsceill", "Matthew Wang"]
spec.email = ["patrick.marsceill@gmail.com", "matt@matthewwang.me"] spec.email = ["patrick.marsceill@gmail.com", "matt@matthewwang.me"]

829
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -7,9 +7,9 @@
"bugs": "https://github.com/just-the-docs/just-the-docs/issues", "bugs": "https://github.com/just-the-docs/just-the-docs/issues",
"devDependencies": { "devDependencies": {
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"prettier": "^3.5.3", "prettier": "^3.3.3",
"stylelint": "^16.16.0", "stylelint": "^16.9.0",
"stylelint-config-standard-scss": "^14.0.0" "stylelint-config-standard-scss": "^13.1.0"
}, },
"scripts": { "scripts": {
"lint": "npm-run-all --parallel --continue-on-error lint:*", "lint": "npm-run-all --parallel --continue-on-error lint:*",