Skip to content

Commit

Permalink
Merge pull request mmistakes#10 from pmarsceill/rake-runtime
Browse files Browse the repository at this point in the history
Rake runtime
  • Loading branch information
pmarsceill committed Oct 24, 2018
2 parents 8bffcd0 + b6ed364 commit d558234
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 29 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# in the templates via {{ site.myvariable }}.
title: Just the Docs
description: A Jekyll theme for documentation
baseurl: "/just-the-docs" # 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:
Expand Down
5 changes: 5 additions & 0 deletions _layouts/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: default
---

{{ content }}
4 changes: 2 additions & 2 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<div class="page-wrap">
<div class="side-bar">
<a href="{{ site.baseurl }}" class="site-title fs-6 text-grey-dk-300 lh-tight">{{ site.title }}</a>
<a href="{{ site.url }}{{ 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 %}
Expand All @@ -19,7 +19,7 @@
<div class="main-content pb-0">
<div class="search js-search">
<div class="search-input-wrap">
<input type="text" class="js-search-input search-input fs-2" placeholder="Search {{ site.title }}" aria-label="Search {{ site.title }}" autocomplete="off">
<input type="text" class="js-search-input search-input" 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>
Expand Down
5 changes: 5 additions & 0 deletions _layouts/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: default
---

{{ content }}
19 changes: 12 additions & 7 deletions _sass/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@

.side-bar {
z-index: 100;
display: flex;
flex-wrap: wrap;
padding-top: $gutter-spacing-sm;
padding-bottom: $gutter-spacing-sm;
background-color: $grey-lt-000;

@include mq(md) {
flex-wrap: nowrap;
position: absolute;
display: flex;
width: $nav-width + 16px;
height: 100%;
padding-top: $gutter-spacing * 2;
Expand Down Expand Up @@ -107,11 +109,9 @@

.navigation {
@include mq(md) {
position: absolute;
top: 0;
right: 0;
height: 100%;
padding-top: $sp-8;
overflow-y: auto;
flex: 1 1 auto;
}
}

Expand All @@ -127,9 +127,14 @@ body {

.site-footer {
position: absolute;
bottom: $sp-3;
bottom: 0;
padding-top: $sp-4;
padding-bottom: $sp-4;

@include mq(md) {
right: 0;
position: static;
align-self: flex-end;
justify-self: end;
background-color: $grey-lt-000;
}
}
15 changes: 2 additions & 13 deletions _sass/navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

.site-title {
display: block;
flex-grow: 1;
flex-shrink: 1;
flex-basis: auto;
flex: 1 1 auto;
background-color: $grey-lt-000;

@include mq(md) {
Expand All @@ -27,7 +25,7 @@
list-style: none;

@include mq(md) {
margin-top: $sp-10;
margin-top: 0;
}
}

Expand Down Expand Up @@ -91,15 +89,6 @@
}
}

.side-bar {
display: flex;
flex-wrap: wrap;

@include mq(md) {
display: block;
overflow-y: auto;
}
}

.navigation-list-toggle {
position: absolute;
Expand Down
16 changes: 14 additions & 2 deletions _sass/search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
z-index: 99;
display: none;
flex-grow: 1;
padding-bottom: $gutter-spacing / 2;
background-color: $white;
padding: $sp-2;
margin-bottom: $sp-3;
background-color: $white;
border-radius: 3px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07), 0 3px 10px rgba(0, 0, 0, 0.05);

@include mq(md) {
display: block;
Expand All @@ -20,6 +21,7 @@
padding-left: 0;
margin-bottom: 0;
background-color: transparent;
box-shadow: none;
}

&.nav-open {
Expand Down Expand Up @@ -65,6 +67,16 @@
fill: $purple-000;
}
}

@include fs-5;

@include mq(sm) {
@include fs-3;
}

@include mq(md) {
@include fs-2;
}
}

.search-icon {
Expand Down
4 changes: 2 additions & 2 deletions docs/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ $ 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
root of your Jekyll site with this content:
`assets/js/` of your Jekyll site with this content:

```{% raw %}
---
Expand All @@ -39,4 +39,4 @@ root of your Jekyll site with this content:
}{% endraw %}
```

You can modify this by modifying the forloop in `search-data.json` and the javascript in `just-the-docs.js` on line 30.
_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)._
1 change: 1 addition & 0 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: default
title: Home
nav_order: 1
permalink: /
---


Expand Down
4 changes: 2 additions & 2 deletions just-the-docs.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

Expand All @@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
spec.executables << 'just-the-docs'

spec.add_runtime_dependency "jekyll", "~> 3.3"
spec.add_runtime_dependency "rake", "~> 10.0"

spec.add_development_dependency "bundler", "~> 1.12"
spec.add_development_dependency "rake", "~> 10.0"
end

0 comments on commit d558234

Please sign in to comment.