Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rcvalle committed Nov 8, 2018
0 parents commit 7714a0b
Show file tree
Hide file tree
Showing 40 changed files with 676 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.gem
.bundle
.jekyll-cache
.sass-cache
Gemfile.lock
_site
1 change: 1 addition & 0 deletions .ruby-gemset
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
jekyll-theme-bootstrap4
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.4
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
language: ruby
rvm:
- 2.4
script:
- jekyll build --drafts
deploy:
- provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
on:
branch: master
local-dir: _site
- provider: rubygems
api_key: $API_KEY
skip-cleanup: true
on:
tags: true
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Contributing Guidelines
=======================

The preferred coding style for this project is the [Google HTML/CSS Style
Guide.](https://google.github.io/styleguide/htmlcssguide.html)
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source 'https://rubygems.org'
gemspec
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2018 Ramon de C Valle

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
77 changes: 77 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
jekyll-theme-bootstrap4
=======================

[![Build Status](https://travis-ci.org/rcvalle/jekyll-theme-bootstrap4.svg?branch=master)](https://travis-ci.org/rcvalle/jekyll-theme-bootstrap4)

A [Bootstrap-based](https://getbootstrap.com/) Jekyll theme.


Installation
------------

To install jekyll-theme-bootstrap4:

1. Add the following lines to your Jekyll site's `Gemfile` file:

gem 'jekyll-paginate'
gem 'jekyll-theme-bootstrap4'

2. On a command prompt or terminal with your Jekyll site's directory as the
current working directory, run the following command:

$ bundle install


Usage
-----

To use jekyll-theme-bootstrap4:

1. Add the `jekyll-paginate` plugin to your Jekyll site's `_config.yml` file
under `plugins`:

plugins:
- jekyll-paginate

2. Add the `paginate` option to your Jekyll site's `_config.yml` file and
replace `3` by the preferred maximum number of posts to display per page:

paginate: 3

3. Add the following line to your Jekyll site's `_config.yml` file:

theme: jekyll-theme-bootstrap4

4. Copy the `_plugins` directory from the theme's directory to your Jekyll
site's directory.

5. Copy the `category.html` and `tag.html` files from the theme's `_layouts`
directory to your Jekyll site's `_layouts` directory.

6. Copy the `index.html` file from the theme's directory to your Jekyll
site's directory.

7. Optional: Add the following line to your Jekyll site's `_config.yml` file
and replace `UA-XXXXX-Y` by your Analytics tracking ID:

analytics: UA-XXXXX-Y

8. Optional: Add the following line to your Jekyll site's `_config.yml` file
and replace `EXAMPLE` by your Disqus shortname:

disqus_shortname: EXAMPLE

See [_config.yml](_config.yml) for an example configuration file.


Contributing
------------

See [CONTRIBUTING.md](CONTRIBUTING.md).


License
-------

Licensed under the MIT license. See [LICENSE](LICENSE) for license text and
copyright information.
14 changes: 14 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
baseurl: /jekyll-theme-bootstrap4
exclude:
- "*.gemspec"
- "CONTRIBUTING*"
- "Gemfile*"
- "LICENSE*"
- "README*"
paginate: 3
paginate_path: /pages/:num/
permalink: /:year/:month/:day/:title/
plugins:
- jekyll-paginate
title: Title
url: https://rcvalle.github.io
19 changes: 19 additions & 0 deletions _drafts/lorem-ipsum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
author: Unknown
categories:
- Uncategorized
comments: true
layout: post
published: true
tags:
- lorem ipsum
- lorem
- ipsum
title: Lorem ipsum
---

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor sit amet consectetur adipisci velit, sed quia non numquam eius modi tempora incidunt, ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?

At vero eos et accusamus et iusto odio dignissimos ducimus, qui blanditiis praesentium voluptatum deleniti atque corrupti, quos dolores et quas molestias excepturi sint, obcaecati cupiditate non provident, similique sunt in culpa, qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio, cumque nihil impedit, quo minus id, quod maxime placeat, facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet, ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
11 changes: 11 additions & 0 deletions _includes/analytics.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% if site.analytics %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', '{{ site.analytics }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
17 changes: 17 additions & 0 deletions _includes/categories.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{% if include.post.categories %}
<span>
{% if include.post.categories.size == 1 %}
<a href="{{ include.post.categories.first | category_url }}">{{ include.post.categories.first | capitalize }}.</a>
{% else %}
{% assign penultimate = include.post.categories.size | minus: 2 %}
{% for i in (0..penultimate) %}
{% if include.post.categories.size == 2 %}
<a href="{{ include.post.categories[i] | category_url }}">{{ include.post.categories[i] | capitalize }}</a>
{% else %}
<a href="{{ include.post.categories[i] | category_url }}">{{ include.post.categories[i] | capitalize }},</a>
{% endif %}
{% endfor %}
and <a href="{{ include.post.categories.last | category_url }}">{{ include.post.categories.last | capitalize }}.</a>
{% endif %}
</span>
{% endif %}
9 changes: 9 additions & 0 deletions _includes/categories_list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<ul>
{% for category in site.categories limit:include.limit %}
{% if category.first == page.category %}
<li><a href="{{ category.first | category_url }}">{{ category.first | capitalize }}</a></li>
{% else %}
<li><a href="{{ category.first | category_url }}">{{ category.first | capitalize }}</a></li>
{% endif %}
{% endfor %}
</ul>
18 changes: 18 additions & 0 deletions _includes/disqus.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{% if site.disqus_shortname %}
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = '{{ page.url | absolute_url }}';
this.page.identifier = '{{ page.url | relative_url }}';
this.page.title = '{{ page.title }}';
this.page.category_id = '{{ page.categories.first | capitalize }}';
};
(function() {
var d = document, s = d.createElement('script');
s.src = 'https://{{ site.disqus_shortname }}.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
{% endif %}
3 changes: 3 additions & 0 deletions _includes/disqus_count.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% if site.disqus_shortname %}
<script id="dsq-count-scr" src="https://{{ site.disqus_shortname }}.disqus.com/count.js" async></script>
{% endif %}
24 changes: 24 additions & 0 deletions _includes/navigation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<nav class="navbar navbar-expand-lg sticky-top navbar-dark bg-dark">
{% if page.type == "home" and paginator.page == 1 %}
<a href="{{ "/" | relative_url }}" class="navbar-brand">{{ site.title | liquify }}</a>
{% else %}
<a href="{{ "/" | relative_url }}" class="navbar-brand">{{ site.title | liquify }}</a>
{% endif %}
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<div class="navbar-nav mr-auto">
{% assign pages = site.pages | sort: 'title' %}
{% for item in pages %}
{% if item.type == "page" %}
{% if item.title == page.title %}
<a href="{{ item.url | relative_url }}" class="nav-item nav-link active">{{ item.title | liquify }}</a>
{% else %}
<a href="{{ item.url | relative_url }}" class="nav-item nav-link">{{ item.title | liquify }}</a>
{% endif %}
{% endif %}
{% endfor %}
</div>
</div>
</nav>
17 changes: 17 additions & 0 deletions _includes/pages_list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<ul>
{% if page.type == "home" and paginator.page == 1 %}
<li><a href="{{ "/" | relative_url }}">{{ page.title | liquify }}</a></li>
{% else %}
<li><a href="{{ "/" | relative_url }}">{{ page.title | liquify }}</a></li>
{% endif %}
{% assign pages = site.pages | sort: 'title' %}
{% for item in pages %}
{% if item.type == "page" %}
{% if item.title == page.title %}
<li><a href="{{ item.url | relative_url }}">{{ item.title | liquify }}</a></li>
{% else %}
<li><a href="{{ item.url | relative_url }}">{{ item.title | liquify }}</a></li>
{% endif %}
{% endif %}
{% endfor %}
</ul>
25 changes: 25 additions & 0 deletions _includes/pagination.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% if paginator.total_pages > 1 %}
<div class="pagination justify-content-center">
{% if paginator.page == 2 %}
<span class="page-item"><a href="{{ "/" | relative_url }}" class="page-link"><i class="fas fa-angle-left"></i></a></span>
{% elsif paginator.previous_page %}
<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>
{% else %}
<span class="page-item disabled"><a href="#" class="page-link"><i class="fas fa-angle-left"></i></a></span>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<span class="page-item active"><a href="#" class="page-link">{{ page }}</a></span>
{% elsif page == 1 %}
<span class="page-item"><a href="{{ "/" | relative_url }}" class="page-link">{{ page }}</a></span>
{% else %}
<span class="page-item"><a href="{{ site.paginate_path | replace: ":num", page | relative_url }}" class="page-link">{{ page }}</a></span>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<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>
{% else %}
<span class="page-item disabled"><a href="#" class="page-link"><i class="fas fa-angle-right"></i></a></span>
{% endif %}
</div>
{% endif %}
8 changes: 8 additions & 0 deletions _includes/post.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<article itemscope itemtype="http://schema.org/BlogPosting">
<h1 itemprop="headline"><a href="{{ include.post.url | relative_url }}">{{ include.post.title }}</a></h1>
<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>
<div itemprop="articleBody">
{{ include.post.content | markdownify }}
</div>
<p>{% include post_tags.html post=include.post %}</p>
</article>
7 changes: 7 additions & 0 deletions _includes/post_categories.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% if include.post.categories %}
<span>
{% for category in include.post.categories %}
<a href="{{ category | category_url }}">{{ category | capitalize }}</a>
{% endfor %}
</span>
{% endif %}
7 changes: 7 additions & 0 deletions _includes/post_tags.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% if include.post.tags %}
<span itemprop="keywords">
{% for tag in include.post.tags %}
<a href="{{ tag | tag_url }}">#{{ tag }}</a>
{% endfor %}
</span>
{% endif %}
9 changes: 9 additions & 0 deletions _includes/posts_list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<ul>
{% for post in site.posts limit:include.limit %}
{% if page.title == post.title %}
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
{% else %}
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endif %}
{% endfor %}
</ul>
18 changes: 18 additions & 0 deletions _includes/side_content.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<aside>
<nav>
<h1>Categories</h1>
{% include categories_list.html %}
</nav>
<nav>
<h1>Pages</h1>
{% include pages_list.html %}
</nav>
<nav>
<h1>Posts</h1>
{% include posts_list.html limit=5 %}
</nav>
<nav>
<h1>Tags</h1>
{% include tags_list.html limit=5 %}
</nav>
</aside>
17 changes: 17 additions & 0 deletions _includes/tags.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{% if include.post.tags %}
<span itemprop="keywords">
{% if include.post.tags.size == 1 %}
<a href="{{ include.post.tags.first | tag_url }}">{{ include.post.tags.first }}.</a>
{% else %}
{% assign penultimate = include.post.tags.size | minus: 2 %}
{% for i in (0..penultimate) %}
{% if include.post.tags.size == 2 %}
<a href="{{ include.post.tags[i] | tag_url }}">{{ include.post.tags[i] }}</a>
{% else %}
<a href="{{ include.post.tags[i] | tag_url }}">{{ include.post.tags[i] }},</a>
{% endif %}
{% endfor %}
and <a href="{{ include.post.tags.last | tag_url }}">{{ include.post.tags.last }}.</a>
{% endif %}
</span>
{% endif %}
9 changes: 9 additions & 0 deletions _includes/tags_list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<ul>
{% for tag in site.tags limit:include.limit %}
{% if tag.first == page.tag %}
<li><a href="{{ tag.first | tag_url }}">{{ tag.first }}</a></li>
{% else %}
<li><a href="{{ tag.first | tag_url }}">{{ tag.first }}</a></li>
{% endif %}
{% endfor %}
</ul>
Loading

0 comments on commit 7714a0b

Please sign in to comment.