-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add alexander-heimbuch/millidocs jekyll theme
- Loading branch information
Showing
32 changed files
with
1,463 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*.gem | ||
.bundle | ||
.sass-cache | ||
_site | ||
Gemfile.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
<h1>404</h1> | ||
|
||
<p><strong>Page not found :(</strong></p> | ||
<p>The requested page could not be found.</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
source "https://rubygems.org" | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2017 Alexander Heimbuch | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Millidocs Theme | ||
|
||
Simple documentation theme for Jekyll featuring [Milligram CSS framework](http://milligram.io/), [PrismJS syntax highlighter](http://prismjs.com/) and [LunrJS search](https://lunrjs.com/). | ||
|
||
One of the core features is a full text client side search and full responsiveness. It has zero dependencies with other gems and should be easily build with Github. | ||
|
||
## Installation | ||
|
||
Add this line to your Jekyll site's `Gemfile`: | ||
|
||
```ruby | ||
gem "millidocs" | ||
``` | ||
|
||
Adapt your Jekyll site config `_config.yml`: | ||
|
||
```yaml | ||
title: My Docs Page Title | ||
description: MY description | ||
url: "https://base/url/site" | ||
theme: millidocs | ||
|
||
markdown: kramdown | ||
kramdown: | ||
syntax_highlighter_opts: | ||
disable : true | ||
|
||
exclude: | ||
- Gemfile | ||
- Gemfile.lock | ||
- README.md | ||
``` | ||
And then execute: | ||
$ bundle | ||
Or install it yourself as: | ||
$ gem install millidocs | ||
## Usage | ||
### Github Pages | ||
You can use this theme by simply adding `remote_theme: alexander-heimbuch/millidocs` to your `_config.yml` (Thanks to @kogli for the hint). | ||
|
||
### Available Themes | ||
|
||
This theme is made for _pages_ only and doesn't support _posts_ by default. So the only available layouts are `default` and `page`. | ||
|
||
### Navigation | ||
|
||
The navigation supports especially only one level. If you need deep nested structures you propably should use a larger documentation system like [GitBook](https://www.gitbook.com/). | ||
|
||
Not every page by default is part of the navigation. If you want to add a page to the navigation you have to add the `navigation` attribute with a desired `index`: | ||
|
||
``` | ||
--- | ||
layout: page | ||
title: Navigation | ||
navigation: 2 | ||
--- | ||
``` | ||
|
||
The navigation `index` is starting with 1 representing the first item. | ||
|
||
|
||
## Development | ||
|
||
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. | ||
|
||
When your theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be released. | ||
|
||
## License | ||
|
||
The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
title: Millidocs Theme | ||
description: Documentation for small projects | ||
url: "https://github.com/alexander-heimbuch/millidocs" # the base hostname & protocol for your site, e.g. http://example.com | ||
|
||
# Build settings | ||
markdown: kramdown | ||
kramdown: | ||
syntax_highlighter_opts: | ||
disable : true | ||
|
||
exclude: | ||
- Gemfile | ||
- Gemfile.lock | ||
- README.md | ||
|
||
sass: | ||
sass_dir: _sass | ||
style: compressed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title> | ||
<meta name="description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}"> | ||
|
||
<link rel="icon" href="{{ "/assets/images/favicon.ico" | relative_url }}"> | ||
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}"> | ||
|
||
{% include styles.html %} | ||
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{% capture html %} | ||
<ul class="navigation" id="navigation"> | ||
{% assign entries = site.pages | sort: "navigation" %} | ||
{% for entry in entries %} | ||
{% if entry.navigation %} | ||
<li> | ||
<a class="{% if page.url == entry.url entry.url %}active{% endif %}" href="{{ entry.url | relative_url }}"> | ||
{{ entry.title }} | ||
</a> | ||
</li> | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
{% endcapture %}{{ html | strip_newlines | replace:' ','' | replace:' ','' | replace:' ',' ' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<script src="{{ "/assets/js/zepto.min.js" | relative_url }}"></script> | ||
<script src="{{ "/assets/js/lunar.min.js" | relative_url }}"></script> | ||
<script src="{{ "/assets/js/prism.min.js" | relative_url }}"></script> | ||
<script src="{{ "/assets/js/database.js" | relative_url }}"></script> | ||
<script src="{{ "/assets/js/search.js" | relative_url }}"></script> | ||
<script src="{{ "/assets/js/mobile-navigation.js" | relative_url }}"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<ul id="search-results" class="navigation"></ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class="search"> | ||
<input type="text" class="search-input" id="search-input" placeholder="Type to search" /> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<sidebar class="sidebar" id="sidebar"> | ||
<div class="sidebar-mobile"> | ||
<img src="{{ "/assets/images/menu.svg" | relative_url }}" class="menu-icon" id="menu" /> | ||
<img src="{{ "/assets/images/close.svg" | relative_url }}" class="close-icon" id="close" /> | ||
</div> | ||
{% include search.html %} | ||
<div class="sidebar-main"> | ||
{% include navigation.html %} | ||
{% include search-results.html %} | ||
</div> | ||
</sidebar> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<link rel="stylesheet" href="{{ "/assets/css/docs.css" | relative_url }}"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html lang="{{ page.lang | default: site.lang | default: "en" }}"> | ||
{% include head.html %} | ||
<body> | ||
<div class="wrapper"> | ||
{% include sidebar.html %} | ||
<main class="content"> | ||
<div class="inner"> | ||
{{ content }} | ||
</div> | ||
</main> | ||
</div> | ||
{% include scripts.html %} | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
{{ content }} |
Oops, something went wrong.