Skip to content
Snippets Groups Projects
Commit a8d3fc8c authored by Johannes Keyser's avatar Johannes Keyser
Browse files

copied everything from multilingual example

parent 0d0e079f
No related branches found
No related tags found
No related merge requests found
---
layout: default
ref: index
lang: fr
---
<div class="home">
<h1 class="page-heading">Articles</h1>
<ul class="post-list">
{% assign posts=site.posts | where:"lang", page.lang %}
{% for post in posts %}
<li>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
<h2>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h2>
</li>
{% endfor %}
</ul>
<p class="rss-subscribe">suivre le <a href="{{ "/flux.xml" | prepend: site.baseurl }}">flux RSS</a></p>
</div>
---
# Only the main Sass file needs front matter (the dashes are enough)
---
@charset "utf-8";
// Our variables
$base-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
$base-font-size: 16px;
$base-font-weight: 400;
$small-font-size: $base-font-size * 0.875;
$base-line-height: 1.5;
$spacing-unit: 30px;
$text-color: #111;
$background-color: #fdfdfd;
$brand-color: #2a7ae2;
$grey-color: #828282;
$grey-color-light: lighten($grey-color, 40%);
$grey-color-dark: darken($grey-color, 25%);
// Width of the content area
$content-width: 800px;
$on-palm: 600px;
$on-laptop: 800px;
// Use media queries like this:
// @include media-query($on-palm) {
// .wrapper {
// padding-right: $spacing-unit / 2;
// padding-left: $spacing-unit / 2;
// }
// }
@mixin media-query($device) {
@media screen and (max-width: $device) {
@content;
}
}
// Import partials from `sass_dir` (defaults to `_sass`)
@import
"base",
"layout",
"syntax-highlighting"
;
feed.xml 0 → 100644
---
layout: null
lang: en
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ site.title[page.lang] | xml_escape }}</title>
<description>{{ site.description[page.lang] | 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"/>
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
<generator>Jekyll v{{ jekyll.version }}</generator>
{% assign posts=site.posts | where:"lang", page.lang %}
{% for post in posts limit:10 %}
<item>
<title>{{ post.title | xml_escape }}</title>
<description>{{ post.content | xml_escape }}</description>
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
<link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
<guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
{% for tag in post.tags %}
<category>{{ tag | xml_escape }}</category>
{% endfor %}
{% for cat in post.categories %}
<category>{{ cat | xml_escape }}</category>
{% endfor %}
</item>
{% endfor %}
</channel>
</rss>
flux.xml 0 → 100644
---
layout: null
lang: fr
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ site.title[page.lang] | xml_escape }}</title>
<description>{{ site.description[page.lang] | xml_escape }}</description>
<link>{{ site.url }}{{ site.baseurl }}/</link>
<atom:link href="{{ "/flux.xml" | prepend: site.baseurl | 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>
{% assign posts=site.posts | where:"lang", page.lang %}
{% for post in posts limit:10 %}
<item>
<title>{{ post.title | xml_escape }}</title>
<description>{{ post.content | xml_escape }}</description>
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
<link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
<guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
{% for tag in post.tags %}
<category>{{ tag | xml_escape }}</category>
{% endfor %}
{% for cat in post.categories %}
<category>{{ cat | xml_escape }}</category>
{% endfor %}
</item>
{% endfor %}
</channel>
</rss>
---
layout: default
ref: index
lang: en
---
<div class="home">
<h1 class="page-heading">Posts</h1>
<ul class="post-list">
{% assign posts=site.posts | where:"lang", page.lang %}
{% for post in posts %}
<li>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
<h2>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h2>
</li>
{% endfor %}
</ul>
<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | prepend: site.baseurl }}">via RSS</a></p>
</div>
Gem::Specification.new do |s|
s.name = 'jekyll-multilingual'
s.version = '3.1.6'
s.license = 'MIT'
s.summary = 'Multilingual version of the Jekyll default theme'
s.author = 'Sylvain Durand'
s.email = 'github@durand.tf'
s.homepage = 'https://www.sylvaindurand.org/making-jekyll-multilingual/'
s.files = `git ls-files -z`.split("\x0").grep(%r{^_(includes|layouts)/})
end
User-agent: *
Allow: /
---
layout:
permalink: /sitemaps.xml
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
{% for post in site.posts %}
{% if post.id contains "404" %}{% else %}
<url>
<loc>{{site.base}}{{ post.url }}</loc>
{% assign versions=site.posts | where:"ref", post.ref %}
{% for version in versions %}
<xhtml:link rel="alternate" hreflang="{{ version.lang }}" href="{{site.base}}{{ version.url }}" />
{% endfor %}
<lastmod>{{ post.date | date_to_xmlschema }}</lastmod>
<changefreq>weekly</changefreq>
</url>
{% endif %}
{% endfor %}
{% for page in site.pages %}
{% if page.id contains "404" %}{% else %}
<url>
<loc>{{site.base}}{{ page.url }}</loc>
{% assign versions=site.pages | where:"ref", page.ref %}
{% for version in versions %}
<xhtml:link rel="alternate" hreflang="{{ version.lang }}" href="{{site.base}}{{ version.url }}" />
{% endfor %}
<changefreq>weekly</changefreq>
</url>
{% endif %}
{% endfor %}
</urlset>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment