Skip to content

Commit 4ca7f75

Browse files
committed
Making a Github Pages theme out of it
1 parent e7da688 commit 4ca7f75

File tree

8 files changed

+97
-33
lines changed

8 files changed

+97
-33
lines changed

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

LICENSE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 Barry Clark
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

_config.yml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,39 @@ social_icons_background_color : "#e6e6e6"
8484

8585

8686
# Analytics
87-
google_analytics : # Enter Google Analytics tracking code (e.g. UA-2110908-2).
87+
google_analytics : # Enter Google Analytics tracking code (e.g. UA-2110908-2).
88+
89+
90+
91+
92+
93+
94+
95+
96+
97+
# If you're hosting your site at a Project repository on GitHub pages
98+
# (http://yourusername.github.io/repository-name)
99+
# and NOT your User repository (http://yourusername.github.io)
100+
# then add in the baseurl here, like this: "/repository-name"
101+
baseurl: ""
102+
103+
#
104+
# !! You don't need to change any of the configuration flags below !!
105+
#
106+
107+
permalink: /:title/
108+
109+
# The release of Mobile App Landing Page that you're using
110+
version: v1.0
111+
112+
# Set the Sass partials directory, as we're using @imports
113+
sass:
114+
style: :compressed # You might prefer to minify using :compressed
115+
116+
# Exclude these files from your production _site
117+
exclude:
118+
- Gemfile
119+
- Gemfile.lock
120+
- LICENSE
121+
- README.md
122+
- CNAME

_includes/analytics.html

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{% if site.google_analytics %}
2+
3+
<script>
4+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
5+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
6+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
7+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
8+
9+
ga('create', '{{ site.google_analytics }}', 'auto');
10+
ga('send', 'pageview', {
11+
'page': '{{ site.baseurl }}{{ page.url }}',
12+
'title': '{{ page.title | replace: "'", "\\'" }}'
13+
});
14+
</script>
15+
16+
{% endif %}
17+
18+
{% if site.google_analytics %}
19+
<!-- Google Analytics -->
20+
<script>
21+
window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;
22+
ga('create','{{ site.google_analytics }}','auto');ga('send','pageview')
23+
</script>
24+
<script src="https://www.google-analytics.com/analytics.js" async defer></script>
25+
26+
<script>
27+
// Automatically track all link clicks
28+
$(function() {
29+
$('body').on('click', 'a', function(e) {
30+
var url = $(this).attr('href');
31+
if (url) {
32+
console.info('GA link click event: ', url);
33+
ga('send', 'event', 'link', 'click', url);
34+
}
35+
});
36+
});
37+
</script>
38+
<!-- End Google Analytics -->
39+
{% endif %}

_includes/head.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,5 @@
1919
{% endif %}
2020

2121
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
22-
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
23-
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
22+
<link rel="stylesheet" href="{{ site.baseurl }}/main.css">
2423
</head>

_layouts/changelog.html

Lines changed: 0 additions & 15 deletions
This file was deleted.

_layouts/faq.html

Lines changed: 0 additions & 15 deletions
This file was deleted.

css/main.scss renamed to main.scss

File renamed without changes.

0 commit comments

Comments
 (0)