Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Shuttleworth foundation
jmathai-github-com
Commits
4b3dd0f7
Commit
4b3dd0f7
authored
May 14, 2014
by
Michael Rose
Browse files
Merge pull request #67 from xuv/master
Verify that the site.url has a protocol in feed.xml
parents
be76bf2d
21aa8a49
Changes
2
Hide whitespace changes
Inline
Side-by-side
_config.yml
View file @
4b3dd0f7
title
:
Site Title
description
:
Describe your website here.
logo
:
site-logo.png
disqus_shortname
:
disqus_shortname
:
search
:
true
# Change url to your domain. Leave localhost server or blank when working locally.
# You don't need to specify the protocol if you want it available on http and https. Example: //localhost:4000
url
:
http://localhost:4000
# Owner/author information
...
...
@@ -12,22 +13,22 @@ owner:
avatar
:
bio-photo.jpg
email
:
you@email.com
# Social networking links used in footer. Update and remove as you like.
twitter
:
facebook
:
github
:
stackexchange
:
linkedin
:
instagram
:
flickr
:
tumblr
:
twitter
:
facebook
:
github
:
stackexchange
:
linkedin
:
instagram
:
flickr
:
tumblr
:
# For Google Authorship https://plus.google.com/authorship
google_plus
:
google_plus
:
# Analytics and webmaster tools stuff goes here
google_analytics
:
google_verify
:
google_analytics
:
google_verify
:
# https://ssl.bing.com/webmaster/configure/verify/ownership Option 2 content= goes here
bing_verify
:
bing_verify
:
# Links to include in top navigation
# For external links add external: true
...
...
@@ -59,7 +60,7 @@ kramdown:
use_coderay
:
false
coderay
:
coderay_line_numbers
:
coderay_line_numbers
:
coderay_line_numbers_start
:
1
coderay_tab_width
:
4
coderay_bold_every
:
10
...
...
feed.xml
View file @
4b3dd0f7
...
...
@@ -3,35 +3,48 @@ layout: none
---
<?xml version="1.0" encoding="utf-8"?>
<feed
xmlns=
"http://www.w3.org/2005/Atom"
xml:lang=
"en"
>
{% assign add_protocol = false %}
{% assign protocol = site.url | split: '/' | first %}
{% if site.url != '' and protocol != 'http:' and protocol != 'https:' %}
{% assign site_url = site.url | prepend: 'http:' %}
{% assign add_protocol = true %}
{% else %}
{% assign site_url = site.url %}
{% endif %}
<title
type=
"text"
>
{{ site.title }}
</title>
<generator
uri=
"https://github.com/mojombo/jekyll"
>
Jekyll
</generator>
<link
rel=
"self"
type=
"application/atom+xml"
href=
"{{ site
.
url }}/feed.xml"
/>
<link
rel=
"alternate"
type=
"text/html"
href=
"{{ site
.
url }}/"
/>
<link
rel=
"self"
type=
"application/atom+xml"
href=
"{{ site
_
url }}/feed.xml"
/>
<link
rel=
"alternate"
type=
"text/html"
href=
"{{ site
_
url }}/"
/>
<updated>
{{ site.time | date_to_xmlschema }}
</updated>
<id>
{{ site
.
url }}/
</id>
<id>
{{ site
_
url }}/
</id>
<author>
<name>
{{ site.owner.name }}
</name>
<uri>
{{ site
.
url }}/
</uri>
<uri>
{{ site
_
url }}/
</uri>
<email>
{{ site.owner.email }}
</email>
</author>
{% for post in site.posts limit:20 %}
<entry>
<title
type=
"html"
>
<![CDATA[{{ post.title | cdata_escape }}]]>
</title>
<link
rel=
"alternate"
type=
"text/html"
href=
"{% if post.link %}{{ post.link }}{% else %}{{ site
.
url }}{{ post.url }}{% endif %}"
/>
<id>
{{ site
.
url }}{{ post.id }}
</id>
<link
rel=
"alternate"
type=
"text/html"
href=
"{% if post.link %}{{ post.link }}{% else %}{{ site
_
url }}{{ post.url }}{% endif %}"
/>
<id>
{{ site
_
url }}{{ post.id }}
</id>
{% if post.modified %}
<updated>
{{ post.modified | to_xmlschema }}T00:00:00-00:00
</updated>
<published>
{{ post.date | date_to_xmlschema }}
</published>
{% else %}
<published>
{{ post.date | date_to_xmlschema }}
</published>
<updated>
{{ post.date | date_to_xmlschema }}
</updated>
{% endif %}
<author>
<name>
{{ site.owner.name }}
</name>
<uri>
{{ site
.
url }}
</uri>
<uri>
{{ site
_
url }}
</uri>
<email>
{{ site.owner.email }}
</email>
</author>
{% for tag in post.tags %}
<category
scheme=
"{{ site.url }}/tags/#{{ tag | uri_escape }}"
term=
"{{ tag }}"
/>
{% endfor %}
<content
type=
"html"
>
{{ post.content | xml_escape }}
<
p
><
a href=
"
{{ site.url }}{{ post.url }}
">
{{ post.title }}
<
/a
>
was originally published by {{ site.owner.name }} at
<
a href=
"
{{ site.url }}
">
{{ site.title }}
<
/a
>
on {{ post.date | date: "%B %d, %Y" }}.
<
/p
>
</content>
{% for tag in post.tags %}
<category
scheme=
"{{ site_url }}/tags/#{{ tag | uri_escape }}"
term=
"{{ tag }}"
/>
{% endfor %}
<content
type=
"html"
>
{% if add_protocol %}
{{ post.content | xml_escape | replace: site.url, site_url }}
{% else %}
{{ post.content | xml_escape }}
{% endif %}
<
p
><
a href=
"
{{ site_url }}{{ post.url }}
">
{{ post.title }}
<
/a
>
was originally published by {{ site.owner.name }} at
<
a href=
"
{{ site_url }}
">
{{ site.title }}
<
/a
>
on {{ post.date | date: "%B %d, %Y" }}.
<
/p
>
</content>
</entry>
{% endfor %}
</feed>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment