diff --git a/_includes/nav.html b/_includes/nav.html index dba0deab4ac9038674af42825f1a75d39baddfb9..170fcfbd3b0d6d9b10aef446678d03cbdb05ed31 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -1,7 +1,8 @@ <nav> <ul class="navigation-list"> {% assign pages_list = site.html_pages | sort:"nav_order" %} - {% for node in pages_list %} + {% for node in pages_list %} + {% unless node.nav_exclude %} <li class="navigation-list-item{% if page.url == node.url %} active{% endif %} js-side-nav-item"> {% if node.parent == nil or node.has_children == true %} <a href="{{ node.url | absolute_url }}" class="navigation-list-link{% if page.url == node.url or (page.parent != nil and page.parent == node.parent) %} active{% endif %}">{{ node.title }}</a> @@ -19,6 +20,7 @@ {% endif %} {% endif %} </li> - {% endfor %} + {% endunless %} + {% endfor %} </ul> </nav> diff --git a/_sass/code.scss b/_sass/code.scss index 69a4ef87add8cf094173351bddb592b95bddb517..f29a97c105f370618b21d1abeeb125fc3857c047 100644 --- a/_sass/code.scss +++ b/_sass/code.scss @@ -11,7 +11,7 @@ code { border-radius: $border-radius; } -.highlight { +pre.highlight { padding: $sp-3; margin-bottom: 0; background-color: $code-background-color; diff --git a/_sass/content.scss b/_sass/content.scss index 1dd5256593b8fbf2cb13aa29c8556f542a6bf9ce..46fc2948ebcc157efe03cf2a9cfe60c27e37f7a4 100644 --- a/_sass/content.scss +++ b/_sass/content.scss @@ -4,6 +4,12 @@ // stylelint-disable selector-no-type, max-nesting-depth, selector-max-compound-selectors, selector-max-type .page-content { + a { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + ul, ol { padding-left: 1.5em; diff --git a/docs/configuration.md b/docs/configuration.md index c2f867b66abd680292c6d5f2405c28c088d013ec..e0924186ba33a33c02927cbb0a304c6135de2f16 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -6,7 +6,7 @@ nav_order: 2 # Configuration -Just the Docs has some specific configuration parameters that can be definied in your Jekyll site's `config.yml` file. +Just the Docs has some specific configuration parameters that can be definied in your Jekyll site's `_config.yml` file. ## Search enabled diff --git a/docs/navigation-structure.md b/docs/navigation-structure.md index 81143214c513af7cccb0483e34d6f9e1a0a7c49a..eab6e731884add31b40d6a3af801cd81120a885f 100644 --- a/docs/navigation-structure.md +++ b/docs/navigation-structure.md @@ -27,6 +27,8 @@ By default, all pages will appear as top level pages in the main nav. To specify a page order, use the `nav_order` variable in your pages' YAML front matter. +#### Example +{: .no_toc } ```yaml --- layout: default @@ -35,6 +37,20 @@ nav_order: 4 --- ``` +### Excluding pages + +For specific pages that you do not wish to include in the main navigation, e.g. a 404 page. Use the `nav_exclude: true` parameter in the YAML front matter for that page. + +#### Example +{: .no_toc } +```yaml +--- +layout: default +title: 404 +nav_exclude: true +--- +``` + ### Pages with children Sometimes you will want to create a page with many children (a section). To accomplish this you need to a few things. First, it is recommended that you keep pages that are related in a directory together... For example, in these docs, we keep all of the written documentation in the `./docs` directory and each of the sections in subdirectories like `./docs/ui-components` and `./docs/utilities`. This gives is an organization like: @@ -75,12 +91,14 @@ On the parent pages, add 3 YAML front matter variables: {: .no_toc } ```yaml +--- layout: default title: UI Components nav_order: 2 has_children: true parent: UI Components permalink: /ui-components +--- ``` Here we're setting up the UI Components landing page that is available at `/ui-components`, has children and is ordered second in the main nav. @@ -92,10 +110,12 @@ On child pages, simply set the `parent:` YAML front matter to whatever the paren #### Example {: .no_toc } ```yaml +--- layout: default title: Buttons parent: UI Components nav_order: 2 +--- ``` The Buttons page appears a child of UI Components and appears second in the UI Components section. diff --git a/docs/ui-components/buttons.md b/docs/ui-components/buttons.md index 849071df4e68822b1f257867edea023149657b80..8da7729d1a595ec6812fd1fb37c1a34901e52a96 100644 --- a/docs/ui-components/buttons.md +++ b/docs/ui-components/buttons.md @@ -21,7 +21,6 @@ nav_order: 2 ### Links that look like buttons <div class="code-example" markdown="1"> - [Link button](http://example.com/){: .btn } [Link button](http://example.com/){: .btn .btn-purple } @@ -32,7 +31,6 @@ nav_order: 2 </div> ```markdown - [Link button](http://example.com/){: .btn } [Link button](http://example.com/){: .btn .btn-purple } diff --git a/docs/ui-components/labels.md b/docs/ui-components/labels.md index 710218fc7254f6de47a3206bd061a92dc1e4dd8b..f3742469f93529db85d4729242c69f77e1470831 100644 --- a/docs/ui-components/labels.md +++ b/docs/ui-components/labels.md @@ -31,7 +31,6 @@ Deprecated </div> ```markdown - Default label {: .label } @@ -49,5 +48,4 @@ Coming soon Deprecated {: .label .label-red} - ``` diff --git a/index.md b/index.md index b467f5d1f3332b6b04156bc74451b620300fe1ba..e960388095f5fb0c89ed4c2d4b2d6eec2323f756 100644 --- a/index.md +++ b/index.md @@ -20,7 +20,14 @@ Just the Docs gives your documentation a jumpstart with a responsive Jekyll them ### Dependencies Just the Docs is built for [Jekyll](https://jekyllrb.com), a static site generator. View the [quick start guide](https://jekyllrb.com/docs/quickstart/) for more information. Just the Docs requires no special Jekyll plugins and can run on GitHub Pages standard Jekyll compiler. -### Installation +### Quick start: Use as a GitHub Pages remote theme +1. Add Just the Docs to your Jekyll site's `_config.yml` as a [remote theme](https://blog.github.com/2017-11-29-use-any-theme-with-github-pages/) +```yaml +remote_theme: pmarsceill/just-the-docs +``` +<small>You must have GitHub pages enabled on your repo, one or more markdown files, and a `_config.yml` file. [See an example repository](https://github.com/pmarsceill/jtd-remote)</small> + +### Local installation: Use the gem-based theme 1. Install the Ruby Gem ```bash $ gem install just-the-docs @@ -29,7 +36,7 @@ $ gem install just-the-docs # .. or add it to your your Jekyll site’s Gemfile gem "just-the-docs" ``` -2. Add Just the Docs to your Jekyll site’s `config.yml` +2. Add Just the Docs to your Jekyll site’s `_config.yml` ```yaml theme: "just-the-docs" ``` @@ -47,6 +54,10 @@ $ bundle exec jekyll serve ``` 4. Point your web browser to [http://localhost:4000](http://localhost:4000) +### Configure Just the Docs +- [See configuration options]({{ site.baseurl }}{% link docs/configuration.md %}) + + --- ## About the project