diff --git a/_includes/footer/custom.html b/_includes/footer/custom.html index d512599..8ca92ca 100644 --- a/_includes/footer/custom.html +++ b/_includes/footer/custom.html @@ -1,3 +1,3 @@ - \ No newline at end of file + diff --git a/_includes/scripts.html b/_includes/scripts.html new file mode 100644 index 0000000..2e763d7 --- /dev/null +++ b/_includes/scripts.html @@ -0,0 +1,55 @@ +{% if site.footer_scripts %} + {% for script in site.footer_scripts %} + + {% endfor %} +{% else %} + +{% endif %} + +{% if site.search == true or page.layout == "search" %} + {%- assign search_provider = site.search_provider | default: "lunr" -%} + {%- case search_provider -%} + {%- when "lunr" -%} + {% include_cached search/lunr-search-scripts.html %} + {%- when "google" -%} + {% include_cached search/google-search-scripts.html %} + {%- when "algolia" -%} + {% include_cached search/algolia-search-scripts.html %} + {%- endcase -%} +{% endif %} + +{% include analytics.html %} +{% include /comments-providers/scripts.html %} + +{% if site.after_footer_scripts %} + {% for script in site.after_footer_scripts %} + + {% endfor %} +{% endif %} + + + + diff --git a/_plugins/skin_manager.rb b/_plugins/skin_manager.rb new file mode 100644 index 0000000..a93d8f7 --- /dev/null +++ b/_plugins/skin_manager.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +module SkinManager + class << self + attr_accessor :available_skins + end + + Jekyll::Hooks.register :site, :post_read do |site| + skins_dir = site.in_theme_dir("_sass", "minimal-mistakes", "skins") + SkinManager.available_skins = Dir["#{skins_dir}/*.scss"].map { |i| File.basename(i, ".scss") } + end + + Jekyll::Hooks.register [:pages, :documents], :pre_render do |doc, payload| + payload["page"]["available_skins"] = SkinManager.available_skins + end + + class SkinPage < Jekyll::PageWithoutAFile + def initialize(site, skin_name) + super(site, site.source, "assets/css", "#{skin_name}.scss") + end + end + + class StyleSheetGenerator < Jekyll::Generator + def generate(site) + SkinManager.available_skins.each do |skin_name| + site.pages << SkinPage.new(site, skin_name).tap do |page| + page.data["skin_name"] = skin_name + page.content = <<~SCSS + @import + "minimal-mistakes/skins/{{ page.skin_name }}", + "minimal-mistakes"; + SCSS + end + end + end + end +end diff --git a/assets/images/attajak.png b/assets/images/attajak.png new file mode 100644 index 0000000..837b034 Binary files /dev/null and b/assets/images/attajak.png differ