jekyll-theme-bootstrap5 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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3c7e6eba2461550cf5ec52655a2c30c3dbbc0d3a76aa35cb21f7463d32723c92
4
+ data.tar.gz: 8be85aeee6e47d191ef6fbae8cd48a42f4f2f02fdb4282796c814774512356df
5
+ SHA512:
6
+ metadata.gz: 77ac4237aa354a53970905303d3634f6aa15439ef58432fb47bbcfc9b9851f541f5481dede24dd6044048a6c445032033f07eb617f6b4c7b7a5ba86c7ff2da31
7
+ data.tar.gz: 5e3a6a16f0541507824776b034be9fa9adbf57693946b64bfd76f478d64d38c1ec7ebf7e46e36ef81f3cf125075e246c1eb6d38cf7fff926d9e24d4fed7822f6
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,5 @@
1
+ Contributing Guidelines
2
+ =======================
3
+
4
+ The preferred coding style for this project is the [Google HTML/CSS Style
5
+ Guide.](https://google.github.io/styleguide/htmlcssguide.html)
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2021 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,78 @@
1
+ jekyll-theme-bootstrap5
2
+ =======================
3
+
4
+ ![Build Status](https://github.com/rcvalle/jekyll-theme-bootstrap5/workflows/build/badge.svg)
5
+
6
+ A [Bootstrap-based](https://getbootstrap.com/) Jekyll theme.
7
+
8
+
9
+ Installation
10
+ ------------
11
+
12
+ To install jekyll-theme-bootstrap5:
13
+
14
+ 1. Add the `jekyll-paginate` and `jekyll-theme-bootstrap5` gems to your Jekyll
15
+ site's `Gemfile` file:
16
+
17
+ gem 'jekyll-paginate'
18
+ gem 'jekyll-theme-bootstrap5'
19
+
20
+ 2. On a command prompt or terminal with your Jekyll site's directory as the
21
+ current working directory, run the following command:
22
+
23
+ bundle install
24
+
25
+
26
+ Usage
27
+ -----
28
+
29
+ To use jekyll-theme-bootstrap5:
30
+
31
+ 1. Add the `jekyll-paginate` plugin to your Jekyll site's `_config.yml` file
32
+ under `plugins`:
33
+
34
+ plugins:
35
+ - jekyll-paginate
36
+
37
+ 2. Add the `paginate` option to your Jekyll site's `_config.yml` file and
38
+ replace `3` by the preferred maximum number of posts to display per page:
39
+
40
+ paginate: 3
41
+
42
+ 3. Add the `theme` option to your Jekyll site's `_config.yml` file:
43
+
44
+ theme: jekyll-theme-bootstrap5
45
+
46
+ 4. Copy the `_plugins` directory from the theme's directory to your Jekyll
47
+ site's directory.
48
+
49
+ 5. Copy the `category.html` and `tag.html` files from the theme's `_layouts`
50
+ directory to your Jekyll site's `_layouts` directory.
51
+
52
+ 6. Copy the `index.html` file from the theme's directory to your Jekyll site's
53
+ directory.
54
+
55
+ 7. Optional: Add the `analytics` option to your Jekyll site's `_config.yml` file
56
+ and replace `UA-XXXXX-Y` by your Analytics tracking ID:
57
+
58
+ analytics: UA-XXXXX-Y
59
+
60
+ 8. Optional: Add the `disqus_shortname` option to your Jekyll site's
61
+ `_config.yml` file and replace `EXAMPLE` by your Disqus shortname:
62
+
63
+ disqus_shortname: EXAMPLE
64
+
65
+ See [_config.yml](_config.yml) for an example configuration file.
66
+
67
+
68
+ Contributing
69
+ ------------
70
+
71
+ See [CONTRIBUTING.md](CONTRIBUTING.md).
72
+
73
+
74
+ License
75
+ -------
76
+
77
+ Licensed under the MIT License. See [LICENSE](LICENSE) for license text and
78
+ copyright information.
data/_config.yml ADDED
@@ -0,0 +1,17 @@
1
+ author: Ramon de C Valle
2
+ baseurl: /jekyll-theme-bootstrap5
3
+ description: A Bootstrap-based Jekyll theme.
4
+ excerpts: true
5
+ exclude:
6
+ - "*.gemspec"
7
+ - "CONTRIBUTING*"
8
+ - "Gemfile*"
9
+ - "LICENSE*"
10
+ - "README*"
11
+ paginate: 3
12
+ paginate_path: /pages/:num/
13
+ permalink: /:year/:month/:day/:title/
14
+ plugins:
15
+ - jekyll-paginate
16
+ title: Title
17
+ url: https://rcvalle.github.io
@@ -0,0 +1,22 @@
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 %}
12
+ {% if site.gtag %}
13
+ <!-- Global site tag (gtag.js) - Google Analytics -->
14
+ <script async src="https://www.googletagmanager.com/gtag/js?id={{ site.gtag }}"></script>
15
+ <script>
16
+ window.dataLayer = window.dataLayer || [];
17
+ function gtag(){dataLayer.push(arguments);}
18
+ gtag('js', new Date());
19
+
20
+ gtag('config', '{{ site.gtag }}');
21
+ </script>
22
+ {% 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,17 @@
1
+ {% if site.disqus_shortname %}
2
+ <div id="disqus_thread"></div>
3
+ <script crossorigin="anonymous">
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
+ };
9
+ (function() {
10
+ var d = document, s = d.createElement('script');
11
+ s.src = 'https://{{ site.disqus_shortname }}.disqus.com/embed.js';
12
+ s.setAttribute('data-timestamp', +new Date());
13
+ (d.head || d.body).appendChild(s);
14
+ })();
15
+ </script>
16
+ <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
17
+ {% endif %}
@@ -0,0 +1,3 @@
1
+ {% if site.disqus_shortname %}
2
+ <script id="dsq-count-scr" src="https://{{ site.disqus_shortname }}.disqus.com/count.js" async></script>
3
+ {% endif %}
@@ -0,0 +1,26 @@
1
+ <nav class="navbar navbar-expand-lg sticky-top navbar-dark bg-dark">
2
+ <div class="container-fluid">
3
+ {% if page.type == "home" and paginator.page == 1 %}
4
+ <a href="{{ "/" | relative_url }}" class="navbar-brand">{{ site.title | liquify }}</a>
5
+ {% else %}
6
+ <a href="{{ "/" | relative_url }}" class="navbar-brand">{{ site.title | liquify }}</a>
7
+ {% endif %}
8
+ <button class="navbar-toggler collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
9
+ <span class="navbar-toggler-icon"></span>
10
+ </button>
11
+ <div class="collapse navbar-collapse" id="navbarNav">
12
+ <div class="navbar-nav me-auto">
13
+ {% assign pages = site.pages | sort: 'title' %}
14
+ {% for item in pages %}
15
+ {% if item.type == "page" %}
16
+ {% if item.title == page.title %}
17
+ <a href="{{ item.url | relative_url }}" class="nav-item nav-link active">{{ item.title | liquify }}</a>
18
+ {% else %}
19
+ <a href="{{ item.url | relative_url }}" class="nav-item nav-link">{{ item.title | liquify }}</a>
20
+ {% endif %}
21
+ {% endif %}
22
+ {% endfor %}
23
+ </div>
24
+ </div>
25
+ </div>
26
+ </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 %}
@@ -0,0 +1,13 @@
1
+ <article itemscope itemtype="http://schema.org/BlogPosting">
2
+ <h1 itemprop="headline">{{ include.post.title }}</h1>
3
+ <p itemprop="description">{% 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.updated %}. Last updated on <time itemprop="dateModified" datetime="{{ include.post.updated | date_to_xmlschema }}">{{ include.post.updated | date: "%B %-d, %Y" }}</time>{% endif %}{% 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
+ {% if page.type == "home" and site.excerpts %}
6
+ {{ include.post.excerpt | markdownify }}
7
+ <p><a href="{{ post.url }}">Read more&hellip;</a></p>
8
+ {% else %}
9
+ {{ include.post.content | markdownify }}
10
+ {% endif %}
11
+ </div>
12
+ <p>{% include post_tags.html post=include.post %}</p>
13
+ </article>
@@ -0,0 +1,7 @@
1
+ {% if include.post.categories %}
2
+ <span>
3
+ {% for category in include.post.categories %}
4
+ <a href="{{ category | category_url }}">{{ category | capitalize }}</a>
5
+ {% endfor %}
6
+ </span>
7
+ {% endif %}
@@ -0,0 +1,7 @@
1
+ {% if include.post.tags %}
2
+ <span itemprop="keywords">
3
+ {% for tag in include.post.tags %}
4
+ <a href="{{ tag | tag_url }}">#{{ tag }}</a>
5
+ {% endfor %}
6
+ </span>
7
+ {% endif %}
@@ -0,0 +1,9 @@
1
+ <ul>
2
+ {% for post in site.posts limit:include.limit %}
3
+ {% if page.title == post.title %}
4
+ <li><a href="{{ post.url }}">{{ post.title }}</a></li>
5
+ {% else %}
6
+ <li><a href="{{ post.url }}">{{ post.title }}</a></li>
7
+ {% endif %}
8
+ {% endfor %}
9
+ </ul>
@@ -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>
@@ -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>
@@ -0,0 +1,25 @@
1
+ ---
2
+ layout: default
3
+ type: blog
4
+ ---
5
+
6
+ <div class="row mb-3">
7
+ <div class="col">
8
+ <main>
9
+ {% for post in paginator.posts %}
10
+ <div class="row mb-3">
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,28 @@
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/@fortawesome/fontawesome-free@5/css/all.min.css" crossorigin="anonymous" rel="stylesheet">
11
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5/dist/css/bootstrap.min.css" crossorigin="anonymous" rel="stylesheet">
12
+ {% if site.author %}
13
+ <meta name="author" content="{{ site.author }}">
14
+ {% endif %}
15
+ {% if site.description %}
16
+ <meta name="description" content="{{ site.description }}">
17
+ {% endif %}
18
+ </head>
19
+ <body>
20
+ {% include navigation.html %}
21
+ <div class="container my-3 my-lg-5">
22
+ {{ content }}
23
+ </div>
24
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
25
+ {% include analytics.html %}
26
+ {% include disqus_count.html %}
27
+ </body>
28
+ </html>
@@ -0,0 +1,12 @@
1
+ ---
2
+ layout: default
3
+ type: page
4
+ ---
5
+
6
+ <div class="row">
7
+ <div class="col">
8
+ <main>
9
+ {{ content }}
10
+ </main>
11
+ </div>
12
+ </div>
@@ -0,0 +1,23 @@
1
+ ---
2
+ layout: default
3
+ type: post
4
+ ---
5
+
6
+ <div class="row mb-3">
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,14 @@
1
+ module Jekyll
2
+ module CategoryFilter
3
+ def category_url(category)
4
+ site = @context.registers[:site]
5
+ if site.config['categories_dir']
6
+ "#{site.config['url']}/#{site.config['baseurl']}/#{site.config['categories_dir']}/#{category.tr(' ', '-')}/"
7
+ else
8
+ "#{site.config['url']}/#{site.config['baseurl']}/categories/#{category.tr(' ', '-')}/"
9
+ end.gsub(/\/\/+/).with_index { |_, i| i.zero? ? '//' : '/' }
10
+ end
11
+ end
12
+ end
13
+
14
+ 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 &#8220;#{category.capitalize}&#8221;"
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,9 @@
1
+ module Jekyll
2
+ module LiquifyFilter
3
+ def liquify(input)
4
+ Liquid::Template.parse(input).render(@context)
5
+ end
6
+ end
7
+ end
8
+
9
+ Liquid::Template.register_filter(Jekyll::LiquifyFilter)
@@ -0,0 +1,14 @@
1
+ module Jekyll
2
+ module TagFilter
3
+ def tag_url(tag)
4
+ site = @context.registers[:site]
5
+ if site.config['tags_dir']
6
+ "#{site.config['url']}/#{site.config['baseurl']}/#{site.config['tags_dir']}/#{tag.tr(' ', '-')}/"
7
+ else
8
+ "#{site.config['url']}/#{site.config['baseurl']}/tags/#{tag.tr(' ', '-')}/"
9
+ end.gsub(/\/\/+/).with_index { |_, i| i.zero? ? '//' : '/' }
10
+ end
11
+ end
12
+ end
13
+
14
+ 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 &#8220;#{tag}&#8221;"
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,36 @@
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="{{ site.url }}"/>
7
+ <link href="{{ page.url | absolute_url }}" rel="self"/>
8
+ {% if site.copyright %}
9
+ <rights>{{ site.copyright }}</rights>
10
+ {% endif %}
11
+ <subtitle>{{ site.description }}</subtitle>
12
+ <title>{{ site.title }}</title>
13
+ <updated>{{ site.posts.first.date | date_to_xmlschema }}</updated>
14
+ {% for post in site.posts %}
15
+ <entry>
16
+ <author>
17
+ <name>{{ post.author }}</name>
18
+ </author>
19
+ {% for category in post.categories %}
20
+ <category term="{{ category | capitalize }}"/>
21
+ {% endfor %}
22
+ <content type="html">
23
+ {{ post.content | xml_escape }}
24
+ </content>
25
+ <id>{{ post.url | absolute_url }}</id>
26
+ <link href="{{ post.url | absolute_url }}"/>
27
+ <published>{{ post.date | date_to_xmlschema }}</published>
28
+ <title>{{ post.title }}</title>
29
+ {% if post.updated %}
30
+ <updated>{{ post.updated | date_to_xmlschema }}</updated>
31
+ {% else %}
32
+ <updated>{{ post.date | date_to_xmlschema }}</updated>
33
+ {% endif %}
34
+ </entry>
35
+ {% endfor %}
36
+ </feed>
data/index.html ADDED
@@ -0,0 +1,5 @@
1
+ ---
2
+ layout: blog
3
+ title: "{{ site.title }}"
4
+ type: home
5
+ ---
data/rss.xml ADDED
@@ -0,0 +1,32 @@
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.title }}</title>
7
+ <link>{{ site.url }}</link>
8
+ <description>{{ site.description }}</description>
9
+ {% if site.copyright %}
10
+ <copyright>{{ site.copyright }}</copyright>
11
+ {% endif %}
12
+ <pubDate>{{ site.posts.first.date | date_to_rfc822 }}</pubDate>
13
+ <lastBuildDate>{{ site.posts.first.date | date_to_rfc822 }}</lastBuildDate>
14
+ <atom:link href="{{ page.url | absolute_url }}" rel="self"/>
15
+ {% for post in site.posts %}
16
+ <item>
17
+ <title>{{ post.title }}</title>
18
+ <link>{{ post.url | absolute_url }}</link>
19
+ <description>
20
+ {{ post.content | xml_escape }}
21
+ </description>
22
+ {% for category in post.categories %}
23
+ <category>{{ category | capitalize }}</category>
24
+ {% endfor %}
25
+ <comments>{{ post.url | absolute_url }}#disqus_thread</comments>
26
+ <guid>{{ post.url | absolute_url }}</guid>
27
+ <pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
28
+ <source url="{{ page.url | absolute_url }}">{{ site.title }}</source>
29
+ </item>
30
+ {% endfor %}
31
+ </channel>
32
+ </rss>
metadata ADDED
@@ -0,0 +1,145 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jekyll-theme-bootstrap5
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: 2021-07-20 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: '2.1'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '13.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '13.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: jekyll
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '4.1'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '4.1'
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
+ - !ruby/object:Gem::Dependency
70
+ name: kramdown-parser-gfm
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.1'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.1'
83
+ description: ''
84
+ email: rcvalle@users.noreply.github.com
85
+ executables: []
86
+ extensions: []
87
+ extra_rdoc_files: []
88
+ files:
89
+ - CONTRIBUTING.md
90
+ - LICENSE
91
+ - README.md
92
+ - _config.yml
93
+ - _includes/analytics.html
94
+ - _includes/categories.html
95
+ - _includes/categories_list.html
96
+ - _includes/disqus.html
97
+ - _includes/disqus_count.html
98
+ - _includes/navigation.html
99
+ - _includes/pages_list.html
100
+ - _includes/pagination.html
101
+ - _includes/post.html
102
+ - _includes/post_categories.html
103
+ - _includes/post_tags.html
104
+ - _includes/posts_list.html
105
+ - _includes/side_content.html
106
+ - _includes/tags.html
107
+ - _includes/tags_list.html
108
+ - _layouts/blog.html
109
+ - _layouts/category.html
110
+ - _layouts/default.html
111
+ - _layouts/page.html
112
+ - _layouts/post.html
113
+ - _layouts/tag.html
114
+ - _plugins/category_filter.rb
115
+ - _plugins/category_generator.rb
116
+ - _plugins/liquify_filter.rb
117
+ - _plugins/tag_filter.rb
118
+ - _plugins/tag_generator.rb
119
+ - atom.xml
120
+ - index.html
121
+ - rss.xml
122
+ homepage: https://github.com/rcvalle/jekyll-theme-bootstrap5
123
+ licenses:
124
+ - MIT
125
+ metadata: {}
126
+ post_install_message:
127
+ rdoc_options: []
128
+ require_paths:
129
+ - lib
130
+ required_ruby_version: !ruby/object:Gem::Requirement
131
+ requirements:
132
+ - - ">="
133
+ - !ruby/object:Gem::Version
134
+ version: 2.3.0
135
+ required_rubygems_version: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ requirements: []
141
+ rubygems_version: 3.0.3.1
142
+ signing_key:
143
+ specification_version: 4
144
+ summary: A Bootstrap-based Jekyll theme.
145
+ test_files: []