-
+
+ {% 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 4ef15ce..1dd5256 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 e3c93e4..35b9631 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 0c7925c..e5d580b 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 7037080..7e3a802 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 dd24cfc..3c0a1b5 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 0000000..c2f867b --- /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 6bcb842..b5a4f83 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 ab7a1f2..1d0db73 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 2bce40f..8114321 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 f585015..0c9543f 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 c98055c..40faf41 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 0000000..364316e --- /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
+-
+
-
+