This repository was archived by the owner on Nov 19, 2024. It is now read-only.
File tree 2 files changed +28
-19
lines changed
2 files changed +28
-19
lines changed Original file line number Diff line number Diff line change @@ -78,13 +78,14 @@ task :whatsnew do
78
78
print 'Generating data for the What\'s New digest: $ ' . magenta
79
79
80
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
85
- else
86
- abort 'The "since" argument must be a string. Example: "jul 4"'
87
- end
81
+ report =
82
+ if since . nil? || since . empty?
83
+ `bin/whatsup_github since '#{ last_update } '`
84
+ elsif since . is_a? String
85
+ `bin/whatsup_github since #{ since } `
86
+ else
87
+ abort 'The "since" argument must be a string. Example: "jul 4"'
88
+ end
88
89
89
90
# Merge generated tmp/whats-new.yml with existing src/_data/whats-new.yml
90
91
generated_data = YAML . load_file generated_file
@@ -94,6 +95,9 @@ task :whatsnew do
94
95
95
96
puts "Writing updates to #{ current_file } "
96
97
File . write current_file , current_data . to_yaml
98
+
99
+ abort report if report . include? 'MISSING whatsnew'
100
+ puts report
97
101
end
98
102
99
103
desc 'Generate index for Algolia'
Original file line number Diff line number Diff line change @@ -15,35 +15,40 @@ title: What's new on DevDocs
15
15
16
16
{% assign grouped_by_year = entries | group_by_exp: "entry", "entry.date | date: '%Y'" %}
17
17
18
- {% for group in grouped_by_year limit:2 %}
18
+ {% for year_group in grouped_by_year limit:2 %}
19
19
20
- ## {{ group.name }}
20
+ {% assign grouped_by_month = year_group.items | group_by_exp: "entry", "entry.date | date: '%B'" %}
21
+ ## {{ year_group.name }}
22
+
23
+ {% for month_group in grouped_by_month %}
24
+ ### {{ month_group.name }}
25
+
26
+ {% assign grouped_by_date = month_group.items | group_by: "date" %}
27
+
28
+ {% for date_group in grouped_by_date %}
29
+ #### {{ date_group.name }}
21
30
22
31
<table >
23
32
<thead >
24
33
<tr>
25
34
<th>Description</th>
26
35
<th>Versions</th>
27
36
<th>Type</th>
28
- <th>Date </th>
37
+ <th>Pull request </th>
29
38
</tr>
30
39
</thead >
31
40
<tbody >
32
- {% for item in group .items %}
41
+ {% for item in date_group .items %}
33
42
<tr >
34
43
<td >{{ item.description | markdownify }}</td >
35
44
<td >{{ item.versions }}</td >
36
45
<td >{{ item.type }}</td >
37
- <td >
38
- {%- if item.link -%}
39
- <a href =" {{ item.link }} " >{{ item.date | date: "%B  ; %e" }}</a >
40
- {%- else -%}
41
- {{ item.date | date: "%B  ; %e" }}
42
- {%- endif -%}
43
- </td >
46
+ <td ><a href =" {{ item.link }} " >{{ item.link | split: "/" | last }}</a ></td >
44
47
</tr >
45
48
{% endfor %}
46
49
</tbody >
47
50
</table >
51
+ {% endfor %}<!-- date_group -->
52
+ {% endfor %}<!-- month_group -->
48
53
49
- {% endfor %}
54
+ {% endfor %}<!-- year_group -->
You can’t perform that action at this time.
0 commit comments