millidocs 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.md +21 -0
- data/README.md +77 -0
- data/_includes/head.html +13 -0
- data/_includes/navigation.html +14 -0
- data/_includes/scripts.html +1 -0
- data/_includes/search-results.html +1 -0
- data/_includes/search.html +18 -0
- data/_includes/sidebar.html +11 -0
- data/_includes/styles.html +1 -0
- data/_layouts/default.html +15 -0
- data/_layouts/page.html +5 -0
- data/_sass/milligram.scss +602 -0
- data/_sass/prism.scss +139 -0
- data/_sass/variables.scss +21 -0
- data/assets/css/docs.scss +179 -0
- data/assets/images/close.svg +3 -0
- data/assets/images/menu.svg +3 -0
- data/assets/js/_includes/lunar.min.js +6 -0
- data/assets/js/_includes/mobile-navigation.js +18 -0
- data/assets/js/_includes/prism.min.js +6 -0
- data/assets/js/_includes/search.js +129 -0
- data/assets/js/_includes/zepto.min.js +2 -0
- data/assets/js/docs.js +8 -0
- metadata +109 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: eeb3349fe3c68d23fd1752bef07e6fc79f51f26f
|
4
|
+
data.tar.gz: 8478b9ec02bf5becd660ff93de22cad48fe9ae37
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7076f386d4a7f760de8939df8024e946ffb260422df79f5bcfc432e7433c54433607bd365b70d1469c26e23106aa34e4142ed4f18956bc1ab489d82a4cb65f21
|
7
|
+
data.tar.gz: 7ecd95fecd36702fffde8abbae4149a548bc149e3baab72f3c4afc9f865e19675dd4c313e9f458f3c965cec6db464f6a6295a279e2812b37866373f009c13752
|
data/LICENSE.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Alexander Heimbuch
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
# Millidocs Theme
|
2
|
+
|
3
|
+
Simple documentation theme for Jekyll featuring [Milligram CSS framework](http://milligram.io/), [PrismJS syntax highlighter](http://prismjs.com/) and [LunrJS search](https://lunrjs.com/).
|
4
|
+
|
5
|
+
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.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your Jekyll site's `Gemfile`:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem "millidocs"
|
13
|
+
```
|
14
|
+
|
15
|
+
Adapt your Jekyll site config `_config.yml`:
|
16
|
+
|
17
|
+
```yaml
|
18
|
+
title: My Docs Page Title
|
19
|
+
description: MY description
|
20
|
+
url: "https://base/url/site"
|
21
|
+
theme: millidocs
|
22
|
+
|
23
|
+
markdown: kramdown
|
24
|
+
kramdown:
|
25
|
+
syntax_highlighter_opts:
|
26
|
+
disable : true
|
27
|
+
|
28
|
+
exclude:
|
29
|
+
- Gemfile
|
30
|
+
- Gemfile.lock
|
31
|
+
- README.md
|
32
|
+
```
|
33
|
+
|
34
|
+
And then execute:
|
35
|
+
|
36
|
+
$ bundle
|
37
|
+
|
38
|
+
Or install it yourself as:
|
39
|
+
|
40
|
+
$ gem install millidocs
|
41
|
+
|
42
|
+
|
43
|
+
## Usage
|
44
|
+
|
45
|
+
### Available Themes
|
46
|
+
|
47
|
+
This theme is made for _pages_ only and doesn't support _posts_ by default. So the only available layouts are `default` and `page`.
|
48
|
+
|
49
|
+
### Navigation
|
50
|
+
|
51
|
+
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/).
|
52
|
+
|
53
|
+
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`:
|
54
|
+
|
55
|
+
```
|
56
|
+
---
|
57
|
+
layout: page
|
58
|
+
title: Navigation
|
59
|
+
navigation: 2
|
60
|
+
---
|
61
|
+
```
|
62
|
+
|
63
|
+
The navigation `index` is starting with 1 representing the first item.
|
64
|
+
|
65
|
+
|
66
|
+
## Development
|
67
|
+
|
68
|
+
To set up your environment to develop this theme, run `bundle install`.
|
69
|
+
|
70
|
+
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.
|
71
|
+
|
72
|
+
When your theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be released.
|
73
|
+
|
74
|
+
## License
|
75
|
+
|
76
|
+
The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
77
|
+
|
data/_includes/head.html
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
<head>
|
2
|
+
<meta charset="utf-8">
|
3
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
5
|
+
|
6
|
+
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
|
7
|
+
<meta name="description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}">
|
8
|
+
|
9
|
+
<link rel="icon" href="{{ "/assets/images/favicon.ico" | relative_url }}">
|
10
|
+
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
|
11
|
+
|
12
|
+
{% include styles.html %}
|
13
|
+
</head>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
{% capture html %}
|
2
|
+
<ul class="navigation" id="navigation">
|
3
|
+
{% assign entries = site.pages | sort: "navigation" %}
|
4
|
+
{% for entry in entries %}
|
5
|
+
{% if entry.navigation %}
|
6
|
+
<li>
|
7
|
+
<a class="{% if page.url == entry.url entry.url %}active{% endif %}" href="{{ site.baseurl }}{{ entry.url }}">
|
8
|
+
{{ entry.title }}
|
9
|
+
</a>
|
10
|
+
</li>
|
11
|
+
{% endif %}
|
12
|
+
{% endfor %}
|
13
|
+
</ul>
|
14
|
+
{% endcapture %}{{ html | strip_newlines | replace:' ','' | replace:' ','' | replace:' ',' ' }}
|
@@ -0,0 +1 @@
|
|
1
|
+
<script src="{{ "/assets/js/docs.js" | relative_url }}"></script>
|
@@ -0,0 +1 @@
|
|
1
|
+
<ul id="search-results" class="navigation"></ul>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<div class="search">
|
2
|
+
<input type="text" class="search-input" id="search-input" placeholder="Type to search" />
|
3
|
+
</div>
|
4
|
+
|
5
|
+
<script>
|
6
|
+
window.database = {
|
7
|
+
{% for page in site.pages %}
|
8
|
+
"{{ page.url | slugify }}": {
|
9
|
+
"title": "{{ page.title | xml_escape }}",
|
10
|
+
"category": "{{ page.category | xml_escape }}",
|
11
|
+
"content": {{ page.content | strip_html | strip_newlines | jsonify }},
|
12
|
+
"url": "{{ page.url | xml_escape }}",
|
13
|
+
"href": "{{ site.baseurl }}{{ page.url | xml_escape }}"
|
14
|
+
}
|
15
|
+
{% unless forloop.last %},{% endunless %}
|
16
|
+
{% endfor %}
|
17
|
+
};
|
18
|
+
</script>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<sidebar class="sidebar" id="sidebar">
|
2
|
+
<div class="sidebar-mobile">
|
3
|
+
<img src="{{ "/assets/images/menu.svg" | relative_url }}" class="menu-icon" id="menu" />
|
4
|
+
<img src="{{ "/assets/images/close.svg" | relative_url }}" class="close-icon" id="close" />
|
5
|
+
</div>
|
6
|
+
{% include search.html %}
|
7
|
+
<div class="sidebar-main">
|
8
|
+
{% include navigation.html %}
|
9
|
+
{% include search-results.html %}
|
10
|
+
</div>
|
11
|
+
</sidebar>
|
@@ -0,0 +1 @@
|
|
1
|
+
<link rel="stylesheet" href="{{ "/assets/css/docs.css" | relative_url }}">
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
|
3
|
+
{% include head.html %}
|
4
|
+
<body>
|
5
|
+
<div class="wrapper">
|
6
|
+
{% include sidebar.html %}
|
7
|
+
<main class="content">
|
8
|
+
<div class="inner">
|
9
|
+
{{ content }}
|
10
|
+
</div>
|
11
|
+
</main>
|
12
|
+
</div>
|
13
|
+
{% include scripts.html %}
|
14
|
+
</body>
|
15
|
+
</html>
|