Skip to content

Commit

Permalink
Make feed accessible.
Browse files Browse the repository at this point in the history
Also, increase excerpt size and make links absolute.
  • Loading branch information
lazyatom committed Nov 5, 2013
1 parent 51abc20 commit b795315
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 3 deletions.
2 changes: 1 addition & 1 deletion _assets/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ section {
}

a.twitter {
background-image: url(/images/twitter-bird-light-bgs.png);
background-image: url(/images/twitter-bird.png);
background-size: $line-height-computed * 1.25;
background-repeat: no-repeat;
background-position: -7px 0;
Expand Down
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Exciting
domain_name: Exciting.io
url: http://exciting.io
markdown: kramdown
pygments: true
permalink: pretty
Expand Down
2 changes: 2 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

<script type="text/javascript" src="//use.typekit.net/teq0fzf.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>

<link rel="alternate" type="application/rss+xml" href="feed.xml">
</head>
<body>
<!--[if lt IE 7]>
Expand Down
12 changes: 12 additions & 0 deletions _plugins/longer_excerpt.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module Jekyll
module LongerExcerpt
def longer_excerpt(input)
separator = "<!-- more -->"
head, _, tail = input["content"].partition(separator)

"" << head << "\n\n" << tail.scan(/^\[[^\]]+\]:.+$/).join("\n")
end
end
end

Liquid::Template.register_filter(Jekyll::LongerExcerpt)
10 changes: 10 additions & 0 deletions _plugins/rss_url_filter.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module Jekyll
module RSSURLFilter
def relative_urls_to_absolute(input)
url = "http://exciting.io"
input.gsub(/src="\/([^\/])/, 'src="' + url + '/\1').gsub(/href="\/([^\/])/, 'href="' + url + '/\1')
end
end
end

Liquid::Template.register_filter(Jekyll::RSSURLFilter)
3 changes: 2 additions & 1 deletion _posts/2012-04-12-hello-printer.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ banner_image_url: /images/printer/printer-and-board.jpg
tags: printer
---


For over a year, I have been playing around with printing things out on a receipt printer. Recently, a few accidents of implementation gave more life to my tinkerings than I had originally intended.

### _Update!_
Expand All @@ -16,6 +15,8 @@ For over a year, I have been playing around with printing things out on a receip

![Printer](/images/printer/14-breadboard.JPG)

<!-- more -->

**TL;DR**: In a nutshell, I've accidentally built a software system that makes it easy for **YOU** to:

* [build your own small internet-connected printers](https://github.com/freerange/printer/wiki/Making-your-own-printer),
Expand Down
2 changes: 2 additions & 0 deletions _posts/2012-05-01-printer-questions.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ The response to our open source printer project has been amazing, but some peopl

If you've got a question about [Printer], or want to discuss your ideas for printer, why not [check the FAQ on the wiki][FAQ], [ask on the mailing list][mailing list], or [follow the printer project on Twitter][twitter]?

<!-- more -->

## Q: ![I want to get my hands on one of these...](/images/printer-questions/get-one.jpg)

**A:** That's great Rory, and we'd really love for as many people as possible to start exploring with us. For me, one of the main aims of this project is to get other people to build some great [content services][] that we can all take advantage of.
Expand Down
2 changes: 2 additions & 0 deletions _posts/2013-10-21-hello-world.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ tags: company
In your mind, you are hearing the computer startup chime.

<iframe src="//player.vimeo.com/video/78566487?autoplay=1" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>

<!-- more -->
6 changes: 5 additions & 1 deletion feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ layout: none
{% for post in site.posts limit:10 %}
<item>
<title>{{ post.title }}</title>
<description>{{ post.content | xml_escape }}</description>
<description>
{{ post | longer_excerpt | markdownify | relative_urls_to_absolute | xml_escape }}

&lt;a href="{{ site.url }}{{ post.url }}">Read more...&lt;/a>
</description>
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
<link>{{ site.url }}{{ post.url }}</link>
<guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
Expand Down

0 comments on commit b795315

Please sign in to comment.