Compare commits

...

25 Commits

Author SHA1 Message Date
Patrick Marsceill
ced66a0056 Just the Docs build packaging cleanup 2018-10-23 17:08:27 -04:00
Patrick Marsceill
ce3fd856dd Just the Docs build packaging 2018-10-23 17:08:27 -04:00
Patrick Marsceill
4df5736ca4 Bump version number 2018-10-23 17:08:22 -04:00
Patrick Marsceill
aa9e2ab8e3 Merge pull request #6 from pmarsceill/paths-problems
Fix moar paths
2018-10-23 17:04:57 -04:00
Patrick Marsceill
b38f9863cd Update _buttons.scss 2018-10-23 17:03:43 -04:00
Patrick Marsceill
ca06df3776 Button bg was no good in Chrome 2018-10-23 17:01:21 -04:00
Patrick Marsceill
e9943f90c9 Don't need slash only axl 2018-10-23 16:54:14 -04:00
Patrick Marsceill
3d4e1de008 Breadcrumb needs baseurl 2018-10-23 16:53:01 -04:00
Patrick Marsceill
bdfdf1bb42 Don't need this slash 2018-10-23 16:48:48 -04:00
Patrick Marsceill
bf0d7eaa5f Fix moar paths 2018-10-23 16:45:08 -04:00
Patrick Marsceill
1b715049eb typo 2018-10-23 16:29:08 -04:00
Patrick Marsceill
049d1f50d7 Update README.md 2018-10-23 15:08:56 -04:00
Patrick Marsceill
3af81c7f36 Merge pull request #5 from pmarsceill/fix-title-px
Fix title px
2018-10-23 14:47:26 -04:00
Patrick Marsceill
97743c1c18 Fix link 2018-10-23 14:24:42 -04:00
Patrick Marsceill
7d4ce89e9b fix alignment 2018-10-23 14:13:45 -04:00
Patrick Marsceill
778e142411 Merge pull request #4 from pmarsceill/fix-title
fix title align
2018-10-23 13:54:49 -04:00
Patrick Marsceill
c45297c5cb fix title align 2018-10-23 13:54:01 -04:00
Patrick Marsceill
c1cacf277c Merge pull request #3 from pmarsceill/v0.1.2
Fix paths in docs
2018-10-23 13:21:57 -04:00
Patrick Marsceill
fc58bd0c04 Just the Docs build packaging cleanup 2018-10-23 13:20:37 -04:00
Patrick Marsceill
b5de18ec2d Just the Docs build packaging 2018-10-23 13:20:36 -04:00
Patrick Marsceill
7ba3b3e5fd bump version number 2018-10-23 13:20:30 -04:00
Patrick Marsceill
62c7ac4729 Add done after creating content 2018-10-23 13:09:23 -04:00
Patrick Marsceill
0611696c2d Fix pathing 2018-10-23 12:56:46 -04:00
Patrick Marsceill
25cd289df5 Fix pathing issues with gh-pages 2018-10-23 12:51:11 -04:00
Patrick Marsceill
d60338910b Merge pull request #2 from pmarsceill/v0.1.1
V0.1.1
2018-10-23 11:46:47 -04:00
11 changed files with 43 additions and 18 deletions

View File

@@ -2,7 +2,8 @@
A nice looking, high customizable, responsive Jekyll theme for documention with built-in search. Easily hosted on GitHub pages.
![screenshot 2018-10-22 11 36 56](https://user-images.githubusercontent.com/896475/47302203-e4a8ca80-d5ee-11e8-916a-9bd30e95a40d.png)
![jtd](https://user-images.githubusercontent.com/896475/47384541-89053c80-d6d5-11e8-98dc-dba16e192de9.gif)
## Installation

View File

@@ -15,7 +15,7 @@
# in the templates via {{ site.myvariable }}.
title: Just the Docs
description: A Jekyll theme for documentation
# baseurl: "" # the subpath of your site, e.g. /blog
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
sass:

View File

@@ -5,7 +5,7 @@
<div class="page-wrap">
<div class="side-bar">
<a href="{{ site.url }}" class="site-title fs-6 text-grey-dk-300 lh-tight">{{ site.title }}</a>
<a href="{{ site.baseurl }}" class="site-title fs-6 text-grey-dk-300 lh-tight">{{ site.title }}</a>
<span class="fs-3"><button class="js-main-nav-trigger navigation-list-toggle btn btn-outline" type="button" data-text-toggle="Hide">Menu</button></span>
<div class="navigation main-nav js-main-nav">
{% include nav.html %}
@@ -38,7 +38,7 @@
{% if page.parent != nil and page.parent != page.title %}
<nav class="breadcrumb-nav">
<ol class="breadcrumb-nav-list">
<li class="breadcrumb-nav-list-item"><a href="{{ site.url }}/{{ page.parent | slugify }}">{{ page.parent }}</a></li>
<li class="breadcrumb-nav-list-item"><a href="{{ site.url }}{{ site.baseurl }}{{ page.parent | slugify }}">{{ page.parent }}</a></li>
<li class="breadcrumb-nav-list-item"><span>{{ page.title }}</span></li>
</ol>
</nav>

View File

@@ -11,9 +11,12 @@
@include mq(md) {
position: absolute;
top: $gutter-spacing;
top: 0;
right: 0;
height: 60px;
padding-top: $sp-4;
z-index: 101;
box-shadow: inset 0 -1px 0 $border-color;
}
}

View File

@@ -2,12 +2,14 @@
@mixin btn-color($fg, $bg) {
color: $fg;
background-color: darken($bg, 2%);
background-image: linear-gradient(lighten($bg, 5%), darken($bg, 2%));
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), 0 4px 10px rgba(0, 0, 0, 0.12);
&:hover,
&.zeroclipboard-is-hover {
color: $fg;
background-color: darken($bg, 4%);
background-image: linear-gradient((lighten($bg, 2%), darken($bg, 4%)));
}

View File

@@ -35,14 +35,29 @@ function initSearch() {
var index = lunr(function () {
this.ref('id');
this.field('title', { boost: 20 });
this.field('content');
this.field('content', { boost: 10 });
this.field('url');
});
// Get the generated search_data.json file so lunr.js can search it locally.
sc = document.getElementsByTagName("script");
source = '';
for(idx = 0; idx < sc.length; idx++)
{
s = sc.item(idx);
if(s.src && s.src.match(/just-the-docs\.js$/))
{ source = s.src; }
}
jsPath = source.replace('just-the-docs.js', '');
jsonPath = jsPath + '/search-data.json';
var request = new XMLHttpRequest();
request.open('GET', '/search-data.json', true);
request.open('GET', jsonPath, true);
request.onload = function() {
if (request.status >= 200 && request.status < 400) {
@@ -103,11 +118,12 @@ function initSearch() {
var resultsLink = document.createElement('a');
var resultsUrlDesc = document.createElement('span');
var resultsUrl = store[results[i].ref].url;
var resultsRelUrl = store[results[i].ref].relUrl;
var resultsTitle = store[results[i].ref].title;
resultsLink.setAttribute('href', store[results[i].ref].url);
resultsLink.setAttribute('href', resultsUrl);
resultsLink.innerText = resultsTitle;
resultsUrlDesc.innerText = resultsUrl;
resultsUrlDesc.innerText = resultsRelUrl;
resultsList.classList.add('search-results-list');
resultsListItem.classList.add('search-results-list-item');

View File

@@ -4,8 +4,9 @@
{% for page in site.html_pages %}"{{ 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 | 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 %},
{% endif %}{% endfor %}
}

View File

@@ -111,4 +111,4 @@ Text can be **bold**, _italic_, or ~~strikethrough~~.
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.
[View typography utilities]({{ site.base_url }}{% link docs/utilities/utilities.md %}#typography){: .btn .btn-outline }
[View typography utilities]({{ site.baseurl }}{% link docs/utilities/utilities.md %}#typography){: .btn .btn-outline }

View File

@@ -16,7 +16,7 @@ Just the Docs gives your documentation a jumpstart with a responsive Jekyll them
---
## Getting started
### Dependancies
### 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
@@ -59,9 +59,8 @@ Just the Docs is distributed by an [MIT license](https://github.com/pmarsceill/j
### Contributing
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][954661c7].
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).
[954661c7]: https://github.com/pmarsceill/just-the-docs/tree/master/CONTRIBUTING.md "Contributing.md on Just the Docs GitHub repository"
### Code of Conduct

View File

@@ -2,7 +2,7 @@
Gem::Specification.new do |spec|
spec.name = "just-the-docs"
spec.version = "0.1.1"
spec.version = "0.1.3"
spec.authors = ["Patrick Marsceill"]
spec.email = ["patrick.marsceill@gmail.com"]

View File

@@ -2,10 +2,12 @@ namespace :search do
desc 'Generate the files needed for search functionality'
task :init do
puts 'Creating search data json file...'
touch 'search-data.json'
touch 'assets/js/search-data.json'
content = %Q[{{ page.content | markdownify | strip_html | xml_escape | remove: 'Table of contents' | strip_newlines | replace: '\\', ' ' }}]
puts 'Done.'
puts 'Generating content...'
File.open('search-data.json', 'w') do |f|
File.open('assets/js/search-data.json', 'w') do |f|
f.puts '---
---
{
@@ -18,5 +20,6 @@ namespace :search do
{% endif %}{% endfor %}
}'
end
puts 'Done.'
end
end