Skip to content

Commit 6b78adf

Browse files
Modiify some source files
1 parent f633ca3 commit 6b78adf

File tree

119 files changed

+15418
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+15418
-4
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
_site
22
.sass-cache
33
.jekyll-metadata
4-
Gemfile.lock
4+
Gemfile.lock
5+
vendor
6+
.bundle

gemfile renamed to Gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ gem "github-pages", group: :jekyll_plugins
55
gem "tzinfo-data"
66
gem "wdm", "~> 0.1.0" if Gem.win_platform?
77

8+
gem "sdbm"
9+
gem "webrick"
10+
gem "net-telnet"
11+
gem "xmlrpc"
12+
813
# If you have any plugins, put them here!
914
group :jekyll_plugins do
1015
gem "jekyll-paginate"

Rakefile

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
require "bundler/gem_tasks"
2+
require "jekyll"
3+
require "listen"
4+
5+
def listen_ignore_paths(base, options)
6+
[
7+
/_config\.ya?ml/,
8+
/_site/,
9+
/\.jekyll-metadata/
10+
]
11+
end
12+
13+
def listen_handler(base, options)
14+
site = Jekyll::Site.new(options)
15+
Jekyll::Command.process_site(site)
16+
proc do |modified, added, removed|
17+
t = Time.now
18+
c = modified + added + removed
19+
n = c.length
20+
relative_paths = c.map{ |p| Pathname.new(p).relative_path_from(base).to_s }
21+
print Jekyll.logger.message("Regenerating:", "#{relative_paths.join(", ")} changed... ")
22+
begin
23+
Jekyll::Command.process_site(site)
24+
puts "regenerated in #{Time.now - t} seconds."
25+
rescue => e
26+
puts "error:"
27+
Jekyll.logger.warn "Error:", e.message
28+
Jekyll.logger.warn "Error:", "Run jekyll build --trace for more information."
29+
end
30+
end
31+
end
32+
33+
task :preview do
34+
base = Pathname.new('.').expand_path
35+
options = {
36+
"source" => base.join('test').to_s,
37+
"destination" => base.join('test/_site').to_s,
38+
"force_polling" => false,
39+
"serving" => true,
40+
"theme" => "minimal-mistakes-jekyll"
41+
}
42+
43+
options = Jekyll.configuration(options)
44+
45+
ENV["LISTEN_GEM_DEBUGGING"] = "1"
46+
listener = Listen.to(
47+
base.join("_data"),
48+
base.join("_includes"),
49+
base.join("_layouts"),
50+
base.join("_sass"),
51+
base.join("assets"),
52+
options["source"],
53+
:ignore => listen_ignore_paths(base, options),
54+
:force_polling => options['force_polling'],
55+
&(listen_handler(base, options))
56+
)
57+
58+
begin
59+
listener.start
60+
Jekyll.logger.info "Auto-regeneration:", "enabled for '#{options["source"]}'"
61+
62+
unless options['serving']
63+
trap("INT") do
64+
listener.stop
65+
puts " Halting auto-regeneration."
66+
exit 0
67+
end
68+
69+
loop { sleep 1000 }
70+
end
71+
rescue ThreadError
72+
# You pressed Ctrl-C, oh my!
73+
end
74+
75+
Jekyll::Commands::Serve.process(options)
76+
end

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ defaults:
7070
comments: false
7171
share: false
7272
related: false
73-
classes: wide
73+
#classes: wide
7474
toc: true
7575
toc_label: "Table of Contents"
7676
toc_icon: "cog"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<!-- start custom analytics snippet -->
2+
3+
<!-- end custom analytics snippet -->
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!-- Global site tag (gtag.js) - Google Analytics -->
2+
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.analytics.google.tracking_id }}"></script>
3+
<script>
4+
window.dataLayer = window.dataLayer || [];
5+
function gtag(){dataLayer.push(arguments);}
6+
gtag('js', new Date());
7+
8+
gtag('config', '{{ site.analytics.google.tracking_id }}', { 'anonymize_ip': {{ site.analytics.google.anonymize_ip | default: false }}});
9+
</script>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<script>
2+
window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;
3+
ga('create','{{ site.analytics.google.tracking_id }}','auto');
4+
ga('set', 'anonymizeIp', {{ site.analytics.google.anonymize_ip | default: false }});
5+
ga('send','pageview')
6+
</script>
7+
<script src="https://www.google-analytics.com/analytics.js" async></script>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<script>
2+
var _gaq = _gaq || [];
3+
_gaq.push(['_setAccount', '{{ site.analytics.google.tracking_id }}']);
4+
{% if site.analytics.google.anonymize_ip == true %}
5+
_gaq.push(['_gat._anonymizeIp']);
6+
{% endif %}
7+
_gaq.push(['_trackPageview']);
8+
9+
(function() {
10+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
11+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
12+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
13+
})();
14+
</script>

_includes/analytics.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{% if jekyll.environment == 'production' and site.analytics.provider and page.analytics != false %}
2+
3+
{% case site.analytics.provider %}
4+
{% when "google" %}
5+
{% include /analytics-providers/google.html %}
6+
{% when "google-universal" %}
7+
{% include /analytics-providers/google-universal.html %}
8+
{% when "google-gtag" %}
9+
{% include /analytics-providers/google-gtag.html %}
10+
{% when "custom" %}
11+
{% include /analytics-providers/custom.html %}
12+
{% endcase %}
13+
14+
{% endif %}

_includes/archive-single.html

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{% if post.header.teaser %}
2+
{% capture teaser %}{{ post.header.teaser }}{% endcapture %}
3+
{% else %}
4+
{% assign teaser = site.teaser %}
5+
{% endif %}
6+
7+
{% if post.id %}
8+
{% assign title = post.title | markdownify | remove: "<p>" | remove: "</p>" %}
9+
{% else %}
10+
{% assign title = post.title %}
11+
{% endif %}
12+
13+
<div class="{{ include.type | default: 'list' }}__item">
14+
<article class="archive__item" itemscope itemtype="https://schema.org/CreativeWork">
15+
{% if include.type == "grid" and teaser %}
16+
<div class="archive__item-teaser">
17+
<img src="{{ teaser | relative_url }}" alt="">
18+
</div>
19+
{% endif %}
20+
<h2 class="archive__item-title no_toc" itemprop="headline">
21+
{% if post.link %}
22+
<a href="{{ post.link }}">{{ title }}</a> <a href="{{ post.url | relative_url }}" rel="permalink"><i class="fas fa-link" aria-hidden="true" title="permalink"></i><span class="sr-only">Permalink</span></a>
23+
{% else %}
24+
<a href="{{ post.url | relative_url }}" rel="permalink">{{ title }}</a>
25+
{% endif %}
26+
</h2>
27+
{% include page__meta.html type=include.type %}
28+
{% if post.excerpt %}<p class="archive__item-excerpt" itemprop="description">{{ post.excerpt | markdownify | strip_html | truncate: 160 }}</p>{% endif %}
29+
</article>
30+
</div>

0 commit comments

Comments
 (0)