Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rcvalle committed Jul 20, 2021
0 parents commit baa1b32
Show file tree
Hide file tree
Showing 43 changed files with 776 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
24 changes: 24 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: build

on:
push:
branches: main
pull_request:
branches: main

jobs:
test:
name: Build and test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Ruby
uses: ruby/setup-ruby@v1

- name: Install dependencies
run: bundle install

- name: Run tests
run: bundle exec jekyll build
20 changes: 20 additions & 0 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: github-pages

on:
push:
branches: main
pull_request:
branches: main

jobs:
github-pages:
name: Build and deploy
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Deploy to GitHub Pages
uses: helaili/jekyll-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
42 changes: 42 additions & 0 deletions .github/workflows/ruby-gem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: ruby-gem

on:
release:
types: [published]

jobs:
build:
name: Build and publish
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Ruby
uses: ruby/setup-ruby@v1

- name: Install dependencies
run: bundle install

- name: Publish to GPR
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
env:
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
OWNER: ${{ github.repository_owner }}

- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
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-bootstrap5
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.6
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 2021 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.
78 changes: 78 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
jekyll-theme-bootstrap5
=======================

![Build Status](https://github.com/rcvalle/jekyll-theme-bootstrap5/workflows/build/badge.svg)

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


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

To install jekyll-theme-bootstrap5:

1. Add the `jekyll-paginate` and `jekyll-theme-bootstrap5` gems to your Jekyll
site's `Gemfile` file:

gem 'jekyll-paginate'
gem 'jekyll-theme-bootstrap5'

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-bootstrap5:

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 `theme` option to your Jekyll site's `_config.yml` file:

theme: jekyll-theme-bootstrap5

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 `analytics` option 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 `disqus_shortname` option 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.
17 changes: 17 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
author: Ramon de C Valle
baseurl: /jekyll-theme-bootstrap5
description: A Bootstrap-based Jekyll theme.
excerpts: true
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.
22 changes: 22 additions & 0 deletions _includes/analytics.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{% 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 %}
{% if site.gtag %}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.gtag }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', '{{ site.gtag }}');
</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>
17 changes: 17 additions & 0 deletions _includes/disqus.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{% if site.disqus_shortname %}
<div id="disqus_thread"></div>
<script crossorigin="anonymous">
var disqus_config = function () {
this.page.url = '{{ page.url | absolute_url }}';
this.page.identifier = '{{ page.url | relative_url }}';
this.page.title = '{{ page.title }}';
};
(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 %}
26 changes: 26 additions & 0 deletions _includes/navigation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<nav class="navbar navbar-expand-lg sticky-top navbar-dark bg-dark">
<div class="container-fluid">
{% 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 collapsed" type="button" data-bs-toggle="collapse" data-bs-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 me-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>
</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>
Loading

0 comments on commit baa1b32

Please sign in to comment.