Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for tag-list #734

Merged
merged 4 commits into from
Jul 3, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ jekyll-archives:
tag: '/blog/tag/:name/'
category: '/blog/category/:name/'

display_tags: ['formatting', 'images', 'links', 'math', 'code'] # this tags will be dispalyed on the front page of your blog

# -----------------------------------------------------------------------------
# Jekyll Scholar
# -----------------------------------------------------------------------------
Expand Down
18 changes: 17 additions & 1 deletion _sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,29 @@ footer.sticky-bottom {
border-bottom: 1px solid var(--global-divider-color);
text-align: center;
padding-top: 2rem;
padding-bottom: 5rem;
padding-bottom: 3rem;
h1 {
color: var(--global-theme-color);
font-size: 5rem;
}
}

.tag-list {
rohandebsarkar marked this conversation as resolved.
Show resolved Hide resolved
border-bottom: 1px solid var(--global-divider-color);
text-align: center;
rohandebsarkar marked this conversation as resolved.
Show resolved Hide resolved

ul {
justify-content: center;

p, li {
list-style: none;
display: inline-block;
padding: 1rem 0.5rem;
color: var(--global-text-color-light);
}
}
}

.post-list {
margin: 0;
margin-bottom: 40px;
Expand Down
12 changes: 12 additions & 0 deletions blog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ <h1>{{ site.blog_name }}</h1>
<h2>{{ site.blog_description }}</h2>
</div>

<div class="tag-list">
<ul class="list-group list-group-horizontal">
{% for tag in site.display_tags %}
<li>
<i class="fas fa-hashtag fa-sm"></i> <a href="{{ tag | prepend: '/blog/tag/' | relative_url }}">{{ tag }}</a>
</li>
{% unless forloop.last %}
<p>&bull;</p>
{% endunless %}
{% endfor %}
</ul>
</div>
rohandebsarkar marked this conversation as resolved.
Show resolved Hide resolved

<ul class="post-list">
{% for post in paginator.posts %}
Expand Down