Skip to content

Commit 413c71f

Browse files
[ENGBLOG-3] Add categories to articles (#10)
* [ENGBLOG-3] Add categories to articles * Remove unnecessary dependencies * Disable Vale for catchphrase in about.md * Improve navigation CSS * Project clean up
1 parent 5b32a95 commit 413c71f

36 files changed

+162
-440
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ gem "minima", "~> 2.5"
1515
# gem "github-pages", group: :jekyll_plugins
1616
# If you have any plugins, put them here!
1717
group :jekyll_plugins do
18-
gem "jekyll-feed", "~> 0.12"
18+
gem "jekyll-category-pages"
1919
end
2020

2121
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem

Gemfile.lock

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ GEM
6363
rouge (~> 3.0)
6464
safe_yaml (~> 1.0)
6565
terminal-table (~> 2.0)
66+
jekyll-category-pages (1.1.1)
67+
jekyll (~> 4.0)
68+
jekyll-paginate (~> 1.1, >= 1.0.0)
6669
jekyll-feed (0.15.1)
6770
jekyll (>= 3.7, < 5.0)
6871
jekyll-gist (1.5.0)
@@ -178,7 +181,7 @@ PLATFORMS
178181
DEPENDENCIES
179182
bootstrap (~> 5.0.0.beta3)
180183
jekyll (~> 4.2.0)
181-
jekyll-feed (~> 0.12)
184+
jekyll-category-pages
182185
jekyll_asset_pipeline (~> 0.6.2)
183186
minima (~> 2.5)
184187
minimal-mistakes-jekyll

_config.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,18 @@
1919
# in the templates via {{ site.myvariable }}.
2020

2121
title: Backbase Engineering
22-
email: your-email@example.com
2322
description: >- # this means to ignore newlines until "baseurl:"
2423
Backbase is a global fintech company creating the best digital banking solutions on the planet.
2524
We are a young-spirited, diverse (45+ nationalities), fast-growing and leading company in our niche.
2625
baseurl: "" # the subpath of your site, e.g. /blog
2726
url: "https://backbase.github.io" # the base hostname & protocol for your site, e.g. http://example.com
28-
twitter_username: jekyllrb
29-
github_username: jekyll
27+
28+
categories:
29+
- Backend
30+
- Frontend
31+
- Mobile
32+
- DevOps
33+
- Architecture
3034

3135
# Build settings
3236
theme: minimal-mistakes-jekyll
@@ -37,6 +41,13 @@ footer_scripts:
3741
atom_feed:
3842
hide: true
3943

44+
plugins:
45+
- jekyll-category-pages
46+
47+
permalink: /:year/:month/:day/:title
48+
49+
category_layout: category.html
50+
4051
footer:
4152
links:
4253
- label: YouTube

_data/navigation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# main links links
22
main:
3-
- title: "Blog"
4-
url: /
3+
- title: "Categories"
4+
id: categories
55
- title: "About"
66
url: /about
77
- title: "Jobs"

_includes/archive-single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{% assign title = post.title %}
1111
{% endif %}
1212

13-
<div class="grid__item col-12 {% if include.type == 'grid' %}col-md{% if include.columns %}-{{ 12 | divided_by: include.columns }}{% endif %}{% endif %} mb-4">
13+
<div class="grid__item col-12 {% if include.type == 'grid' %}{% if include.class %}{{ include.class }}{% else %}col-md{% endif %}{% endif %} mb-4">
1414
<article class="archive__item card" itemscope itemtype="https://schema.org/CreativeWork">
1515
{% if include.type == "grid" and teaser %}
1616
<div class="archive__item-teaser">

_includes/footer.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,3 @@
3737

3838
<div class="page__footer-copyright">&copy; {{ site.time | date: '%Y' }} {{ site.name | default: site.title }}. {{ site.data.ui-text[site.locale].powered_by | default: "Powered by" }} <a href="https://jekyllrb.com" rel="nofollow">Jekyll</a> &amp; <a href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/" rel="nofollow">Minimal Mistakes</a>.</div>
3939

40-
{% include scripts.html %}

_includes/head.html

Lines changed: 0 additions & 39 deletions
This file was deleted.

_includes/masthead.html

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,27 @@
2525
<div class="collapse navbar-collapse justify-content-end" id="navbarSupportedContent">
2626
<ul class="navbar-nav">
2727
{%- for item in site.data.navigation.main -%}
28-
<li class="nav-item">
29-
<a class="nav-link" href="{{ item.url | relative_url }}"{% if item.description %} title="{{ item.description }}"{% endif %} {% if item.external %}target="_blank"{% endif %}>{{ item.title }}</a>
30-
</li>
28+
{% if item.id == 'categories' %}
29+
<li class="nav-item dropdown">
30+
<a class="nav-link dropdown-toggle" href="#" id="navbarCategoriesDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false">
31+
<span>{{ item.title }}</span>
32+
</a>
33+
<ul class="dropdown-menu dropdown-menu-dark" aria-labelledby="navbarCategoriesDropdownMenuLink">
34+
{%- for category in site.categories %}
35+
{% assign category_name = category | first %}
36+
<a class="nav-link" href="/{{ site.category_path | default: 'category' }}/{{ category_name | slugify }}">
37+
<span>{{ category_name }}</span>
38+
</a>
39+
{% endfor %}
40+
</ul>
41+
</li>
42+
{% else %}
43+
<li class="nav-item">
44+
<a class="nav-link" href="{{ item.url | relative_url }}"{% if item.description %} title="{{ item.description }}"{% endif %} {% if item.external %}target="_blank"{% endif %}>
45+
<span>{{ item.title }}</span>
46+
</a>
47+
</li>
48+
{% endif %}
3149
{%- endfor -%}
3250
</ul>
3351
</div>

_includes/page__hero.html

Lines changed: 0 additions & 55 deletions
This file was deleted.

_includes/paginator.html

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)