Skip to content

Commit cf3fa5f

Browse files
author
delisma
committed
feat: Assets workflow
Create assets folder Create _root folder Create _config_staging.yml
1 parent 25fcde9 commit cf3fa5f

301 files changed

Lines changed: 496 additions & 9 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

_config.staging.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Site settings
2+
analytics:
3+
adobe:
4+
tracking_id: be5dfd287373/0127575cd23a/launch-913b1beddf7a-staging

_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ defaults:
5757
scope:
5858
path: "en/"
5959
values:
60-
css: "https://blog.canada.ca/css/blog.css"
60+
css: "assets/css/blog.css"
6161
lang: "en"
6262
-
6363
scope:
6464
path: "fr/"
6565
values:
66-
css: "https://blogue.canada.ca/css/blogue.css"
66+
css: "assets/css/blogue.css"
6767
lang: "fr"
6868
-
6969
scope:

_root/feed.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
layout: null
3+
sitemap:
4+
exclude: true
5+
---
6+
<?xml version="1.0" encoding="UTF-8"?>
7+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
8+
<channel>
9+
<title>{{ site.title[ page.lang ] | xml_escape }}</title>
10+
<description>{{ site.description[ page.lang ] | xml_escape }}</description>
11+
<link>{{ site.urlalt[ page.lang ] }}{{ site.baseurl }}/</link>
12+
<atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.urlalt[ page.lang ] }}" rel="self" type="application/rss+xml"/>
13+
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
14+
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
15+
<generator>Jekyll v{{ jekyll.version }}</generator>
16+
{%- assign posts=site.posts | where:"lang", page.lang -%}
17+
{%- for post in posts limit:10 -%}
18+
<item>
19+
<title>{{ post.title | xml_escape }}</title>
20+
<description>{{ post.description | xml_escape }}</description>
21+
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
22+
<link>{{ post.url | remove_first: '/' | remove_first: page.lang | prepend: site.baseurl | prepend: site.urlalt[ page.lang ] }}</link>
23+
<guid isPermaLink="true">{{ post.url | remove_first: '/' | remove_first: page.lang | prepend: site.baseurl | prepend: site.urlalt[ page.lang ] }}</guid>
24+
{%- for tag in post.tags -%}
25+
<category>{{ tag | xml_escape }}</category>
26+
{%- endfor -%}
27+
{%- for cat in post.categories -%}
28+
<category>{{ cat | xml_escape }}</category>
29+
{%- endfor -%}
30+
</item>
31+
{%- endfor -%}
32+
</channel>
33+
</rss>

_root/google81498e2fb8992272.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
google-site-verification: google81498e2fb8992272.html
2+
<!-- Google Search Console -->

_root/robots.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
layout: null
3+
sitemap:
4+
exclude: true
5+
---
6+
User-agent: *
7+
Disallow: /images/
8+
Allow: /2023/
9+
ALlow: /2022/
10+
Allow: /2021/
11+
Allow: /2020/
12+
Allow: /2019/
13+
Allow: /2018/
14+
Allow: /2017/
15+
Allow: /research-summaries/
16+
Allow: /pages/
17+
Sitemap: {{ site.urlalt[page.lang] }}/sitemap.xml

_root/sitemap.xml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
layout: null
3+
sitemap:
4+
exclude: true
5+
---
6+
<?xml version="1.0" encoding="UTF-8"?>
7+
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
8+
{%- assign locales = site.data.locales.sitemap -%}
9+
{%- for post in site.posts -%}
10+
{%- if post.lang == page.lang -%}
11+
<url>
12+
<loc>{{ post.url | remove_first: '/' | remove_first: page.lang | prepend: site.urlalt[ page.lang ] }}</loc>
13+
{%- if post.dateModified == null -%}
14+
<dateModified>{{ post.date | date: "%F" }}</dateModified>
15+
{% else %}
16+
<dateModified>{{ post.dateModified | date: "%F" }}</dateModified>
17+
{%- endif -%}
18+
<changefreq>{{ locales.weekly[ post.lang ] }}</changefreq>
19+
<priority>1.0</priority>
20+
</url>
21+
{%- endif -%}
22+
{%- endfor -%}
23+
{%- for single_page in site.pages -%}
24+
{%- if single_page.lang == page.lang -%}
25+
{%- unless single_page.sitemap.exclude -%}
26+
<url>
27+
<loc>{{ single_page.url | remove_first: '/' | remove_first: page.lang | prepend: site.urlalt[ page.lang ] }}</loc>
28+
<dateModified>{{ single_page.dateModified | date: "%F" }}</dateModified>
29+
<changefreq>{{ single_page.sitemap.changefreq }}</changefreq>
30+
<priority>{{ single_page.sitemap.priority }}</priority>
31+
</url>
32+
{%- endunless -%}
33+
{%- endif -%}
34+
{%- endfor -%}
35+
</urlset>
36+
{%- comment -%}
37+
source: http://davidensinger.com/2013/11/building-a-better-sitemap-xml-with-jekyll/
38+
{%- endcomment -%}

0 commit comments

Comments
 (0)