just-the-docs 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -4
- data/_includes/head.html +3 -0
- data/_includes/nav.html +1 -1
- data/_layouts/default.html +7 -4
- data/_layouts/page.html +5 -0
- data/_sass/code.scss +2 -1
- data/_sass/content.scss +2 -0
- data/_sass/layout.scss +4 -0
- data/assets/css/dark-mode-preview.scss +1 -1
- data/assets/css/just-the-docs.scss +1 -1
- data/assets/js/just-the-docs.js +7 -0
- data/assets/js/search-data.json +6 -6
- data/bin/just-the-docs +1 -1
- data/lib/tasks/search.rake +6 -6
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f254277683542a0d58881179882a0d4a05731bd9
|
4
|
+
data.tar.gz: da30e14a1a7e897e484370553ec552a6ec262483
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 723da18da5b80e42c66a4af42019cc98fab7f409d95900795e9dd7c55edbbe6f2a4aebbeb96490b4b702250662bfda137f0c11b9aa26f1ed40774f8174bf84ad
|
7
|
+
data.tar.gz: 4af5eb24129d0aeb5cd039a4301d920f3abb49908fca5832b96e53b5434759155c28efff25299ba50cbe388c36c7b53a2d1ee4271f86e5d393214eea74f33372
|
data/README.md
CHANGED
@@ -4,12 +4,11 @@
|
|
4
4
|
<br><br>
|
5
5
|
<p align="center">
|
6
6
|
<h1 align="center">Just the Docs</h1>
|
7
|
-
<p align="center">A modern, high customizable, responsive Jekyll theme for documentation with built-in search.<br>Easily hosted on GitHub
|
8
|
-
<p align="center"><strong><a href="https://pmarsceill.github.io/just-the-docs">See it in action!</a></strong></p>
|
7
|
+
<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>
|
8
|
+
<p align="center"><strong><a href="https://pmarsceill.github.io/just-the-docs/">See it in action!</a></strong></p>
|
9
9
|
<br><br><br>
|
10
10
|
</p>
|
11
11
|
|
12
|
-
|
13
12
|
![jtd](https://user-images.githubusercontent.com/896475/47384541-89053c80-d6d5-11e8-98dc-dba16e192de9.gif)
|
14
13
|
|
15
14
|
## Installation
|
@@ -60,7 +59,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/pmarsc
|
|
60
59
|
|
61
60
|
To set up your environment to develop this theme, run `bundle install`.
|
62
61
|
|
63
|
-
Your theme is
|
62
|
+
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.
|
64
63
|
|
65
64
|
When the theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be released.
|
66
65
|
|
data/_includes/head.html
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
<head>
|
2
2
|
<meta charset="UTF-8">
|
3
3
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
4
|
+
{% if page.description %}
|
5
|
+
<meta name="Description" content="{{ page.description }}">
|
6
|
+
{% endif %}
|
4
7
|
|
5
8
|
<title>{{ page.title }} - {{ site.title }}</title>
|
6
9
|
<link rel="stylesheet" href="{{ "/assets/css/just-the-docs.css" | absolute_url }}">
|
data/_includes/nav.html
CHANGED
data/_layouts/default.html
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
<html lang="en-us">
|
4
4
|
{% include head.html %}
|
5
|
+
<body>
|
5
6
|
|
6
7
|
<div class="page-wrap">
|
7
8
|
<div class="side-bar">
|
@@ -20,7 +21,7 @@
|
|
20
21
|
{% if site.search_enabled != nil %}
|
21
22
|
<div class="search js-search">
|
22
23
|
<div class="search-input-wrap">
|
23
|
-
<input type="text" class="js-search-input search-input" placeholder="Search {{ site.title }}" aria-label="Search {{ site.title }}" autocomplete="off">
|
24
|
+
<input type="text" class="js-search-input search-input" tabindex="0" placeholder="Search {{ site.title }}" aria-label="Search {{ site.title }}" autocomplete="off">
|
24
25
|
<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>
|
25
26
|
</div>
|
26
27
|
<div class="js-search-results search-results-wrap"></div>
|
@@ -35,7 +36,7 @@
|
|
35
36
|
{% endif %}
|
36
37
|
</div>
|
37
38
|
</div>
|
38
|
-
<div class="main-content">
|
39
|
+
<div class="main-content js-main-content" tabindex="0">
|
39
40
|
{% unless page.url == "/" %}
|
40
41
|
{% if page.parent %}
|
41
42
|
<nav class="breadcrumb-nav">
|
@@ -51,10 +52,10 @@
|
|
51
52
|
</nav>
|
52
53
|
{% endif %}
|
53
54
|
{% endunless %}
|
54
|
-
<div class="page-content">
|
55
|
+
<div id="main-content" class="page-content" role="main">
|
55
56
|
{{ content }}
|
56
57
|
|
57
|
-
{% if page.has_children == true %}
|
58
|
+
{% if page.has_children == true and page.has_toc != false %}
|
58
59
|
<hr>
|
59
60
|
<h2 class="text-delta">Table of contents</h2>
|
60
61
|
{% assign children_list = site.pages | sort:"nav_order" %}
|
@@ -72,4 +73,6 @@
|
|
72
73
|
</div>
|
73
74
|
</div>
|
74
75
|
</div>
|
76
|
+
|
77
|
+
</body>
|
75
78
|
</html>
|
data/_layouts/page.html
ADDED
data/_sass/code.scss
CHANGED
@@ -14,6 +14,7 @@ code {
|
|
14
14
|
pre.highlight {
|
15
15
|
padding: $sp-3;
|
16
16
|
margin-bottom: 0;
|
17
|
+
-webkit-overflow-scrolling: touch;
|
17
18
|
background-color: $code-background-color;
|
18
19
|
|
19
20
|
code {
|
@@ -104,7 +105,7 @@ pre.highlight {
|
|
104
105
|
.code-example {
|
105
106
|
padding: $sp-3;
|
106
107
|
margin-bottom: $sp-3;
|
107
|
-
overflow:
|
108
|
+
overflow: auto;
|
108
109
|
border: 1px solid $border-color;
|
109
110
|
border-radius: $border-radius;
|
110
111
|
|
data/_sass/content.scss
CHANGED
data/_sass/layout.scss
CHANGED
data/assets/js/just-the-docs.js
CHANGED
@@ -150,11 +150,18 @@ function initSearch() {
|
|
150
150
|
}
|
151
151
|
}
|
152
152
|
|
153
|
+
function pageFocus() {
|
154
|
+
var mainContent = document.querySelector('.js-main-content');
|
155
|
+
mainContent.focus();
|
156
|
+
console.log(mainContent)
|
157
|
+
}
|
158
|
+
|
153
159
|
|
154
160
|
// Document ready
|
155
161
|
|
156
162
|
function ready(){
|
157
163
|
toggleNav();
|
164
|
+
pageFocus();
|
158
165
|
if (typeof lunr !== 'undefined') {
|
159
166
|
initSearch();
|
160
167
|
}
|
data/assets/js/search-data.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
---
|
2
2
|
---
|
3
3
|
{
|
4
|
-
{% for page in site.html_pages %}"{{ forloop.index0 }}": {
|
4
|
+
{% for page in site.html_pages %}{% if page.search_exclude != true %}"{{ forloop.index0 }}": {
|
5
5
|
"id": "{{ forloop.index0 }}",
|
6
|
-
"title": "{{ page.title |
|
7
|
-
"content": "{{ page.content | markdownify | strip_html |
|
8
|
-
"url": "{{ page.url | absolute_url
|
9
|
-
"relUrl": "{{ page.url
|
10
|
-
}{%
|
6
|
+
"title": "{{ page.title | replace: '&', '&' }}",
|
7
|
+
"content": "{{ page.content | markdownify | strip_html | escape_once | remove: 'Table of contents' | remove: '```' | remove: '---' | replace: '\', ' ' | normalize_whitespace }}",
|
8
|
+
"url": "{{ page.url | absolute_url }}",
|
9
|
+
"relUrl": "{{ page.url }}"
|
10
|
+
}{% unless forloop.last %},{% endunless %}
|
11
11
|
{% endif %}{% endfor %}
|
12
12
|
}
|
data/bin/just-the-docs
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
gem_dir = File.expand_path("..",File.dirname(__FILE__))
|
4
|
-
$LOAD_PATH.unshift gem_dir# Look in gem directory for resources first.
|
4
|
+
$LOAD_PATH.unshift gem_dir # Look in gem directory for resources first.
|
5
5
|
exec_type = ARGV[0]
|
6
6
|
|
7
7
|
if exec_type == 'rake' then
|
data/lib/tasks/search.rake
CHANGED
@@ -4,7 +4,7 @@ namespace :search do
|
|
4
4
|
puts 'Creating search data json file...'
|
5
5
|
mkdir_p 'assets/js'
|
6
6
|
touch 'assets/js/search-data.json'
|
7
|
-
content = %Q[{{ page.content | markdownify | strip_html |
|
7
|
+
content = %Q[{{ page.content | markdownify | strip_html | escape_once | remove: 'Table of contents' | remove: '```' | remove: '---' | replace: '\\', ' ' | normalize_whitespace }}]
|
8
8
|
puts 'Done.'
|
9
9
|
puts 'Generating content...'
|
10
10
|
|
@@ -12,13 +12,13 @@ namespace :search do
|
|
12
12
|
f.puts '---
|
13
13
|
---
|
14
14
|
{
|
15
|
-
{% for page in site.html_pages %}"{{ forloop.index0 }}": {
|
15
|
+
{% for page in site.html_pages %}{% if page.search_exclude != true %}"{{ forloop.index0 }}": {
|
16
16
|
"id": "{{ forloop.index0 }}",
|
17
|
-
"title": "{{ page.title |
|
17
|
+
"title": "{{ page.title | replace: '&', '&' }}",
|
18
18
|
"content": "'+content+'",
|
19
|
-
"url": "{{ page.url | absolute_url
|
20
|
-
"relUrl": "{{ page.url
|
21
|
-
}{%
|
19
|
+
"url": "{{ page.url | absolute_url }}",
|
20
|
+
"relUrl": "{{ page.url }}"
|
21
|
+
}{% unless forloop.last %},{% endunless %}
|
22
22
|
{% endif %}{% endfor %}
|
23
23
|
}'
|
24
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: just-the-docs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Marsceill
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 2.0.1
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 2.0.1
|
55
55
|
description:
|
56
56
|
email:
|
57
57
|
- patrick.marsceill@gmail.com
|
@@ -68,6 +68,7 @@ files:
|
|
68
68
|
- _layouts/about.html
|
69
69
|
- _layouts/default.html
|
70
70
|
- _layouts/home.html
|
71
|
+
- _layouts/page.html
|
71
72
|
- _layouts/post.html
|
72
73
|
- _sass/base.scss
|
73
74
|
- _sass/buttons.scss
|
@@ -129,6 +130,6 @@ rubyforge_project:
|
|
129
130
|
rubygems_version: 2.5.1
|
130
131
|
signing_key:
|
131
132
|
specification_version: 4
|
132
|
-
summary: A nice looking,
|
133
|
+
summary: A nice looking, highly customizable, responsive Jekyll theme for documentation
|
133
134
|
with built-in search.
|
134
135
|
test_files: []
|