-
+
+ {% if site.search_enabled != nil %}
+ {% endif %}
{% if site.aux_links != nil %}
-
@@ -24,8 +25,9 @@
-
+
- {{ link.first }} {% endfor %} diff --git a/_sass/content.scss b/_sass/content.scss index 4ef15ce12476b..1dd5256593b8f 100644 --- a/_sass/content.scss +++ b/_sass/content.scss @@ -56,6 +56,23 @@ } } + .task-list { + padding-left: 0; + } + + .task-list-item { + display: flex; + align-items: center; + + &::before { + content: ""; + } + } + + .task-list-item-checkbox { + margin-right: 0.6em; + } + hr + * { margin-top: 0; } diff --git a/_sass/layout.scss b/_sass/layout.scss index e3c93e480b562..35b9631b0e897 100644 --- a/_sass/layout.scss +++ b/_sass/layout.scss @@ -79,8 +79,6 @@ @include mq(md) { background-color: $white; - border-bottom: $border $border-color; - } .main-content { @@ -88,8 +86,11 @@ @include mq(md) { display: flex; - justify-content: space-between; + justify-content: flex-end; + height: 60px; padding-top: $sp-4; + padding-bottom: $sp-4; + border-bottom: $border $border-color; } } } diff --git a/_sass/navigation.scss b/_sass/navigation.scss index 0c7925cd69402..e5d580b02ac75 100644 --- a/_sass/navigation.scss +++ b/_sass/navigation.scss @@ -14,7 +14,7 @@ z-index: 101; height: 60px; padding-top: $sp-4; - box-shadow: inset 0 -1px 0 $border-color; + border-bottom: $border $border-color; } } diff --git a/_sass/search.scss b/_sass/search.scss index 7037080661b29..7e3a80267faf0 100644 --- a/_sass/search.scss +++ b/_sass/search.scss @@ -17,7 +17,7 @@ display: block; padding-top: $sp-1; padding-right: 0; - padding-bottom: $sp-4; + padding-bottom: 0; padding-left: 0; margin-bottom: 0; background-color: transparent; diff --git a/assets/js/just-the-docs.js b/assets/js/just-the-docs.js index dd24cfc854e25..3c0a1b5574f3c 100644 --- a/assets/js/just-the-docs.js +++ b/assets/js/just-the-docs.js @@ -155,7 +155,9 @@ function initSearch() { function ready(){ toggleNav(); - initSearch(); + if (typeof lunr !== 'undefined') { + initSearch(); + } } // in case the document is already rendered diff --git a/docs/configuration.md b/docs/configuration.md new file mode 100644 index 0000000000000..c2f867b66abd6 --- /dev/null +++ b/docs/configuration.md @@ -0,0 +1,25 @@ +--- +layout: default +title: Configuration +nav_order: 2 +--- + +# Configuration + +Just the Docs has some specific configuration parameters that can be definied in your Jekyll site's `config.yml` file. + +## Search enabled + +```yml +# Enable or disable the site search +search_enabled: true +``` + +## Aux links + +```yml +# Aux links for the upper right navigation +aux_links: +"Just the Docs on GitHub": + - "//github.com/pmarsceill/just-the-docs" +``` diff --git a/docs/customization.md b/docs/customization.md index 6bcb8427b9ba5..b5a4f83ce1791 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -1,7 +1,7 @@ --- layout: default title: Customization -nav_order: 5 +nav_order: 6 --- # Customization diff --git a/docs/index-test.md b/docs/index-test.md index ab7a1f2df3cd8..1d0db73cbae63 100644 --- a/docs/index-test.md +++ b/docs/index-test.md @@ -94,6 +94,12 @@ end - level 2 item - level 1 item +### And a task list + +- [ ] Hello, this is a TODO item +- [ ] Hello, this is another TODO item +- [x] Goodbye, this item is done + ### Small image ![](https://assets-cdn.github.com/images/icons/emoji/octocat.png) diff --git a/docs/navigation-structure.md b/docs/navigation-structure.md index 2bce40fdb6c2f..81143214c513a 100644 --- a/docs/navigation-structure.md +++ b/docs/navigation-structure.md @@ -1,7 +1,7 @@ --- layout: default title: Navigation Structure -nav_order: 4 +nav_order: 5 --- # Navigation Structure diff --git a/docs/search.md b/docs/search.md index f5850152fa67b..0c9543fd056ba 100644 --- a/docs/search.md +++ b/docs/search.md @@ -1,7 +1,7 @@ --- layout: default title: Search -nav_order: 6 +nav_order: 7 --- # Search @@ -12,7 +12,9 @@ Just the docs uses [lunr.js](http://lunrjs.com) to add a client-side search inte - Page content - Page URL -## Setup search +## Set up search + +### 1. Generate search index Before you can use search, you must initialize the feature by running this rake command that comes with the `just-the-docs` @@ -41,3 +43,12 @@ your search index. Alternatively, you can create the file manually in the ``` _Note: If you don't run this rake command or create this file manually, search will not work (or it will use the search index data from this docs site, not your site's content)._ + +### 2. Enable search in configuration + +In your site's `_config.yml` enable search: + +```yml +# Enable or disable the site search +search_enabled: true +``` diff --git a/docs/ui-components/code.md b/docs/ui-components/code.md index c98055c8f786b..40faf41272d69 100644 --- a/docs/ui-components/code.md +++ b/docs/ui-components/code.md @@ -2,7 +2,7 @@ layout: default title: Code parent: UI Components -nav_order: 5 +nav_order: 6 --- # Code diff --git a/docs/ui-components/lists.md b/docs/ui-components/lists.md new file mode 100644 index 0000000000000..364316e40d171 --- /dev/null +++ b/docs/ui-components/lists.md @@ -0,0 +1,98 @@ +--- +layout: default +title: Lists +parent: UI Components +nav_order: 5 +--- + +# Lists +{:.no_toc} + +## Table of contents +{: .no_toc .text-delta } + +1. TOC +{:toc} + +--- + +Most lists can be rendered with pure markdown... + +## Unordered list +
- Name +
- Godzilla +
- Born +
- 1952 +
- Birthplace +
- Japan +
- Color +
- Green +
- Name +
- Godzilla +
- Born +
- 1952 +
- Birthplace +
- Japan +
- Color +
- Green +
-
{% for link in site.aux_links %}
+- Item 1
+- Item 2
+- Item 3
+
+_or_
+
+* Item 1
+* Item 2
+* Item 3
+
+```markdown
+- Item 1
+- Item 2
+- Item 3
+
+_or_
+
+* Item 1
+* Item 2
+* Item 3
+```
+
+
+## Ordered list
+
+1. Item 1
+1. Item 2
+1. Item 3
+
+ ```markdown
+1. Item 1
+1. Item 2
+1. Item 3
+ ```
+## Task list
+
+
+- [ ] hello, this is a todo item
+- [ ] hello, this is another todo item
+- [x] goodbye, this item is done
+
+ ```markdown
+- [ ] hello, this is a todo item
+- [ ] hello, this is another todo item
+- [x] goodbye, this item is done
+ ```
+
+## Definition list
+
+Definition lists require HTML syntax and aren't supported with the GitHub flavored markdown compiler.
+
+
+
+```html
+-
+
-
+