jekyll-theme-semantic2 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 +45 -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 +29 -0
- data/_layouts/category.html +18 -0
- data/_layouts/default.html +54 -0
- data/_layouts/page.html +12 -0
- data/_layouts/post.html +27 -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: d2e5143c25673e0204cbc09e4527107f6ee7ecae6d49ebc4858647bbbddd673c
|
4
|
+
data.tar.gz: 164c7db8beb79788e38194b32c18b24a94f3941aa17c929afde892011cc303e3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d57375f875b1b09f4d10450af0f1201dafa619e53062709485f8be6886de9a8fb1f59b24c4d601d871d82541396316244b30ed976542c1ddb34c552f3911c225
|
7
|
+
data.tar.gz: bfc38bf7b35171aee48df8e44561954f91cbe8ba2559cbbbd862b8928979ec4b4333b31701ecc70a7238d886b188dd6a88cb0dee8763552544ef7c029fcb0898
|
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-semantic2
|
2
|
+
======================
|
3
|
+
|
4
|
+
[](https://travis-ci.org/rcvalle/jekyll-theme-semantic2)
|
5
|
+
|
6
|
+
A [Semantic UI -based](https://semantic-ui.com/) Jekyll theme.
|
7
|
+
|
8
|
+
|
9
|
+
Installation
|
10
|
+
------------
|
11
|
+
|
12
|
+
To install jekyll-theme-semantic2:
|
13
|
+
|
14
|
+
1. Add the following lines to your Jekyll site's `Gemfile` file:
|
15
|
+
|
16
|
+
gem 'jekyll-paginate'
|
17
|
+
gem 'jekyll-theme-semantic2'
|
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-semantic2:
|
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-semantic2
|
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-semantic2
|
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,45 @@
|
|
1
|
+
<div class="computer only row">
|
2
|
+
<div class="column">
|
3
|
+
<div class="ui inverted fixed menu">
|
4
|
+
{% if page.type == "home" and paginator.page == 1 %}
|
5
|
+
<a href="{{ "/" | relative_url }}" class="header item">{{ site.title | liquify }}</a>
|
6
|
+
{% else %}
|
7
|
+
<a href="{{ "/" | relative_url }}" class="header item">{{ site.title | liquify }}</a>
|
8
|
+
{% endif %}
|
9
|
+
{% assign pages = site.pages | sort: 'title' %}
|
10
|
+
{% for item in pages %}
|
11
|
+
{% if item.type == "page" %}
|
12
|
+
{% if item.title == page.title %}
|
13
|
+
<a href="{{ item.url | relative_url }}" class="active item">{{ item.title | liquify }}</a>
|
14
|
+
{% else %}
|
15
|
+
<a href="{{ item.url | relative_url }}" class="item">{{ item.title | liquify }}</a>
|
16
|
+
{% endif %}
|
17
|
+
{% endif %}
|
18
|
+
{% endfor %}
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<div class="mobile tablet only row">
|
23
|
+
<div class="column">
|
24
|
+
<div class="ui sidebar inverted vertical menu">
|
25
|
+
{% if page.type == "home" and paginator.page == 1 %}
|
26
|
+
<a href="{{ "/" | relative_url }}" class="header item">{{ site.title | liquify }}</a>
|
27
|
+
{% else %}
|
28
|
+
<a href="{{ "/" | relative_url }}" class="header item">{{ site.title | liquify }}</a>
|
29
|
+
{% endif %}
|
30
|
+
{% assign pages = site.pages | sort: 'title' %}
|
31
|
+
{% for item in pages %}
|
32
|
+
{% if item.type == "page" %}
|
33
|
+
{% if item.title == page.title %}
|
34
|
+
<a href="{{ item.url | relative_url }}" class="active item">{{ item.title | liquify }}</a>
|
35
|
+
{% else %}
|
36
|
+
<a href="{{ item.url | relative_url }}" class="item">{{ item.title | liquify }}</a>
|
37
|
+
{% endif %}
|
38
|
+
{% endif %}
|
39
|
+
{% endfor %}
|
40
|
+
</div>
|
41
|
+
<div class="ui inverted fixed menu">
|
42
|
+
<a class="toggle icon item"><i class="sidebar icon"></i></a>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
</div>
|
@@ -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="ui pagination menu">
|
3
|
+
{% if paginator.page == 2 %}
|
4
|
+
<a href="{{ "/" | relative_url }}" class="item"><i class="angle left icon"></i></a>
|
5
|
+
{% elsif paginator.previous_page %}
|
6
|
+
<a href="{{ site.paginate_path | replace: ":num", paginator.previous_page | relative_url }}" class="item"><i class="angle left icon"></i></a>
|
7
|
+
{% else %}
|
8
|
+
<span class="disabled item"><i class="angle left icon"></i></span>
|
9
|
+
{% endif %}
|
10
|
+
{% for page in (1..paginator.total_pages) %}
|
11
|
+
{% if page == paginator.page %}
|
12
|
+
<span class="active item">{{ page }}</span>
|
13
|
+
{% elsif page == 1 %}
|
14
|
+
<a href="{{ "/" | relative_url }}" class="item">{{ page }}</a>
|
15
|
+
{% else %}
|
16
|
+
<a href="{{ site.paginate_path | replace: ":num", page | relative_url }}" class="item">{{ page }}</a>
|
17
|
+
{% endif %}
|
18
|
+
{% endfor %}
|
19
|
+
{% if paginator.next_page %}
|
20
|
+
<a href="{{ site.paginate_path | replace: ":num", paginator.next_page | relative_url }}" class="item"><i class="angle right icon"></i></a>
|
21
|
+
{% else %}
|
22
|
+
<span class="disabled item"><i class="angle right icon"></i></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 class="ui header" 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 class="ui basic vertical segment" 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,29 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
type: blog
|
4
|
+
---
|
5
|
+
|
6
|
+
<div class="row">
|
7
|
+
<div class="column">
|
8
|
+
<main>
|
9
|
+
<div class="ui text container">
|
10
|
+
{% for post in paginator.posts %}
|
11
|
+
<div class="ui basic vertical segment">
|
12
|
+
{% include post.html post=post %}
|
13
|
+
</div>
|
14
|
+
{% endfor %}
|
15
|
+
</div>
|
16
|
+
</main>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
{% if paginator.total_pages > 1 %}
|
20
|
+
<div class="row">
|
21
|
+
<div class="column">
|
22
|
+
<div class="ui center aligned text container">
|
23
|
+
<div class="ui basic vertical segment">
|
24
|
+
{% include pagination.html %}
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
{% endif %}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
type: category
|
4
|
+
---
|
5
|
+
|
6
|
+
<div class="row">
|
7
|
+
<div class="column">
|
8
|
+
<main>
|
9
|
+
<div class="ui text container">
|
10
|
+
{% for post in site.categories[page.category] %}
|
11
|
+
<div class="ui basic vertical segment">
|
12
|
+
{% include post.html post=post %}
|
13
|
+
</div>
|
14
|
+
{% endfor %}
|
15
|
+
</div>
|
16
|
+
</main>
|
17
|
+
</div>
|
18
|
+
</div>
|
@@ -0,0 +1,54 @@
|
|
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/semantic-ui@2/dist/semantic.min.css" crossorigin="anonymous" rel="stylesheet">
|
11
|
+
<style>
|
12
|
+
article > h1.ui.header a {
|
13
|
+
color: rgba(0, 0, 0, 0.87);
|
14
|
+
}
|
15
|
+
|
16
|
+
.ui.grid > .row:nth-child(3) {
|
17
|
+
margin-top: 3rem;
|
18
|
+
}
|
19
|
+
|
20
|
+
.ui.grid > .row:last-of-type {
|
21
|
+
margin-bottom: 3rem;
|
22
|
+
}
|
23
|
+
|
24
|
+
.ui.pagination.menu > .item > .icon {
|
25
|
+
margin: 0;
|
26
|
+
width: auto;
|
27
|
+
}
|
28
|
+
</style>
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div class="pusher">
|
32
|
+
<div class="ui grid">
|
33
|
+
{% include navigation.html %}
|
34
|
+
{{ content }}
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
<script src="https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js" crossorigin="anonymous"></script>
|
38
|
+
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2/dist/semantic.min.js" crossorigin="anonymous"></script>
|
39
|
+
<script>
|
40
|
+
$(document)
|
41
|
+
.ready(function() {
|
42
|
+
$('.ui.sidebar')
|
43
|
+
.sidebar('attach events', '.toggle.item')
|
44
|
+
;
|
45
|
+
$('.ui.accordion')
|
46
|
+
.accordion()
|
47
|
+
;
|
48
|
+
})
|
49
|
+
;
|
50
|
+
</script>
|
51
|
+
{% include analytics.html %}
|
52
|
+
{% include disqus_count.html %}
|
53
|
+
</body>
|
54
|
+
</html>
|
data/_layouts/page.html
ADDED
data/_layouts/post.html
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
type: post
|
4
|
+
---
|
5
|
+
|
6
|
+
<div class="row">
|
7
|
+
<div class="column">
|
8
|
+
<main>
|
9
|
+
<div class="ui text container">
|
10
|
+
<div class="ui basic vertical segment">
|
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="column">
|
20
|
+
<div class="ui text container">
|
21
|
+
<div class="ui basic vertical segment">
|
22
|
+
{% include disqus.html %}
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
{% 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="column">
|
8
|
+
<main>
|
9
|
+
<div class="ui text container">
|
10
|
+
{% for post in site.tags[page.tag] %}
|
11
|
+
<div class="ui basic vertical segment">
|
12
|
+
{% include post.html post=post %}
|
13
|
+
</div>
|
14
|
+
{% endfor %}
|
15
|
+
</div>
|
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-semantic2
|
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-semantic2
|
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 Semantic UI -based Jekyll theme.
|
132
|
+
test_files: []
|