Skip to content

Commit 087939c

Browse files
authored
Cleanup of Site Files (#65)
* Remove trailing white-space from lines. * Update text files to have a single blank line at EOF. * Fix HTML quoting. * Convert inconsistent indentation character to double spaces. * Correct files readability indentations, white-space, and tags. * Fixing URLs, protocols and domains. * Added missing favicon file. * Enhance 404 page. * Updated development environment to add `lessc` and `github-pages` gem. * Updated `less` files to perform explicit math (as the CLI math option is being deprecated). * Updated page layout: - Updated `html`,`body`, `.body`, and `.unit-body` to have full height - Updated `.body` to fix 1 pixel width overflow * Update pagination layout on posts.
1 parent 8fff55d commit 087939c

Some content is hidden

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

53 files changed

+1166
-1049
lines changed

.github/move.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ closeSourceIssue: true
77
# Lock the source issue after moving
88
lockSourceIssue: false
99
# Set custom aliases for targets
10-
aliases:
11-
main: bpkg/bpkg
10+
aliases:
11+
main: bpkg/bpkg
1212

1313
#EOF

404.html

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,57 @@
1-
Sorry this page does not exist =(
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>404 - Page Not Found - BPKG</title>
5+
<style>
6+
@font-face {
7+
font-family: 'UbuntuMono-B';
8+
src: url('/assets/themes/the-program/font/UbuntuMono-B-webfont.eot');
9+
src: url('/assets/themes/the-program/font/UbuntuMono-B-webfont.eot?#iefix') format('embedded-opentype'),
10+
url('/assets/themes/the-program/font/UbuntuMono-B-webfont.woff') format('woff'),
11+
url('/assets/themes/the-program/font/UbuntuMono-B-webfont.ttf') format('truetype'),
12+
url('/assets/themes/the-program/font/UbuntuMono-B-webfont.svg#UbuntuMono-B') format('svg');
13+
font-weight: normal !important;
14+
font-style: normal;
15+
}
16+
html, body {
17+
background: black;
18+
height: 100%;
19+
margin: 0;
20+
color: rgba(255,255,255,0.75);
21+
font-family: UbuntuMono-B;
22+
font-size: 32px;
23+
font-size: 3vw;
24+
}
25+
.center-middle {
26+
align-items: center;
27+
display: flex;
28+
height: 100%;
29+
justify-content: center;
30+
}
31+
p {
32+
margin: 0;
33+
text-align: center;
34+
line-height: 3vi;
35+
}
36+
.sorry {
37+
font-size: 2.25vw;
38+
}
39+
.pnf {
40+
font-family: 'Courier New', Courier, monospace;
41+
}
42+
img {
43+
filter: invert(75%);
44+
height: 50vmin;
45+
}
46+
</style>
47+
</head>
48+
<body>
49+
<div class="center-middle">
50+
<p>
51+
<img src="/assets/logo.svg" /><br />
52+
<span class="sorry">Sorry this page does not exist =(</span><br />
53+
<span class="pnf">404 - Page Not Found</span>
54+
</p>
55+
</div>
56+
</body>
57+
</html>

CNAME

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
bpkg.sh
1+
bpkg.sh

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Alternative way to create a new page, on this case it will be `./about.html`.
111111
This site uses [Jekyll Bootstrap][boots] with a heavily customized version of
112112
[the_program][theme] theme, originally made by [Yuya Saito][saito].
113113

114-
[home]: http://bpkg.sh/
114+
[home]: https://bpkg.sh/
115115
[hub]: https://github.com/bpkg/bpkg
116116
[org]: https://github.com/bpkg
117117
[jekyll]: http://jekyllrb.com/

Rakefile

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module JB
2424
:theme_packages => "_theme_packages",
2525
:posts => "_posts"
2626
}
27-
27+
2828
def self.base
2929
SOURCE
3030
end
@@ -36,7 +36,7 @@ module JB
3636
path.compact!
3737
File.__send__ :join, path
3838
end
39-
39+
4040
end #Path
4141
end #JB
4242

@@ -59,7 +59,7 @@ task :post do
5959
if File.exist?(filename)
6060
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
6161
end
62-
62+
6363
puts "Creating new post: #{filename}"
6464
open(filename, 'w') do |post|
6565
post.puts "---"
@@ -85,7 +85,7 @@ task :page do
8585
if File.exist?(filename)
8686
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
8787
end
88-
88+
8989
mkdir_p File.dirname(filename)
9090
puts "Creating new page: #{filename}"
9191
open(filename, 'w') do |post|
@@ -107,7 +107,7 @@ end # task :preview
107107
task :switch_theme => "theme:switch"
108108

109109
namespace :theme do
110-
110+
111111
# Public: Switch from one theme to another for your blog.
112112
#
113113
# name - String, Required. name of the theme you want to switch to.
@@ -142,16 +142,16 @@ namespace :theme do
142142
page.puts "---"
143143
page.puts "layout: default"
144144
page.puts "---"
145-
end
145+
end
146146
page.puts "{% include JB/setup %}"
147-
page.puts "{% include themes/#{theme_name}/#{File.basename(filename)} %}"
147+
page.puts "{% include themes/#{theme_name}/#{File.basename(filename)} %}"
148148
end
149149
end
150-
150+
151151
puts "=> Theme successfully switched!"
152152
puts "=> Reload your web-page to check it out =)"
153153
end # task :switch
154-
154+
155155
# Public: Install a theme using the theme packager.
156156
# Version 0.1.0 simple 1:1 file matching.
157157
#
@@ -175,28 +175,28 @@ namespace :theme do
175175
end
176176

177177
packaged_theme_path = JB::Path.build(:theme_packages, :node => name)
178-
178+
179179
abort("rake aborted!
180180
=> ERROR: 'name' cannot be blank") if name.empty?
181-
abort("rake aborted!
181+
abort("rake aborted!
182182
=> ERROR: '#{packaged_theme_path}' directory not found.
183183
=> Installable themes can be added via git. You can find some here: http://github.com/jekyllbootstrap
184184
=> To download+install run: `rake theme:install git='[PUBLIC-CLONE-URL]'`
185185
=> example : rake theme:install git='[email protected]:jekyllbootstrap/theme-the-program.git'
186186
") unless FileTest.directory?(packaged_theme_path)
187-
187+
188188
manifest = verify_manifest(packaged_theme_path)
189-
189+
190190
# Get relative paths to packaged theme files
191191
# Exclude directories as they'll be recursively created. Exclude meta-data files.
192192
packaged_theme_files = []
193193
FileUtils.cd(packaged_theme_path) {
194-
Dir.glob("**/*.*") { |f|
194+
Dir.glob("**/*.*") { |f|
195195
next if ( FileTest.directory?(f) || f =~ /^(manifest|readme|packager)/i )
196-
packaged_theme_files << f
196+
packaged_theme_files << f
197197
}
198198
}
199-
199+
200200
# Mirror each file into the framework making sure to prompt if already exists.
201201
packaged_theme_files.each do |filename|
202202
file_install_path = File.join(JB::Path.base, filename)
@@ -207,7 +207,7 @@ namespace :theme do
207207
cp_r File.join(packaged_theme_path, filename), file_install_path
208208
end
209209
end
210-
210+
211211
puts "=> #{name} theme has been installed!"
212212
puts "=> ---"
213213
if ask("=> Want to switch themes now?", ['y', 'n']) == 'y'
@@ -220,7 +220,7 @@ namespace :theme do
220220
# In other words packaging is essentially the reverse of installing.
221221
#
222222
# name - String, Required name of the theme you want to package.
223-
#
223+
#
224224
# Examples
225225
#
226226
# rake theme:package name="twitter"
@@ -235,12 +235,12 @@ namespace :theme do
235235
abort("rake aborted: name cannot be blank") if name.empty?
236236
abort("rake aborted: '#{theme_path}' directory not found.") unless FileTest.directory?(theme_path)
237237
abort("rake aborted: '#{asset_path}' directory not found.") unless FileTest.directory?(asset_path)
238-
238+
239239
## Mirror theme's template directory (_includes)
240240
packaged_theme_path = JB::Path.build(:themes, :root => JB::Path.build(:theme_packages, :node => name))
241241
mkdir_p packaged_theme_path
242242
cp_r theme_path, packaged_theme_path
243-
243+
244244
## Mirror theme's asset directory
245245
packaged_theme_assets_path = JB::Path.build(:theme_assets, :root => JB::Path.build(:theme_packages, :node => name))
246246
mkdir_p packaged_theme_assets_path
@@ -251,18 +251,18 @@ namespace :theme do
251251
open(JB::Path.build(:theme_packages, :node => "#{name}/packager.yml"), "w") do |page|
252252
page.puts packager.to_yaml
253253
end
254-
254+
255255
puts "=> '#{name}' theme is packaged and available at: #{JB::Path.build(:theme_packages, :node => name)}"
256256
end
257-
257+
258258
end # end namespace :theme
259259

260260
# Internal: Download and process a theme from a git url.
261261
# Notice we don't know the name of the theme until we look it up in the manifest.
262262
# So we'll have to change the folder name once we get the name.
263263
#
264264
# url - String, Required url to git repository.
265-
#
265+
#
266266
# Returns theme manifest hash
267267
def theme_from_git_url(url)
268268
tmp_path = JB::Path.build(:theme_packages, :node => "_tmp")
@@ -282,7 +282,7 @@ end
282282
# Internal: Process theme package manifest file.
283283
#
284284
# theme_path - String, Required. File path to theme package.
285-
#
285+
#
286286
# Returns theme manifest hash
287287
def verify_manifest(theme_path)
288288
manifest_path = File.join(theme_path, "manifest.yml")

_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ exclude: [
5858
# Else if you are pushing to username.github.io, replace with your username.
5959
# Finally if you are pushing to a GitHub project page, include the project name at the end.
6060
#
61-
production_url : http://bpkg.github.io
61+
production_url : https://bpkg.sh/
6262

6363
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
6464
# Jekyll-Bootstrap specific configurations
@@ -165,4 +165,4 @@ JB :
165165
# where [HELPER] is the name of the helper you are overriding.
166166

167167

168-
theme: jekyll-theme-minimal
168+
theme: jekyll-theme-minimal

_includes/JB/analytics

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
{% include custom/analytics %}
1414
{% endcase %}
1515

16-
{% endif %}
16+
{% endif %}
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<script type="text/javascript">
2-
var clicky_site_ids = clicky_site_ids || [];
3-
clicky_site_ids.push({{ site.JB.analytics.getclicky.site_id }});
4-
(function() {
5-
var s = document.createElement('script');
6-
s.type = 'text/javascript';
7-
s.async = true;
8-
s.src = '//static.getclicky.com/js';
9-
( document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0] ).appendChild( s );
10-
})();
2+
var clicky_site_ids = clicky_site_ids || [];
3+
clicky_site_ids.push({{ site.JB.analytics.getclicky.site_id }});
4+
(function() {
5+
var s = document.createElement('script');
6+
s.type = 'text/javascript';
7+
s.async = true;
8+
s.src = '//static.getclicky.com/js';
9+
( document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0] ).appendChild( s );
10+
})();
1111
</script>
1212
<noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/{{ site.JB.analytics.getclicky.site_id }}ns.gif" /></p></noscript>

_includes/JB/analytics-providers/google

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
99
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
1010
})();
11-
</script>
11+
</script>
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<script type="text/javascript">
2-
var mpq = [];
3-
mpq.push(["init", "{{ site.JB.analytics.mixpanel.token}}"]);
4-
(function(){var b,a,e,d,c;b=document.createElement("script");b.type="text/javascript";
5-
b.async=true;b.src=(document.location.protocol==="https:"?"https:":"http:")+
6-
"//api.mixpanel.com/site_media/js/api/mixpanel.js";a=document.getElementsByTagName("script")[0];
7-
a.parentNode.insertBefore(b,a);e=function(f){return function(){mpq.push(
8-
[f].concat(Array.prototype.slice.call(arguments,0)))}};d=["init","track","track_links",
9-
"track_forms","register","register_once","identify","name_tag","set_config"];for(c=0;c<
10-
d.length;c++){mpq[d[c]]=e(d[c])}})();
11-
</script>
2+
var mpq = [];
3+
mpq.push(["init", "{{ site.JB.analytics.mixpanel.token}}"]);
4+
(function(){var b,a,e,d,c;b=document.createElement("script");b.type="text/javascript";
5+
b.async=true;b.src=(document.location.protocol==="https:"?"https:":"http:")+
6+
"//api.mixpanel.com/site_media/js/api/mixpanel.js";a=document.getElementsByTagName("script")[0];
7+
a.parentNode.insertBefore(b,a);e=function(f){return function(){mpq.push(
8+
[f].concat(Array.prototype.slice.call(arguments,0)))}};d=["init","track","track_links",
9+
"track_forms","register","register_once","identify","name_tag","set_config"];for(c=0;c<
10+
d.length;c++){mpq[d[c]]=e(d[c])}})();
11+
</script>
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<script type="text/javascript">
2-
var pkBaseURL = (("https:" == document.location.protocol) ? "https://{{ site.JB.analytics.piwik.baseURL }}/" : "http://{{ site.JB.analytics.piwik.baseURL }}/");
3-
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
4-
</script><script type="text/javascript">
2+
var pkBaseURL = ('https:' == document.location.protocol ? 'https:' : 'http:') + '//{{ site.JB.analytics.piwik.baseURL }}/';
3+
document.write(unescape('%3Cscript src="' + pkBaseURL + 'piwik.js" type="text/javascript"%3E%3C/script%3E'));
4+
</script>
5+
<script type="text/javascript">
56
try {
6-
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", {{ site.JB.analytics.piwik.idsite }});
7+
var piwikTracker = Piwik.getTracker(pkBaseURL + 'piwik.php', {{ site.JB.analytics.piwik.idsite }});
78
piwikTracker.trackPageView();
89
piwikTracker.enableLinkTracking();
910
} catch( err ) {}
10-
</script><noscript><p><img src="http://{{ site.JB.analytics.piwik.baseURL }}/piwik.php?idsite={{ site.JB.analytics.piwik.idsite }}" style="border:0" alt="" /></p></noscript>
11+
</script>
12+
<noscript><p><img src="//{{ site.JB.analytics.piwik.baseURL }}/piwik.php?idsite={{ site.JB.analytics.piwik.idsite }}" style="border:0" alt="" /></p></noscript>

_includes/JB/categories_list

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,33 @@ Usage:
55
2) include JB/categories_list
66
example:
77
<ul>
8-
{% assign categories_list = site.categories %}
9-
{% include JB/categories_list %}
10-
</ul>
11-
12-
Notes:
8+
{% assign categories_list = site.categories %}
9+
{% include JB/categories_list %}
10+
</ul>
11+
12+
Notes:
1313
Categories can be either a Hash of Category objects (hashes) or an Array of category-names (strings).
1414
The encapsulating 'if' statement checks whether categories_list is a Hash or Array.
1515
site.categories is a Hash while page.categories is an array.
16-
16+
1717
This helper can be seen in use at: ../_layouts/default.html
1818
-->{% endcomment %}
1919

2020
{% if site.JB.categories_list.provider == "custom" %}
2121
{% include custom/categories_list %}
2222
{% else %}
2323
{% if categories_list.first[0] == null %}
24-
{% for category in categories_list %}
25-
<li><a href="{{ BASE_PATH }}{{ site.JB.categories_path }}#{{ category }}-ref">
26-
{{ category | join: "/" }} <span>{{ site.categories[category].size }}</span>
27-
</a></li>
24+
{% for category in categories_list %}
25+
<li><a href="{{ BASE_PATH }}{{ site.JB.categories_path }}#{{ category }}-ref">
26+
{{ category | join: "/" }} <span>{{ site.categories[category].size }}</span>
27+
</a></li>
2828
{% endfor %}
2929
{% else %}
30-
{% for category in categories_list %}
31-
<li><a href="{{ BASE_PATH }}{{ site.JB.categories_path }}#{{ category[0] }}-ref">
32-
{{ category[0] | join: "/" }} <span>{{ category[1].size }}</span>
33-
</a></li>
30+
{% for category in categories_list %}
31+
<li><a href="{{ BASE_PATH }}{{ site.JB.categories_path }}#{{ category[0] }}-ref">
32+
{{ category[0] | join: "/" }} <span>{{ category[1].size }}</span>
33+
</a></li>
3434
{% endfor %}
3535
{% endif %}
3636
{% endif %}
37-
{% assign categories_list = nil %}
37+
{% assign categories_list = nil %}

_includes/JB/comments

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
{% include custom/comments %}
1414
{% endcase %}
1515

16-
{% endif %}
16+
{% endif %}

0 commit comments

Comments
 (0)