Skip to content

Commit b59baf4

Browse files
committed
Add local site diff'ing instructions
1 parent 798bf8b commit b59baf4

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

CONTRIBUTING.md

+15
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,21 @@ translation PRs are opened within a week of the original newsletter being
5454
published for new newsletters. That said, we also encourage translation of
5555
older newsletters and blog posts as well.
5656

57+
### Reviewing changes to the website generation code
58+
59+
When reviewing changes to the Jekyll code that generates the website, it's useful to compare
60+
the generated website before and after the change. To do so, you can run the following commands:
61+
62+
```bash
63+
git checkout $reviewbranch # Checkout the branch that you want to review
64+
rm -rf _site.bak # Remove the backup site directory if it exists
65+
JEKYLL_ENV=local make build # Do a clean build of the site to the _site directory. The local env is to remove the 'updated' field which causes irrelevant diffs
66+
mv _site _site.bak # Rename the generated site directory
67+
git checkout master # Checkout the base branch
68+
JEKYLL_ENV=local make build # Do a clean build of the site to the _site directory
69+
diff -ruN _site _site.bak # Compare the generated sites (-r for recursive, -u for unified, -N for new file)
70+
```
71+
5772
## Compatibility Matrix Data
5873

5974
The compatibility matrix section of the website is built from

feed.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<generator uri="https://jekyllrb.com/" version="{{ jekyll.version }}">Jekyll</generator>
99
<link href="{{ page.url | absolute_url }}" rel="self" type="application/atom+xml" />
1010
<link href="{{ '/' | absolute_url }}" rel="alternate" type="text/html" {% if site.lang %}hreflang="{{ site.lang }}" {% endif %}/>
11-
<updated>{{ site.time | date_to_xmlschema }}</updated>
11+
{%- if jekyll.environment != 'local' -%}<updated>{{ site.time | date_to_xmlschema }}</updated>{% endif %}
1212
<id>{{ '/' | absolute_url | xml_escape }}</id>
1313

1414
{% if site.title %}

0 commit comments

Comments
 (0)