jekyll-theme-template 0.0.1
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/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 +17 -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 +13 -0
- data/_layouts/category.html +10 -0
- data/_layouts/default.html +16 -0
- data/_layouts/page.html +8 -0
- data/_layouts/post.html +11 -0
- data/_layouts/tag.html +10 -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: 13fdd86e05533e9c6231c8ad78bc1f0dc863a13d1d84cfa5c52e36c04488ad85
|
|
4
|
+
data.tar.gz: 70388aba831aba95758fac1fc43df7d5b29e66be66fc7560f3835b4064731b06
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 2fda5ea25dbe13cb104f19ec79aee537d5555a6954d61869cf7dbb75485dfe9b9120a063699d595d59db6e4a676bbdbccd342fd99ef7531bfda86f8290987a9a
|
|
7
|
+
data.tar.gz: e4db7a46e973fea0971f7278cee7d22221fae1fc809611a5ce02705b76214ad91d6fd20b4ac309c080ec7a0a52cc512cbea53274735ab56d99640d7a38cf31f9
|
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-template
|
|
2
|
+
=====================
|
|
3
|
+
|
|
4
|
+
[](https://travis-ci.org/rcvalle/jekyll-theme-template)
|
|
5
|
+
|
|
6
|
+
A Jekyll theme template.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Installation
|
|
10
|
+
------------
|
|
11
|
+
|
|
12
|
+
To install jekyll-theme-template:
|
|
13
|
+
|
|
14
|
+
1. Add the following lines to your Jekyll site's `Gemfile` file:
|
|
15
|
+
|
|
16
|
+
gem 'jekyll-paginate'
|
|
17
|
+
gem 'jekyll-theme-template'
|
|
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-template:
|
|
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-template
|
|
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-template
|
|
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,17 @@
|
|
|
1
|
+
<nav>
|
|
2
|
+
{% if page.type == "home" and paginator.page == 1 %}
|
|
3
|
+
<a href="{{ "/" | relative_url }}">{{ site.title | liquify }}</a>
|
|
4
|
+
{% else %}
|
|
5
|
+
<a href="{{ "/" | relative_url }}">{{ site.title | liquify }}</a>
|
|
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
|
+
<a href="{{ item.url | relative_url }}">{{ item.title | liquify }}</a>
|
|
12
|
+
{% else %}
|
|
13
|
+
<a href="{{ item.url | relative_url }}">{{ item.title | liquify }}</a>
|
|
14
|
+
{% endif %}
|
|
15
|
+
{% endif %}
|
|
16
|
+
{% endfor %}
|
|
17
|
+
</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
|
+
<nav>
|
|
3
|
+
{% if paginator.page == 2 %}
|
|
4
|
+
<a href="{{ "/" | relative_url }}">‹</a>
|
|
5
|
+
{% elsif paginator.previous_page %}
|
|
6
|
+
<a href="{{ site.paginate_path | replace: ":num", paginator.previous_page | relative_url }}">‹</a>
|
|
7
|
+
{% else %}
|
|
8
|
+
<a href="#">‹</a>
|
|
9
|
+
{% endif %}
|
|
10
|
+
{% for page in (1..paginator.total_pages) %}
|
|
11
|
+
{% if page == paginator.page %}
|
|
12
|
+
<a href="#">{{ page }}</a>
|
|
13
|
+
{% elsif page == 1 %}
|
|
14
|
+
<a href="{{ "/" | relative_url }}">{{ page }}</a>
|
|
15
|
+
{% else %}
|
|
16
|
+
<a href="{{ site.paginate_path | replace: ":num", page | relative_url }}">{{ page }}</a>
|
|
17
|
+
{% endif %}
|
|
18
|
+
{% endfor %}
|
|
19
|
+
{% if paginator.next_page %}
|
|
20
|
+
<a href="{{ site.paginate_path | replace: ":num", paginator.next_page | relative_url }}">›</a>
|
|
21
|
+
{% else %}
|
|
22
|
+
<a href="#">›</a>
|
|
23
|
+
{% endif %}
|
|
24
|
+
</nav>
|
|
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,16 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<base href="{{ site.baseurl }}">
|
|
6
|
+
<title>{{ page.title | liquify }}</title>
|
|
7
|
+
<link href="{{ "/atom.xml" | relative_url }}" rel="alternate" type="application/atom+xml">
|
|
8
|
+
<link href="{{ "/rss.xml" | relative_url }}" rel="alternate" type="application/rss+xml">
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
{% include navigation.html %}
|
|
12
|
+
{{ content }}
|
|
13
|
+
{% include analytics.html %}
|
|
14
|
+
{% include disqus_count.html %}
|
|
15
|
+
</body>
|
|
16
|
+
</html>
|
data/_layouts/page.html
ADDED
data/_layouts/post.html
ADDED
data/_layouts/tag.html
ADDED
|
@@ -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-template
|
|
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-template
|
|
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 Jekyll theme template.
|
|
132
|
+
test_files: []
|