Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit def5639

Browse files
Donald BoothDonald Booth
authored andcommitted
Merge branch 'master' into small-changes
2 parents f569e9b + 8676988 commit def5639

File tree

172 files changed

+15204
-3462
lines changed

Some content is hidden

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

172 files changed

+15204
-3462
lines changed

.github/workflows/linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ jobs:
5454
VALIDATE_ALL_CODEBASE: false
5555
DEFAULT_BRANCH: master
5656
VALIDATE_HTML: false
57-
VALIDATE_MD: false
57+
VALIDATE_MARKDOWN: false

Rakefile

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,31 @@ task check: %w[check:image_optim check:mdl]
6969

7070
desc 'Generate data for a news digest. Default timeframe is a week since today. For other period, use "since" argument: since="jul 4"'
7171
task :whatsnew do
72-
date = ENV['since']
73-
print 'Generating data for the weekly digest: $ '.magenta
74-
if date.nil? || date.empty?
75-
sh 'bin/whatsup_github'
76-
elsif date.is_a? String
77-
sh 'bin/whatsup_github', 'since', ENV['since'].to_s
72+
since = ENV['since']
73+
current_file = 'src/_data/whats-new.yml'
74+
generated_file = 'tmp/whats-new.yml'
75+
current_data = YAML.load_file current_file
76+
last_update = current_data['updated']
77+
78+
print 'Generating data for the What\'s New digest: $ '.magenta
79+
80+
# Generate tmp/whats-new.yml
81+
if since.nil? || since.empty?
82+
sh 'bin/whatsup_github', 'since', last_update
83+
elsif since.is_a? String
84+
sh 'bin/whatsup_github', 'since', since
7885
else
79-
puts 'The "since" argument must be a string. Example: "jul 4"'
86+
abort 'The "since" argument must be a string. Example: "jul 4"'
8087
end
88+
89+
# Merge generated tmp/whats-new.yml with existing src/_data/whats-new.yml
90+
generated_data = YAML.load_file generated_file
91+
current_data['updated'] = generated_data['updated']
92+
current_data['entries'].prepend(generated_data['entries']).flatten!
93+
current_data['entries'].uniq! { |entry| entry['link'] }
94+
95+
puts "Writing updates to #{current_file}"
96+
File.write current_file, current_data.to_yaml
8197
end
8298

8399
desc 'Generate index for Algolia'

src/_data/main-nav.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,6 @@
179179
- label: Web API Functional Testing
180180
url: /get-started/web-api-functional-testing.html
181181

182-
-
183-
184182
- label: Functional Areas
185183
children:
186184

0 commit comments

Comments
 (0)