Skip to content

Commit db4dcea

Browse files
committed
Lots of style updates
1 parent 6c7ba1b commit db4dcea

File tree

14 files changed

+194
-77
lines changed

14 files changed

+194
-77
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
21
# Jekyll Boilerplate
32

43
Create your Jekyll blog in minutes.
54

6-
A clean, one-column theme from which to kick off your Jekyll blog.
5+
A clean, one-column theme from which to kick off your Jekyll blog.

_config.yml

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,37 @@
1+
#
2+
# This file contains configuration flags to customize your site
3+
#
4+
5+
# The name of your site
16
name: Jekyll Boilerplate
27

3-
markdown: redcarpet
4-
markdown_ext: md
8+
# A short bio or description
9+
description: Short bio of description placeholder.
10+
11+
# A URL pointing to your avatar or profile pic
12+
# To use your Gravatar: (the one that GitHub uses for your profile pic)
13+
# 1. Go to https://github.com/YOURUSERNAME/
14+
# 2. Right click > Copy Image URL on your profile pic,
15+
# 3. Take the first long ID from the URL and paste it in place of mine below
16+
avatar: http://www.gravatar.com/avatar/36b4f56a7fa40d3c06e5afc4ed0b82b5?s=200
17+
18+
# Your disqus username, if you'd like blog commenting
19+
disqus:
20+
21+
# Your Google Analytics web tracking code (e.g. UA-2110908-2)
22+
google_analytics:
23+
24+
# Links used for your social icons
25+
links:
26+
github: https://github.com/YOUR-USERNAME
27+
twitter: https://twitter.com/YOUR-USERNAME
28+
#linkedin: https://linkedin.com/in/YOUR-USERNAME
529

6-
pygments: true
30+
markdown: redcarpet
731

32+
# Exclude these files from your production _site
833
exclude:
934
- Gemfile
1035
- Gemfile.lock
1136
- scss
12-
- js
13-
- README.md
14-
15-
disqus:
16-
shortname: ''
17-
18-
googleanalytics:
19-
id: ''
20-
21-
links:
22-
#github: https://github.com/YOUR-USERNAME
23-
#twitter: https://twitter.com/YOUR-USERNAME
24-
#linkedin: https://linkedin.com/in/YOUR-USERNAME
25-
#avatar: http://YOUR-USERNAME.github.io/images/avatar.jpg
37+
- README.md

_includes/analytics.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<script type="text/javascript">
33

44
var _gaq = _gaq || [];
5-
_gaq.push(['_setAccount', '{{ site.googleanalytics.id }}']);
5+
_gaq.push(['_setAccount', '{{ site.google_analytics }}']);
66
_gaq.push(['_trackPageview']);
77

88
(function() {

_includes/disqus.html

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
<div id="disqus_thread"></div>
22
<script type="text/javascript">
3-
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
4-
var disqus_shortname = '{{ site.disqus.shortname }}'; // required: replace example with your forum shortname
3+
{% if include.disqus %}
54

6-
{% if include.disqus_identifier %}
7-
var disqus_identifier = "{{ include.disqus_identifier }}";
8-
{% endif %}
5+
var disqus_shortname = '{{ site.disqus }}';
96

10-
(function() {
11-
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
12-
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
13-
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
14-
})();
15-
</script>
7+
(function() {
8+
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
9+
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
10+
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
11+
})();
12+
{% endif %}
13+
</script>
1614
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>

_layouts/default.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@
2020
</head>
2121

2222
<body>
23-
<header>
24-
<a href="/" class="logo"><img src="/404.ups" />{{ site.name }}</a>
23+
<header class="masthead">
24+
<img src="{{ site.avatar }}" class="avatar" />
25+
<a href="/" class="name">{{ site.name }}</a>
26+
<p class="description">{{ site.description }}</p>
2527

2628
<nav>
2729
<a href="/">Blog</a>

_layouts/page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
---
44

55
<article class="page">
6-
<h1>{{ page.title }}</h1>
6+
<header><h1>{{ page.title }}</h1></header>
77

88
<div class="entry">
99
{{ content }}

_layouts/post.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
---
44

55
<article class="post">
6-
<h1>{{ page.title }}</h1>
6+
<header>
7+
<h1>{{ page.title }}</h1>
8+
</header>
79

810
<div class="entry">
911
{{ content }}
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
layout: post
3+
title: Jekyll The Easy Way
4+
---
5+
6+
I just migrated my blog over to this Jekyll powered static site that you're currently reading. Finding a good workflow with Jekyll took me longer than I expected.
7+
8+
When you understand how Jekyll works, it's _extremely_ fast to set up. However when learning I came across lot of articles, repos and stack overflow threads that made the setup much more complicated than it needs to be.
9+
10+
![cool code image aww yea](/images/omg-code.jpg)
11+
12+
### Jekyll is built for one specific purpose
13+
14+
Tom Preston Warner of Github build Jekyll to [[INSERT HERE EXCERT FROM TPW's blog]]
15+
16+
This also the way that Jekyll was built to be used!
17+
18+
It was built for one purpose. To make blogging on Github Pages extremely quick and easy.
19+
20+
If you want more than a simple blog hosted on Github Pages, don't use Jekyll! Sure, it can be used for other things too. But if you try to use them for those, you're probably going to have a bad time.
21+
22+
### Use your named account on Github Pages (barryclark.github.io)
23+
24+
This eliminates the need for a seperate gh-pages branch workflow, making things really simple!
25+
26+
You just commit your Jekyll layout files and your markdown blog posts and content to the master branch of your barryclark.github.io, and Github Pages AUTOMATICALLY compiles it.
27+
28+
Fun fact: Github Pages processes ALL files through Jekyll. You mostly just don't notice this if you're using Github Pages for static content as flat .html content just passes through and doesn't get compiled.
29+
30+
If you wanted to, you wouldn't actually ever hard to install or run jekyll locally. You could just push up to your barryclark.github.io and everything would be taken care of for you.
31+
32+
That is awesome. And that's the first way that Jekyll is supposed to be used.
33+
34+
### Don't use plugins
35+
36+
Github Pages builds Jekyll sites in "safe mode". This means that when compiling your site, Github Pages won't run any of your plugins, it'll only use the standard Jekyll build. If you want to use plugins to
37+
38+
That means you can't compile SASS, etc, etc.
39+
40+
Using plugins means that you can't use your Github Pages account. There are other ways to do this. But they add lots of extra complexity.
41+
42+
### Pre-process css/js yourself
43+
44+
Use a guard or grunt script while you're theming. Don't try to do it within the jekyll build process.
45+
46+
You should be using grunt anyway.
47+
48+
Then just push the .css and .js and Jekyll will have no problems with it. No need to install jekyll-asset-manager, which has a whole host of complications with it.
49+
50+
### Have a workflow for blogging, and a separate workflow for theming
51+
52+
Updating content is CRAZY easy... and that's the whole point of Jekyll. You just write a markdown post and commit it to the repo, and you're done. Amazing.
53+
54+
2 of the simplest theming workflows I found:
55+
56+
- Build your site statically and theme that.
57+
-
58+
59+
Don't try to mix things in to the jekyll build process. It's not worth it, and you likely won't be able to use that workflow on barryclark.github.io
60+
61+
### To get started, fork a good repo
62+
63+
Following all of the about tips, you'll have a much easier time setting up Jekyll... and hell, if you want to do some fancy things, add them in later.
64+
65+
There are a number of repos that already follow the rules above. Forking one of them will put you on the right tracks, and save you a TON of time. You'll be able to get up and running extremely quickly.
66+
67+
Give a list of my favorite repos to fork.
68+
69+
- Tom Preston Warner
70+
- Zach Holman
71+
72+
I've also shared my base theme repo, which abides by each of the things I've covered in this post. It includes grunt scripts to do your pre-processing, and the same layout as you see here on this blog, with easy options for customization.
73+
74+
- Mine (Jekyllstrap? Jekyll-base?) :>
75+
76+
### Forking Jekyllstrap
77+
78+
Give instructions on exactly how to fork the repo. Step through each step to have your Jekyll site running on your name.com domain name.
79+
80+
1. Fork
81+
2. Write your CSS
82+
3.
83+
84+
I should create this, and fork my own repo.
85+

about.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
layout: page
3+
title: About Me
4+
---
5+
6+
Some information about you!
7+
8+
### More Information
9+
10+
A place to include any other types of information that you'd like to include about yourself.
11+
12+
### Contact me
13+
14+

images/omg-code.jpg

61.6 KB
Loading

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
{% for post in site.posts %}
77
<article class="post">
88
<header>
9-
<h2>{{ post.title }}</h2>
9+
<h1>{{ post.title }}</h1>
1010
</header>
1111

12-
<div class="entry">{{ post.content | truncatewords:50}}</div>
12+
<div class="entry">{{ post.content | truncatewords:40}}</div>
1313

14-
<a href="{{ post.url }}">Read More</a>
14+
<a href="{{ post.url }}" class="read-more">Read More</a>
1515
</article>
1616
{% endfor %}
1717
</div>

scss/_variables.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ $black: #000;
1212
$darkerGray: #222;
1313
$darkGray: #333;
1414
$gray: #666;
15-
$lightGray: #bbb;
15+
$lightGray: #aaa;
1616
$lighterGray: #eee;
1717
$white: #fff;
1818

scss/style.scss

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,28 @@ html {
1717
}
1818

1919
body {
20-
max-width: 700px;
20+
max-width: 680px;
2121
margin: 0 auto;
2222

2323
background: $white;
2424
font: 18px/1.4 $helvetica;
2525
color: $darkGray;
2626
}
2727

28-
h1, h2, h3, h4, h5, h6, .section > header {
28+
h1, h2, h3, h4, h5, h6 {
2929
font-family: $helveticaNeue;
3030
color: $darkerGray;
31-
font-weight: bold;
31+
font-weight: 400;
3232

3333
line-height: 1.7;
34-
margin: 2em 0 15px;
34+
margin: 1em 0 15px;
3535
padding: 0;
3636
}
37-
37+
3838
h1 {
39-
font-size: 2rem;
39+
font-size: 2.2rem;
4040
@include mobile {
41-
font-size: 2rem;
41+
font-size: 2.2rem;
4242
}
4343
}
4444

@@ -86,6 +86,10 @@ ul {
8686
list-style-type: disc;
8787
}
8888

89+
img {
90+
max-width: 100%;
91+
}
92+
8993
// Specify the color of the selection
9094
::-moz-selection {
9195
color: $black;
@@ -101,10 +105,6 @@ ul {
101105
// LAYOUT / SECTIONS
102106
//
103107

104-
header {
105-
margin: 40px 0;
106-
}
107-
108108
.logo {
109109
float: left;
110110

@@ -118,6 +118,10 @@ header {
118118
}
119119
}
120120

121+
.avatar {
122+
border-radius: 6px;
123+
}
124+
121125
nav {
122126
float: right;
123127

@@ -154,13 +158,12 @@ nav {
154158
}
155159
}
156160

157-
.post {
158-
width: 680px;
159-
160-
@include mobile {
161-
width: 100%;
162-
}
161+
.posts > .post {
162+
padding-bottom: 2em;
163+
border-bottom: 1px solid $lighterGray;
164+
}
163165

166+
.post {
164167
blockquote {
165168
border-left: 2px solid $gray;
166169
font-size: 1.2em;

0 commit comments

Comments
 (0)