diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 926b7f5..9036e11 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,26 +9,26 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v2 - name: Build the site in the jekyll/builder container run: | docker run --rm \ --volume="${{ github.workspace }}:/srv/jekyll" \ - jekyll/builder:latest /bin/bash -c "gem install bundler && chmod -R 777 /srv/jekyll && jekyll build && bundle exec just-the-docs rake search:init" + jekyll/builder:latest /bin/bash -c "gem install bundler && chmod -R 777 /srv/jekyll && bundle install && jekyll build && bundle exec rake search:init" jekyll-3-8-5: name: Build Jekyll site (v3.8.5) runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v2 - name: Build the site in the jekyll/builder container run: | docker run --rm \ --volume="${{ github.workspace }}:/srv/jekyll" \ - jekyll/builder:3.8.5 /bin/bash -c "gem install bundler && chmod -R 777 /srv/jekyll && jekyll build && bundle exec just-the-docs rake search:init" + jekyll/builder:3.8.5 /bin/bash -c "gem install bundler && chmod -R 777 /srv/jekyll && bundle install && jekyll build && bundle exec rake search:init" assets: name: Format and test CSS and JS diff --git a/.gitignore b/.gitignore index b447a12..a54b922 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ *.gem .bundle +.ruby-version +.jekyll-cache .sass-cache _site Gemfile.lock diff --git a/.prettierignore b/.prettierignore index 41fbef8..5dc073f 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,8 +1,9 @@ package.json package-lock.json _site -assets/css/dark-mode-preview.scss -assets/css/just-the-docs.scss +assets/css/just-the-docs-default.scss +assets/css/just-the-docs-light.scss +assets/css/just-the-docs-dark.scss assets/js/vendor/lunr.min.js assets/js/search-data.json assets/js/just-the-docs.js diff --git a/.stylelintrc.json b/.stylelintrc.json index a14d920..329ca34 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,7 +1,8 @@ { "ignoreFiles": [ - "assets/css/just-the-docs.scss", - "assets/css/dark-mode-preview.scss", + "assets/css/just-the-docs-default.scss", + "assets/css/just-the-docs-light.scss", + "assets/css/just-the-docs-dark.scss", "_sass/vendor/**/*.scss" ], "extends": ["stylelint-config-primer", "stylelint-config-prettier"], diff --git a/_config.yml b/_config.yml index a090670..42ccec2 100644 --- a/_config.yml +++ b/_config.yml @@ -38,15 +38,42 @@ aux_links: "Just the Docs on GitHub": - "//github.com/pmarsceill/just-the-docs" -# Footer content appears at the bottom of every page's main content -footer_content: "Copyright © 2017-2019 Patrick Marsceill. Distributed by an MIT license." +# Makes Aux links open in a new tab. Default is false +aux_links_new_tab: false -# Color scheme currently only supports "dark" or nil (default) +# Sort order for navigation links +nav_sort: case_insensitive # default, equivalent to nil +# nav_sort: case_sensitive # Capital letters sorted before lowercase + +# Footer content +# appears at the bottom of every page's main content + +# Back to top link +back_to_top: true +back_to_top_text: "Back to top" + +footer_content: "Copyright © 2017-2020 Patrick Marsceill. Distributed by an MIT license." + +# Footer last edited timestamp +last_edit_timestamp: true # show or hide edit time - page must have `last_modified_date` defined in the frontmatter +last_edit_time_format: "%b %e %Y at %I:%M %p" # uses ruby's time format: https://ruby-doc.org/stdlib-2.7.0/libdoc/time/rdoc/Time.html + + + +# Footer "Edit this page on GitHub" link text +gh_edit_link: true # show or hide edit this page link +gh_edit_link_text: "Edit this page on GitHub" +gh_edit_repository: "https://github.com/pmarsceill/just-the-docs" # the github URL for your repo +gh_edit_branch: "master" # the branch that your docs is served from +gh_edit_view_mode: "tree" # "tree" or "edit" if you want the user to jump into the editor immediately + +# Color scheme currently only supports "dark", "light"/nil (default), or a custom scheme that you define color_scheme: nil # Google Analytics Tracking (optional) # e.g, UA-1234567-89 ga_tracking: UA-2709176-10 +ga_tracking_anonymize_ip: true # Use GDPR compliant Google Analytics settings (true/nil by default) plugins: - jekyll-seo-tag diff --git a/_includes/css/custom.scss.liquid b/_includes/css/custom.scss.liquid new file mode 100644 index 0000000..2ad1576 --- /dev/null +++ b/_includes/css/custom.scss.liquid @@ -0,0 +1 @@ +@import "./custom/custom"; diff --git a/_includes/css/just-the-docs.scss.liquid b/_includes/css/just-the-docs.scss.liquid new file mode 100644 index 0000000..495cd6d --- /dev/null +++ b/_includes/css/just-the-docs.scss.liquid @@ -0,0 +1,7 @@ +{% if site.logo %} +$logo: "{{ site.logo | absolute_url }}"; +{% endif %} +@import "./support/support"; +@import "./color_schemes/{{ include.color_scheme }}"; +@import "./modules"; +{% include css/custom.scss.liquid %} diff --git a/_includes/head.html b/_includes/head.html index eae6a5e..4f22497 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -2,17 +2,17 @@ - {% if site.plugins.jekyll-seo == nil %} + {% unless site.plugins contains "jekyll-seo-tag" %} {{ page.title }} - {{ site.title }} {% if page.description %} {% endif %} - {% endif %} + {% endunless %} - + {% if site.ga_tracking != nil %} @@ -21,7 +21,7 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', "{{ site.ga_tracking }}"); + gtag('config', '{{ site.ga_tracking }}'{% unless site.ga_tracking_anonymize_ip == nil %}, { 'anonymize_ip': true }{% endunless %}); {% endif %} diff --git a/_includes/nav.html b/_includes/nav.html index d561a42..573e1f9 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -1,25 +1,35 @@