Skip to content

Instantly share code, notes, and snippets.

Avatar

Konstantin Morenko konstantin-morenko

View GitHub Profile
@konstantin-morenko
konstantin-morenko / pre-commit.sh
Created May 9, 2019
[Git] Pre-commit hook checking build targets is up-to-date
View pre-commit.sh
#!/bin/sh
# Check the rebuild files are up-to-date
if ! $(make -q) ; then
echo "Remake files with make"; exit 1
fi
@konstantin-morenko
konstantin-morenko / list-categories-count.liquid
Last active Sep 16, 2020 — forked from Phlow/list-categories-count.liquid
Jekyll: List all categories with according post count and show and link all post items listed in the according category
View list-categories-count.liquid
<h2>Categories</h2>
<ul>
{% assign categories_list = site.categories %}
{% if categories_list.first[0] == null %}
{% for category in categories_list %}
<li><a href="#{{ category }}">{{ category | capitalize }} ({{ site.tags[category].size }})</a></li>
{% endfor %}
{% else %}
{% for category in categories_list %}
<li><a href="#{{ tag[0] }}">{{ category[0] | capitalize }} ({{ category[1].size }})</a></li>
You can’t perform that action at this time.