From cba53a69145580ea948133412f1baefd264b9150 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Mon, 20 May 2019 09:48:57 +0200 Subject: [PATCH 01/39] Make themes more customizable (cherry picked from commit dffb2706a158784e2f3091f895a868e373683bc8) --- .stylelintrc.json | 4 +- _config.yml | 2 +- _includes/head.html | 6 ++- _sass/color_schemes/dark.scss | 1 + _sass/color_schemes/light.scss | 1 + .../modules.scss | 21 +-------- assets/css/just-the-docs-dark.scss | 5 +++ assets/css/just-the-docs-light.scss | 5 +++ assets/css/just-the-docs.scss | 44 ------------------- assets/js/just-the-docs.js | 14 ++++++ docs/configuration.md | 11 ++--- docs/customization.md | 11 ++--- 12 files changed, 44 insertions(+), 81 deletions(-) create mode 100644 _sass/color_schemes/light.scss rename assets/css/dark-mode-preview.scss => _sass/modules.scss (54%) create mode 100644 assets/css/just-the-docs-dark.scss create mode 100644 assets/css/just-the-docs-light.scss delete mode 100644 assets/css/just-the-docs.scss diff --git a/.stylelintrc.json b/.stylelintrc.json index 108fc51..2253e64 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,7 +1,7 @@ { "ignoreFiles" : [ - "assets/css/just-the-docs.scss", - "assets/css/dark-mode-preview.scss", + "assets/css/just-the-docs-light.scss", + "assets/css/just-the-docs-dark.scss", "_sass/vendor/**/*.scss" ], "extends": [ diff --git a/_config.yml b/_config.yml index d12d439..17441c0 100644 --- a/_config.yml +++ b/_config.yml @@ -35,7 +35,7 @@ aux_links: # Footer content appears at the bottom of every page's main content footer_content: "Copyright © 2017-2019 Patrick Marsceill. Distributed by an MIT license." -# Color scheme currently only supports "dark" or nil (default) +# Color scheme currently only supports "dark" or "light"/nil (default) color_scheme: nil # Google Analytics Tracking (optional) diff --git a/_includes/head.html b/_includes/head.html index eae6a5e..f7ab6ed 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -12,7 +12,11 @@ - + {% assign color_scheme = site.color_scheme %} + {% if color_theme == nil %} + {% assign color_scheme = 'light' %} + {% endif %} + {% if site.ga_tracking != nil %} diff --git a/_sass/color_schemes/dark.scss b/_sass/color_schemes/dark.scss index f0e6505..333c2b1 100644 --- a/_sass/color_schemes/dark.scss +++ b/_sass/color_schemes/dark.scss @@ -1,3 +1,4 @@ +// override this file to change the dark theme $body-background-color: $grey-dk-300; $sidebar-color: $grey-dk-300; diff --git a/_sass/color_schemes/light.scss b/_sass/color_schemes/light.scss new file mode 100644 index 0000000..e9624b3 --- /dev/null +++ b/_sass/color_schemes/light.scss @@ -0,0 +1 @@ +// override this file to change the light (default) theme \ No newline at end of file diff --git a/assets/css/dark-mode-preview.scss b/_sass/modules.scss similarity index 54% rename from assets/css/dark-mode-preview.scss rename to _sass/modules.scss index 8b77da6..c0b017b 100644 --- a/assets/css/dark-mode-preview.scss +++ b/_sass/modules.scss @@ -1,28 +1,11 @@ ---- -# this ensures Jekyll reads the file to be transformed into CSS later -# only Main files contain this front matter, not partials. ---- - // // Import external dependencies // - @import "./vendor/normalize.scss/normalize.scss"; // -// Import Just the Docs scss -// - -// Support -@import "./support/support"; - -// -// Import custom color scheme scss -// - -@import "./color_schemes/dark.scss"; - // Modules +// @import "./base"; @import "./layout"; @import "./content"; @@ -38,4 +21,4 @@ // // Import custom overrides // -@import "./custom/custom"; +@import "./custom/custom"; \ No newline at end of file diff --git a/assets/css/just-the-docs-dark.scss b/assets/css/just-the-docs-dark.scss new file mode 100644 index 0000000..a19ffc7 --- /dev/null +++ b/assets/css/just-the-docs-dark.scss @@ -0,0 +1,5 @@ +--- +--- +@import "./support/support"; +@import "./color_schemes/dark"; +@import "./modules"; \ No newline at end of file diff --git a/assets/css/just-the-docs-light.scss b/assets/css/just-the-docs-light.scss new file mode 100644 index 0000000..c32b314 --- /dev/null +++ b/assets/css/just-the-docs-light.scss @@ -0,0 +1,5 @@ +--- +--- +@import "./support/support"; +@import "./color_schemes/light"; +@import "./modules"; diff --git a/assets/css/just-the-docs.scss b/assets/css/just-the-docs.scss deleted file mode 100644 index 6a2eefa..0000000 --- a/assets/css/just-the-docs.scss +++ /dev/null @@ -1,44 +0,0 @@ ---- -# this ensures Jekyll reads the file to be transformed into CSS later -# only Main files contain this front matter, not partials. ---- - -// -// Import external dependencies -// - -@import "./vendor/normalize.scss/normalize.scss"; - -// -// Import Just the Docs scss -// - -// Support -@import "./support/support"; - -// -// Import custom overrides -// - -@import "./custom/custom"; - -// -// Import custom color scheme scss -// - -{% if site.color_scheme == "dark" %} -@import "./color_schemes/dark.scss"; -{% endif %} - -// Modules -@import "./base"; -@import "./layout"; -@import "./content"; -@import "./navigation"; -@import "./typography"; -@import "./labels"; -@import "./buttons"; -@import "./search"; -@import "./tables"; -@import "./code"; -@import "./utilities/utilities"; diff --git a/assets/js/just-the-docs.js b/assets/js/just-the-docs.js index aadbf82..c765a9b 100644 --- a/assets/js/just-the-docs.js +++ b/assets/js/just-the-docs.js @@ -274,11 +274,25 @@ function initSearch() { } } +// Focus + function pageFocus() { var mainContent = document.querySelector('.js-main-content'); mainContent.focus(); } +// Switch theme + +jtd.getTheme = function() { + var cssFileHref = document.querySelector('[rel="stylesheet"]').getAttribute('href'); + return cssFileHref.substring(cssFileHref.lastIndexOf('-') + 1, cssFileHref.length - 4); +} + +jtd.setTheme = function(theme) { + var cssFile = document.querySelector('[rel="stylesheet"]'); + cssFile.setAttribute('href', '{{ "assets/css/just-the-docs-" | absolute_url }}' + theme + '.css'); +} + // Document ready jtd.onReady(function(){ diff --git a/docs/configuration.md b/docs/configuration.md index 14422fd..cb00b1a 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -67,17 +67,14 @@ color_scheme: "dark" See [Customization]({{ site.baseurl }}{% link docs/customization.md %}) for more information. diff --git a/docs/customization.md b/docs/customization.md index eccb4bc..6f715bf 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -36,17 +36,14 @@ color_scheme: "dark" ## Specific visual customization From f61b836f6e836595cd3979a5fc22eeedc17b01d8 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Mon, 20 May 2019 10:05:56 +0200 Subject: [PATCH 02/39] Fixed stylesheet link (cherry picked from commit ac42a41ae3e36b002df52882be296c01873c0e5b) --- _includes/head.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/_includes/head.html b/_includes/head.html index f7ab6ed..e640f97 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -12,9 +12,10 @@ - {% assign color_scheme = site.color_scheme %} - {% if color_theme == nil %} + {% if site.color_scheme == nil or site.color_scheme == "nil" %} {% assign color_scheme = 'light' %} + {% else %} + {% assign color_scheme = site.color_scheme %} {% endif %} From da50250f47d74350d0cf1bba11aff6fc3cfb3e49 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Mon, 20 May 2019 10:16:30 +0200 Subject: [PATCH 03/39] Fixed custom css (cherry picked from commit 7df9af5ab1f4b7f1c286d176a8b24be9d3ce8063) --- _sass/modules.scss | 7 +------ assets/css/just-the-docs-dark.scss | 3 ++- assets/css/just-the-docs-light.scss | 1 + 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/_sass/modules.scss b/_sass/modules.scss index c0b017b..4b1f129 100644 --- a/_sass/modules.scss +++ b/_sass/modules.scss @@ -16,9 +16,4 @@ @import "./search"; @import "./tables"; @import "./code"; -@import "./utilities/utilities"; - -// -// Import custom overrides -// -@import "./custom/custom"; \ No newline at end of file +@import "./utilities/utilities"; \ No newline at end of file diff --git a/assets/css/just-the-docs-dark.scss b/assets/css/just-the-docs-dark.scss index a19ffc7..8a5b8f7 100644 --- a/assets/css/just-the-docs-dark.scss +++ b/assets/css/just-the-docs-dark.scss @@ -2,4 +2,5 @@ --- @import "./support/support"; @import "./color_schemes/dark"; -@import "./modules"; \ No newline at end of file +@import "./modules"; +@import "./custom/custom"; \ No newline at end of file diff --git a/assets/css/just-the-docs-light.scss b/assets/css/just-the-docs-light.scss index c32b314..997198e 100644 --- a/assets/css/just-the-docs-light.scss +++ b/assets/css/just-the-docs-light.scss @@ -3,3 +3,4 @@ @import "./support/support"; @import "./color_schemes/light"; @import "./modules"; +@import "./custom/custom"; From 5f0de692bec814a7c9d4441adc2474ae73080431 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Thu, 15 Aug 2019 18:44:10 +0200 Subject: [PATCH 04/39] Fixed css style --- _sass/color_schemes/light.scss | 2 +- _sass/modules.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_sass/color_schemes/light.scss b/_sass/color_schemes/light.scss index e9624b3..5932f29 100644 --- a/_sass/color_schemes/light.scss +++ b/_sass/color_schemes/light.scss @@ -1 +1 @@ -// override this file to change the light (default) theme \ No newline at end of file +// override this file to change the light (default) theme diff --git a/_sass/modules.scss b/_sass/modules.scss index 4b1f129..dc94a4b 100644 --- a/_sass/modules.scss +++ b/_sass/modules.scss @@ -16,4 +16,4 @@ @import "./search"; @import "./tables"; @import "./code"; -@import "./utilities/utilities"; \ No newline at end of file +@import "./utilities/utilities"; From 9e0bc86dbe3d2870d534dae6c61b7d116f6b02d0 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Sat, 20 Jul 2019 20:06:45 +0200 Subject: [PATCH 05/39] Simplified css color schemes (cherry picked from commit 52b0bced5d235d7557413e064f3841ea774d9063) --- _includes/css/just-the-docs.scss | 3 +++ _sass/modules.scss | 1 + assets/css/just-the-docs-dark.scss | 5 +---- assets/css/just-the-docs-light.scss | 5 +---- 4 files changed, 6 insertions(+), 8 deletions(-) create mode 100644 _includes/css/just-the-docs.scss diff --git a/_includes/css/just-the-docs.scss b/_includes/css/just-the-docs.scss new file mode 100644 index 0000000..61c8c2e --- /dev/null +++ b/_includes/css/just-the-docs.scss @@ -0,0 +1,3 @@ +@import "./support/support"; +@import "./color_schemes/{{ include.color_scheme }}"; +@import "./modules"; diff --git a/_sass/modules.scss b/_sass/modules.scss index dc94a4b..30f1f2a 100644 --- a/_sass/modules.scss +++ b/_sass/modules.scss @@ -17,3 +17,4 @@ @import "./tables"; @import "./code"; @import "./utilities/utilities"; +@import "./custom/custom"; diff --git a/assets/css/just-the-docs-dark.scss b/assets/css/just-the-docs-dark.scss index 8a5b8f7..c44bde1 100644 --- a/assets/css/just-the-docs-dark.scss +++ b/assets/css/just-the-docs-dark.scss @@ -1,6 +1,3 @@ --- --- -@import "./support/support"; -@import "./color_schemes/dark"; -@import "./modules"; -@import "./custom/custom"; \ No newline at end of file +{% include css/just-the-docs.scss color_scheme="dark" %} \ No newline at end of file diff --git a/assets/css/just-the-docs-light.scss b/assets/css/just-the-docs-light.scss index 997198e..a5aab89 100644 --- a/assets/css/just-the-docs-light.scss +++ b/assets/css/just-the-docs-light.scss @@ -1,6 +1,3 @@ --- --- -@import "./support/support"; -@import "./color_schemes/light"; -@import "./modules"; -@import "./custom/custom"; +{% include css/just-the-docs.scss color_scheme="light" %} \ No newline at end of file From 6c569cbdc253b886b230cd80f39d9f54fce66254 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Sat, 20 Jul 2019 22:04:17 +0200 Subject: [PATCH 06/39] Fixed custom css (cherry picked from commit bab3437a1feefc49213e1e787db0451491aca9b9) --- _includes/css/just-the-docs.scss | 1 + _sass/modules.scss | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/css/just-the-docs.scss b/_includes/css/just-the-docs.scss index 61c8c2e..ee779b2 100644 --- a/_includes/css/just-the-docs.scss +++ b/_includes/css/just-the-docs.scss @@ -1,3 +1,4 @@ @import "./support/support"; @import "./color_schemes/{{ include.color_scheme }}"; @import "./modules"; +@import "./custom/custom"; diff --git a/_sass/modules.scss b/_sass/modules.scss index 30f1f2a..dc94a4b 100644 --- a/_sass/modules.scss +++ b/_sass/modules.scss @@ -17,4 +17,3 @@ @import "./tables"; @import "./code"; @import "./utilities/utilities"; -@import "./custom/custom"; From 3995fbfc3559cbe33dc778f5cca818b6dd2bc4fa Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Sat, 20 Jul 2019 22:11:41 +0200 Subject: [PATCH 07/39] More customizable css (cherry picked from commit 8aa0899facd01f689692fccdb338673f5e9a9fbd) --- _includes/css/custom.scss | 1 + _includes/css/just-the-docs.scss | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 _includes/css/custom.scss diff --git a/_includes/css/custom.scss b/_includes/css/custom.scss new file mode 100644 index 0000000..2ad1576 --- /dev/null +++ b/_includes/css/custom.scss @@ -0,0 +1 @@ +@import "./custom/custom"; diff --git a/_includes/css/just-the-docs.scss b/_includes/css/just-the-docs.scss index ee779b2..9c27ce6 100644 --- a/_includes/css/just-the-docs.scss +++ b/_includes/css/just-the-docs.scss @@ -1,4 +1,4 @@ @import "./support/support"; @import "./color_schemes/{{ include.color_scheme }}"; @import "./modules"; -@import "./custom/custom"; +{% include css/custom.scss %} From 2febd256db056b73ef06992fb9788c9ded4a29da Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Sun, 21 Jul 2019 17:00:21 +0200 Subject: [PATCH 08/39] Added .liquid suffix to included scss files (cherry picked from commit 7fb79c2018b979fdf917f427ca5d3f2451f3265d) --- _includes/css/{custom.scss => custom.scss.liquid} | 0 _includes/css/{just-the-docs.scss => just-the-docs.scss.liquid} | 2 +- assets/css/just-the-docs-dark.scss | 2 +- assets/css/just-the-docs-light.scss | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename _includes/css/{custom.scss => custom.scss.liquid} (100%) rename _includes/css/{just-the-docs.scss => just-the-docs.scss.liquid} (73%) diff --git a/_includes/css/custom.scss b/_includes/css/custom.scss.liquid similarity index 100% rename from _includes/css/custom.scss rename to _includes/css/custom.scss.liquid diff --git a/_includes/css/just-the-docs.scss b/_includes/css/just-the-docs.scss.liquid similarity index 73% rename from _includes/css/just-the-docs.scss rename to _includes/css/just-the-docs.scss.liquid index 9c27ce6..2fc1e27 100644 --- a/_includes/css/just-the-docs.scss +++ b/_includes/css/just-the-docs.scss.liquid @@ -1,4 +1,4 @@ @import "./support/support"; @import "./color_schemes/{{ include.color_scheme }}"; @import "./modules"; -{% include css/custom.scss %} +{% include css/custom.scss.liquid %} diff --git a/assets/css/just-the-docs-dark.scss b/assets/css/just-the-docs-dark.scss index c44bde1..3f5bd6b 100644 --- a/assets/css/just-the-docs-dark.scss +++ b/assets/css/just-the-docs-dark.scss @@ -1,3 +1,3 @@ --- --- -{% include css/just-the-docs.scss color_scheme="dark" %} \ No newline at end of file +{% include css/just-the-docs.scss.liquid color_scheme="dark" %} \ No newline at end of file diff --git a/assets/css/just-the-docs-light.scss b/assets/css/just-the-docs-light.scss index a5aab89..336d74e 100644 --- a/assets/css/just-the-docs-light.scss +++ b/assets/css/just-the-docs-light.scss @@ -1,3 +1,3 @@ --- --- -{% include css/just-the-docs.scss color_scheme="light" %} \ No newline at end of file +{% include css/just-the-docs.scss.liquid color_scheme="light" %} \ No newline at end of file From d549d37e6faac68cfeba7cec13e35d306d47fee5 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Thu, 15 Aug 2019 20:12:57 +0200 Subject: [PATCH 09/39] Fixed missing new lines --- _includes/title.html | 2 +- _layouts/table_wrappers.html | 2 +- assets/css/just-the-docs-dark.scss | 2 +- assets/css/just-the-docs-light.scss | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_includes/title.html b/_includes/title.html index f6d5669..35b2c6c 100644 --- a/_includes/title.html +++ b/_includes/title.html @@ -1 +1 @@ -{{ site.title }} \ No newline at end of file +{{ site.title }} diff --git a/_layouts/table_wrappers.html b/_layouts/table_wrappers.html index cc6187a..3f8f226 100644 --- a/_layouts/table_wrappers.html +++ b/_layouts/table_wrappers.html @@ -4,4 +4,4 @@ layout: vendor/compress {% assign content_ = content | replace: '', '' %} -{{ content_ }} \ No newline at end of file +{{ content_ }} diff --git a/assets/css/just-the-docs-dark.scss b/assets/css/just-the-docs-dark.scss index 3f5bd6b..ac92fb1 100644 --- a/assets/css/just-the-docs-dark.scss +++ b/assets/css/just-the-docs-dark.scss @@ -1,3 +1,3 @@ --- --- -{% include css/just-the-docs.scss.liquid color_scheme="dark" %} \ No newline at end of file +{% include css/just-the-docs.scss.liquid color_scheme="dark" %} diff --git a/assets/css/just-the-docs-light.scss b/assets/css/just-the-docs-light.scss index 336d74e..ac69688 100644 --- a/assets/css/just-the-docs-light.scss +++ b/assets/css/just-the-docs-light.scss @@ -1,3 +1,3 @@ --- --- -{% include css/just-the-docs.scss.liquid color_scheme="light" %} \ No newline at end of file +{% include css/just-the-docs.scss.liquid color_scheme="light" %} From 95498ccaf8f1829a9123bde4c14800fb3219f28a Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Sat, 17 Aug 2019 15:02:53 +0200 Subject: [PATCH 10/39] Added just-the-docs-default.scss which includes the theme set in _config.yml --- _includes/head.html | 7 +------ _sass/color_schemes/dark.scss | 2 -- _sass/color_schemes/light.scss | 1 - assets/css/just-the-docs-default.scss | 8 ++++++++ 4 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 assets/css/just-the-docs-default.scss diff --git a/_includes/head.html b/_includes/head.html index e640f97..16ffe3d 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -12,12 +12,7 @@ - {% if site.color_scheme == nil or site.color_scheme == "nil" %} - {% assign color_scheme = 'light' %} - {% else %} - {% assign color_scheme = site.color_scheme %} - {% endif %} - + {% if site.ga_tracking != nil %} diff --git a/_sass/color_schemes/dark.scss b/_sass/color_schemes/dark.scss index 333c2b1..9a0b9ea 100644 --- a/_sass/color_schemes/dark.scss +++ b/_sass/color_schemes/dark.scss @@ -1,5 +1,3 @@ -// override this file to change the dark theme - $body-background-color: $grey-dk-300; $sidebar-color: $grey-dk-300; $border-color: $grey-dk-200; diff --git a/_sass/color_schemes/light.scss b/_sass/color_schemes/light.scss index 5932f29..e69de29 100644 --- a/_sass/color_schemes/light.scss +++ b/_sass/color_schemes/light.scss @@ -1 +0,0 @@ -// override this file to change the light (default) theme diff --git a/assets/css/just-the-docs-default.scss b/assets/css/just-the-docs-default.scss new file mode 100644 index 0000000..63fde26 --- /dev/null +++ b/assets/css/just-the-docs-default.scss @@ -0,0 +1,8 @@ +--- +--- +{% if site.color_scheme and site.color_scheme != "nil" %} + {% assign color_scheme = site.color_scheme %} +{% else %} + {% assign color_scheme = "light" %} +{% endif %} +{% include css/just-the-docs.scss.liquid color_scheme=color_scheme %} From 3ed2d586fdf0a67ffd7a7f4b85bbaec63633481a Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Sat, 17 Aug 2019 16:07:09 +0200 Subject: [PATCH 11/39] Fixed stylelintrc.json --- .stylelintrc.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.stylelintrc.json b/.stylelintrc.json index 2253e64..e8d6e17 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,5 +1,6 @@ { "ignoreFiles" : [ + "assets/css/just-the-docs-default.scss", "assets/css/just-the-docs-light.scss", "assets/css/just-the-docs-dark.scss", "_sass/vendor/**/*.scss" From 7c8ead0bff574e80542a3132d377e53d92332dbb Mon Sep 17 00:00:00 2001 From: Matthew Wang Date: Mon, 9 Sep 2019 19:31:23 -0700 Subject: [PATCH 12/39] adds page last modified to footer --- _layouts/default.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_layouts/default.html b/_layouts/default.html index d414234..de5244e 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -83,6 +83,9 @@ layout: table_wrappers {% if site.footer_content != nil %}
+ {% if page.last_modified_date %} +

Page last modified: {{ page.last_modified_date | date: "%Y-%m-%d %H:%M" }}

+ {% endif %}

{{ site.footer_content }}

{% endif %} From be5822cb860e695eabc3368867d38f569bb93f19 Mon Sep 17 00:00:00 2001 From: Matthew Wang Date: Mon, 9 Sep 2019 19:43:33 -0700 Subject: [PATCH 13/39] adds page last modified above header --- _layouts/default.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_layouts/default.html b/_layouts/default.html index de5244e..d56132e 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -59,6 +59,9 @@ layout: table_wrappers {% endif %} {% endunless %}
+ {% if page.last_modified_date %} +

Page last modified: {{ page.last_modified_date | date: "%Y-%m-%d %H:%M" }}

+ {% endif %} {% if site.heading_anchors != false %} {% include vendor/anchor_headings.html html=content beforeHeading = "true" anchorBody="" anchorClass="anchor-heading" %} {% else %} From 97efc81fa904054e367d9fb1f5df7f11e2a90e6b Mon Sep 17 00:00:00 2001 From: Matthew Wang Date: Wed, 11 Sep 2019 15:31:47 -0700 Subject: [PATCH 14/39] implements configuration for footer data and "edit this page" functionality --- _config.yml | 6 ++++++ _layouts/default.html | 14 +++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/_config.yml b/_config.yml index d12d439..cab96f5 100644 --- a/_config.yml +++ b/_config.yml @@ -34,6 +34,12 @@ aux_links: # Footer content appears at the bottom of every page's main content footer_content: "Copyright © 2017-2019 Patrick Marsceill. Distributed by an MIT license." +# Footer metadata +show_last_edit_time: true +last_edit_time_format: "%b %e %Y at %I:%M %p" +show_gh_edit_link: true +gh_edit_repository: "https://github.com/pmarsceill/just-the-docs" +edit_link_text: "Edit this page on GitHub" # Color scheme currently only supports "dark" or nil (default) color_scheme: nil diff --git a/_layouts/default.html b/_layouts/default.html index d56132e..e7d4996 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -59,9 +59,6 @@ layout: table_wrappers {% endif %} {% endunless %}
- {% if page.last_modified_date %} -

Page last modified: {{ page.last_modified_date | date: "%Y-%m-%d %H:%M" }}

- {% endif %} {% if site.heading_anchors != false %} {% include vendor/anchor_headings.html html=content beforeHeading = "true" anchorBody="" anchorClass="anchor-heading" %} {% else %} @@ -86,8 +83,15 @@ layout: table_wrappers {% if site.footer_content != nil %}
- {% if page.last_modified_date %} -

Page last modified: {{ page.last_modified_date | date: "%Y-%m-%d %H:%M" }}

+ {% if site.show_last_edit_time and site.last_edit_time_format and page.last_modified_date %} +

+ Page last modified: {{ page.last_modified_date | date: site.last_edit_time_format }}. +

+ {% endif %} + {% if site.show_gh_edit_link and site.edit_link_text %} +

+ Edit this page on GitHub. +

{% endif %}

{{ site.footer_content }}

From 4ff38dbe9c8090ea31bcb39927d8ba7d0ffcff99 Mon Sep 17 00:00:00 2001 From: Matthew Wang Date: Wed, 11 Sep 2019 15:36:36 -0700 Subject: [PATCH 15/39] adds documentation --- docs/configuration.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/configuration.md b/docs/configuration.md index 14422fd..1a443c9 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -55,8 +55,18 @@ heading_anchors: true ```yaml # Footer content appears at the bottom of every page's main content footer_content: "Copyright © 2017-2019 Patrick Marsceill. Distributed by an MIT license." +# Footer metadata +show_last_edit_time: true +last_edit_time_format: "%b %e %Y at %I:%M %p" +show_gh_edit_link: true +gh_edit_repository: "https://github.com/pmarsceill/just-the-docs" +edit_link_text: "Edit this page on GitHub" ``` +* the "page last modified" data will only display if a page has a key called `last_modified_date`, formatted in some readable date format +* `last_edit_time_format` uses Ruby's DateTime formatter; see examples and more information [at this link.](https://apidock.com/ruby/DateTime/strftime) +* `gh_edit_repository` should be changed to the project's GitHub repository + ## Color scheme ```yaml From 9c4622d75f5cfec36c3ce1950cbcb221aea6c9dc Mon Sep 17 00:00:00 2001 From: Matthew Wang Date: Sat, 14 Sep 2019 17:54:27 -0700 Subject: [PATCH 16/39] implements conditional or on footer --- _layouts/default.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_layouts/default.html b/_layouts/default.html index 5bf27a9..9c333af 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -86,7 +86,7 @@ layout: table_wrappers {% endif %} - {% if site.footer_content != nil %} + {% if site.footer_content != nil or site.show_last_edit_time or site.show_gh_edit_link %}
{% if site.show_last_edit_time and site.last_edit_time_format and page.last_modified_date %} @@ -99,7 +99,9 @@ layout: table_wrappers Edit this page on GitHub.

{% endif %} + {% if site.footer_content != nil %}

{{ site.footer_content }}

+ {% endif %}
{% endif %} From 25331a5ffad215b86fcdf78067ee89b940147bc5 Mon Sep 17 00:00:00 2001 From: Alexey Averikhin Date: Fri, 8 Nov 2019 06:54:59 +0100 Subject: [PATCH 17/39] Enable IP anonymization in Google Analytics (GDPR) - Introduced "ga_tracking_anonymize_ip" parameter to enable/disable Google Analytics IP anonymization (to comply with GDPR). (cherry picked from commit ce530f36fa0549c78ffe53ea6077f44f6f0b330f) (+1 squashed commit) Squashed commits: [69b7718] - enable GA anonymize_ip (cherry picked from commit f2b67c632af72b61dd634b9a337200781519691e) --- _config.yml | 1 + _includes/head.html | 2 +- docs/configuration.md | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index a090670..5508d4a 100644 --- a/_config.yml +++ b/_config.yml @@ -47,6 +47,7 @@ color_scheme: nil # Google Analytics Tracking (optional) # e.g, UA-1234567-89 ga_tracking: UA-2709176-10 +ga_tracking_anonymize_ip: true plugins: - jekyll-seo-tag diff --git a/_includes/head.html b/_includes/head.html index eae6a5e..67e7b05 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -21,7 +21,7 @@ function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', "{{ site.ga_tracking }}"); + gtag('config', '{{ site.ga_tracking }}'{% if site.ga_tracking_anonymize_ip %}, { 'anonymize_ip': true }{% endif %}); {% endif %} diff --git a/docs/configuration.md b/docs/configuration.md index eb43a08..23a0e26 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -85,4 +85,5 @@ See [Customization]({{ site.baseurl }}{% link docs/customization.md %}) for more # Google Analytics Tracking (optional) # e.g, UA-1234567-89 ga_tracking: UA-5555555-55 +ga_tracking_anonymize_ip: true ``` From 2c949289173da379d38868417ac8e66969b966d4 Mon Sep 17 00:00:00 2001 From: Matthew Wang Date: Wed, 13 Nov 2019 23:06:23 -0800 Subject: [PATCH 18/39] oops, adds edit_link_text to layout --- _config.yml | 2 +- _layouts/default.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_config.yml b/_config.yml index 09da13f..721cc74 100644 --- a/_config.yml +++ b/_config.yml @@ -45,7 +45,7 @@ show_last_edit_time: true last_edit_time_format: "%b %e %Y at %I:%M %p" show_gh_edit_link: true gh_edit_repository: "https://github.com/pmarsceill/just-the-docs" -edit_link_text: "Edit this page on GitHub" +edit_link_text: "Edit this page on GitHub." # Color scheme currently only supports "dark" or nil (default) color_scheme: nil diff --git a/_layouts/default.html b/_layouts/default.html index 9c333af..4496d9d 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -96,7 +96,7 @@ layout: table_wrappers {% endif %} {% if site.show_gh_edit_link and site.edit_link_text %}

- Edit this page on GitHub. + {{ site.edit_link_text }}

{% endif %} {% if site.footer_content != nil %} From 03979bf8fc9c0fbb42221dc736f23828d97136c9 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Wed, 27 Nov 2019 11:15:57 +0100 Subject: [PATCH 19/39] Added documentation for custom color schemes and custom css --- _sass/custom/custom.scss | 129 --------------------------------- _sass/overrides.scss | 3 - assets/js/dark-mode-preview.js | 23 ------ docs/configuration.md | 9 ++- docs/customization.md | 56 ++++++++++---- 5 files changed, 48 insertions(+), 172 deletions(-) delete mode 100644 _sass/overrides.scss delete mode 100644 assets/js/dark-mode-preview.js diff --git a/_sass/custom/custom.scss b/_sass/custom/custom.scss index 9ac503b..e69de29 100644 --- a/_sass/custom/custom.scss +++ b/_sass/custom/custom.scss @@ -1,129 +0,0 @@ -//// -//// Typography -//// - -//$body-font-family: -apple-system, BlinkMacSystemFont, "helvetica neue", helvetica, roboto, noto, "segoe ui", arial, sans-serif; -//$mono-font-family: "SFMono-Regular", Menlo, Consolas, Monospace; -//$root-font-size: 16px; // Base font-size for rems -//$body-line-height: 1.4; -//$content-line-height: 1.5; -//$body-heading-line-height: 1.15; - -//// -//// Colors -//// - -//$white: #fff; - -//$grey-dk-000: #959396; -//$grey-dk-100: #5c5962; -//$grey-dk-200: #44434d; -//$grey-dk-250: #302d36; -//$grey-dk-300: #27262b; - -//$grey-lt-000: #f5f6fa; -//$grey-lt-100: #eeebee; -//$grey-lt-200: #ecebed; -//$grey-lt-300: #e6e1e8; - -//$purple-000: #7253ed; -//$purple-100: #5e41d0; -//$purple-200: #4e26af; -//$purple-300: #381885; - -//$blue-000: #2c84fa; -//$blue-100: #2869e6; -//$blue-200: #264caf; -//$blue-300: #183385; - -//$green-000: #41d693; -//$green-100: #11b584; -//$green-200: #009c7b; -//$green-300: #026e57; - -//$yellow-000: #ffeb82; -//$yellow-100: #fadf50; -//$yellow-200: #f7d12e; -//$yellow-300: #e7af06; - -//$red-000: #f77e7e; -//$red-100: #f96e65; -//$red-200: #e94c4c; -//$red-300: #dd2e2e; - -//$body-background-color: $white; -//$sidebar-color: $grey-lt-000; -//$search-background-color: $white; -//$table-background-color: $white; -//$code-background-color: $grey-lt-000; - -//$body-text-color: $grey-dk-100; -//$body-heading-color: $grey-dk-300; -//$search-result-preview-color: $grey-dk-000; -//$nav-child-link-color: $grey-dk-100; -//$link-color: $purple-000; -//$btn-primary-color: $purple-100; -//$base-button-color: #f7f7f7; - -//// -//// Spacing -//// - -//$spacing-unit: 1rem; // 1rem == 16px - -//$spacers: ( -//sp-0: 0, -//sp-1: $spacing-unit * 0.25, -//sp-2: $spacing-unit * 0.5, -//sp-3: $spacing-unit * 0.75, -//sp-4: $spacing-unit, -//sp-5: $spacing-unit * 1.5, -//sp-6: $spacing-unit * 2, -//sp-7: $spacing-unit * 2.5, -//sp-8: $spacing-unit * 3, -//sp-9: $spacing-unit * 3.5, -//sp-10: $spacing-unit * 4 -//); - -//$sp-1: map-get($spacers, sp-1); // 0.25 rem == 4px -//$sp-2: map-get($spacers, sp-2); // 0.5 rem == 8px -//$sp-3: map-get($spacers, sp-3); // 0.75 rem == 12px -//$sp-4: map-get($spacers, sp-4); // 1 rem == 16px -//$sp-5: map-get($spacers, sp-5); // 1.5 rem == 24px -//$sp-6: map-get($spacers, sp-6); // 2 rem == 32px -//$sp-7: map-get($spacers, sp-7); // 2.5 rem == 40px -//$sp-8: map-get($spacers, sp-8); // 3 rem == 48px -//$sp-9: map-get($spacers, sp-9); // 4 rem == 48px -//$sp-10: map-get($spacers, sp-10); // 4.5 rem == 48px - -//// -//// Borders -//// - -//$border: 1px solid; -//$border-radius: 4px; -//$border-color: $grey-lt-100; - -//// -//// Grid system -//// - -//$gutter-spacing: $sp-6; -//$gutter-spacing-sm: $sp-4; -//$nav-width: 264px; -//$nav-width-md: 248px; -//$content-width: 800px; -//$header-height: 60px; -//$search-results-width: 500px; - -//// -//// Media queries in pixels -//// - -//$media-queries: ( -//xs: 320px, -//sm: 500px, -//md: $content-width, -//lg: $content-width + $nav-width, -//xl: 1400px -//); diff --git a/_sass/overrides.scss b/_sass/overrides.scss deleted file mode 100644 index 21e9527..0000000 --- a/_sass/overrides.scss +++ /dev/null @@ -1,3 +0,0 @@ -// -// Custom overrides from a user. -// diff --git a/assets/js/dark-mode-preview.js b/assets/js/dark-mode-preview.js deleted file mode 100644 index b9ad81e..0000000 --- a/assets/js/dark-mode-preview.js +++ /dev/null @@ -1,23 +0,0 @@ -document.addEventListener("DOMContentLoaded", function(){ - - const toggleDarkMode = document.querySelector('.js-toggle-dark-mode') - const cssFile = document.querySelector('[rel="stylesheet"]') - const originalCssRef = cssFile.getAttribute('href') - const darkModeCssRef = originalCssRef.replace('just-the-docs.css', 'dark-mode-preview.css') - const buttonCopy = ['Return to the light side', 'Preview dark color scheme'] - const updateButtonText = function(toggleDarkMode) { - toggleDarkMode.textContent === buttonCopy[0] ? - toggleDarkMode.textContent = buttonCopy[1] : - toggleDarkMode.textContent = buttonCopy[0] - } - - jtd.addEvent(toggleDarkMode, 'click', function(){ - if (cssFile.getAttribute('href') === originalCssRef) { - cssFile.setAttribute('href', darkModeCssRef) - updateButtonText(toggleDarkMode) - } else { - cssFile.setAttribute('href', originalCssRef) - updateButtonText(toggleDarkMode) - } - }) -}) diff --git a/docs/configuration.md b/docs/configuration.md index 939b6ae..26db5b5 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -38,7 +38,6 @@ search_enabled: true # Enable support for hyphenated search words: search_tokenizer_separator: /[\s/]+/ - ``` ## Aux links @@ -56,7 +55,7 @@ aux_links: # Heading anchor links appear on hover over h1-h6 tags in page content # allowing users to deep link to a particular heading on a page. # -# Supports true (default) or false/nil +# Supports true (default) or false heading_anchors: true ``` @@ -70,8 +69,8 @@ footer_content: "Copyright © 2017-2019 Patrick Marsceill. Distributed by an ## Color scheme ```yaml -# Color scheme currently only supports "dark" or nil (default) -color_scheme: "dark" +# Color scheme supports "light" (default) and "dark" +color_scheme: dark ``` @@ -81,8 +80,10 @@ const toggleDarkMode = document.querySelector('.js-toggle-dark-mode'); jtd.addEvent(toggleDarkMode, 'click', function(){ if (jtd.getTheme() === 'dark') { jtd.setTheme('light'); + toggleDarkMode.textContent = 'Preview dark color scheme'; } else { jtd.setTheme('dark'); + toggleDarkMode.textContent = 'Return to the light side'; } }); diff --git a/docs/customization.md b/docs/customization.md index 9848ad3..cbcd38c 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -29,8 +29,8 @@ To enable a color scheme, set the `color_scheme` parameter in your site's `_conf {: .no_toc } ```yaml -# Color scheme currently only supports "dark" or nil (default) -color_scheme: "dark" +# Color scheme supports "light" (default) and "dark" +color_scheme: dark ``` @@ -40,36 +40,66 @@ const toggleDarkMode = document.querySelector('.js-toggle-dark-mode'); jtd.addEvent(toggleDarkMode, 'click', function(){ if (jtd.getTheme() === 'dark') { jtd.setTheme('light'); + toggleDarkMode.textContent = 'Preview dark color scheme'; } else { jtd.setTheme('dark'); + toggleDarkMode.textContent = 'Return to the light side'; } }); -## Specific visual customization +## Custom schemes -To customize your site’s aesthetic, open `_sass/custom/custom.scss` in your editor to see if there is a variable that you can override. Most styles like fonts, colors, spacing, etc. are derived from these variables. To override a specific variable, uncomment its line and change its value. +### Define a custom scheme -For example, to change the link color from the purple default to blue, open `_sass/custom/custom.css` and find the `$link-color` variable on line `50`. Uncomment it, and change its value to our `$blue-000` variable, or another shade of your choosing. +You can add custom schemes. +If you want to add a scheme named `foo` (can be any name) just add a file `_sass/color_schemes/foo.scss` (replace `foo` by your scheme name) +where you override theme variables to change colors, fonts, spacing, etc. + +Available variables are listed in the [_variables.scss](https://github.com/pmarsceill/just-the-docs/tree/master/_sass/support/_variables.scss) file. + +For example, to change the link color from the purple default to blue, include the following inside your scheme file: #### Example {: .no_toc } ```scss -// ... -// -// $body-text-color: $grey-dk-100; -// $body-heading-color: $grey-dk-300; $link-color: $blue-000; -// -// ... ``` _Note:_ Editing the variables directly in `_sass/support/variables.scss` is not recommended and can cause other dependencies to fail. +Please use scheme files. -## Override styles +### Use a custom scheme -For styles that aren't defined as a variables, you may want to modify specific CSS classes. To add your own CSS overrides at the end of the cascade, edit `_sass/overrides.scss`. This will allow for all overrides to be kept in a single file, and for any upstream changes to still be applied. +To use the custom color scheme, only set the `color_scheme` parameter in your site's `_config.yml` file: +```yaml +color_scheme: foo +``` + +### Switchable custom scheme + +If you want to be able to change the scheme dynamically, for example via javascript, just add a file `assets/css/just-the-docs-foo.scss` (replace `foo` by your scheme name) +with the following content:` + +{% raw %} + --- + --- + {% include css/just-the-docs.scss.liquid color_scheme="foo" %} +{% endraw %} + +This allows you to switch the scheme via the following javascript. + +```js +jtd.setTheme('foo'); +``` + +## Override and completely custom styles + +For styles that aren't defined as variables, you may want to modify specific CSS classes. +Additionally, you may want to add completely custom CSS specific to your content. +To do this, put your styles in the file `_sass/custom/custom.scss`. +This will allow for all overrides to be kept in a single file, and for any upstream changes to still be applied. For example, if you'd like to add your own styles for printing a page, you could add the following styles. From 9b86e292fa1860820ede6531ed494c97ea6db444 Mon Sep 17 00:00:00 2001 From: Matthew Wang Date: Sun, 12 Jan 2020 13:47:05 -0800 Subject: [PATCH 20/39] implements requested branch and edit mode configs --- _config.yml | 6 ++++-- _layouts/default.html | 11 +++++++++-- docs/configuration.md | 12 ++++++++---- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/_config.yml b/_config.yml index 721cc74..4850575 100644 --- a/_config.yml +++ b/_config.yml @@ -42,9 +42,11 @@ aux_links: footer_content: "Copyright © 2017-2019 Patrick Marsceill. Distributed by an MIT license." # Footer metadata show_last_edit_time: true -last_edit_time_format: "%b %e %Y at %I:%M %p" +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 show_gh_edit_link: true -gh_edit_repository: "https://github.com/pmarsceill/just-the-docs" +gh_edit_repository: "https://github.com/pmarsceill/just-the-docs" # the github URL for your repo +gh_edit_branch: "master" # switch to the branch that your docs is served from +gh_edit_view_mode: "tree" # switch to "edit" if you want the user to jump into the editor immediately edit_link_text: "Edit this page on GitHub." # Color scheme currently only supports "dark" or nil (default) diff --git a/_layouts/default.html b/_layouts/default.html index 4496d9d..86f7469 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -94,9 +94,16 @@ layout: table_wrappers Page last modified: {{ page.last_modified_date | date: site.last_edit_time_format }}.

{% endif %} - {% if site.show_gh_edit_link and site.edit_link_text %} + {% + if + site.show_gh_edit_link and + site.edit_link_text and + site.gh_edit_repository and + site.gh_edit_view_mode and + site.gh_edit_branch + %}

- {{ site.edit_link_text }} + {{ site.edit_link_text }}

{% endif %} {% if site.footer_content != nil %} diff --git a/docs/configuration.md b/docs/configuration.md index 86dd7eb..74a0d0c 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -67,15 +67,19 @@ heading_anchors: true footer_content: "Copyright © 2017-2019 Patrick Marsceill. Distributed by an MIT license." # Footer metadata show_last_edit_time: true -last_edit_time_format: "%b %e %Y at %I:%M %p" +last_edit_time_format: "%b %e %Y at %I:%M %p" # uses ruby's time format show_gh_edit_link: true -gh_edit_repository: "https://github.com/pmarsceill/just-the-docs" -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" # switch to the branch that your docs is served from +gh_edit_view_mode: "tree" # switch to "edit" if you want the user to jump into the editor immediately +edit_link_text: "Edit this page on GitHub." ``` * the "page last modified" data will only display if a page has a key called `last_modified_date`, formatted in some readable date format * `last_edit_time_format` uses Ruby's DateTime formatter; see examples and more information [at this link.](https://apidock.com/ruby/DateTime/strftime) -* `gh_edit_repository` should be changed to the project's GitHub repository +* `gh_edit_repository` is the URL of the project's GitHub repository +* `gh_edit_branch` is the branch that the docs site is served from; defaults to `master` +* `gh_edit_view_mode` is `"tree"` by default, which brings the user to the github page; switch to `"edit"` to bring the user directly into editing mode ## Color scheme From 6f2065aa57a1d3285a3b6c8f04a31785cc5f54af Mon Sep 17 00:00:00 2001 From: Scott V Kissinger Date: Wed, 19 Feb 2020 16:01:50 +0800 Subject: [PATCH 21/39] Update nav.html for handling nav_exclude It appears nav_exclude only works on top level navigation items. I needed it to work at the child level as well. I believe these changes accomplish that for the child and grand_child levels. Love this theme. I've used it a few times. Apologies if this pull request is not according to convention. This is the first time I've done it on someone else's code. Thanks! --- _includes/nav.html | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/_includes/nav.html b/_includes/nav.html index d561a42..8042aa4 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -13,22 +13,26 @@ {%- assign children_list = site.html_pages | where: "parent", node.title | sort:"nav_order" -%} {%- endif -%} From aa8ca74883243708f3203e7f659aafbbcbdc720e Mon Sep 17 00:00:00 2001 From: Serge Date: Sun, 22 Mar 2020 22:51:37 -0400 Subject: [PATCH 22/39] Fix duplicated title and description tags Currently just-the-docs renders two title and description tags when used with jekyll-seo-tag. This patch fixes plugin detection conditonal. --- _includes/head.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_includes/head.html b/_includes/head.html index eae6a5e..aebfaba 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -2,13 +2,13 @@ - {% if site.plugins.jekyll-seo == nil %} + {% unless site.plugins contains "jekyll-seo-tag" %} {{ page.title }} - {{ site.title }} {% if page.description %} {% endif %} - {% endif %} + {% endunless %} From 17153f001fa8979513f4bc0d9396b19262b2567e Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Thu, 23 Apr 2020 22:32:46 -0400 Subject: [PATCH 23/39] Update _config.yml --- _config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_config.yml b/_config.yml index 4850575..014cf46 100644 --- a/_config.yml +++ b/_config.yml @@ -41,12 +41,12 @@ aux_links: # Footer content appears at the bottom of every page's main content footer_content: "Copyright © 2017-2019 Patrick Marsceill. Distributed by an MIT license." # Footer metadata -show_last_edit_time: true +show_last_edit_time: true # show (default) or hide edit time 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 -show_gh_edit_link: true +show_gh_edit_link: true # show (default) or hide edit this page link gh_edit_repository: "https://github.com/pmarsceill/just-the-docs" # the github URL for your repo -gh_edit_branch: "master" # switch to the branch that your docs is served from -gh_edit_view_mode: "tree" # switch to "edit" if you want the user to jump into the editor immediately +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 edit_link_text: "Edit this page on GitHub." # Color scheme currently only supports "dark" or nil (default) From 5d3b88a1e13ca09755f109c0e298a55e0c142d33 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Thu, 23 Apr 2020 22:38:45 -0400 Subject: [PATCH 24/39] Update _config.yml --- _config.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/_config.yml b/_config.yml index 014cf46..fa93ad3 100644 --- a/_config.yml +++ b/_config.yml @@ -38,16 +38,20 @@ 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 +# appears at the bottom of every page's main content footer_content: "Copyright © 2017-2019 Patrick Marsceill. Distributed by an MIT license." -# Footer metadata + +# Footer last edited timestamp show_last_edit_time: true # show (default) or hide edit time 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 -show_gh_edit_link: true # show (default) or hide edit this page link + +# 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 -edit_link_text: "Edit this page on GitHub." # Color scheme currently only supports "dark" or nil (default) color_scheme: nil From eecc51062bcbad5d54f8260f49bbde5fb4c1e991 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Thu, 23 Apr 2020 22:39:11 -0400 Subject: [PATCH 25/39] Update default.html --- _layouts/default.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_layouts/default.html b/_layouts/default.html index 86f7469..0b714bc 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -96,8 +96,8 @@ layout: table_wrappers {% endif %} {% if - site.show_gh_edit_link and - site.edit_link_text and + site.gh_edit_link and + site.gh_edit_link_text and site.gh_edit_repository and site.gh_edit_view_mode and site.gh_edit_branch From 60756a592dd8b8a7bc6f799cf65c126ff742edb8 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Thu, 23 Apr 2020 22:41:29 -0400 Subject: [PATCH 26/39] Update configuration.md --- docs/configuration.md | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 74a0d0c..e0065df 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -63,23 +63,27 @@ heading_anchors: true ## Footer content ```yaml -# Footer content appears at the bottom of every page's main content +# Footer content +# appears at the bottom of every page's main content footer_content: "Copyright © 2017-2019 Patrick Marsceill. Distributed by an MIT license." -# Footer metadata -show_last_edit_time: true -last_edit_time_format: "%b %e %Y at %I:%M %p" # uses ruby's time format -show_gh_edit_link: true + +# Footer last edited timestamp +last_edit_timestamp: true # show (default) or hide edit time +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" # switch to the branch that your docs is served from -gh_edit_view_mode: "tree" # switch to "edit" if you want the user to jump into the editor immediately -edit_link_text: "Edit this page on GitHub." +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 ``` -* the "page last modified" data will only display if a page has a key called `last_modified_date`, formatted in some readable date format -* `last_edit_time_format` uses Ruby's DateTime formatter; see examples and more information [at this link.](https://apidock.com/ruby/DateTime/strftime) -* `gh_edit_repository` is the URL of the project's GitHub repository -* `gh_edit_branch` is the branch that the docs site is served from; defaults to `master` -* `gh_edit_view_mode` is `"tree"` by default, which brings the user to the github page; switch to `"edit"` to bring the user directly into editing mode +- the "page last modified" data will only display if a page has a key called `last_modified_date`, formatted in some readable date format +- `last_edit_time_format` uses Ruby's DateTime formatter; see examples and more information [at this link.](https://apidock.com/ruby/DateTime/strftime) +- `gh_edit_repository` is the URL of the project's GitHub repository +- `gh_edit_branch` is the branch that the docs site is served from; defaults to `master` +- `gh_edit_view_mode` is `"tree"` by default, which brings the user to the github page; switch to `"edit"` to bring the user directly into editing mode ## Color scheme From 2faa91f2359b21de71fc9cec5836461114854899 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Thu, 23 Apr 2020 22:42:00 -0400 Subject: [PATCH 27/39] Update default.html --- _layouts/default.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_layouts/default.html b/_layouts/default.html index 0b714bc..13a860f 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -89,7 +89,7 @@ layout: table_wrappers {% if site.footer_content != nil or site.show_last_edit_time or site.show_gh_edit_link %}