From 6540493df22ab05e49cdb97b9ea7935a4257fdc7 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Fri, 16 Nov 2018 13:57:32 -0500 Subject: [PATCH 1/8] Add condition for nav exclude --- _includes/nav.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/_includes/nav.html b/_includes/nav.html index dba0dea..170fcfb 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -1,7 +1,8 @@ From 379a97638778a9017e4c90daf2e91f7ef8c62e9f Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Fri, 16 Nov 2018 13:57:49 -0500 Subject: [PATCH 2/8] Add docs for nav exclude --- docs/navigation-structure.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/navigation-structure.md b/docs/navigation-structure.md index 8114321..d966713 100644 --- a/docs/navigation-structure.md +++ b/docs/navigation-structure.md @@ -35,6 +35,18 @@ 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. + +```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: From bfce0f57d3eaa6481ae3626c43b02ea2ed8302f8 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Fri, 16 Nov 2018 14:36:26 -0500 Subject: [PATCH 3/8] Fix bug on code snippets causing double padding. --- _sass/code.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_sass/code.scss b/_sass/code.scss index 0f08daa..3e740ed 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: $grey-lt-000; From 410085dd28fd2d7254e1cdd8e64caea537a69494 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Fri, 16 Nov 2018 14:37:00 -0500 Subject: [PATCH 4/8] Content cleanup --- docs/configuration.md | 2 +- docs/ui-components/buttons.md | 2 -- docs/ui-components/labels.md | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index c2f867b..e092418 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/ui-components/buttons.md b/docs/ui-components/buttons.md index 849071d..8da7729 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
- [Link button](http://example.com/){: .btn } [Link button](http://example.com/){: .btn .btn-purple } @@ -32,7 +31,6 @@ nav_order: 2
```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 710218f..f374246 100644 --- a/docs/ui-components/labels.md +++ b/docs/ui-components/labels.md @@ -31,7 +31,6 @@ Deprecated ```markdown - Default label {: .label } @@ -49,5 +48,4 @@ Coming soon Deprecated {: .label .label-red} - ``` From 7c24af074532e3e9b4a7e2536f905d442abe83d7 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Fri, 16 Nov 2018 14:37:28 -0500 Subject: [PATCH 5/8] Add remote-theme docs --- index.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/index.md b/index.md index 66c8339..192cfec 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 +```yaml +remote_theme: pmarsceill/just-the-docs +``` +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) + +### 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 From 2568b05fe7b46c95b1daa50d46bc60a9418a1257 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Fri, 16 Nov 2018 14:54:46 -0500 Subject: [PATCH 6/8] Don't break links in body --- _sass/content.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/_sass/content.scss b/_sass/content.scss index 1dd5256..8aa9f6c 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 { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + } + ul, ol { padding-left: 1.5em; From 4814fbce640790d015400ce55671e6bbc74b0eb6 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Fri, 16 Nov 2018 14:55:20 -0500 Subject: [PATCH 7/8] Content cleanup --- docs/navigation-structure.md | 8 ++++++++ index.md | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/navigation-structure.md b/docs/navigation-structure.md index d966713..eab6e73 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 @@ -39,6 +41,8 @@ nav_order: 4 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 @@ -87,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. @@ -104,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/index.md b/index.md index 192cfec..3ad9ca6 100644 --- a/index.md +++ b/index.md @@ -21,7 +21,7 @@ Just the Docs gives your documentation a jumpstart with a responsive Jekyll them 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. ### 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 +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 ``` From 559e21050345b387d7aa257ff17065978406e003 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Fri, 16 Nov 2018 15:04:31 -0500 Subject: [PATCH 8/8] Lint --- _sass/content.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_sass/content.scss b/_sass/content.scss index 8aa9f6c..46fc294 100644 --- a/_sass/content.scss +++ b/_sass/content.scss @@ -5,9 +5,9 @@ .page-content { a { + overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - overflow: hidden; } ul,