Skip to content

Commit

Permalink
Modiify some source files
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSecureHuman committed Oct 5, 2022
1 parent f633ca3 commit 6b78adf
Show file tree
Hide file tree
Showing 119 changed files with 15,418 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
_site
.sass-cache
.jekyll-metadata
Gemfile.lock
Gemfile.lock
vendor
.bundle
5 changes: 5 additions & 0 deletions gemfile → Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ gem "github-pages", group: :jekyll_plugins
gem "tzinfo-data"
gem "wdm", "~> 0.1.0" if Gem.win_platform?

gem "sdbm"
gem "webrick"
gem "net-telnet"
gem "xmlrpc"

# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-paginate"
Expand Down
76 changes: 76 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
require "bundler/gem_tasks"
require "jekyll"
require "listen"

def listen_ignore_paths(base, options)
[
/_config\.ya?ml/,
/_site/,
/\.jekyll-metadata/
]
end

def listen_handler(base, options)
site = Jekyll::Site.new(options)
Jekyll::Command.process_site(site)
proc do |modified, added, removed|
t = Time.now
c = modified + added + removed
n = c.length
relative_paths = c.map{ |p| Pathname.new(p).relative_path_from(base).to_s }
print Jekyll.logger.message("Regenerating:", "#{relative_paths.join(", ")} changed... ")
begin
Jekyll::Command.process_site(site)
puts "regenerated in #{Time.now - t} seconds."
rescue => e
puts "error:"
Jekyll.logger.warn "Error:", e.message
Jekyll.logger.warn "Error:", "Run jekyll build --trace for more information."
end
end
end

task :preview do
base = Pathname.new('.').expand_path
options = {
"source" => base.join('test').to_s,
"destination" => base.join('test/_site').to_s,
"force_polling" => false,
"serving" => true,
"theme" => "minimal-mistakes-jekyll"
}

options = Jekyll.configuration(options)

ENV["LISTEN_GEM_DEBUGGING"] = "1"
listener = Listen.to(
base.join("_data"),
base.join("_includes"),
base.join("_layouts"),
base.join("_sass"),
base.join("assets"),
options["source"],
:ignore => listen_ignore_paths(base, options),
:force_polling => options['force_polling'],
&(listen_handler(base, options))
)

begin
listener.start
Jekyll.logger.info "Auto-regeneration:", "enabled for '#{options["source"]}'"

unless options['serving']
trap("INT") do
listener.stop
puts " Halting auto-regeneration."
exit 0
end

loop { sleep 1000 }
end
rescue ThreadError
# You pressed Ctrl-C, oh my!
end

Jekyll::Commands::Serve.process(options)
end
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ defaults:
comments: false
share: false
related: false
classes: wide
#classes: wide
toc: true
toc_label: "Table of Contents"
toc_icon: "cog"
Expand Down
3 changes: 3 additions & 0 deletions _includes/analytics-providers/custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<!-- start custom analytics snippet -->

<!-- end custom analytics snippet -->
9 changes: 9 additions & 0 deletions _includes/analytics-providers/google-gtag.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.analytics.google.tracking_id }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', '{{ site.analytics.google.tracking_id }}', { 'anonymize_ip': {{ site.analytics.google.anonymize_ip | default: false }}});
</script>
7 changes: 7 additions & 0 deletions _includes/analytics-providers/google-universal.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script>
window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;
ga('create','{{ site.analytics.google.tracking_id }}','auto');
ga('set', 'anonymizeIp', {{ site.analytics.google.anonymize_ip | default: false }});
ga('send','pageview')
</script>
<script src="https://www.google-analytics.com/analytics.js" async></script>
14 changes: 14 additions & 0 deletions _includes/analytics-providers/google.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{{ site.analytics.google.tracking_id }}']);
{% if site.analytics.google.anonymize_ip == true %}
_gaq.push(['_gat._anonymizeIp']);
{% endif %}
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
14 changes: 14 additions & 0 deletions _includes/analytics.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{% if jekyll.environment == 'production' and site.analytics.provider and page.analytics != false %}

{% case site.analytics.provider %}
{% when "google" %}
{% include /analytics-providers/google.html %}
{% when "google-universal" %}
{% include /analytics-providers/google-universal.html %}
{% when "google-gtag" %}
{% include /analytics-providers/google-gtag.html %}
{% when "custom" %}
{% include /analytics-providers/custom.html %}
{% endcase %}

{% endif %}
30 changes: 30 additions & 0 deletions _includes/archive-single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{% if post.header.teaser %}
{% capture teaser %}{{ post.header.teaser }}{% endcapture %}
{% else %}
{% assign teaser = site.teaser %}
{% endif %}

{% if post.id %}
{% assign title = post.title | markdownify | remove: "<p>" | remove: "</p>" %}
{% else %}
{% assign title = post.title %}
{% endif %}

<div class="{{ include.type | default: 'list' }}__item">
<article class="archive__item" itemscope itemtype="https://schema.org/CreativeWork">
{% if include.type == "grid" and teaser %}
<div class="archive__item-teaser">
<img src="{{ teaser | relative_url }}" alt="">
</div>
{% endif %}
<h2 class="archive__item-title no_toc" itemprop="headline">
{% if post.link %}
<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>
{% else %}
<a href="{{ post.url | relative_url }}" rel="permalink">{{ title }}</a>
{% endif %}
</h2>
{% include page__meta.html type=include.type %}
{% if post.excerpt %}<p class="archive__item-excerpt" itemprop="description">{{ post.excerpt | markdownify | strip_html | truncate: 160 }}</p>{% endif %}
</article>
</div>
7 changes: 7 additions & 0 deletions _includes/author-profile-custom-links.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
<li>
<a href="http://link-to-whatever-social-network.com/user/" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<i class="fas fa-fw" aria-hidden="true"></i> Custom Social Profile Link
</a>
</li>
-->
Loading

0 comments on commit 6b78adf

Please sign in to comment.