1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-06-07 16:17:50 +00:00

Dynamically detect the sass variables hook

This commit is contained in:
Cotes Chung 2021-07-07 02:00:47 +08:00
parent f0a2113a9f
commit 797450174d

View File

@ -1,6 +1,16 @@
---
---
{% include_relative variables-hook.scss %}
{% comment %} include the variables-hook if it exists {% endcomment %}
@import "jekyll-theme-chirpy";
{% assign hook = 'variables-hook.scss' %}
{% assign _hook_path = hook | prepend: '/assets/css/' %}
{% assign _hook_obj = site.static_files | where: 'path', _hook_path | first %}
{% if _hook_obj %}
{% include_relative {{ hook }} %}
{% endif %}
@import "{{ site.theme }}";
// append your custom style below