Compare commits

..

88 Commits

Author SHA1 Message Date
Patrick Marsceill
9a076b48ac Merge pull request #122 from pmarsceill/v0.2.4-release
v0.2.4 release branch
2019-04-30 18:17:36 -07:00
Patrick Marsceill
2c789d408c Merge branch 'master' into v0.2.4-release 2019-04-30 18:14:27 -07:00
Patrick Marsceill
4fb036ebac Update main.workflow 2019-04-30 18:14:13 -07:00
Patrick Marsceill
f255c07c7f update for latest stylint config 2019-04-30 18:00:56 -07:00
Patrick Marsceill
ce2d213dbe Merge pull request #105 from pmarsceill/dependabot/npm_and_yarn/stylelint-config-primer-6.0.0
Bump stylelint-config-primer from 3.0.1 to 6.0.0
2019-04-30 17:41:34 -07:00
Patrick Marsceill
95b76010c2 Merge branch 'v0.2.4-release' into dependabot/npm_and_yarn/stylelint-config-primer-6.0.0 2019-04-30 17:40:42 -07:00
Patrick Marsceill
ca0af1795a Merge pull request #115 from pmarsceill/dependabot/npm_and_yarn/stylelint-10.0.1
Bump stylelint from 9.10.1 to 10.0.1
2019-04-30 17:38:20 -07:00
Patrick Marsceill
f9e03e1248 Merge pull request #95 from gebeto/master
Add SEO and 'lang' param for `_config`
2019-04-30 17:35:22 -07:00
Patrick Marsceill
c83bdf853e Merge pull request #97 from montchr/montchr-50-sass-custom-import-order
Import custom Sass variable overrides before default variables are defined
2019-04-30 17:32:53 -07:00
Patrick Marsceill
af77e527d0 Merge pull request #102 from JoeNyland/patch-1
Remove unnecessary console.log()
2019-04-30 17:30:33 -07:00
Patrick Marsceill
151691eb09 Merge pull request #117 from gnarea/gh-pages-local
Explain how to use theme locally with GitHub Pages
2019-04-30 17:27:46 -07:00
Patrick Marsceill
4de1bdaf65 Update index.md 2019-04-30 20:24:46 -04:00
Gus Narea
afaa3ab225 Explain how to use theme locally with GitHub Pages 2019-04-17 23:41:04 +01:00
dependabot[bot]
e356659dbe Bump stylelint from 9.10.1 to 10.0.1
Bumps [stylelint](https://github.com/stylelint/stylelint) from 9.10.1 to 10.0.1.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/9.10.1...10.0.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-16 10:24:11 +00:00
dependabot[bot]
0ec44bd474 Bump stylelint-config-primer from 3.0.1 to 6.0.0
Bumps [stylelint-config-primer](https://github.com/primer/stylelint-config-primer) from 3.0.1 to 6.0.0.
- [Release notes](https://github.com/primer/stylelint-config-primer/releases)
- [Changelog](https://github.com/primer/stylelint-config-primer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/primer/stylelint-config-primer/commits/v6.0.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-19 10:33:34 +00:00
Joe Nyland
839cf91428 Remove unnecessary console.log() 2019-03-15 08:20:21 +00:00
Chris Montgomery
5291de45c5 Import custom overrides Sass before variables are used 2019-03-03 23:01:10 -05:00
gebeto
92fb6d1908 add jekyll-seo-tag to dependency to fix bundle crash 2019-02-28 09:08:27 +02:00
gebeto
8597aa4cac bump version to 0.2.4 2019-02-28 08:29:06 +02:00
gebeto
0bfd125087 add dynamic html 'lang' attribute 2019-02-28 08:11:12 +02:00
gebeto
25b6455ed7 add seo 2019-02-28 08:10:48 +02:00
Patrick Marsceill
b44efbf1da Merge pull request #89 from pmarsceill/github-action-for-release
Add main.workflow
2019-02-13 15:42:18 -05:00
Patrick Marsceill
8aa5982cd5 Add main.workflow 2019-02-06 14:54:07 -05:00
Patrick Marsceill
20f21217ca Merge pull request #86 from pmarsceill/v0.2.3
v0.2.3 Release Branch
2019-02-02 15:54:40 -08:00
Patrick Marsceill
96c053bb63 Merge branch 'master' into v0.2.3 2019-02-02 15:45:59 -08:00
Patrick Marsceill
d9a5bd0a19 lint 2019-02-02 17:43:14 -06:00
Patrick Marsceill
0ac8ec23bf Support for nesting ul in ol and vice versa 2019-02-02 17:38:36 -06:00
Patrick Marsceill
c40eec1c2f Merge pull request #87 from pmarsceill/feature-request
Update issue templates
2019-02-02 15:06:32 -08:00
Patrick Marsceill
de98c2b51b Update issue templates 2019-02-02 15:06:18 -08:00
Patrick Marsceill
c70f012eee Merge pull request #76 from pmarsceill/pmarsceill-patch-1
Add issue templates
2019-02-02 15:05:00 -08:00
Patrick Marsceill
aee6d1fb8c Use analytics.js instead of tag manager 2019-02-02 13:59:41 -08:00
Patrick Marsceill
f5d6cf6222 Add site url to config 2019-02-02 13:59:20 -08:00
Patrick Marsceill
f3fc9d9dd3 Update copyright date 2019-02-02 12:32:56 -08:00
Patrick Marsceill
a8c282ae5a Add docs for GA tracking 2019-02-02 12:32:33 -08:00
Patrick Marsceill
e12408d07b Add hook for GA tracking 2019-02-02 12:32:04 -08:00
Patrick Marsceill
a44d3a8652 Bump version numbers and description 2019-02-02 11:59:34 -08:00
Patrick Marsceill
ad867e37c0 move js class top parent div to fix page offset 2019-02-02 11:52:31 -08:00
Patrick Marsceill
01b500b1b3 Dont unesape this or it wont read the content var 2019-02-02 11:46:46 -08:00
Patrick Marsceill
84f8f003ac Merge pull request #73 from pmarsceill/dependabot/npm_and_yarn/stylelint-9.10.1
Bump stylelint from 9.9.0 to 9.10.1
2019-02-02 11:35:25 -08:00
Patrick Marsceill
ab20833d17 Merge pull request #77 from woernfl/patch-1
Just fixing a typo in the layout example
2019-02-02 11:33:23 -08:00
Patrick Marsceill
b77d22cf2e Merge pull request #81 from ilivewithian/patch-1
Bug: Can now show single search result.
2019-02-02 11:31:37 -08:00
Patrick Marsceill
35d7864874 Merge pull request #84 from novelistparty/master
fix #80 - escape the single quotes in the string
2019-02-02 11:27:01 -08:00
Patrick Marsceill
c9e4284754 Merge pull request #65 from stephenedmondson/master
search-data path fix
2019-02-02 11:22:53 -08:00
John Boyle
da0762007d escape the single quotes in the string 2019-01-31 10:02:06 -08:00
Rob White
5b8ff78bb6 Bug: Can now show single search result. 2019-01-29 13:39:20 +00:00
Florian Woerner
04e81c7158 Just fixing a typo in the layout example 2019-01-26 16:28:26 +01:00
Patrick Marsceill
b7913ec5a5 Update bug_report.md 2019-01-25 16:11:12 -05:00
Patrick Marsceill
25250db5e0 Add issue templates 2019-01-25 16:08:27 -05:00
dependabot[bot]
75f0ef57e2 Bump stylelint from 9.9.0 to 9.10.1
Bumps [stylelint](https://github.com/stylelint/stylelint) from 9.9.0 to 9.10.1.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/9.9.0...9.10.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-23 19:07:26 +00:00
Patrick Marsceill
eaafeee675 Merge pull request #74 from pmarsceill/v0.2.2
v0.2.2
2019-01-23 14:04:51 -05:00
Patrick Marsceill
10c0f95b40 Update just-the-docs.gemspec 2019-01-23 13:56:56 -05:00
Patrick Marsceill
8da9b82d66 Update package.json 2019-01-23 13:56:15 -05:00
Patrick Marsceill
b0e1c64a5a v0.2.2 release
v0.2.2 release branch
2019-01-23 13:54:12 -05:00
Patrick Marsceill
e1d226f192 Merge pull request #69 from bmann/patch-1
page layout also used out of the box by Jekyll
2019-01-23 13:51:26 -05:00
Patrick Marsceill
2de780bb4b Merge pull request #70 from EricFromCanada/improve-search
Improve search data generation
2019-01-23 13:19:08 -05:00
EricFromCanada
60c82cb518 Allow for ampersand in title or URL
Because `page.title` (and `page.url`) is already escaped and page titles served by lunrjs do not need escaping, ampersands need to be unescaped to display properly in search results.
2019-01-16 00:31:30 -05:00
EricFromCanada
9a4ea76957 Improve search content generator 2019-01-15 22:54:30 -05:00
EricFromCanada
793ea356c3 Use unless loop for comma
and mention `search_exclude`
2019-01-15 20:48:52 -05:00
EricFromCanada
71ba32e131 Additional text fixes 2019-01-15 20:48:48 -05:00
Boris Mann
37d54f5bf2 page layout also used out of the box by Jekyll
Suggesting page, since `about.md` uses it for new Jekyll installs as well.
2019-01-15 10:52:32 -08:00
Patrick Marsceill
ce947ae543 Merge pull request #67 from EricFromCanada/doc-cleanup
Documentation cleanup
2019-01-15 10:49:04 -05:00
EricFromCanada
2218e6e565 Fix links and syntax
For pages in utilities/, reorder `nav_order` to follow `parent`.
2019-01-14 14:43:33 -05:00
EricFromCanada
ae5bcfe361 Fix grammar and capitalization 2019-01-14 14:43:29 -05:00
EricFromCanada
ff49d02f83 Make spacing consistent 2019-01-14 14:43:16 -05:00
Stephen Edmondson
d7b1adb8c7 search-data path fix 2019-01-11 12:41:00 -06:00
Patrick Marsceill
b3fb5ebd87 Merge pull request #61 from pmarsceill/dependabot/bundler/bundler-tw-2.0.1
Update bundler requirement from ~> 1.17.1 to ~> 2.0.1
2019-01-07 10:44:05 -05:00
Patrick Marsceill
79a8cda356 Merge pull request #44 from pmarsceill/dependabot/npm_and_yarn/stylelint-config-primer-3.0.1
Bump stylelint-config-primer from 3.0.0 to 3.0.1
2019-01-07 10:43:34 -05:00
Patrick Marsceill
ae3f570370 Fix some styling bugs 2019-01-06 15:51:30 -05:00
Patrick Marsceill
f17700afe3 Better search index 2019-01-06 15:51:17 -05:00
Patrick Marsceill
269271a8d7 Add a page description 2019-01-06 15:50:57 -05:00
Patrick Marsceill
09cc61c25f Moar A11y updates 2019-01-06 15:50:31 -05:00
Patrick Marsceill
06c8acc06b Lol we forgot the body tag 2019-01-06 15:50:01 -05:00
Patrick Marsceill
a3ae6ad74e A11y updates 2019-01-06 15:49:26 -05:00
Patrick Marsceill
f264034999 If page has a description use that for meta data 2019-01-06 15:48:58 -05:00
dependabot[bot]
2b0ff701fa Update bundler requirement from ~> 1.17.1 to ~> 2.0.1
Updates the requirements on [bundler](https://github.com/bundler/bundler) to permit the latest version.
- [Release notes](https://github.com/bundler/bundler/releases)
- [Changelog](https://github.com/bundler/bundler/blob/v2.0.1/CHANGELOG.md)
- [Commits](https://github.com/bundler/bundler/commits/v2.0.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-04 10:18:33 +00:00
Patrick Marsceill
4a9b4fd5b1 lint 2018-12-16 15:29:06 -05:00
Patrick Marsceill
d5d1ddbd92 Docs update 2018-12-16 15:27:25 -05:00
Patrick Marsceill
39828f0775 A nicer 404 2018-12-16 15:24:00 -05:00
Patrick Marsceill
954e8941bb Accidental reversal 2018-12-16 15:23:33 -05:00
Patrick Marsceill
20970ca9e6 Better code scrolling for touch 2018-12-16 15:23:18 -05:00
Patrick Marsceill
eaf1247911 Auto focus main content for keyboard scrolling 2018-12-16 15:22:51 -05:00
Patrick Marsceill
eb0a6c328f Allow pages to be excluded from search 2018-12-16 14:47:41 -05:00
Patrick Marsceill
ed33ab18ac Exclude package-lock.json from jekyll build 2018-12-16 14:29:35 -05:00
Patrick Marsceill
555dfae410 Make TOC on parent pages optional 2018-12-16 14:27:44 -05:00
Patrick Marsceill
309b238400 Merge pull request #51 from flut1/master
Fix charset for list item content in scss
2018-12-13 11:16:27 -05:00
Floris Bernard
2caefa4e9e Fix charset for list item content in scss 2018-12-12 14:33:02 +01:00
dependabot[bot]
e4dd35083a Bump stylelint-config-primer from 3.0.0 to 3.0.1
Bumps [stylelint-config-primer](https://github.com/primer/primer) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/primer/primer/releases)
- [Changelog](https://github.com/primer/primer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/primer/primer/compare/v3.0.0...v3.0.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-30 10:25:20 +00:00
Patrick Marsceill
80bbdb7be8 Merge pull request #43 from pmarsceill/v0.2.1
v0.2.1 release
2018-11-29 11:43:28 -05:00
38 changed files with 1321 additions and 2317 deletions

38
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View File

@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

16
.github/main.workflow vendored Normal file
View File

@@ -0,0 +1,16 @@
workflow "Publish to RubyGems" {
on = "release"
resolves = ["scarhand/actions-ruby@master"]
}
action "Build from Gemspec" {
uses = "scarhand/actions-ruby@master"
runs = "build *.gemspec"
}
action "scarhand/actions-ruby@master" {
uses = "scarhand/actions-ruby@master"
needs = ["Build from Gemspec"]
runs = "push *.gem"
secrets = ["RUBYGEMS_AUTH_TOKEN"]
}

11
404.html Normal file
View File

@@ -0,0 +1,11 @@
---
layout: default
title: Page not found
permalink: /404
nav_exclude: true
search_exclude: true
---
<h1>Page not found</h1>
<p>The page you requested could not be found. Try using the navigation {% if site.search_enabled %}or search {% endif %}to find what you're looking for or go to this <a href="{{ site.url }}{{ site.baseurl }}">site's home page</a>.</p>

View File

@@ -4,12 +4,11 @@
<br><br>
<p align="center">
<h1 align="center">Just the Docs</h1>
<p align="center">A modern, high customizable, responsive Jekyll theme for documentation with built-in search.<br>Easily hosted on GitHub pages with few dependencies.</p>
<p align="center"><strong><a href="https://pmarsceill.github.io/just-the-docs">See it in action!</a></strong></p>
<p align="center">A modern, high customizable, responsive Jekyll theme for documentation with built-in search.<br>Easily hosted on GitHub Pages with few dependencies.</p>
<p align="center"><strong><a href="https://pmarsceill.github.io/just-the-docs/">See it in action!</a></strong></p>
<br><br><br>
</p>
![jtd](https://user-images.githubusercontent.com/896475/47384541-89053c80-d6d5-11e8-98dc-dba16e192de9.gif)
## Installation
@@ -60,7 +59,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/pmarsc
To set up your environment to develop this theme, run `bundle install`.
Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
Your theme is set up just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
When the theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be released.

View File

@@ -16,10 +16,10 @@
title: Just the Docs
description: A Jekyll theme for documentation
baseurl: "/just-the-docs/" # the subpath of your site, e.g. /blog
# url: "" # the base hostname & protocol for your site, e.g. http://example.com
url: "https://pmarsceill.github.io" # the base hostname & protocol for your site, e.g. http://example.com
permalink: pretty
exclude: ["node_modules/", "*.gemspec", "*.gem", "Gemfile", "Gemfile.lock", "package.json", "script/", "LICENSE.txt", "lib/", "bin/", "README.md", "Rakefile"]
exclude: ["node_modules/", "*.gemspec", "*.gem", "Gemfile", "Gemfile.lock", "package.json", "package-lock.json", "script/", "LICENSE.txt", "lib/", "bin/", "README.md", "Rakefile"]
# Enable or disable the site search
search_enabled: true
@@ -31,3 +31,10 @@ aux_links:
# Color scheme currently only supports "dark" or nil (default)
color_scheme: nil
# Google Analytics Tracking (optional)
# e.g, UA-1234567-89
ga_tracking: UA-2709176-10
plugins:
- jekyll-seo-tag

View File

@@ -1,13 +1,28 @@
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
{% if page.description %}
<meta name="Description" content="{{ page.description }}">
{% endif %}
<title>{{ page.title }} - {{ site.title }}</title>
<link rel="stylesheet" href="{{ "/assets/css/just-the-docs.css" | absolute_url }}">
{% if site.ga_tracking != nil %}
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', '{{ site.ga_tracking }}', '{{ site.url }}');
ga('send', 'pageview');
</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
{% endif %}
{% if site.search_enabled != nil %}
<script type="text/javascript" src="{{ "/assets/js/vendor/lunr.min.js" | absolute_url }}"></script>
<script type="text/javascript" src="{{ "/assets/js/vendor/lunr.min.js" | absolute_url }}"></script>
{% endif %}
<script type="text/javascript" src="{{ "/assets/js/just-the-docs.js" | absolute_url }}"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
{% seo %}
</head>

View File

@@ -1,4 +1,4 @@
<nav>
<nav role="navigation" aria-label="Main navigation">
<ul class="navigation-list">
{% assign pages_list = site.html_pages | sort:"nav_order" %}
{% for node in pages_list %}

View File

@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="en-us">
<html lang="{{ site.lang | default: "en-US" }}">
{% include head.html %}
<body>
<div class="page-wrap">
<div class="side-bar">
@@ -14,13 +15,13 @@
<p class="text-small text-grey-dk-000 mb-0">This site uses <a href="https://github.com/pmarsceill/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.</p>
</footer>
</div>
<div class="main-content-wrap">
<div class="main-content-wrap js-main-content" tabindex="0">
<div class="page-header">
<div class="main-content">
{% if site.search_enabled != nil %}
<div class="search js-search">
<div class="search-input-wrap">
<input type="text" class="js-search-input search-input" placeholder="Search {{ site.title }}" aria-label="Search {{ site.title }}" autocomplete="off">
<input type="text" class="js-search-input search-input" tabindex="0" placeholder="Search {{ site.title }}" aria-label="Search {{ site.title }}" autocomplete="off">
<svg width="14" height="14" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg" class="search-icon"><title>Search</title><g fill-rule="nonzero"><path d="M17.332 20.735c-5.537 0-10-4.6-10-10.247 0-5.646 4.463-10.247 10-10.247 5.536 0 10 4.601 10 10.247s-4.464 10.247-10 10.247zm0-4c3.3 0 6-2.783 6-6.247 0-3.463-2.7-6.247-6-6.247s-6 2.784-6 6.247c0 3.464 2.7 6.247 6 6.247z"/><path d="M11.672 13.791L.192 25.271 3.02 28.1 14.5 16.62z"/></g></svg>
</div>
<div class="js-search-results search-results-wrap"></div>
@@ -51,10 +52,10 @@
</nav>
{% endif %}
{% endunless %}
<div class="page-content">
<div id="main-content" class="page-content" role="main">
{{ content }}
{% if page.has_children == true %}
{% if page.has_children == true and page.has_toc != false %}
<hr>
<h2 class="text-delta">Table of contents</h2>
{% assign children_list = site.pages | sort:"nav_order" %}
@@ -72,4 +73,6 @@
</div>
</div>
</div>
</body>
</html>

5
_layouts/page.html Normal file
View File

@@ -0,0 +1,5 @@
---
layout: default
---
{{ content }}

View File

@@ -14,6 +14,7 @@ code {
pre.highlight {
padding: $sp-3;
margin-bottom: 0;
-webkit-overflow-scrolling: touch;
background-color: $code-background-color;
code {
@@ -104,7 +105,7 @@ pre.highlight {
.code-example {
padding: $sp-3;
margin-bottom: $sp-3;
overflow: scroll;
overflow: auto;
border: 1px solid $border-color;
border-radius: $border-radius;

View File

@@ -1,3 +1,5 @@
@charset "UTF-8";
//
// Styles for rendered markdown in the .main-content container
//
@@ -19,13 +21,13 @@
list-style-type: none;
counter-reset: step-counter;
li {
> li {
position: relative;
&::before {
position: absolute;
top: 0.2em;
left: -1.5em;
left: -1.6em;
color: $grey-dk-000;
content: counter(step-counter);
counter-increment: step-counter;
@@ -52,10 +54,10 @@
ul {
list-style: none;
li {
> li {
&::before {
position: absolute;
margin-left: -1.5em;
margin-left: -1.4em;
color: $grey-dk-000;
content: "";
}

View File

@@ -74,6 +74,10 @@
}
}
.js-main-content:focus {
outline: none;
}
.page-header {
background-color: $sidebar-color;
@@ -116,7 +120,8 @@
}
}
// stylelint-disable selector-no-type
// stylelint-disable selector-max-type
body {
position: relative;
padding-bottom: $sp-10;
@@ -126,7 +131,8 @@ body {
padding-bottom: 0;
}
}
// stylelint-enable selector-no-type
// stylelint-enable selector-max-type
.site-footer {
position: absolute;

View File

@@ -10,7 +10,7 @@
@import "./vendor/normalize.scss/normalize.scss";
//
// Import Just the docs scss
// Import Just the Docs scss
//
// Support

View File

@@ -10,12 +10,18 @@
@import "./vendor/normalize.scss/normalize.scss";
//
// Import Just the docs scss
// Import Just the Docs scss
//
// Support
@import "./support/support";
//
// Import custom overrides
//
@import "./custom/custom";
//
// Import custom color scheme scss
//
@@ -36,8 +42,3 @@
@import "./tables";
@import "./code";
@import "./utilities/utilities";
//
// Import custom overrides
//
@import "./custom/custom";

View File

@@ -54,7 +54,7 @@ function initSearch() {
jsPath = source.replace('just-the-docs.js', '');
jsonPath = jsPath + '/search-data.json';
jsonPath = jsPath + 'search-data.json';
var request = new XMLHttpRequest();
request.open('GET', jsonPath, true);
@@ -108,7 +108,7 @@ function initSearch() {
} else {
var results = index.search(query);
if (results.length > 1) {
if (results.length > 0) {
searchResults.classList.add('active');
var resultsList = document.createElement('ul');
searchResults.appendChild(resultsList);
@@ -150,11 +150,17 @@ function initSearch() {
}
}
function pageFocus() {
var mainContent = document.querySelector('.js-main-content');
mainContent.focus();
}
// Document ready
function ready(){
toggleNav();
pageFocus();
if (typeof lunr !== 'undefined') {
initSearch();
}

View File

@@ -1,12 +1,12 @@
---
---
{
{% for page in site.html_pages %}"{{ forloop.index0 }}": {
{% for page in site.html_pages %}{% if page.search_exclude != true %}"{{ forloop.index0 }}": {
"id": "{{ forloop.index0 }}",
"title": "{{ page.title | xml_escape }}",
"content": "{{ page.content | markdownify | strip_html | xml_escape | remove: 'Table of contents' | strip_newlines | replace: '\', ' ' }}",
"url": "{{ page.url | absolute_url | xml_escape }}",
"relUrl": "{{ page.url | xml_escape }}"
}{% if forloop.last %}{% else %},
"title": "{{ page.title | replace: '&amp;', '&' }}",
"content": "{{ page.content | markdownify | strip_html | escape_once | remove: 'Table of contents' | remove: '```' | remove: '---' | replace: '\', ' ' | normalize_whitespace }}",
"url": "{{ page.url | absolute_url }}",
"relUrl": "{{ page.url }}"
}{% unless forloop.last %},{% endunless %}
{% endif %}{% endfor %}
}

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
gem_dir = File.expand_path("..",File.dirname(__FILE__))
$LOAD_PATH.unshift gem_dir# Look in gem directory for resources first.
$LOAD_PATH.unshift gem_dir # Look in gem directory for resources first.
exec_type = ARGV[0]
if exec_type == 'rake' then

View File

@@ -5,19 +5,33 @@ nav_order: 2
---
# Configuration
{: .no_toc }
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 defined in your Jekyll site's _config.yml file.
{: .fs-6 .fw-300 }
## Table of contents
{: .no_toc .text-delta }
1. TOC
{:toc}
---
View this site's [_config.yml](https://github.com/pmarsceill/just-the-docs/tree/master/_config.yml) file as an example.
## Search enabled
```yml
```yaml
# Enable or disable the site search
search_enabled: true
```
## Aux links
```yml
```yaml
# Aux links for the upper right navigation
aux_links:
"Just the Docs on GitHub":
@@ -26,7 +40,7 @@ aux_links:
## Color scheme
```yml
```yaml
# Color scheme currently only supports "dark" or nil (default)
color_scheme: "dark"
```
@@ -39,12 +53,20 @@ const originalCssRef = cssFile.getAttribute('href')
const darkModeCssRef = originalCssRef.replace('just-the-docs.css', 'dark-mode-preview.css')
addEvent(toggleDarkMode, 'click', function(){
if (cssFile.getAttribute('href') === originalCssRef) {
cssFile.setAttribute('href', darkModeCssRef)
} else {
cssFile.setAttribute('href', originalCssRef)
}
if (cssFile.getAttribute('href') === originalCssRef) {
cssFile.setAttribute('href', darkModeCssRef)
} else {
cssFile.setAttribute('href', originalCssRef)
}
})
</script>
See [Customization]({{site.baseurl }}{% link docs/customization.md %}) for more information.
See [Customization]({{ site.baseurl }}{% link docs/customization.md %}) for more information.
## Google Analytics
```yaml
# Google Analytics Tracking (optional)
# e.g, UA-1234567-89
ga_tracking: UA-5555555-55
```

View File

@@ -5,7 +5,7 @@ nav_order: 6
---
# Customization
{:.no_toc}
{: .no_toc }
## Table of contents
{: .no_toc .text-delta }
@@ -16,19 +16,19 @@ nav_order: 6
---
## Color schemes
{: .d-inline-block :}
{: .d-inline-block }
New
{: .label .label-green :}
{: .label .label-green }
Just the Docs supports two color schemes: light (default), and dark.
To enable a color scheme, set the `color_scheme` parameter in your site's `_config.yml` file:
#### Example
{: no_toc }
{: .no_toc }
```yml
```yaml
# Color scheme currently only supports "dark" or nil (default)
color_scheme: "dark"
```
@@ -49,15 +49,14 @@ addEvent(toggleDarkMode, 'click', function(){
})
</script>
## Specific visual customization
To customize your sites 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 out its line and change its value.
To customize your sites 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.
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 out, and change it's value to our `$blue-000` variable, or another shade of your choosing.
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.
#### Example
{: no_toc }
{: .no_toc }
```scss
// ...
@@ -69,7 +68,6 @@ $link-color: $blue-000;
// ...
```
_Note:_ Editing the variables directly in `_sass/support/variables.scss` is not recommended and can cause other dependancies to fail.
_Note:_ Editing the variables directly in `_sass/support/variables.scss` is not recommended and can cause other dependencies to fail.
---

View File

@@ -94,6 +94,24 @@ end
- level 2 item
- level 1 item
### Nesting an ol in ul in an ol
- level 1 item (ul)
1. level 2 item (ol)
1. level 2 item (ol)
- level 3 item (ul)
- level 3 item (ul)
- level 1 item (ul)
1. level 2 item (ol)
1. level 2 item (ol)
- level 3 item (ul)
- level 3 item (ul)
1. level 4 item (ol)
1. level 4 item (ol)
- level 3 item (ul)
- level 3 item (ul)
- level 1 item (ul)
### And a task list
- [ ] Hello, this is a TODO item

View File

@@ -25,10 +25,11 @@ By default, all pages will appear as top level pages in the main nav unless a pa
## Ordering pages
To specify a page order, use the `nav_order` variable in your pages' YAML front matter.
To specify a page order, use the `nav_order` parameter in your pages' YAML front matter.
#### Example
{: .no_toc }
```yaml
---
layout: default
@@ -41,10 +42,11 @@ nav_order: 4
## Excluding pages
For specific pages that you do not wish to include in the main navigation, e.g. a 404 page or a landing page. Use the `nav_exclude: true` parameter in the YAML front matter for that page.
For specific pages that you do not wish to include in the main navigation, e.g. a 404 page or a landing page, use the `nav_exclude: true` parameter in the YAML front matter for that page.
#### Example
{: .no_toc }
```yaml
---
layout: default
@@ -57,7 +59,7 @@ nav_exclude: true
## Pages with children
Sometimes you will want to create a page with many children (a section). 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:
Sometimes you will want to create a page with many children (a section). 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 us an organization like:
```
+-- ..
@@ -86,9 +88,9 @@ Sometimes you will want to create a page with many children (a section). First,
+-- ..
```
On the parent pages, add 2 YAML front matter variables:
- `has_children: true` (tells us that this a parent page)
- `permalink:` set this to the site directories that the contains the pages
On the parent pages, add 2 YAML front matter parameters:
- `has_children: true` (tells us that this is a parent page)
- `permalink:` set this to the site directory that contains the child pages
#### Example
{: .no_toc }
@@ -103,7 +105,7 @@ permalink: /docs/ui-components
---
```
Here we're setting up the UI Components landing page that is available at `/docs/ui-components`, it has children and is ordered second in the main nav.
Here we're setting up the UI Components landing page that is available at `/docs/ui-components`, which has children and is ordered second in the main nav.
### Child pages
{: .text-gamma }
@@ -112,6 +114,7 @@ On child pages, simply set the `parent:` YAML front matter to whatever the paren
#### Example
{: .no_toc }
```yaml
---
layout: default
@@ -121,12 +124,30 @@ nav_order: 2
---
```
The Buttons page appears a child of UI Components and appears second in the UI Components section.
The Buttons page appears as a child of UI Components and appears second in the UI Components section.
### Auto-generating Table of Contents
By default, all pages with children will automatically append a Table of Contents which lists the child pages after the parent page's content. To disable this auto Table of Contents, set `has_toc: false` in the parent page's YAML front matter.
#### Example
{: .no_toc }
```yaml
---
layout: default
title: UI Components
nav_order: 2
has_children: true
has_toc: false
permalink: /docs/ui-components
---
```
### Children with children
{: .text-gamma }
Child pages can also have children (grand children). This is achieved by using a similar pattern on the child and grand child pages.
Child pages can also have children (grandchildren). This is achieved by using a similar pattern on the child and grandchild pages.
1. Add the `has_children` attribute to the child
1. Add the `parent` and `grand_parent` attribute to the grandchild
@@ -154,7 +175,7 @@ nav_order: 1
---
```
Would create the following navigation structure:
This would create the following navigation structure:
```
+-- ..
@@ -179,10 +200,10 @@ To add a auxiliary navigation item to your site (in the upper right on all pages
#### Example
{: .no_toc }
```yml
```yaml
# Aux links for the upper right navigation
aux_links:
"Just the Docs on GitHub":
"Just the Docs on GitHub":
- "//github.com/pmarsceill/just-the-docs"
```
@@ -190,7 +211,7 @@ aux_links:
## In-page navigation with Table of Contents
To generate a Table of Contents on your docs pages, you can use the `{:toc}` method from Kramdown, immediately after an `<ol>` in markdown. This will automatically generate an ordered list of anchor links to various sections of page based on headings and heading levels. There may be occasions where you're using a heading and you don't want it to show up in the TOC, to skip a particular heading use the `{: .no_toc }` CSS class.
To generate a Table of Contents on your docs pages, you can use the `{:toc}` method from Kramdown, immediately after an `<ol>` in Markdown. This will automatically generate an ordered list of anchor links to various sections of the page based on headings and heading levels. There may be occasions where you're using a heading and you don't want it to show up in the TOC, so to skip a particular heading use the `{: .no_toc }` CSS class.
#### Example
{: .no_toc }

View File

@@ -5,8 +5,17 @@ nav_order: 7
---
# Search
{: .no_toc }
Just the docs uses [lunr.js](http://lunrjs.com) to add a client-side search interface powered by a JSON index that Jekyll generates. All search results are shown in an auto-complete style interface (there is no search results page). By default, all generated html pages are indexed using the following data points:
## Table of contents
{: .no_toc .text-delta }
1. TOC
{:toc}
---
Just the Docs uses [lunr.js](http://lunrjs.com) to add a client-side search interface powered by a JSON index that Jekyll generates. All search results are shown in an auto-complete style interface (there is no search results page). By default, all generated HTML pages are indexed using the following data points:
- Page title
- Page content
@@ -14,41 +23,54 @@ Just the docs uses [lunr.js](http://lunrjs.com) to add a client-side search inte
## Set up search
### 1. Generate search index
### 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`
Before you can use search, you must initialize the feature by running this `rake` command that comes with `just-the-docs`:
```bash
$ bundle exec just-the-docs rake search:init
```
This command creates the `search-data.json` file that Jekyll uses to create
your search index. Alternatively, you can create the file manually in the
`assets/js/` of your Jekyll site with this content:
This command creates the `search-data.json` file that Jekyll uses to create your search index. Alternatively, you can create the file manually in the `assets/js/` directory of your Jekyll site with this content:
```{% raw %}
---
```liquid
{% raw %}---
---
{
{% for page in site.html_pages %}"{{ forloop.index0 }}": {
{% for page in site.html_pages %}{% if page.search_exclude != true %}"{{ forloop.index0 }}": {
"id": "{{ forloop.index0 }}",
"title": "{{ page.title | xml_escape }}",
"content": "{{ page.content | markdownify | strip_html | xml_escape | remove: 'Table of contents' | remove: page.title | strip_newlines | replace: '\', ' '}}",
"url": "{{ page.url | absolute_url | xml_escape }}",
"relUrl": "{{ page.url | xml_escape }}"
}{% if forloop.last %}{% else %},
"title": "{{ page.title | replace: '&amp;', '&' }}",
"content": "{{ page.content | markdownify | strip_html | escape_once | remove: 'Table of contents' | remove: '```' | remove: '---' | replace: '\', ' ' | normalize_whitespace }}",
"url": "{{ page.url | absolute_url }}",
"relUrl": "{{ page.url }}"
}{% unless forloop.last %},{% endunless %}
{% endif %}{% endfor %}
}{% endraw %}
```
_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
### Enable search in configuration
In your site's `_config.yml` enable search:
In your site's `_config.yml`, enable search:
```yml
```yaml
# Enable or disable the site search
search_enabled: true
```
## Hiding pages from search
Sometimes you might have a page that you don't want to be indexed for the search nor to show up in search results, e.g, a 404 page. To exclude a page from search, add the `search_exclude: true` parameter to the page's YAML front matter:
#### Example
{: .no_toc }
```yaml
---
layout: default
title: Page not found
nav_exclude: true
search_exclude: true
---
```

View File

@@ -6,7 +6,7 @@ nav_order: 2
---
# Buttons
{:.no_toc}
{: .no_toc }
## Table of contents
{: .no_toc .text-delta }
@@ -28,7 +28,6 @@ nav_order: 2
[Link button](http://example.com/){: .btn .btn-green }
[Link button](http://example.com/){: .btn .btn-outline }
</div>
```markdown
[Link button](http://example.com/){: .btn }
@@ -42,13 +41,10 @@ nav_order: 2
### Button element
GitHub flavored markdown does not support the `button` element, so you'll have to use inline HTML for this:
GitHub Flavored Markdown does not support the `button` element, so you'll have to use inline HTML for this:
<div class="code-example">
<button type="button" name="button" class="btn">Button element</button>
</div>
```html
<button type="button" name="button" class="btn">Button element</button>
@@ -60,11 +56,9 @@ GitHub flavored markdown does not support the `button` element, so you'll have t
### Button size
Wrap the button in container that uses the [font-size utility classes]({{
site.baseurl }}{% link docs/utilities/typography.md %}) to scale buttons:
Wrap the button in a container that uses the [font-size utility classes]({{ site.baseurl }}{% link docs/utilities/typography.md %}) to scale buttons:
<div class="code-example" markdown="1">
<span class="fs-6">
[Big ass button](http://example.com/){: .btn }
</span>
@@ -72,7 +66,6 @@ site.baseurl }}{% link docs/utilities/typography.md %}) to scale buttons:
<span class="fs-3">
[Tiny ass button](http://example.com/){: .btn }
</span>
</div>
```markdown
<span class="fs-8">
@@ -86,20 +79,19 @@ site.baseurl }}{% link docs/utilities/typography.md %}) to scale buttons:
### Spacing between buttons
Use the [margin utility classes]({{ site.baseurl }}{% link docs/utilities/utilities.md %}#spacing) to add spacing between two buttons in the same block.
Use the [margin utility classes]({{ site.baseurl }}{% link docs/utilities/layout.md %}#spacing) to add spacing between two buttons in the same block.
<div class="code-example" markdown="1">
[Button with space](http://example.com/){: .btn .btn-purple .mr-2 }
[Button ](http://example.com/){: .btn .btn-blue .mr-2 }
[Button with space](http://example.com/){: .btn .btn-purple .mr-2}
[Button ](http://example.com/){: .btn .btn-blue .mr-2}
[Button with more space](http://example.com/){: .btn .btn-green .mr-4}
[Button with more space](http://example.com/){: .btn .btn-green .mr-4 }
[Button ](http://example.com/){: .btn .btn-blue }
</div>
```markdown
[Button with space](http://example.com/){: .btn .btn-purple .mr-2}
[Button with space](http://example.com/){: .btn .btn-purple .mr-2 }
[Button ](http://example.com/){: .btn .btn-blue }
[Button with more space](http://example.com/){: .btn .btn-green .mr-4}
[Button with more space](http://example.com/){: .btn .btn-green .mr-4 }
[Button ](http://example.com/){: .btn .btn-blue }
```

View File

@@ -6,7 +6,7 @@ nav_order: 6
---
# Code
{:.no_toc}
{: .no_toc }
## Table of contents
{: .no_toc .text-delta }
@@ -18,12 +18,10 @@ nav_order: 6
## Inline code
Code can be rendered inline using single ticks by wrapping your code in single back ticks.
Code can be rendered inline by wrapping it in single back ticks.
<div class="code-example" markdown="1">
Lorem ipsum dolor sit amet, `<inline code snippet>` adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</div>
```markdown
Lorem ipsum dolor sit amet, `<inline code snippet>` adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
@@ -33,7 +31,7 @@ Lorem ipsum dolor sit amet, `<inline code snippet>` adipisicing elit, sed do eiu
## Syntax highlighted code blocks
Use Jekyll's built in syntax highlighting with Rouge for code blocks by using three backticks, followed by the language name:
Use Jekyll's built-in syntax highlighting with Rouge for code blocks by using three backticks, followed by the language name:
<div class="code-example" markdown="1">
```js
@@ -58,7 +56,7 @@ var fun = function lang(l) {
## Code blocks with rendered examples
To demonstrate front end code, sometimes it useful to show a rendered example of that code. After including the styles from your project that you'll need to show the rendering, you can use a div with the `code-example` class, followed by the code block syntax. If you want to render your output with Markdown instead of HTML, use the `markdown="1"` attribute to tell Jekyll that the code you are rendering will be in Markdown format... This is about to get meta...
To demonstrate front end code, sometimes it's useful to show a rendered example of that code. After including the styles from your project that you'll need to show the rendering, you can use a `<div>` with the `code-example` class, followed by the code block syntax. If you want to render your output with Markdown instead of HTML, use the `markdown="1"` attribute to tell Jekyll that the code you are rendering will be in Markdown format... This is about to get meta...
<div class="code-example" markdown="1">

View File

@@ -10,42 +10,40 @@ nav_order: 3
Use labels as a way to add an additional mark to a section of your docs. Labels come in a few colors. By default, labels will be blue.
<div class="code-example" markdown="1">
Default label
{: .label }
Blue label
{: .label .label-blue}
{: .label .label-blue }
Stable
{: .label .label-green}
{: .label .label-green }
New release
{: .label .label-purple}
{: .label .label-purple }
Coming soon
{: .label .label-yellow}
{: .label .label-yellow }
Deprecated
{: .label .label-red}
{: .label .label-red }
</div>
```markdown
Default label
{: .label }
Blue label
{: .label .label-blue}
{: .label .label-blue }
Stable
{: .label .label-green}
{: .label .label-green }
New release
{: .label .label-purple}
{: .label .label-purple }
Coming soon
{: .label .label-yellow}
{: .label .label-yellow }
Deprecated
{: .label .label-red}
{: .label .label-red }
```

View File

@@ -6,7 +6,7 @@ nav_order: 5
---
# Lists
{:.no_toc}
{: .no_toc }
## Table of contents
{: .no_toc .text-delta }
@@ -16,9 +16,10 @@ nav_order: 5
---
Most lists can be rendered with pure markdown...
Most lists can be rendered with pure Markdown.
## Unordered list
<div class="code-example" markdown="1">
- Item 1
- Item 2
@@ -42,18 +43,19 @@ _or_
* Item 3
```
## Ordered list
<div class="code-example" markdown="1">
1. Item 1
1. Item 2
1. Item 3
</div>
```markdown
```markdown
1. Item 1
1. Item 2
1. Item 3
```
```
## Task list
<div class="code-example" markdown="1">
@@ -61,15 +63,15 @@ _or_
- [ ] hello, this is another todo item
- [x] goodbye, this item is done
</div>
```markdown
```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.
Definition lists require HTML syntax and aren't supported with the GitHub Flavored Markdown compiler.
<div class="code-example" markdown="1">
<dl>
@@ -95,4 +97,3 @@ Definition lists require HTML syntax and aren't supported with the GitHub flavor
<dd>Green</dd>
</dl>
```

View File

@@ -6,7 +6,7 @@ nav_order: 1
---
# Typography
{:.no_toc}
{: .no_toc }
## Table of contents
{: .no_toc .text-delta }
@@ -24,17 +24,17 @@ By default, Just the Docs uses a native system font stack for sans-serif fonts:
-apple-system, BlinkMacSystemFont, "helvetica neue", helvetica, roboto, noto, "segoe ui", arial, sans-serif
```
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
{: .fs-5 .ls-10 .code-example }
For monospace type, like code snippets or the pre `<pre>` element, Just the Docs uses a native system font stack for monospace fonts:
For monospace type, like code snippets or the `<pre>` element, Just the Docs uses a native system font stack for monospace fonts:
```scss
"SFMono-Regular", Menlo, Consolas, Monospace
```
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
{: .fs-5 .ls-10 .text-mono .code-example }
@@ -42,7 +42,7 @@ abcdefghijklmnopqrstuvwxyz
## Responsive type scale
Just the docs uses a responsive type scale that shifts depending on the viewport size. Common elements text elements rendered from markdown use a
Just the Docs uses a responsive type scale that shifts depending on the viewport size.
| Selector | Small screen size `font-size` | Large screen size `font-size` |
|:----------------------|:---------------------------------|:------------------------------|
@@ -51,7 +51,7 @@ Just the docs uses a responsive type scale that shifts depending on the viewport
| `h3`, `.text-gamma` | 16px | 18px |
| `h4`, `.text-delta` | 14px | 16px |
| `h5`, `.text-epsilon` | 16px | 18px |
| `h6`, `.text-zeta ` | 18px | 24px |
| `h6`, `.text-zeta` | 18px | 24px |
| `body` | 14px | 16px |
---
@@ -109,6 +109,6 @@ Text can be **bold**, _italic_, or ~~strikethrough~~.
## Typographic Utilities
There are a number of specific typographic CSS classes that allow you to do override default styling for font size, font-weight, line height, and capitalization.
There are a number of specific typographic CSS classes that allow you to override default styling for font size, font weight, line height, and capitalization.
[View typography utilities]({{ site.baseurl }}{% link docs/utilities/utilities.md %}#typography){: .btn .btn-outline }

View File

@@ -1,12 +1,12 @@
---
layout: default
title: Color
nav_order: 3
parent: Utilities
nav_order: 3
---
# Color Utilities
{:.no_toc}
{: .no_toc }
## Table of contents
{: .no_toc .text-delta }
@@ -16,7 +16,7 @@ parent: Utilities
---
All the colors used in Just the Docs have been systemsized into a series of variables that have been extended to both font color and background color utility classes.
All the colors used in Just the Docs have been systematized into a series of variables that have been extended to both font color and background color utility classes.
## Light Greys

View File

@@ -1,13 +1,12 @@
---
layout: default
title: Layout
nav_order: 2
parent: Utilities
has_children: true
nav_order: 2
---
# Layout Utilities
{:.no_toc}
{: .no_toc }
## Table of contents
{: .no_toc .text-delta }
@@ -57,15 +56,14 @@ Spacing values are based on a `1rem = 16px` spacing scale, broken down into thes
#### Examples
{: .no_toc }
```markdown
In Markdown, use the `{: }` wrapper to apply custom classes:
```markdown
This paragraph will have a margin bottom of 1rem/16px at large screens.
{: .mb-lg-4 }
This paragraph will have 2rem/32px of padding on the right and left at all screen sizes.
{: .px-6 }
```
## Vertical Alignment
@@ -96,9 +94,9 @@ Use these classes in conjunction with the responsive modifiers.
#### Examples
{: .no_toc }
```markdown
In Markdown, use the `{: }` wrapper to apply custom classes:
```markdown
This button will be hidden until medium screen sizes:
[ A button ](#url)
@@ -107,9 +105,8 @@ This button will be hidden until medium screen sizes:
These headings will be `inline-block`:
### heading 3
{ .d-inline-block }
{: .d-inline-block }
### heading 3
{ .d-inline-block }
{: .d-inline-block }
```

View File

@@ -1,8 +1,8 @@
---
layout: default
title: Responsive Modifiers
nav_order: 1
parent: Utilities
nav_order: 1
---
# Responsive modifiers

View File

@@ -1,12 +1,12 @@
---
layout: default
title: Typography
nav_order: 3
parent: Utilities
nav_order: 4
---
# Typography Utilities
{:.no_toc}
{: .no_toc }
## Table of contents
{: .no_toc .text-delta }
@@ -117,33 +117,31 @@ Use the `lh-` classes to explicitly apply line height to text.
| `.lh-tight` | 1.1 | Default for headings |
| `.lh-default` | 1.4 | Default for body (paragraphs) |
<div class="code-example" markdown="1">
No Line height
No Line height
No Line height
{: .lh-0 }
Tight line height
Tight line height
Tight line height
{: .lh-tight }
Default line height
Default line height
Default line height
{: .fh-default }
</div>
```markdown
In Markdown, use the `{: }` wrapper to apply custom classes:
No Line height
No Line height
No Line height
{: .lh-0 }
Tight line height
Tight line height
Tight line height
{: .lh-tight }
Default line height
Default line height
Default line height
{: .fh-default }
```

View File

@@ -7,7 +7,7 @@ permalink: docs/utilities
---
# Utilities
{:.no_toc}
{: .no_toc }
CSS utility classes come in handy when you to want to override default styles to give create additional whitespace (margins/padding), unexpected shifts in font-size or weight, add color, or to hide (or show) something a specific screen size.
CSS utility classes come in handy when you to want to override default styles to create additional whitespace (margins/padding), correct unexpected shifts in font size or weight, add color, or hide (or show) something at a specific screen size.
{: .fs-6 .fw-300 }

View File

@@ -2,32 +2,36 @@
layout: default
title: Home
nav_order: 1
description: "Just the Docs is a responsive Jekyll theme with built-in search that is easily customizable and hosted on GitHub Pages."
permalink: /
---
# Focus on writing good documentation
{: .fs-9 }
Just the Docs gives your documentation a jumpstart with a responsive Jekyll theme that is easily customizable and hosted on GitHub pages.
Just the Docs gives your documentation a jumpstart with a responsive Jekyll theme that is easily customizable and hosted on GitHub Pages.
{: .fs-6 .fw-300 }
[Get started now](#getting-started){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 } [View it on GitHub](https://github.com/pmarsceill/just-the-docs){: .btn .fs-5 }
[Get started now](#getting-started){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 } [View it on GitHub](https://github.com/pmarsceill/just-the-docs){: .btn .fs-5 .mb-4 .mb-md-0 }
---
## Getting started
### 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.
Just the Docs is built for [Jekyll](https://jekyllrb.com), a static site generator. View the [quick start guide](https://jekyllrb.com/docs/) 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](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>
<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
@@ -54,15 +58,17 @@ $ 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 %})
If you're hosting your site on GitHub Pages, [set up GitHub Pages and Jekyll locally](https://help.github.com/en/articles/setting-up-your-github-pages-site-locally-with-jekyll) so that you can more easily work in your development environment.
### Configure Just the Docs
- [See configuration options]({{ site.baseurl }}{% link docs/configuration.md %})
---
## About the project
Just the Docs is &copy; 2017 by [Patrick Marsceill](http://patrickmarsceill.com).
Just the Docs is &copy; 2017-2019 by [Patrick Marsceill](http://patrickmarsceill.com).
### License
@@ -73,7 +79,6 @@ Just the Docs is distributed by an [MIT license](https://github.com/pmarsceill/j
When contributing to this repository, please first discuss the change you wish to make via issue,
email, or any other method with the owners of this repository before making a change. Read more about becoming a contributor in [our GitHub repo](https://github.com/pmarsceill/just-the-docs#contributing).
### Code of Conduct
Just the Docs is committed to fostering a welcoming community.

View File

@@ -2,11 +2,11 @@
Gem::Specification.new do |spec|
spec.name = "just-the-docs"
spec.version = "0.2.1"
spec.version = "0.2.4"
spec.authors = ["Patrick Marsceill"]
spec.email = ["patrick.marsceill@gmail.com"]
spec.summary = %q{A nice looking, high customizable, responsive Jekyll theme for documention with built-in search.}
spec.summary = %q{A modern, high customizable, responsive Jekyll theme for documention with built-in search.}
spec.homepage = "https://github.com/pmarsceill/just-the-docs"
spec.license = "MIT"
@@ -14,7 +14,8 @@ Gem::Specification.new do |spec|
spec.executables << 'just-the-docs'
spec.add_runtime_dependency "jekyll", "~> 3.8.5"
spec.add_runtime_dependency "jekyll-seo-tag", "~> 2.0"
spec.add_runtime_dependency "rake", "~> 12.3.1"
spec.add_development_dependency "bundler", "~> 1.17.1"
spec.add_development_dependency "bundler", "~> 2.0.1"
end

View File

@@ -4,7 +4,7 @@ namespace :search do
puts 'Creating search data json file...'
mkdir_p 'assets/js'
touch 'assets/js/search-data.json'
content = %Q[{{ page.content | markdownify | strip_html | xml_escape | remove: 'Table of contents' | strip_newlines | replace: '\\', ' ' }}]
content = %Q[{{ page.content | markdownify | strip_html | escape_once | remove: 'Table of contents' | remove: '```' | remove: '---' | replace: '\\', ' ' | normalize_whitespace }}]
puts 'Done.'
puts 'Generating content...'
@@ -12,13 +12,13 @@ namespace :search do
f.puts '---
---
{
{% for page in site.html_pages %}"{{ forloop.index0 }}": {
{% for page in site.html_pages %}{% if page.search_exclude != true %}"{{ forloop.index0 }}": {
"id": "{{ forloop.index0 }}",
"title": "{{ page.title | xml_escape }}",
"title": "{{ page.title | replace: \'&amp;\', \'&\' }}",
"content": "'+content+'",
"url": "{{ page.url | absolute_url | xml_escape }}",
"relUrl": "{{ page.url | xml_escape }}"
}{% if forloop.last %}{% else %},
"url": "{{ page.url | absolute_url }}",
"relUrl": "{{ page.url }}"
}{% unless forloop.last %},{% endunless %}
{% endif %}{% endfor %}
}'
end

3060
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +1,18 @@
{
"name": "just-the-docs",
"version": "0.2.1",
"description": "A Jekyll theme for documentation",
"version": "0.2.4",
"description": "A modern Jekyll theme for documentation",
"repository": "pmarsceill/just-the-docs",
"license": "MIT",
"bugs": "https://github.com/pmarsceill/just-the-docs/issues",
"devDependencies": {
"stylelint": "^9.9.0",
"stylelint-config-primer": "^3.0.0"
"stylelint": "^10.0.1",
"stylelint-config-primer": "^6.0.0",
"stylelint-selector-no-utility": "^4.0.0"
},
"dependencies": {
"@primer/css": "^12.2.3"
},
"dependencies": {},
"scripts": {
"test": "stylelint '**/*.scss'"
}