jekyll-blocker 0.1.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/blocker +49 -0
- data/lib/jekyll-blocker/block.rb +58 -0
- data/lib/jekyll-blocker/block_collection.rb +32 -0
- data/lib/jekyll-blocker/converters.rb +18 -0
- data/lib/jekyll-blocker/errors.rb +4 -0
- data/lib/jekyll-blocker/hooks.rb +39 -0
- data/lib/jekyll-blocker/page.rb +12 -0
- data/lib/jekyll-blocker/page_collection.rb +23 -0
- data/lib/jekyll-blocker/tags/block_container_tag.rb +33 -0
- data/lib/jekyll-blocker/tags/block_tag.rb +30 -0
- data/lib/jekyll-blocker/tags/menu_tag.rb +100 -0
- data/lib/jekyll-blocker/utilities.rb +17 -0
- data/lib/jekyll-blocker/version.rb +1 -1
- data/lib/jekyll-blocker.rb +7 -3
- data/lib/new_site/.gitignore +5 -0
- data/lib/new_site/Gemfile +32 -0
- data/lib/new_site/_blocker/blocks/example.liquid +15 -0
- data/lib/new_site/_blocker/blocks/header.liquid +17 -0
- data/lib/new_site/_blocker/menu_styles/full/item.liquid +19 -0
- data/lib/new_site/_blocker/menu_styles/full/wrapper.liquid +19 -0
- data/lib/new_site/_blocker/menus/main.yml +6 -0
- data/lib/new_site/_config.yml +53 -0
- data/lib/new_site/_globals.yml +8 -0
- data/lib/new_site/_includes/footer.liquid +8 -0
- data/lib/new_site/_layouts/default.liquid +22 -0
- data/lib/new_site/_layouts/home.liquid +11 -0
- data/lib/new_site/_layouts/not_found.liquid +8 -0
- data/lib/new_site/_layouts/page.liquid +16 -0
- data/lib/new_site/_layouts/post.liquid +7 -0
- data/lib/new_site/_posts/2023-02-03-welcome-to-jekyll.markdown +35 -0
- data/lib/new_site/_sass/bluma.css +1 -0
- data/lib/new_site/_sass/highlight.css +66 -0
- data/lib/new_site/css/main.scss +4 -0
- data/lib/new_site/favicons/android-chrome-192x192.png +0 -0
- data/lib/new_site/favicons/android-chrome-512x512.png +0 -0
- data/lib/new_site/favicons/apple-touch-icon.png +0 -0
- data/lib/new_site/favicons/favicon-16x16.png +0 -0
- data/lib/new_site/favicons/favicon-32x32.png +0 -0
- data/lib/new_site/favicons/site.webmanifest +1 -0
- data/lib/new_site/images/.keep +0 -0
- data/lib/new_site/images/logo.svg +1 -0
- data/lib/new_site/index.liquid +25 -0
- data/lib/new_site/not_found.liquid +6 -0
- data/lib/new_site/uploads/files/.keep +0 -0
- data/lib/new_site/uploads/images/.keep +0 -0
- metadata +81 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c51070fc39c52b68d6128a6143082313acd82382ff23cf25b3bd453fc738a86
|
4
|
+
data.tar.gz: e5e7c38c7249214d34c451466b1fa1d37d1473acd1e564011af560920b99b937
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa742a641e07901bf7f3ac3b41fc6c5888b5355c977983a077872cd2398960ce73f2e2ee1ab562cf5f6d55acac9f39e04eaab94b0d28bd1ecb1e488881263bf5
|
7
|
+
data.tar.gz: a2558c03ea41e9e91499a0e5666234965f6e33f32101a183b9a8ee80745134b39f7be8d6b47f09ce34bfd1f602bdac9c8052b07ffc01a1b82f724c4e32a30cfb
|
data/bin/blocker
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "thor"
|
4
|
+
require "jekyll-blocker"
|
5
|
+
|
6
|
+
class BlockerCLI < Thor
|
7
|
+
desc "new PATH", "create a new jekyll site setup for blocker in PATH"
|
8
|
+
def new(path)
|
9
|
+
pastel = Pastel.new
|
10
|
+
full_path = File.expand_path(path)
|
11
|
+
|
12
|
+
if Dir.exist?(full_path)
|
13
|
+
if !Dir.empty?(full_path)
|
14
|
+
error = "The path is not empty. Cannot create new jekyll-blocker project."
|
15
|
+
puts pastel.red(error)
|
16
|
+
exit
|
17
|
+
end
|
18
|
+
else
|
19
|
+
FileUtils.mkdir_p(full_path)
|
20
|
+
end
|
21
|
+
|
22
|
+
FileUtils.cp_r(File.join(
|
23
|
+
File.expand_path(
|
24
|
+
File.join(__dir__, "..", "lib", "new_site")), '.'),
|
25
|
+
full_path)
|
26
|
+
|
27
|
+
puts pastel.cyan("Copied Files:")
|
28
|
+
Dir.glob(File.join(full_path, "**", "*"), File::FNM_DOTMATCH).
|
29
|
+
select{|file| File.file?(file)}.
|
30
|
+
each do |file|
|
31
|
+
puts " " + file.sub(/\A#{full_path}#{File::SEPARATOR}/, '')
|
32
|
+
end
|
33
|
+
|
34
|
+
Dir.chdir(full_path) do
|
35
|
+
puts pastel.cyan("\nBundling:")
|
36
|
+
puts `bundle`
|
37
|
+
|
38
|
+
puts pastel.cyan("\nMaking Git repo")
|
39
|
+
puts `git init`
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
desc "version", "jekyll-blocker version"
|
44
|
+
def version
|
45
|
+
puts JekyllBlocker::VERSION
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
BlockerCLI.start(ARGV)
|
@@ -0,0 +1,58 @@
|
|
1
|
+
module JekyllBlocker
|
2
|
+
class Block
|
3
|
+
attr_accessor :content, :data
|
4
|
+
|
5
|
+
ALLOWED_TAGS = %w(assign break capture case comment continue cycle decrement
|
6
|
+
for if ifchanged increment raw tablerow unless highlight
|
7
|
+
link post_url)
|
8
|
+
|
9
|
+
def initialize(content: "", data: {})
|
10
|
+
@content = content.instance_of?(String) ? content : ""
|
11
|
+
@data = data.instance_of?(Hash) ? data : {}
|
12
|
+
end
|
13
|
+
|
14
|
+
def render(instance_data, context)
|
15
|
+
_context = Liquid::Context.new(context.environments.dup, {}, context.registers)
|
16
|
+
|
17
|
+
data.each do |key, value|
|
18
|
+
temp = instance_data.key?(key) ? instance_data[key] : value["value"]
|
19
|
+
case value["type"]
|
20
|
+
when "text", "richtext", "html"
|
21
|
+
essential_liquid_tags do
|
22
|
+
temp = Liquid::Template.parse(temp).render(context)
|
23
|
+
end
|
24
|
+
when "image"
|
25
|
+
temp['src'] = '/uploads/images/' + temp['src']
|
26
|
+
when "file"
|
27
|
+
temp = '/uploads/files/' + temp
|
28
|
+
when "markdown"
|
29
|
+
essential_liquid_tags do
|
30
|
+
temp = Liquid::Template.parse(temp).render(context)
|
31
|
+
end
|
32
|
+
temp = Kramdown::Document.new(temp, input: 'GFM').to_html
|
33
|
+
end
|
34
|
+
_context[key] = temp
|
35
|
+
end
|
36
|
+
|
37
|
+
template = Liquid::Template.parse(@content)
|
38
|
+
template.render(_context)
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def essential_liquid_tags
|
44
|
+
removed = {}
|
45
|
+
Liquid::Template.tags.each do |name, klass|
|
46
|
+
unless ALLOWED_TAGS.include?(name)
|
47
|
+
removed[name] = klass
|
48
|
+
Liquid::Template.tags.delete(name)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
yield
|
52
|
+
removed.each do |name, klass|
|
53
|
+
Liquid::Template.register_tag(name, Object.const_get(klass))
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module JekyllBlocker
|
2
|
+
class BlockCollection
|
3
|
+
def initialize(folder)
|
4
|
+
@blocks = {}
|
5
|
+
@path = File.join(folder, "_blocker", "blocks")
|
6
|
+
|
7
|
+
paths = Dir[File.join(@path, "**", "*.{html,liquid}")]
|
8
|
+
paths.each { |path| load_block(path) }
|
9
|
+
end
|
10
|
+
|
11
|
+
def find(name)
|
12
|
+
@blocks[name]
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def load_block(path)
|
18
|
+
file = Utilities.read_jekyll_file(path)
|
19
|
+
|
20
|
+
key = Pathname(
|
21
|
+
path.sub(/\A#{@path}/, '').
|
22
|
+
sub(/#{File.extname(path)}\z/, '')
|
23
|
+
).each_filename.to_a.join('/')
|
24
|
+
|
25
|
+
if @blocks.key? key
|
26
|
+
raise ValidationError, "Block '#{key}' exists in multiple extensions"
|
27
|
+
end
|
28
|
+
|
29
|
+
@blocks[key] = Block.new(content: file[:content], data: file[:data])
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module JekyllBlocker
|
2
|
+
Jekyll::Hooks.register :site, :pre_render do |site, payload|
|
3
|
+
# set blocks in config
|
4
|
+
site.config["blocks"] = BlockCollection.new(site.source)
|
5
|
+
|
6
|
+
# set site globals
|
7
|
+
site.config["globals"] = {}
|
8
|
+
global_path = File.join(site.source, "_globals.yml")
|
9
|
+
if File.exist? global_path
|
10
|
+
globals = YAML.safe_load(File.read(global_path))
|
11
|
+
site.config["globals"] = globals.map{|k, v| [k, v["value"]]}.to_h
|
12
|
+
end
|
13
|
+
|
14
|
+
# set layout globals
|
15
|
+
site.layouts.each do |_, layout|
|
16
|
+
layout.data["globals"] = if layout.data["globals"]
|
17
|
+
layout.data["globals"].
|
18
|
+
map{|k, v| [k, v["value"]]}.
|
19
|
+
to_h
|
20
|
+
else
|
21
|
+
{}
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
Jekyll::Hooks.register :pages, :pre_render do |page, payload|
|
26
|
+
# set globals merged data, site and layout
|
27
|
+
payload["globals"] = page.site.config["globals"]
|
28
|
+
|
29
|
+
layout = page.site.layouts[page["layout"]]
|
30
|
+
if layout
|
31
|
+
payload["globals"].merge!(layout.data["globals"])
|
32
|
+
end
|
33
|
+
end
|
34
|
+
Jekyll::Hooks.register :posts, :pre_render do |post, payload|
|
35
|
+
# set globals merged data, site and layout
|
36
|
+
layout = post.site.layouts[post["layout"]]
|
37
|
+
payload["globals"] = post.site.config["globals"].merge(layout.data["globals"])
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module JekyllBlocker
|
2
|
+
class PageCollection
|
3
|
+
attr_reader :pages
|
4
|
+
|
5
|
+
def initialize(path)
|
6
|
+
paths = Dir[File.join(path, "**", "*.{liquid,html}")].reject do |file|
|
7
|
+
file =~ /\A#{File.join(path, '_')}/
|
8
|
+
end
|
9
|
+
|
10
|
+
paths.each do |path|
|
11
|
+
key = file.sub(/\A#{path}/, '')
|
12
|
+
file = Utilities.read_jekyll_file(path)
|
13
|
+
@pages[key] = Page.new
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
def find(id)
|
19
|
+
@pages[id.to_s]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module JekyllBlocker
|
2
|
+
class BlockContainerTag < Liquid::Block
|
3
|
+
def initialize(tag_name, params, parse_context)
|
4
|
+
super
|
5
|
+
parts = params.to_s.strip.split.compact
|
6
|
+
if parts.count == 1
|
7
|
+
@name = parts.first
|
8
|
+
else
|
9
|
+
msg = "block_container tag expects 1 argument, #{parts.count} given"
|
10
|
+
raise Liquid::SyntaxError, msg
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def render(context)
|
15
|
+
blocks = context.registers[:site].config["blocks"]
|
16
|
+
block_containers = context.registers[:page]["block_containers"] || {}
|
17
|
+
block_container = block_containers[@name] ||
|
18
|
+
super.split.map do |block|
|
19
|
+
{ "type" => block, "fields" => {} }
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
out = ""
|
24
|
+
block_container.each do |block|
|
25
|
+
out << blocks.find(block["type"]).render(block["fields"], context)
|
26
|
+
end
|
27
|
+
out
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
Liquid::Template.register_tag('block_container', JekyllBlocker::BlockContainerTag)
|
33
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module JekyllBlocker
|
2
|
+
class BlockTag < Liquid::Tag
|
3
|
+
def initialize(tag_name, params, parse_context)
|
4
|
+
super
|
5
|
+
parts = params.to_s.strip.split.compact
|
6
|
+
|
7
|
+
if parts.count == 1
|
8
|
+
@name = @id = parts.first.strip
|
9
|
+
elsif parts.count == 2
|
10
|
+
@name = parts.first
|
11
|
+
@id = parts.last
|
12
|
+
else
|
13
|
+
raise Liquid::SyntaxError, "block tag expects 1..2 arguments, #{parts.count} given"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def render(context)
|
18
|
+
blocks = context.registers[:site].config["blocks"]
|
19
|
+
page_blocks = context.registers[:page]["blocks"] || {}
|
20
|
+
block = page_blocks[@id] || { "type" => @name, "fields" => {} }
|
21
|
+
|
22
|
+
raise BlockerError unless @name == block["type"]
|
23
|
+
|
24
|
+
blocks.find(@name).render(block["fields"], context)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
Liquid::Template.register_tag('block', JekyllBlocker::BlockTag)
|
30
|
+
|
@@ -0,0 +1,100 @@
|
|
1
|
+
module JekyllBlocker
|
2
|
+
class MenuTag < Liquid::Tag
|
3
|
+
def initialize(tag_name, params, parse_context)
|
4
|
+
super
|
5
|
+
parts = params.to_s.strip.split.compact
|
6
|
+
|
7
|
+
if parts.count == 2
|
8
|
+
@name = parts.first.strip
|
9
|
+
@style = parts.last.strip
|
10
|
+
else
|
11
|
+
raise Liquid::SyntaxError, "menu tag expects 2 arguments, #{parts.count} given"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def render(context)
|
16
|
+
@context = context
|
17
|
+
@style = parse_param(@style)
|
18
|
+
menu = build_menu(load_menu(@name))
|
19
|
+
|
20
|
+
if style_wrapper
|
21
|
+
menu = render_part(style_wrapper, { "content" => menu })
|
22
|
+
end
|
23
|
+
|
24
|
+
menu
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def render_part(content, params)
|
30
|
+
_context = Liquid::Context.new(@context.environments.dup, {}, @context.registers)
|
31
|
+
params.each {|key, value| _context[key] = value}
|
32
|
+
template = Liquid::Template.parse(content)
|
33
|
+
template.render(_context)
|
34
|
+
end
|
35
|
+
|
36
|
+
def build_menu(menu)
|
37
|
+
out = ""
|
38
|
+
menu.each do |item|
|
39
|
+
url = case item["type"]
|
40
|
+
when "page"
|
41
|
+
pages = @context.registers[:site].pages
|
42
|
+
pages.find{|page| page["id"] == item["value"]}&.url.to_s
|
43
|
+
when "text"
|
44
|
+
item["value"]
|
45
|
+
when "placeholder"
|
46
|
+
nil
|
47
|
+
end
|
48
|
+
data = {
|
49
|
+
"classes" => item["classes"].to_s,
|
50
|
+
"url" => url,
|
51
|
+
"text" => item["text"].to_s
|
52
|
+
}
|
53
|
+
if item["children"].instance_of?(Array) && item["children"].any?
|
54
|
+
data["children"] = build_menu(item["children"])
|
55
|
+
end
|
56
|
+
|
57
|
+
out << render_part(style_item, data)
|
58
|
+
end
|
59
|
+
out
|
60
|
+
end
|
61
|
+
|
62
|
+
def parse_param(name)
|
63
|
+
if (name[0] == '"' && name[-1] == '"') ||
|
64
|
+
(name[0] == "'" && name[-1] == "'")
|
65
|
+
name[1..-2]
|
66
|
+
else
|
67
|
+
part = @context
|
68
|
+
name.split(".").each do |value|
|
69
|
+
part = part[value]
|
70
|
+
end
|
71
|
+
part.to_s
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def style_wrapper
|
76
|
+
@style_wrapper ||= get_style_part("wrapper", true)
|
77
|
+
end
|
78
|
+
|
79
|
+
def style_item
|
80
|
+
@style_item ||= get_style_part("item")
|
81
|
+
end
|
82
|
+
|
83
|
+
def get_style_part(part, optional=false)
|
84
|
+
file_path = File.join("_blocker", "menu_styles", @style, "#{part}.liquid")
|
85
|
+
|
86
|
+
return if optional && !File.exist?(file_path)
|
87
|
+
|
88
|
+
File.read(file_path)
|
89
|
+
end
|
90
|
+
|
91
|
+
def load_menu(param)
|
92
|
+
name = parse_param(param)
|
93
|
+
file_path = File.join("_blocker", "menus", "#{name}.yml")
|
94
|
+
YAML.safe_load(File.read(file_path))
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
Liquid::Template.register_tag('menu', JekyllBlocker::MenuTag)
|
100
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module JekyllBlocker
|
2
|
+
class Utilities
|
3
|
+
class << self
|
4
|
+
def read_jekyll_file(path)
|
5
|
+
out = { data: {}, content: File.read(path) }
|
6
|
+
|
7
|
+
if out[:content] =~ Jekyll::Document::YAML_FRONT_MATTER_REGEXP
|
8
|
+
out[:content] = Regexp.last_match.post_match
|
9
|
+
out[:data] = YAML.safe_load(Regexp.last_match(1))
|
10
|
+
end
|
11
|
+
|
12
|
+
out
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
data/lib/jekyll-blocker.rb
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
# require "debug"
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
%w(yaml uri fileutils jekyll securerandom pastel).each do |lib|
|
6
|
+
require lib
|
7
7
|
end
|
8
8
|
|
9
|
+
Dir[File.join(__dir__, "jekyll-blocker", "**", "*")].
|
10
|
+
select { |path| File.file?(path) }.
|
11
|
+
each { |lib| require lib }
|
12
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
# Hello! This is where you manage which Jekyll version is used to run.
|
3
|
+
# When you want to use a different version, change it below, save the
|
4
|
+
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
|
5
|
+
#
|
6
|
+
# bundle exec jekyll serve
|
7
|
+
#
|
8
|
+
# For Vagrant
|
9
|
+
# bundle exec jekyll serve -H 0.0.0.0
|
10
|
+
#
|
11
|
+
# This will help ensure the proper Jekyll version is running.
|
12
|
+
# Happy Jekylling!
|
13
|
+
gem "jekyll", "~> 4.3.2"
|
14
|
+
|
15
|
+
# If you have any plugins, put them here!
|
16
|
+
group :jekyll_plugins do
|
17
|
+
gem "jekyll-blocker"
|
18
|
+
end
|
19
|
+
|
20
|
+
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
|
21
|
+
# and associated library.
|
22
|
+
platforms :mingw, :x64_mingw, :mswin, :jruby do
|
23
|
+
gem "tzinfo", ">= 1", "< 3"
|
24
|
+
gem "tzinfo-data"
|
25
|
+
end
|
26
|
+
|
27
|
+
# Performance-booster for watching directories on Windows
|
28
|
+
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
|
29
|
+
|
30
|
+
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
|
31
|
+
# do not have a Java counterpart.
|
32
|
+
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
text:
|
3
|
+
type: text
|
4
|
+
value: >-
|
5
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus id sapien
|
6
|
+
dolor. Mauris ut ante a eros euismod cursus a nec orci. Vivamus in nisl
|
7
|
+
rutrum, auctor urna nec, imperdiet mauris. Nunc dignissim augue blandit
|
8
|
+
bibendum vulputate. Nullam semper nisl sit amet tellus volutpat, nec porta
|
9
|
+
erat finibus. Cras lobortis, sapien ut mollis viverra, turpis orci luctus
|
10
|
+
erat, sed faucibus odio dolor non mi. Donec sed lorem feugiat, porta nunc
|
11
|
+
ac, ornare quam. Pellentesque in risus orci. Proin sit amet rhoncus eros,
|
12
|
+
et interdum ligula.
|
13
|
+
---
|
14
|
+
<p>{{ text }}</p>
|
15
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
title:
|
3
|
+
type: text
|
4
|
+
value: default h1
|
5
|
+
subtitle:
|
6
|
+
type: text
|
7
|
+
value: >-
|
8
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
9
|
+
Vivamus id sapien dolor.
|
10
|
+
Mauris ut ante a eros euismod cursus a nec orci.
|
11
|
+
---
|
12
|
+
<section class="hero">
|
13
|
+
<div class="hero-body">
|
14
|
+
<h1 class="title">{{ title }}</h1>
|
15
|
+
<h2 class="subtitle">{{ subtitle }}</h2>
|
16
|
+
</div>
|
17
|
+
</section>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
{% if children %}
|
2
|
+
<div class="navbar-item has-dropdown is-hoverable">
|
3
|
+
<a class="navbar-link {{classes}} {% if page.url == url %}is-active{% endif %}" {% if url %}href="{{url}}"{% endif %}>
|
4
|
+
{{text}}
|
5
|
+
</a>
|
6
|
+
|
7
|
+
<div class="navbar-dropdown">
|
8
|
+
{{children}}
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
{% else %}
|
12
|
+
<a
|
13
|
+
class="navbar-item {{classes}} {% if page.url == url %}is-active{% endif %}"
|
14
|
+
href="{{url}}"
|
15
|
+
>
|
16
|
+
{{text}}
|
17
|
+
</a>
|
18
|
+
{% endif %}
|
19
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<nav class="navbar is-dark" role="navigation" aria-label="main navigation">
|
2
|
+
<div class="navbar-brand">
|
3
|
+
<a class="navbar-item" href="/">
|
4
|
+
<img src="/images/logo.svg" width="112" height="28">
|
5
|
+
</a>
|
6
|
+
|
7
|
+
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarMenu">
|
8
|
+
<span aria-hidden="true"></span>
|
9
|
+
<span aria-hidden="true"></span>
|
10
|
+
<span aria-hidden="true"></span>
|
11
|
+
</a>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div id="navbarMenu" class="navbar-menu">
|
15
|
+
<div class="navbar-start">
|
16
|
+
{{content}}
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
</nav>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# Welcome to Jekyll!
|
2
|
+
#
|
3
|
+
# This config file is meant for settings that affect your whole blog, values
|
4
|
+
# which you are expected to set up once and rarely edit after that. If you find
|
5
|
+
# yourself editing this file very often, consider using Jekyll's data files
|
6
|
+
# feature for the data you need to update frequently.
|
7
|
+
#
|
8
|
+
# For technical reasons, this file is *NOT* reloaded automatically when you use
|
9
|
+
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.
|
10
|
+
#
|
11
|
+
# If you need help with YAML syntax, here are some quick references for you:
|
12
|
+
# https://learn-the-web.algonquindesign.ca/topics/markdown-yaml-cheat-sheet/#yaml
|
13
|
+
# https://learnxinyminutes.com/docs/yaml/
|
14
|
+
#
|
15
|
+
# Site settings
|
16
|
+
# These are used to personalize your new site. If you look in the HTML files,
|
17
|
+
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
|
18
|
+
# You can create any custom variable you would like, and they will be accessible
|
19
|
+
# in the templates via {{ site.myvariable }}.
|
20
|
+
|
21
|
+
title: Your awesome title
|
22
|
+
description: >- # this means to ignore newlines until "baseurl:"
|
23
|
+
Write an awesome description for your new site here. You can edit this
|
24
|
+
line in _config.yml. It will appear in your document head meta (for
|
25
|
+
Google search results) and in your feed.xml site description.
|
26
|
+
baseurl: "" # the subpath of your site, e.g. /blog
|
27
|
+
url: "" # the base hostname & protocol for your site, e.g. http://example.com
|
28
|
+
|
29
|
+
# Build settings
|
30
|
+
plugins:
|
31
|
+
- jekyll-blocker
|
32
|
+
|
33
|
+
sass:
|
34
|
+
style: compressed
|
35
|
+
# Exclude from processing.
|
36
|
+
# The following items will not be processed, by default.
|
37
|
+
# Any item listed under the `exclude:` key here will be automatically added to
|
38
|
+
# the internal "default list".
|
39
|
+
#
|
40
|
+
# Excluded items can be processed by explicitly listing the directories or
|
41
|
+
# their entries' file path in the `include:` list.
|
42
|
+
#
|
43
|
+
# exclude:
|
44
|
+
# - .sass-cache/
|
45
|
+
# - .jekyll-cache/
|
46
|
+
# - gemfiles/
|
47
|
+
# - Gemfile
|
48
|
+
# - Gemfile.lock
|
49
|
+
# - node_modules/
|
50
|
+
# - vendor/bundle/
|
51
|
+
# - vendor/cache/
|
52
|
+
# - vendor/gems/
|
53
|
+
# - vendor/ruby/
|