Skip to content

Commit

Permalink
reorder tags, style and content changes
Browse files Browse the repository at this point in the history
  • Loading branch information
acousticrobot committed Dec 2, 2015
1 parent cac5b4d commit 9774a96
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 32 deletions.
27 changes: 27 additions & 0 deletions _includes/comments.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{% if page.comments %}

<div id="disqus_thread"></div>
<script>
/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables
*/

var disqus_config = function () {
//this.disqus_developer = 1;
this.page.url = "{{ page.url | prepend: site.url }}"; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = "{{ page.url }}"; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};

(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');

s.src = '//jonathangabel.disqus.com/embed.js';

s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>

{% endif %}
2 changes: 2 additions & 0 deletions _includes/sub_nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<nav class="sub-nav__nav-bar">
{% if page.url_previous %}
<div class="sub-nav__left-nav-button"><a href="{{ page.url_previous }}">previous {{ page.sub_nav_term_for }}</a></div>
{% else %}
<div class="sub_nav__ghost_spacer"></div>
{% endif %}
{% if page.url_next %}
<div class="sub-nav__right-nav-button"><a href="{{ page.url_next }}">next {{ page.sub_nav_term_for }}</a></div>
Expand Down
4 changes: 3 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
{{ content }}
</div>

{% if page.tags %}
{% include comments.html %}

{% if page.tags != empty %}
<footer class="footer__tag-list">
<span>See more on:</span>

Expand Down
12 changes: 4 additions & 8 deletions _pages/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ layout: page

##### About This Site

This is the website of Jonathan Gabel.

This version was initialized on August 25, 2015, and replaces a WordPress site that ran from Jun 11, 2012 until December 2015.

The current site is built using [Jekyll](http://jekyllrb.com/) and is committed on [Github](https://github.com/josankapo)
This is the website of Jonathan Gabel. This version was initialized on August 25, 2015, and replaces a WordPress site that ran from Jun 11, 2012 until December 2015.The current site is built using [Jekyll](http://jekyllrb.com/) and is committed on [Github](https://github.com/josankapo)

You can contact me directly at: hello [at] jonathangabel [dot] com

Expand All @@ -21,8 +17,8 @@ You can contact me directly at: hello [at] jonathangabel [dot] com

* {{ page.posts_count }} posts
* {{ page.pages_count }} pages
* {{ site.data.all_tags | size }} tags
* {{ site.data.old_sitemap | size }} old site pages archived or redesigned
* {{ page.artworks_count }} artwork pages
* [{{ site.data.all_tags | size }} tags](/tags/)
* [{{ site.data.old_sitemap | size }} old site pages archived](/archive/2012)
* [{{ page.artworks_count }} artwork pages](/artworks)

---
2 changes: 1 addition & 1 deletion _pages/feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ index: false
<title>{{ site.title | xml_escape }}</title>
<description>{{ site.description | xml_escape }}</description>
<link>{{ site.url }}{{ site.baseurl }}/</link>
<atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
<atom:link href="{{ "/feed.xml" | prepend: site.url }}" rel="self" type="application/rss+xml"/>
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
<generator>Jekyll v{{ jekyll.version }}</generator>
Expand Down
24 changes: 11 additions & 13 deletions _plugins/_tags.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,37 @@ module Jekyll

# The list of pages and posts for each tag
# modified from: https://github.com/jekyll/jekyll-help/issues/279
# (altered to add pages after posts, for temporal relavency)
class TagsGenerator < Generator
priority :low

def generate(site)
site.data['all_tags'] = prepend_page_tags_to_post_tags(site)
site.data['all_tags'] = add_page_tags_to_post_tags(site)
end

# Returns a hash of pages and posts indexed by tags.
# Returns a hash of posts and pages indexed by tags.
#
# Example:
# {
# 'tech' => [<Page A>, <Page B>, <Post A>, <Post B>],
# 'tech' => [<Post A>, <Post B>, <Page A>, <Page B>],
# 'ruby' => [<Post B>]
# }
#
# By default Jekyll does not return the list of pages for each tag, only the posts
def prepend_page_tags_to_post_tags(site)
def add_page_tags_to_post_tags(site)
# Already given by Jekyll: the list of posts for each tag
all_tags = site.post_attr_hash('tags')

puts "plugin: generating tags from pages, adding to post tags"
# Trick: loop over the pages in reverse order because they are prepend to the hash
# => end up with the original order
site.pages.reverse.each do |page|
page_tags = page.data['tags']
unless page_tags.nil?
page_tags.each do |tag|
# Pages in front of the list
all_tags[tag].unshift(page)

site.pages.each do |page|
tags = page.data['tags']
unless tags.nil?
tags.each do |tag|
all_tags[tag] << page
end
end
end

return all_tags
end
end
Expand Down
16 changes: 8 additions & 8 deletions _posts/2016-01-01-new-site-launching-2016.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tags:

## Why I'm changing this site

I'm rebuilding this site using [Jekyll](http://jekyllrb.com/), in the hope that I'll be actively updating it. For years now I've had my site running as a self hosted WordPress site. I learned a lot building in back in 2012, but there were aspect of the site that kept me from using it on a regular basis.
I'm rebuilding this site using [Jekyll](http://jekyllrb.com/), in the hope that I'll be actively updating it. For years now I've had my site running as a self hosted WordPress site. I learned a lot building in back in 2012, but there were aspects of the site that kept me from using it on a regular basis.

Back when I build the Wordpress version, I spend a great deal of time customizing the behavior, and really enjoyed how far I could push my own theme beyond the default blogging platform at its base. Besides the active support community, the really impressive thing about Wordpress is how far something that was originally meant for blogging can be extended into a customized content management system.

Expand All @@ -21,15 +21,15 @@ Streamlining the development is part of a more general goal to simplify all aspe

#### Simple Styles

In the sitelen sitelen lessons, for instance, I'm removing the text floating around the images. Take a look at lesson 3 [before](/archive/2012/learn_t47_lesson-3.html), and [after](/toki-pona/lesson-3/). In the previous version, I spent a lot of time moving the images within a grid system before I was satisfied with how they flowed with the text. The thing is, facing this kind of layout on top of writing the lesson kept me from ever getting them finished, which is something I've always wanted to do.
In the sitelen sitelen lessons, for instance, I'm removing the text floating around the images. Take a look at lesson 3 [before](/archive/2012/learn_t47_lesson-3.html), and [after](/toki-pona/lesson-3/). In the previous version, I spent a lot of time moving the images within a grid system before I was satisfied with how they flowed with the text. The thing is, facing this kind of layout on top of writing the lesson kept me from ever getting them finished. I'm hoping to have a chance to work on the remaining lessons once I've launched the new site.

The new style may involve more scrolling, but it's content independent, and actually look better when I take all media sizes into consideration.
The new style may involve more scrolling, but it's content independent, and actually looks better on phones and laptops.

#### Files, not a database

The [version of my site](/archive/2007/) that lasted from 2007 until 2012 was build with completely static files. I rebuilt over eight hundred pages, manually typing html and replacing the pertinent details from page to page. So moving onto PHP and all Wordpress offered felt incredibly powerful for my next attempt.
The [2007-2012 version of my site](/archive/2007/) was build with completely static files. I rebuilt over eight hundred pages, manually typing HTML and replacing the pertinent details from page to page. So moving on to PHP and all Wordpress offered felt incredibly powerful for my next attempt.

It occurred to me though, how many times the same files were being constructed anew, and always with the same result. Sure, this can be sped up with cashing, but nothing about the pages on my site needs to be so elaborate. So far, Jekyll is proving to be the best of both worlds -- the ability to process repeatable content and updates like a dynamic site, but the simplicity and portability of a static one.
It occurred to me though, how many times the same files were being processed anew on the backend, and always with the same result. Sure, this can be sped up with cashing, but nothing about the pages on my site needs to be so elaborate. So far, Jekyll is proving to be the best of both worlds -- the ability to process repeatable content and updates like a dynamic site, but the simplicity and portability of a static one.

### Ruby!

Expand All @@ -43,7 +43,7 @@ I may be forcing a simplification of the site, but it's all in the service of ge

### The Archives

I've transfered most of the content from before into the new site, but if I've screwed up and not presented something that used to be here as well as it once was, I've also done my best to store static copies of all the old content. I've also added the older (pre 2009) content back in. All of this is available in [the Archives](/archives).
I've transfered most of the content from before into the new site, but for the sake of preservation, I've also done my best to store static copies of all the old content. I've also added the older *(pre 2009)* content back in. All of this is available in [the Archives](/archives).

### Artworks

Expand All @@ -56,8 +56,8 @@ Being able to navigate a site is something I cherish highly, and in this regard
* [the archive page](/archive/) -- where I hope to add other things as I dig them up
* [the sitemap](/sitemap/) - where I will list all posts and pages
* [the artworks page](/artworks/) -- which should soon have sub-menus as well
* [toki pona](/toki-pona) -- all things sitelen sitelen, see below
* [toki pona](/toki-pona) -- all things sitelen sitelen

### Sitelen Sitelen

Fans of toki pona have been making their way here for years, and I hope to fill this site with more content soon. Beyond the sitelen sitelen lessons that still need to be written, I've had several artworks sent to me that hadn't made it onto my site. Check the [sitelen sitelen fanart](/toki-pona#xxx) section for the latest!
Fans of toki pona have been making their way here for years, and will be filling this site with more content soon. Beyond the sitelen sitelen lessons that still need to be written, I've had several artworks sent to me that hadn't made it onto my site. Check the [sitelen sitelen fanart](/toki-pona/#sitelen-pi-jan-ante) section for the latest!
2 changes: 1 addition & 1 deletion archive/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This version was a self hosted Wordpress Site, now archived as static pages.
#### [2007](2007/)
This version was a static site, each page built originally in Dreamweaver, and then eventually in plain text using Textmate. It has the most complete archive of artworks to date.

### Previous site index:
#### Previous site index:

Index of pages from the previous site, and the corresponding new versions and archived pages:

Expand Down
6 changes: 6 additions & 0 deletions css/_sub_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@
left: 0%;
}
}


.sub_nav__ghost_spacer {
height: 1.5rem;
float: right;
}

0 comments on commit 9774a96

Please sign in to comment.