Skip to content

Commit c7f10b9

Browse files
committed
first commit
1 parent 6d0d5e2 commit c7f10b9

30 files changed

+1120
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
_site/
22
.sass-cache/
3+
.DS_Store

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015 Nick Balestra
3+
Copyright (c) 2015 Cactus Authors - https://github.com/koenbok/Cactus/blob/master/AUTHORS
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Cactus for Jekyll
2+
3+
This is a port of [Cactus](https://github.com/koenbok/Cactus)'s default theme for Jekyll.
4+
Feel free to fork, change, modify and re-use it.
5+
6+
[demo](http://nick.balestra.ch)
7+
8+
## How to use it
9+
10+
Simply clone this repository, and then run `jekyll serve` inside the directory.
11+
This theme is fully compliant with GH Pages and their dependencies.
12+
For extra info: [Using Jekyll with Pages](https://help.github.com/articles/using-jekyll-with-pages/#keeping-jekyll-up-to-date).
13+
14+
Cactus theme includes:
15+
16+
* Pagination
17+
* Rss feed
18+
* Google Analytics Tracking code
19+
* Code Syntax Highlight
20+
* Author's profile with picture header
21+
* Twitter/Facebook share buttons
22+
* Archive posts list under each post
23+
* Disqus comments
24+
25+
## Screenshots
26+
27+
![index page](https://raw.github.com/nickbalestra/kactus/master/assets/images/kactus-theme-index.png)
28+
![post page](https://raw.github.com/nickbalestra/kactus/master/assets/images/kactus-theme-post.png)
29+
30+
31+
## Thanks
32+
Most of the work has been already done by the [Cactus for mac authors](https://github.com/koenbok/Cactus/blob/master/AUTHORS), I've just ported their default theme to Jekyll.
33+
I've also added few things specific to Jekyll and some minor style changes.

_config.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Your New Jekyll Site
2+
description: Blogging about stuffs
3+
meta_description: "Your New Jekyll Site, Blogging about stuffs"
4+
5+
aboutPage: true
6+
7+
markdown: redcarpet
8+
highlighter: pygments
9+
10+
paginate: 20
11+
baseurl: /
12+
domain_name: 'http://yourblog-domain.com'
13+
google_analytics: 'UA-XXXXXXXX-X'
14+
disqus_shortname: 'your-disqus-shortname'
15+
16+
# Details for the RSS feed generator
17+
url: 'http://your-blog-url.example.com'
18+
author: 'Your Name'
19+
authorTwitter: 'YourTwitterUsername'
20+
21+
permalink: /:year/:title/
22+
23+
defaults:
24+
-
25+
scope:
26+
path: "" # empty string for all files
27+
type: pages
28+
values:
29+
layout: default
30+
-
31+
scope:
32+
path: "" # empty string for all files
33+
type: posts
34+
values:
35+
layout: post

_includes/disqus.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<section class="disqus">
2+
<div id="disqus_thread"></div>
3+
<script type="text/javascript">
4+
var disqus_shortname = '{{ site.disqus_shortname }}';
5+
var disqus_developer = 0; // developer mode is on
6+
(function() {
7+
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
8+
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
9+
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
10+
})();
11+
</script>
12+
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
13+
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
14+
</section>

_includes/footer.html

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<footer id="footer">
2+
<p class="small">© Copyright {{ site.time | date: '%Y' }} {{ site.author }}</p>
3+
</footer>

_includes/navigation.html

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<nav class="main-nav">
2+
{% if page.url != "/index.html" %}
3+
<a href='{{ site.baseurl }}{{ page.about }}'> <span class="arrow"></span> Home </a>
4+
{% endif %}
5+
6+
{% if page.url != "/about/" %}
7+
{% if site.aboutPage %}
8+
<a href='{{ site.baseurl }}about'>About </a>
9+
{% endif %}
10+
{% endif %}
11+
<a class="cta" href="{{ site.baseurl }}feed.xml">Subscribe</a>
12+
</nav>

_includes/pagination.html

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<nav id="post-nav">
2+
{% if paginator.previous_page %}
3+
<span class="prev">
4+
{% if paginator.previous_page == 1 %}
5+
<a href="/" title="Previous Page">
6+
<span class="arrow"></span> Newer Posts
7+
</a>
8+
{% else %}
9+
<a href="/page{{ paginator.previous_page }}/">
10+
<span class="arrow"></span> Newer Posts
11+
</a>
12+
{% endif %}
13+
</span>
14+
{% endif %}
15+
{% if paginator.next_page %}
16+
<span class="next">
17+
<a href="/page{{ paginator.next_page }}/">
18+
Older Posts <span class="arrow"></span>
19+
</a>
20+
</span>
21+
{% endif %}
22+
</nav>

_includes/post-list.html

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<ul id="post-list">
2+
{% for post in paginator.posts %}
3+
<li>
4+
<a href='{{ post.url }}'><aside class="dates">{{ post.date | date:"%b %d" }}</aside></a>
5+
<a href='{{ post.url }}'>{{ post.title }} <h2>{{ post.description }}</h2></a>
6+
</li>
7+
{% endfor %}
8+
</ul>
9+
10+
{% if paginator.previous_page or paginator.next_page %}
11+
{% include pagination.html %}
12+
{% endif %}

_includes/profile.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<div class="profile">
2+
<section id="wrapper">
3+
<header id="header">
4+
<a href='{{ site.baseurl }}about'>
5+
<img id="avatar" class="2x" src="/assets/images/avatar.png"/>
6+
</a>
7+
<h1>{{ site.author }}</h1>
8+
<h2>{{ site.description }}</h2>
9+
</header>
10+
</section>
11+
</div>

_includes/share.html

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<a class="twitter" href="https://twitter.com/intent/tweet?text={{ site.baseurl }}{{ page.url }} - {{page.title}} by @{{ site.authorTwitter }}"><span class="icon-twitter"> Tweet</span></a>
2+
3+
<a class="facebook" href="#" onclick="
4+
window.open(
5+
'https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(location.href),
6+
'facebook-share-dialog',
7+
'width=626,height=436');
8+
return false;"><span class="icon-facebook-rect"> Share</span>
9+
</a>

_layouts/default.html

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
8+
<title>{{ site.name }}{% if page.title %} - {{ page.title }}{% endif %}</title>
9+
<link rel="shortcut icon" href="/assets/images/favicon.ico">
10+
<link rel="stylesheet" href="/assets/css/style.css">
11+
<link rel="alternate" type="application/rss+xml" title="My Blog" href="/rss.xml">
12+
<link rel="stylesheet" href="/assets/css/highlight.css">
13+
</head>
14+
<body>
15+
16+
{% include navigation.html %}
17+
18+
{% if page.profile %}
19+
{% include profile.html %}
20+
{% endif %}
21+
22+
<section id="wrapper" class="{% if page.profile %}home{% endif %}">
23+
{{ content }}
24+
</section>
25+
26+
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
27+
<script src="/assets/js/main.js"></script>
28+
<script src="/assets/js/highlight.js"></script>
29+
<script>hljs.initHighlightingOnLoad();</script>
30+
31+
<script>
32+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
33+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
34+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
35+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
36+
37+
ga('create', '{{ site.google_analytics }}', 'auto');
38+
ga('send', 'pageview');
39+
</script>
40+
</body>
41+
</html>
42+
43+
44+

_layouts/post.html

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
layout: default
3+
disqus: false
4+
archive: true
5+
---
6+
7+
<article class="post">
8+
<header>
9+
<h1>{{ page.title }}</h1>
10+
<h2 class="headline">{{ page.date | date:"%B %-d, %Y" }}</h2>
11+
</header>
12+
<section id="post-body">
13+
{{content}}
14+
</section>
15+
</article>
16+
<footer id="post-meta" class="clearfix">
17+
<a href="http://twitter.com/{{ site.authorTwitter }}">
18+
<img class="avatar" src="/assets/images/avatar.png">
19+
<div>
20+
<span class="dark">{{ site.author }}</span>
21+
<span>{{ site.description }}</span>
22+
</div>
23+
</a>
24+
25+
<section id="sharing">
26+
{% include share.html %}
27+
</section>
28+
</footer>
29+
30+
<!-- Disqus comments -->
31+
{% if page.disqus %}
32+
<div class="archive readmore">
33+
<h3>Comments</h3>
34+
{% include disqus.html %}
35+
</div>
36+
{% endif %}
37+
38+
<!-- Archive post list -->
39+
{% if page.archive %}
40+
<ul id="post-list" class="archive readmore">
41+
<h3>Read more</h3>
42+
{% for post in site.posts %}
43+
<li>
44+
<a href="{{ post.url }}">{{ post.title }}<aside class="dates">{{ post.date | date:"%b %d" }}</aside></a>
45+
</li>
46+
{% endfor %}
47+
</ul>
48+
{% endif %}
49+
50+
51+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: "Welcome to Jekyll!"
3+
date: 2013-11-10 10:18:00
4+
description: Thriller Comedy Horror
5+
---
6+
7+
You'll find this post in your `_posts` directory - edit this post and re-build (or run with the `-w` switch) to see your changes!
8+
To add new posts, simply add a file in the `_posts` directory that follows the convention: YYYY-MM-DD-name-of-post.ext.
9+
10+
Jekyll also offers powerful support for code snippets:
11+
12+
{% highlight ruby %}
13+
def print_hi(name)
14+
puts "Hi, #{name}"
15+
end
16+
print_hi('Tom')
17+
#=> prints 'Hi, Tom' to STDOUT.
18+
{% endhighlight %}
19+
20+
Check out the [Jekyll docs][jekyll] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll's GitHub repo][jekyll-gh].
21+
22+
[jekyll-gh]: https://github.com/mojombo/jekyll
23+
[jekyll]: http://jekyllrb.com

about.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: About
3+
permalink: about/
4+
profile: true
5+
---
6+
7+
This is a static page. It could be an 'about page' if you'd like.
8+
9+
{% include footer.html %}

0 commit comments

Comments
 (0)