Skip to content

Commit 494dff9

Browse files
committed
rev_news: Wild flailing attempt at getting RSS
I stole some bits from http://jekyllrb.com/news/ and managed to get some sort of feed going on. * README on how to get the site running locally (for Ubuntu) * The rev_news/rev_news.html now iterates over all _posts entries * The old Rev News meta content is at the bottom of the page * The feed is available on /feed.xml * I broke the URL to the first edition (will need a redirect) * Single posts is not clickable yet (works on jekyll's site tho) * Still are some copy/paste bits left from the Jekyll news * The nav menu now has two "ghost" entries
1 parent bf2ed6a commit 494dff9

File tree

7 files changed

+111
-3
lines changed

7 files changed

+111
-3
lines changed

Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source 'https://rubygems.org'
2+
# Because https://help.github.com/articles/using-jekyll-with-pages/
3+
gem 'github-pages'
4+

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ name: Git Developer Pages
22
markdown: redcarpet
33
gems:
44
- jekyll-redirect-from
5+
permalink: /news/:year/:month/:day/:title/

_includes/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# About
2+
13
This homepage is maintained by editing files in the
24
[git/git.github.io](https://github.com/git/git.github.io) repository on
35
GitHub.
@@ -9,3 +11,27 @@ be better?
911
If you want push access, contact peff@peff.net and provide your GitHub
1012
username. You may also send patches by mail (and feel free to cc
1113
git@vger.kernel.org if appropriate).
14+
15+
16+
# Development
17+
18+
* Make sure you've got ruby2 (packages are available, have to replace
19+
`/usr/bin/ruby` and `/usr/bin/gem` with their v2 options)
20+
* `sudo gem install bundler`
21+
* Clone this repo
22+
* If I haven't committed the Gemfile yet, create it with these lines:
23+
```
24+
source 'https://rubygems.org'
25+
gem 'github-pages'
26+
```
27+
* `sudo apt-get install zlib1g-dev` # ref [1]
28+
* `bundle install`
29+
* `bundle exec jekyll serve`
30+
* browse the site on http://localhost:4000
31+
32+
Based on https://help.github.com/articles/using-jekyll-with-pages/
33+
34+
I better copy the above into the repo's README at some point.
35+
36+
[1] http://www.nokogiri.org/tutorials/installing_nokogiri.html#ubuntu___debian
37+

_includes/news_item.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<article>
2+
<h2>
3+
<a href="{{ post.url }}">
4+
{{ post.title }}
5+
</a>
6+
</h2>
7+
<span class="post-category">
8+
<span class="label">
9+
{{ post.categories | array_to_sentence_string }}
10+
</span>
11+
</span>
12+
<div class="post-meta">
13+
<span class="post-date">
14+
{{ post.date | date_to_string }}
15+
</span>
16+
<a href="https://github.com/{{ post.author }}" class="post-author">
17+
<img src="https://github.com/{{ post.author }}.png" class="avatar" alt="{{ post.author }} avatar" width="24" height="24">
18+
{{ post.author }}
19+
</a>
20+
</div>
21+
<div class="post-content">
22+
{{ post.content }}
23+
</div>
24+
</article>

rev_news/edition-1.md renamed to _posts/2015-02-28-rev-news-edition-1.markdown

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
2-
layout: default
32
title: Git Rev News Edition 1 (March 25th, 2015)
4-
redirect_from: "/rev_news/"
3+
layout: news_item
4+
date: 2015-02-26 21:06:51 -0800
5+
author: chriscool
6+
categories: [community]
57
---
68

79
## Git Rev News: Edition 1 (March 25th, 2015)

feed.xml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
permalink: /feed.xml
3+
---
4+
5+
<?xml version="1.0" encoding="utf-8"?>
6+
<rss version="2.0"
7+
xmlns:content="http://purl.org/rss/1.0/modules/content/"
8+
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
9+
xmlns:dc="http://purl.org/dc/elements/1.1/"
10+
xmlns:atom="http://www.w3.org/2005/Atom"
11+
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
12+
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
13+
>
14+
<channel>
15+
<title xml:lang="en">Git Rev News</title>
16+
<atom:link type="application/atom+xml" href="http://jekyllrb.com/feed.xml" rel="self"/>
17+
<link>http://git.github.io/rev_news</link>
18+
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
19+
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
20+
<language>en-US</language>
21+
<generator>Jekyll v{{ jekyll.version }}</generator>
22+
<description>Git Rev News</description>
23+
<image>
24+
<description>Git Rev News</description>
25+
<url>http://jekyllrb.com/img/logo-rss.png</url>
26+
<title>Git Rev News</title>
27+
<link>http://git.github.io/rev_news</link>
28+
<width>144</width>
29+
<height>73</height>
30+
</image>
31+
{% for post in site.posts %}
32+
<item>
33+
<title>{{ post.title | xml_escape}}</title>
34+
<link>http://git.github.io/rev_news{{ post.url }}</link>
35+
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
36+
<dc:creator>{{ post.author }}</dc:creator>
37+
{% for tag in post.tags %}
38+
<category>{{ tag | xml_escape }}</category>
39+
{% endfor %}
40+
{% for cat in post.categories %}
41+
<category>{{ cat | xml_escape }}</category>
42+
{% endfor %}
43+
<guid isPermaLink="true">http://git.github.io/rev_news{{ post.url }}</guid>
44+
<description>{{ post.content | xml_escape }}</description>
45+
</item>
46+
{% endfor %}
47+
</channel>
48+
</rss>

rev_news/rev_news.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
---
22
layout: default
33
title: Git Rev News
4+
redirect_from: "/rev_news/"
45
---
56

6-
This is a page to explain what Git Rev News could be.
7+
{% for post in site.posts %}
8+
{% include news_item.html %}
9+
{% endfor %}
710

811
## Promote reviewers and helpers
912

0 commit comments

Comments
 (0)