jekyll-theme-bootstrap4 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CONTRIBUTING.md +5 -0
- data/LICENSE +20 -0
- data/README.md +77 -0
- data/_config.yml +14 -0
- data/_includes/analytics.html +11 -0
- data/_includes/categories.html +17 -0
- data/_includes/categories_list.html +9 -0
- data/_includes/disqus.html +18 -0
- data/_includes/disqus_count.html +3 -0
- data/_includes/navigation.html +24 -0
- data/_includes/pages_list.html +17 -0
- data/_includes/pagination.html +25 -0
- data/_includes/post.html +8 -0
- data/_includes/post_categories.html +7 -0
- data/_includes/post_tags.html +7 -0
- data/_includes/posts_list.html +9 -0
- data/_includes/side_content.html +18 -0
- data/_includes/tags.html +17 -0
- data/_includes/tags_list.html +9 -0
- data/_layouts/blog.html +25 -0
- data/_layouts/category.html +18 -0
- data/_layouts/default.html +55 -0
- data/_layouts/page.html +12 -0
- data/_layouts/post.html +23 -0
- data/_layouts/tag.html +18 -0
- data/_plugins/category_filter.rb +10 -0
- data/_plugins/category_generator.rb +26 -0
- data/_plugins/liquify_filter.rb +9 -0
- data/_plugins/tag_filter.rb +10 -0
- data/_plugins/tag_generator.rb +26 -0
- data/atom.xml +30 -0
- data/index.html +5 -0
- data/rss.xml +30 -0
- metadata +132 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 290b9bb4ca3bda4209f2aeb66279b20c3b20c26e6cf15c21c11b0fd625dff604
|
4
|
+
data.tar.gz: 2f0d8d91108b34365e6ab679051b8341aceef15b38918524fa18293864345ae9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 498dcdcf5569492af804cc655416c190fbcfc182f9087f53fb07589d613b65fb93c4edd9c8ec68acc31453efa9d33449824b159b01c3866b8bffb99348ac4ae6
|
7
|
+
data.tar.gz: 80c75d834ff379b7b134a9087a1a0505ae87d5abd8ff507a99e3a67ab758a7e24debfdd05c1abead6ded7d7a21525ad850baf261bc34bd91a5407f1b7fb7207c
|
data/CONTRIBUTING.md
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2018 Ramon de C Valle
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be included
|
12
|
+
in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
17
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
18
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
19
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
20
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
jekyll-theme-bootstrap4
|
2
|
+
=======================
|
3
|
+
|
4
|
+
[![Build Status](https://travis-ci.org/rcvalle/jekyll-theme-bootstrap4.svg?branch=master)](https://travis-ci.org/rcvalle/jekyll-theme-bootstrap4)
|
5
|
+
|
6
|
+
A [Bootstrap-based](https://getbootstrap.com/) Jekyll theme.
|
7
|
+
|
8
|
+
|
9
|
+
Installation
|
10
|
+
------------
|
11
|
+
|
12
|
+
To install jekyll-theme-bootstrap4:
|
13
|
+
|
14
|
+
1. Add the following lines to your Jekyll site's `Gemfile` file:
|
15
|
+
|
16
|
+
gem 'jekyll-paginate'
|
17
|
+
gem 'jekyll-theme-bootstrap4'
|
18
|
+
|
19
|
+
2. On a command prompt or terminal with your Jekyll site's directory as the
|
20
|
+
current working directory, run the following command:
|
21
|
+
|
22
|
+
$ bundle install
|
23
|
+
|
24
|
+
|
25
|
+
Usage
|
26
|
+
-----
|
27
|
+
|
28
|
+
To use jekyll-theme-bootstrap4:
|
29
|
+
|
30
|
+
1. Add the `jekyll-paginate` plugin to your Jekyll site's `_config.yml` file
|
31
|
+
under `plugins`:
|
32
|
+
|
33
|
+
plugins:
|
34
|
+
- jekyll-paginate
|
35
|
+
|
36
|
+
2. Add the `paginate` option to your Jekyll site's `_config.yml` file and
|
37
|
+
replace `3` by the preferred maximum number of posts to display per page:
|
38
|
+
|
39
|
+
paginate: 3
|
40
|
+
|
41
|
+
3. Add the following line to your Jekyll site's `_config.yml` file:
|
42
|
+
|
43
|
+
theme: jekyll-theme-bootstrap4
|
44
|
+
|
45
|
+
4. Copy the `_plugins` directory from the theme's directory to your Jekyll
|
46
|
+
site's directory.
|
47
|
+
|
48
|
+
5. Copy the `category.html` and `tag.html` files from the theme's `_layouts`
|
49
|
+
directory to your Jekyll site's `_layouts` directory.
|
50
|
+
|
51
|
+
6. Copy the `index.html` file from the theme's directory to your Jekyll
|
52
|
+
site's directory.
|
53
|
+
|
54
|
+
7. Optional: Add the following line to your Jekyll site's `_config.yml` file
|
55
|
+
and replace `UA-XXXXX-Y` by your Analytics tracking ID:
|
56
|
+
|
57
|
+
analytics: UA-XXXXX-Y
|
58
|
+
|
59
|
+
8. Optional: Add the following line to your Jekyll site's `_config.yml` file
|
60
|
+
and replace `EXAMPLE` by your Disqus shortname:
|
61
|
+
|
62
|
+
disqus_shortname: EXAMPLE
|
63
|
+
|
64
|
+
See [_config.yml](_config.yml) for an example configuration file.
|
65
|
+
|
66
|
+
|
67
|
+
Contributing
|
68
|
+
------------
|
69
|
+
|
70
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
71
|
+
|
72
|
+
|
73
|
+
License
|
74
|
+
-------
|
75
|
+
|
76
|
+
Licensed under the MIT license. See [LICENSE](LICENSE) for license text and
|
77
|
+
copyright information.
|
data/_config.yml
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
baseurl: /jekyll-theme-bootstrap4
|
2
|
+
exclude:
|
3
|
+
- "*.gemspec"
|
4
|
+
- "CONTRIBUTING*"
|
5
|
+
- "Gemfile*"
|
6
|
+
- "LICENSE*"
|
7
|
+
- "README*"
|
8
|
+
paginate: 3
|
9
|
+
paginate_path: /pages/:num/
|
10
|
+
permalink: /:year/:month/:day/:title/
|
11
|
+
plugins:
|
12
|
+
- jekyll-paginate
|
13
|
+
title: Title
|
14
|
+
url: https://rcvalle.github.io
|
@@ -0,0 +1,11 @@
|
|
1
|
+
{% if site.analytics %}
|
2
|
+
<script>
|
3
|
+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
4
|
+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
5
|
+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
6
|
+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
7
|
+
|
8
|
+
ga('create', '{{ site.analytics }}', 'auto');
|
9
|
+
ga('send', 'pageview');
|
10
|
+
</script>
|
11
|
+
{% endif %}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{% if include.post.categories %}
|
2
|
+
<span>
|
3
|
+
{% if include.post.categories.size == 1 %}
|
4
|
+
<a href="{{ include.post.categories.first | category_url }}">{{ include.post.categories.first | capitalize }}.</a>
|
5
|
+
{% else %}
|
6
|
+
{% assign penultimate = include.post.categories.size | minus: 2 %}
|
7
|
+
{% for i in (0..penultimate) %}
|
8
|
+
{% if include.post.categories.size == 2 %}
|
9
|
+
<a href="{{ include.post.categories[i] | category_url }}">{{ include.post.categories[i] | capitalize }}</a>
|
10
|
+
{% else %}
|
11
|
+
<a href="{{ include.post.categories[i] | category_url }}">{{ include.post.categories[i] | capitalize }},</a>
|
12
|
+
{% endif %}
|
13
|
+
{% endfor %}
|
14
|
+
and <a href="{{ include.post.categories.last | category_url }}">{{ include.post.categories.last | capitalize }}.</a>
|
15
|
+
{% endif %}
|
16
|
+
</span>
|
17
|
+
{% endif %}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<ul>
|
2
|
+
{% for category in site.categories limit:include.limit %}
|
3
|
+
{% if category.first == page.category %}
|
4
|
+
<li><a href="{{ category.first | category_url }}">{{ category.first | capitalize }}</a></li>
|
5
|
+
{% else %}
|
6
|
+
<li><a href="{{ category.first | category_url }}">{{ category.first | capitalize }}</a></li>
|
7
|
+
{% endif %}
|
8
|
+
{% endfor %}
|
9
|
+
</ul>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{% if site.disqus_shortname %}
|
2
|
+
<div id="disqus_thread"></div>
|
3
|
+
<script>
|
4
|
+
var disqus_config = function () {
|
5
|
+
this.page.url = '{{ page.url | absolute_url }}';
|
6
|
+
this.page.identifier = '{{ page.url | relative_url }}';
|
7
|
+
this.page.title = '{{ page.title }}';
|
8
|
+
this.page.category_id = '{{ page.categories.first | capitalize }}';
|
9
|
+
};
|
10
|
+
(function() {
|
11
|
+
var d = document, s = d.createElement('script');
|
12
|
+
s.src = 'https://{{ site.disqus_shortname }}.disqus.com/embed.js';
|
13
|
+
s.setAttribute('data-timestamp', +new Date());
|
14
|
+
(d.head || d.body).appendChild(s);
|
15
|
+
})();
|
16
|
+
</script>
|
17
|
+
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
|
18
|
+
{% endif %}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<nav class="navbar navbar-expand-lg sticky-top navbar-dark bg-dark">
|
2
|
+
{% if page.type == "home" and paginator.page == 1 %}
|
3
|
+
<a href="{{ "/" | relative_url }}" class="navbar-brand">{{ site.title | liquify }}</a>
|
4
|
+
{% else %}
|
5
|
+
<a href="{{ "/" | relative_url }}" class="navbar-brand">{{ site.title | liquify }}</a>
|
6
|
+
{% endif %}
|
7
|
+
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
8
|
+
<span class="navbar-toggler-icon"></span>
|
9
|
+
</button>
|
10
|
+
<div class="collapse navbar-collapse" id="navbarNav">
|
11
|
+
<div class="navbar-nav mr-auto">
|
12
|
+
{% assign pages = site.pages | sort: 'title' %}
|
13
|
+
{% for item in pages %}
|
14
|
+
{% if item.type == "page" %}
|
15
|
+
{% if item.title == page.title %}
|
16
|
+
<a href="{{ item.url | relative_url }}" class="nav-item nav-link active">{{ item.title | liquify }}</a>
|
17
|
+
{% else %}
|
18
|
+
<a href="{{ item.url | relative_url }}" class="nav-item nav-link">{{ item.title | liquify }}</a>
|
19
|
+
{% endif %}
|
20
|
+
{% endif %}
|
21
|
+
{% endfor %}
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
</nav>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<ul>
|
2
|
+
{% if page.type == "home" and paginator.page == 1 %}
|
3
|
+
<li><a href="{{ "/" | relative_url }}">{{ page.title | liquify }}</a></li>
|
4
|
+
{% else %}
|
5
|
+
<li><a href="{{ "/" | relative_url }}">{{ page.title | liquify }}</a></li>
|
6
|
+
{% endif %}
|
7
|
+
{% assign pages = site.pages | sort: 'title' %}
|
8
|
+
{% for item in pages %}
|
9
|
+
{% if item.type == "page" %}
|
10
|
+
{% if item.title == page.title %}
|
11
|
+
<li><a href="{{ item.url | relative_url }}">{{ item.title | liquify }}</a></li>
|
12
|
+
{% else %}
|
13
|
+
<li><a href="{{ item.url | relative_url }}">{{ item.title | liquify }}</a></li>
|
14
|
+
{% endif %}
|
15
|
+
{% endif %}
|
16
|
+
{% endfor %}
|
17
|
+
</ul>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
{% if paginator.total_pages > 1 %}
|
2
|
+
<div class="pagination justify-content-center">
|
3
|
+
{% if paginator.page == 2 %}
|
4
|
+
<span class="page-item"><a href="{{ "/" | relative_url }}" class="page-link"><i class="fas fa-angle-left"></i></a></span>
|
5
|
+
{% elsif paginator.previous_page %}
|
6
|
+
<span class="page-item"><a href="{{ site.paginate_path | replace: ":num", paginator.previous_page | relative_url }}" class="page-link"><i class="fas fa-angle-left"></i></a></span>
|
7
|
+
{% else %}
|
8
|
+
<span class="page-item disabled"><a href="#" class="page-link"><i class="fas fa-angle-left"></i></a></span>
|
9
|
+
{% endif %}
|
10
|
+
{% for page in (1..paginator.total_pages) %}
|
11
|
+
{% if page == paginator.page %}
|
12
|
+
<span class="page-item active"><a href="#" class="page-link">{{ page }}</a></span>
|
13
|
+
{% elsif page == 1 %}
|
14
|
+
<span class="page-item"><a href="{{ "/" | relative_url }}" class="page-link">{{ page }}</a></span>
|
15
|
+
{% else %}
|
16
|
+
<span class="page-item"><a href="{{ site.paginate_path | replace: ":num", page | relative_url }}" class="page-link">{{ page }}</a></span>
|
17
|
+
{% endif %}
|
18
|
+
{% endfor %}
|
19
|
+
{% if paginator.next_page %}
|
20
|
+
<span class="page-item"><a href="{{ site.paginate_path | replace: ":num", paginator.next_page | relative_url }}" class="page-link"><i class="fas fa-angle-right"></i></a></span>
|
21
|
+
{% else %}
|
22
|
+
<span class="page-item disabled"><a href="#" class="page-link"><i class="fas fa-angle-right"></i></a></span>
|
23
|
+
{% endif %}
|
24
|
+
</div>
|
25
|
+
{% endif %}
|
data/_includes/post.html
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
<article itemscope itemtype="http://schema.org/BlogPosting">
|
2
|
+
<h1 itemprop="headline"><a href="{{ include.post.url | relative_url }}">{{ include.post.title }}</a></h1>
|
3
|
+
<p>{% if include.post.author %}By <span itemprop="author">{{ include.post.author }}</span> on {% endif %}<time itemprop="datePublished" datetime="{{ include.post.date | date_to_xmlschema }}">{{ include.post.date | date: "%B %-d, %Y" }}</time>{% if include.post.comments %}. <a href="{{ include.post.url | relative_url }}#disqus_thread" data-disqus-identifier="{{ include.post.url | relative_url }}"></a>{% endif %}</p>
|
4
|
+
<div itemprop="articleBody">
|
5
|
+
{{ include.post.content | markdownify }}
|
6
|
+
</div>
|
7
|
+
<p>{% include post_tags.html post=include.post %}</p>
|
8
|
+
</article>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<aside>
|
2
|
+
<nav>
|
3
|
+
<h1>Categories</h1>
|
4
|
+
{% include categories_list.html %}
|
5
|
+
</nav>
|
6
|
+
<nav>
|
7
|
+
<h1>Pages</h1>
|
8
|
+
{% include pages_list.html %}
|
9
|
+
</nav>
|
10
|
+
<nav>
|
11
|
+
<h1>Posts</h1>
|
12
|
+
{% include posts_list.html limit=5 %}
|
13
|
+
</nav>
|
14
|
+
<nav>
|
15
|
+
<h1>Tags</h1>
|
16
|
+
{% include tags_list.html limit=5 %}
|
17
|
+
</nav>
|
18
|
+
</aside>
|
data/_includes/tags.html
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
{% if include.post.tags %}
|
2
|
+
<span itemprop="keywords">
|
3
|
+
{% if include.post.tags.size == 1 %}
|
4
|
+
<a href="{{ include.post.tags.first | tag_url }}">{{ include.post.tags.first }}.</a>
|
5
|
+
{% else %}
|
6
|
+
{% assign penultimate = include.post.tags.size | minus: 2 %}
|
7
|
+
{% for i in (0..penultimate) %}
|
8
|
+
{% if include.post.tags.size == 2 %}
|
9
|
+
<a href="{{ include.post.tags[i] | tag_url }}">{{ include.post.tags[i] }}</a>
|
10
|
+
{% else %}
|
11
|
+
<a href="{{ include.post.tags[i] | tag_url }}">{{ include.post.tags[i] }},</a>
|
12
|
+
{% endif %}
|
13
|
+
{% endfor %}
|
14
|
+
and <a href="{{ include.post.tags.last | tag_url }}">{{ include.post.tags.last }}.</a>
|
15
|
+
{% endif %}
|
16
|
+
</span>
|
17
|
+
{% endif %}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<ul>
|
2
|
+
{% for tag in site.tags limit:include.limit %}
|
3
|
+
{% if tag.first == page.tag %}
|
4
|
+
<li><a href="{{ tag.first | tag_url }}">{{ tag.first }}</a></li>
|
5
|
+
{% else %}
|
6
|
+
<li><a href="{{ tag.first | tag_url }}">{{ tag.first }}</a></li>
|
7
|
+
{% endif %}
|
8
|
+
{% endfor %}
|
9
|
+
</ul>
|
data/_layouts/blog.html
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
type: blog
|
4
|
+
---
|
5
|
+
|
6
|
+
<div class="row">
|
7
|
+
<div class="col">
|
8
|
+
<main>
|
9
|
+
{% for post in paginator.posts %}
|
10
|
+
<div class="row">
|
11
|
+
<div class="col">
|
12
|
+
{% include post.html post=post %}
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
{% endfor %}
|
16
|
+
</main>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
{% if paginator.total_pages > 1 %}
|
20
|
+
<div class="row">
|
21
|
+
<div class="col">
|
22
|
+
{% include pagination.html %}
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
{% endif %}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
type: category
|
4
|
+
---
|
5
|
+
|
6
|
+
<div class="row">
|
7
|
+
<div class="col">
|
8
|
+
<main>
|
9
|
+
{% for post in site.categories[page.category] %}
|
10
|
+
<div class="row">
|
11
|
+
<div class="col">
|
12
|
+
{% include post.html post=post %}
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
{% endfor %}
|
16
|
+
</main>
|
17
|
+
</div>
|
18
|
+
</div>
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
6
|
+
<base href="{{ site.baseurl }}">
|
7
|
+
<title>{{ page.title | liquify }}</title>
|
8
|
+
<link href="{{ "/atom.xml" | relative_url }}" rel="alternate" type="application/atom+xml">
|
9
|
+
<link href="{{ "/rss.xml" | relative_url }}" rel="alternate" type="application/rss+xml">
|
10
|
+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@4/dist/css/bootstrap.min.css" crossorigin="anonymous" rel="stylesheet">
|
11
|
+
<style>
|
12
|
+
article > h1 a {
|
13
|
+
color: #212529;
|
14
|
+
}
|
15
|
+
|
16
|
+
article > h1 a:hover {
|
17
|
+
color: #212529;
|
18
|
+
text-decoration: none;
|
19
|
+
}
|
20
|
+
|
21
|
+
main > .row {
|
22
|
+
margin-bottom: 2rem;
|
23
|
+
}
|
24
|
+
|
25
|
+
.container > .row:first-of-type {
|
26
|
+
margin-top: 3.5rem;
|
27
|
+
}
|
28
|
+
|
29
|
+
.container > .row:last-of-type {
|
30
|
+
margin-bottom: 3.5rem;
|
31
|
+
}
|
32
|
+
|
33
|
+
.pagination > .page-item > .page-link {
|
34
|
+
color: #212529;
|
35
|
+
}
|
36
|
+
|
37
|
+
.pagination > .page-item.active > .page-link {
|
38
|
+
color: #212529;
|
39
|
+
background-color: #e9ecef;
|
40
|
+
border-color: #dee2e6;
|
41
|
+
}
|
42
|
+
</style>
|
43
|
+
</head>
|
44
|
+
<body>
|
45
|
+
{% include navigation.html %}
|
46
|
+
<div class="container">
|
47
|
+
{{ content }}
|
48
|
+
</div>
|
49
|
+
<script src="https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js" crossorigin="anonymous"></script>
|
50
|
+
<script src="https://cdn.jsdelivr.net/npm/popper.js@1/dist/umd/popper.min.js" crossorigin="anonymous"></script>
|
51
|
+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4/dist/js/bootstrap.min.js" crossorigin="anonymous"></script>
|
52
|
+
{% include analytics.html %}
|
53
|
+
{% include disqus_count.html %}
|
54
|
+
</body>
|
55
|
+
</html>
|
data/_layouts/page.html
ADDED
data/_layouts/post.html
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
type: post
|
4
|
+
---
|
5
|
+
|
6
|
+
<div class="row">
|
7
|
+
<div class="col">
|
8
|
+
<main>
|
9
|
+
<div class="row">
|
10
|
+
<div class="col">
|
11
|
+
{% include post.html post=page %}
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
</main>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
{% if page.comments %}
|
18
|
+
<div class="row">
|
19
|
+
<div class="col">
|
20
|
+
{% include disqus.html %}
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
{% endif %}
|
data/_layouts/tag.html
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
type: tag
|
4
|
+
---
|
5
|
+
|
6
|
+
<div class="row">
|
7
|
+
<div class="col">
|
8
|
+
<main>
|
9
|
+
{% for post in site.tags[page.tag] %}
|
10
|
+
<div class="row">
|
11
|
+
<div class="col">
|
12
|
+
{% include post.html post=post %}
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
{% endfor %}
|
16
|
+
</main>
|
17
|
+
</div>
|
18
|
+
</div>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module Jekyll
|
2
|
+
module CategoryFilter
|
3
|
+
def category_url(category)
|
4
|
+
site = @context.registers[:site]
|
5
|
+
site.config['categories_dir'] ? "#{site.config['baseurl']}/#{site.config['categories_dir']}/#{category.tr(' ', '-')}/" : "#{site.config['baseurl']}/categories/#{category.tr(' ', '-')}/"
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
Liquid::Template.register_filter(Jekyll::CategoryFilter)
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Jekyll
|
2
|
+
class CategoryPage < Page
|
3
|
+
def initialize(site, base, dir, category)
|
4
|
+
@site = site
|
5
|
+
@base = base
|
6
|
+
@dir = dir
|
7
|
+
@name = 'index.html'
|
8
|
+
|
9
|
+
self.process(@name)
|
10
|
+
self.read_yaml(File.join(base, '_layouts'), 'category.html')
|
11
|
+
self.data['category'] = category
|
12
|
+
self.data['title'] = "Posts in “#{category.capitalize}”"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
class CategoryPageGenerator < Generator
|
17
|
+
safe true
|
18
|
+
|
19
|
+
def generate(site)
|
20
|
+
if site.layouts.key?('category')
|
21
|
+
dir = site.config['categories_dir'] || 'categories'
|
22
|
+
site.categories.keys.each { |category| site.pages << CategoryPage.new(site, site.source, File.join(dir, category.tr(' ', '-')), category) }
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module Jekyll
|
2
|
+
module TagFilter
|
3
|
+
def tag_url(tag)
|
4
|
+
site = @context.registers[:site]
|
5
|
+
site.config['tags_dir'] ? "#{site.config['baseurl']}/#{site.config['tags_dir']}/#{tag.tr(' ', '-')}/" : "#{site.config['baseurl']}/tags/#{tag.tr(' ', '-')}/"
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
Liquid::Template.register_filter(Jekyll::TagFilter)
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Jekyll
|
2
|
+
class TagPage < Page
|
3
|
+
def initialize(site, base, dir, tag)
|
4
|
+
@site = site
|
5
|
+
@base = base
|
6
|
+
@dir = dir
|
7
|
+
@name = 'index.html'
|
8
|
+
|
9
|
+
self.process(@name)
|
10
|
+
self.read_yaml(File.join(base, '_layouts'), 'tag.html')
|
11
|
+
self.data['tag'] = tag
|
12
|
+
self.data['title'] = "Posts tagged with “#{tag}”"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
class TagPageGenerator < Generator
|
17
|
+
safe true
|
18
|
+
|
19
|
+
def generate(site)
|
20
|
+
if site.layouts.key?('tag')
|
21
|
+
dir = site.config['tags_dir'] || 'tags'
|
22
|
+
site.tags.keys.each { |tag| site.pages << TagPage.new(site, site.source, File.join(dir, tag.tr(' ', '-')), tag) }
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/atom.xml
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
---
|
2
|
+
---
|
3
|
+
<?xml version="1.0" encoding="utf-8"?>
|
4
|
+
<feed xmlns="http://www.w3.org/2005/Atom">
|
5
|
+
<id>{{ "/" | absolute_url }}</id>
|
6
|
+
<link href="{{ "/" | absolute_url }}"/>
|
7
|
+
<link href="{{ page.url | absolute_url }}" rel="self"/>
|
8
|
+
<rights>{{ site.copyright }}</rights>
|
9
|
+
<subtitle>{{ site.description }}</subtitle>
|
10
|
+
<title>{{ site.name }}</title>
|
11
|
+
<updated>{{ site.posts.first.date | date_to_xmlschema }}</updated>
|
12
|
+
{% for post in site.posts %}
|
13
|
+
<entry>
|
14
|
+
<author>
|
15
|
+
<name>{{ post.author }}</name>
|
16
|
+
</author>
|
17
|
+
{% for category in post.categories %}
|
18
|
+
<category term="{{ category | capitalize }}"/>
|
19
|
+
{% endfor %}
|
20
|
+
<content type="html">
|
21
|
+
{{ post.content | xml_escape }}
|
22
|
+
</content>
|
23
|
+
<id>{{ post.url | absolute_url }}</id>
|
24
|
+
<link href="{{ post.url | absolute_url }}"/>
|
25
|
+
<published>{{ post.date | date_to_xmlschema }}</published>
|
26
|
+
<title>{{ post.title }}</title>
|
27
|
+
<updated>{{ post.date | date_to_xmlschema }}</updated>
|
28
|
+
</entry>
|
29
|
+
{% endfor %}
|
30
|
+
</feed>
|
data/index.html
ADDED
data/rss.xml
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
---
|
2
|
+
---
|
3
|
+
<?xml version="1.0" encoding="utf-8"?>
|
4
|
+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
5
|
+
<channel>
|
6
|
+
<title>{{ site.name }}</title>
|
7
|
+
<link>{{ "/" | absolute_url }}</link>
|
8
|
+
<description>{{ site.description }}</description>
|
9
|
+
<copyright>{{ site.copyright }}</copyright>
|
10
|
+
<pubDate>{{ site.posts.first.date | date_to_rfc822 }}</pubDate>
|
11
|
+
<lastBuildDate>{{ site.posts.first.date | date_to_rfc822 }}</lastBuildDate>
|
12
|
+
<atom:link href="{{ page.url | absolute_url }}" rel="self"/>
|
13
|
+
{% for post in site.posts %}
|
14
|
+
<item>
|
15
|
+
<title>{{ post.title }}</title>
|
16
|
+
<link>{{ post.url | absolute_url }}</link>
|
17
|
+
<description>
|
18
|
+
{{ post.content | xml_escape }}
|
19
|
+
</description>
|
20
|
+
{% for category in post.categories %}
|
21
|
+
<category>{{ category | capitalize }}</category>
|
22
|
+
{% endfor %}
|
23
|
+
<comments>{{ post.url | absolute_url }}#disqus_thread</comments>
|
24
|
+
<guid>{{ post.url | absolute_url }}</guid>
|
25
|
+
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
|
26
|
+
<source url="{{ page.url | absolute_url }}">{{ site.name }}</source>
|
27
|
+
</item>
|
28
|
+
{% endfor %}
|
29
|
+
</channel>
|
30
|
+
</rss>
|
metadata
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jekyll-theme-bootstrap4
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ramon de C Valle
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-11-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.16'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.16'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '12.3'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '12.3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: jekyll
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.8'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.8'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: jekyll-paginate
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.1'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.1'
|
69
|
+
description: ''
|
70
|
+
email: rcvalle@users.noreply.github.com
|
71
|
+
executables: []
|
72
|
+
extensions: []
|
73
|
+
extra_rdoc_files: []
|
74
|
+
files:
|
75
|
+
- CONTRIBUTING.md
|
76
|
+
- LICENSE
|
77
|
+
- README.md
|
78
|
+
- _config.yml
|
79
|
+
- _includes/analytics.html
|
80
|
+
- _includes/categories.html
|
81
|
+
- _includes/categories_list.html
|
82
|
+
- _includes/disqus.html
|
83
|
+
- _includes/disqus_count.html
|
84
|
+
- _includes/navigation.html
|
85
|
+
- _includes/pages_list.html
|
86
|
+
- _includes/pagination.html
|
87
|
+
- _includes/post.html
|
88
|
+
- _includes/post_categories.html
|
89
|
+
- _includes/post_tags.html
|
90
|
+
- _includes/posts_list.html
|
91
|
+
- _includes/side_content.html
|
92
|
+
- _includes/tags.html
|
93
|
+
- _includes/tags_list.html
|
94
|
+
- _layouts/blog.html
|
95
|
+
- _layouts/category.html
|
96
|
+
- _layouts/default.html
|
97
|
+
- _layouts/page.html
|
98
|
+
- _layouts/post.html
|
99
|
+
- _layouts/tag.html
|
100
|
+
- _plugins/category_filter.rb
|
101
|
+
- _plugins/category_generator.rb
|
102
|
+
- _plugins/liquify_filter.rb
|
103
|
+
- _plugins/tag_filter.rb
|
104
|
+
- _plugins/tag_generator.rb
|
105
|
+
- atom.xml
|
106
|
+
- index.html
|
107
|
+
- rss.xml
|
108
|
+
homepage: https://github.com/rcvalle/jekyll-theme-bootstrap4
|
109
|
+
licenses:
|
110
|
+
- MIT
|
111
|
+
metadata: {}
|
112
|
+
post_install_message:
|
113
|
+
rdoc_options: []
|
114
|
+
require_paths:
|
115
|
+
- lib
|
116
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
117
|
+
requirements:
|
118
|
+
- - ">="
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '0'
|
121
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
requirements: []
|
127
|
+
rubyforge_project:
|
128
|
+
rubygems_version: 2.7.7
|
129
|
+
signing_key:
|
130
|
+
specification_version: 4
|
131
|
+
summary: A Bootstrap-based Jekyll theme.
|
132
|
+
test_files: []
|