Compare commits

..

37 Commits

Author SHA1 Message Date
Patrick Marsceill
74693a0b2a Merge pull request #13 from pmarsceill/add-ci
Add CI for testing
2018-10-25 12:43:05 -04:00
Patrick Marsceill
6400e79e02 Update README.md 2018-10-25 11:22:11 -04:00
Patrick Marsceill
6a6efba27a fix linting / rules 2018-10-25 11:17:10 -04:00
Patrick Marsceill
d554236ba3 Update .travis.yml 2018-10-25 11:00:40 -04:00
Patrick Marsceill
6d14c454f1 Update package.json 2018-10-25 10:54:17 -04:00
Patrick Marsceill
9d51b4601c Update .travis.yml 2018-10-25 10:53:28 -04:00
Patrick Marsceill
62fc067441 Update .travis.yml 2018-10-25 10:53:03 -04:00
Patrick Marsceill
ea61589b12 Add travis yaml 2018-10-25 10:48:35 -04:00
Patrick Marsceill
89f9c5f38c Merge pull request #12 from jakebresnehan/patch-1
Update README.md
2018-10-25 10:41:21 -04:00
Jake Bresnehan
caf5311feb Update README.md 2018-10-25 18:40:36 +11:00
Patrick Marsceill
3a32d20f18 Merge pull request #11 from pmarsceill/rake-mkdir
rake search:init fails if dirs don't exist
2018-10-24 16:45:43 -04:00
Patrick Marsceill
651ed922b0 Just the Docs build packaging cleanup 2018-10-24 16:39:13 -04:00
Patrick Marsceill
64ed5ef369 Just the Docs build packaging 2018-10-24 16:39:13 -04:00
Patrick Marsceill
82e1873460 bump version number 2018-10-24 16:39:03 -04:00
Patrick Marsceill
46782d9352 Rake fails when dirs dont exist 2018-10-24 16:34:11 -04:00
Patrick Marsceill
d558234885 Merge pull request #10 from pmarsceill/rake-runtime
Rake runtime
2018-10-24 14:25:11 -04:00
Patrick Marsceill
b6ed3643f1 Just the Docs build packaging cleanup 2018-10-24 14:23:00 -04:00
Patrick Marsceill
6ebfb5c77e Just the Docs build packaging 2018-10-24 14:22:59 -04:00
Patrick Marsceill
86402106e7 Merge branch 'master' of github.com:pmarsceill/just-the-docs into rake-runtime 2018-10-24 14:21:43 -04:00
Patrick Marsceill
53b093474f Just the Docs build packaging cleanup 2018-10-24 14:21:38 -04:00
Patrick Marsceill
c8a93a9a3c Just the Docs build packaging 2018-10-24 14:21:38 -04:00
Patrick Marsceill
8bffcd06cd Merge pull request #9 from daviddarnes/patch-1
Improve presentation of Description Lists
2018-10-24 14:16:51 -04:00
Patrick Marsceill
dc0d4a0c84 White space 2018-10-24 14:15:29 -04:00
Patrick Marsceill
886654d86d Add these for a better default jekyll experience 2018-10-24 14:07:02 -04:00
Patrick Marsceill
4177f965df Content updates 2018-10-24 14:06:41 -04:00
Patrick Marsceill
f97f504284 Better layout for when nav is long and scrolls 2018-10-24 14:06:12 -04:00
Patrick Marsceill
45abf03b48 Annoying bug that 404s on local dev 2018-10-24 14:05:42 -04:00
Patrick Marsceill
debc7d3310 Fix up search bar on mobile 2018-10-24 14:05:29 -04:00
Patrick Marsceill
ea23134560 Fix path for home 2018-10-24 14:03:50 -04:00
Patrick Marsceill
2ad43933cf Just the Docs build packaging cleanup 2018-10-24 12:56:42 -04:00
Patrick Marsceill
1afc26cc33 Just the Docs build packaging 2018-10-24 12:56:41 -04:00
Patrick Marsceill
b64368873c Make Rake a runtime dep 2018-10-24 12:56:33 -04:00
David Darnes
89a3e86ebf Remove whitespace 2018-10-24 13:52:27 +01:00
David Darnes
952a016807 Improve presentation of Description Lists
Thought the description list could benefit from some CSS Grid powers
2018-10-24 13:50:07 +01:00
Patrick Marsceill
6c05ef8b9d Merge pull request #8 from pmarsceill/more-path-problems
Fix breadcrumb path
2018-10-23 17:59:36 -04:00
Patrick Marsceill
3752c58af2 Fix breadcrumb path 2018-10-23 17:55:59 -04:00
Patrick Marsceill
6e534b63c2 Merge pull request #7 from pmarsceill/bump-version
Bump version
2018-10-23 17:11:40 -04:00
18 changed files with 112 additions and 52 deletions

View File

@@ -1,4 +1,7 @@
{
"ignoreFiles" : [
"assets/css/just-the-docs.scss"
],
"extends": [
"stylelint-config-primer"
]

13
.travis.yml Normal file
View File

@@ -0,0 +1,13 @@
language: ruby
rvm:
- 2.3.0
env:
- TRAVIS_NODE_VERSION="9.3.0"
install:
- npm install
- bundle install
script:
- npm run test
- bundle exec jekyll build

View File

@@ -1,6 +1,6 @@
# Just the Docs
A nice looking, high customizable, responsive Jekyll theme for documention with built-in search. Easily hosted on GitHub pages.
A nice looking, high customizable, responsive Jekyll theme for documentation with built-in search. Easily hosted on GitHub pages.
![jtd](https://user-images.githubusercontent.com/896475/47384541-89053c80-d6d5-11e8-98dc-dba16e192de9.gif)
@@ -35,6 +35,13 @@ Or install it yourself as:
Bug reports and pull requests are welcome on GitHub at https://github.com/pmarsceill/just-the-docs. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
### Submitting code changes:
- Open a [Pull Request](https://github.com/pmarsceill/just-the-docs/pulls)
- Ensure all CI tests pass
- Await code review
- Bump the version number in `just-the-docs.gemspec` and `package.json` according to [semantic versioning](https://semver.org/).
## Development
To set up your environment to develop this theme, run `bundle install`.
@@ -43,16 +50,6 @@ Your theme is setup just like a normal Jekyll site! To test your theme, run `bun
When the theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be released.
### When your changes are ready:
- Open a [Pull Request](https://github.com/pmarsceill/just-the-docs/pulls)
- Await code review
- Bump the version number in `just-the-docs.gemspec`
- Run `script/build` to package the gem
- Run `gem push just-the-docs-<version>.gem` to publish the gem to Rubygems.org
## License
The theme is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

View File

@@ -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:

5
_layouts/about.html Normal file
View File

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

View File

@@ -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 %}
@@ -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>
@@ -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 }}{{ site.baseurl }}{{ 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>

5
_layouts/home.html Normal file
View File

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

View File

@@ -5,8 +5,7 @@
.page-content {
ul,
ol,
dl {
ol {
padding-left: 1.5em;
}
@@ -64,4 +63,27 @@
h1:first-of-type {
margin-top: 0.5em;
}
dl {
display: grid;
grid-template-columns: max-content 1fr;
}
dt,
dd {
margin: 0.25em 0;
}
dt {
text-align: right;
&::after {
content: ":";
}
}
dd {
margin-left: 1em;
font-weight: 500;
}
}

View File

@@ -12,9 +12,9 @@
margin-right: $sp-1;
margin-left: $sp-1;
color: $white;
text-transform: uppercase;
vertical-align: middle;
background-color: $blue-100;
text-transform: uppercase;
@include fs-2;
}

View File

@@ -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;
@@ -107,14 +109,13 @@
.navigation {
@include mq(md) {
position: absolute;
top: 0;
right: 0;
height: 100%;
padding-top: $sp-8;
overflow-y: auto;
flex: 1 1 auto;
}
}
// stylelint-disable selector-no-type
body {
position: relative;
padding-bottom: $sp-10;
@@ -124,12 +125,18 @@ body {
padding-bottom: 0;
}
}
// stylelint-enable selector-no-type
.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;
}
}

View File

@@ -4,18 +4,16 @@
.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) {
position: absolute;
top: 0;
right: 0;
z-index: 101;
height: 60px;
padding-top: $sp-4;
z-index: 101;
box-shadow: inset 0 -1px 0 $border-color;
}
}
@@ -27,7 +25,7 @@
list-style: none;
@include mq(md) {
margin-top: $sp-10;
margin-top: 0;
}
}
@@ -91,16 +89,6 @@
}
}
.side-bar {
display: flex;
flex-wrap: wrap;
@include mq(md) {
display: block;
overflow-y: auto;
}
}
.navigation-list-toggle {
position: absolute;
right: $sp-4;

View File

@@ -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;
@@ -20,6 +21,7 @@
padding-left: 0;
margin-bottom: 0;
background-color: transparent;
box-shadow: none;
}
&.nav-open {
@@ -65,6 +67,16 @@
fill: $purple-000;
}
}
@include fs-5;
@include mq(sm) {
@include fs-3;
}
@include mq(md) {
@include fs-2;
}
}
.search-icon {

View File

@@ -15,7 +15,9 @@
@media (min-width: rem($value)) {
@content;
}
} @else {
}
@else {
@warn "No value could be retrieved from `#{$media-query}`. "
+ "Please make sure it is defined in `$media-queries` map.";
}
@@ -24,11 +26,11 @@
// Responsive container
@mixin container {
padding-left: $gutter-spacing-sm;
padding-right: $gutter-spacing-sm;
padding-left: $gutter-spacing-sm;
@include mq(md) {
padding-left: $gutter-spacing;
padding-right: $gutter-spacing;
padding-left: $gutter-spacing;
}
}

View File

@@ -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 %}
---
@@ -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)._

View File

@@ -2,6 +2,7 @@
layout: default
title: Home
nav_order: 1
permalink: /
---

View File

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

View File

@@ -2,6 +2,7 @@ namespace :search do
desc 'Generate the files needed for search functionality'
task :init 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: '\\', ' ' }}]
puts 'Done.'
@@ -15,7 +16,8 @@ namespace :search do
"id": "{{ forloop.index0 }}",
"title": "{{ page.title | xml_escape }}",
"content": "'+content+'",
"url": "{{ page.url | xml_escape }}"
"url": "{{ page.url | absolute_url | xml_escape }}",
"relUrl": "{{ page.url | xml_escape }}"
}{% if forloop.last %}{% else %},
{% endif %}{% endfor %}
}'

View File

@@ -10,5 +10,8 @@
"stylelint": "^7.9.0",
"stylelint-config-primer": "^1.4.0"
},
"dependencies": {}
"dependencies": {},
"scripts": {
"test": "stylelint '**/*.scss'"
}
}