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

Updating whatsnew rake task and template #952

Merged
merged 6 commits into from
Dec 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 32 additions & 17 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright © Magento, Inc. All rights reserved.
# See COPYING.txt for license details.

# frozen_string_literal: true

# This file contains tasks with no namespace.
Expand All @@ -6,9 +9,6 @@
# For example, 'preview:all' is defined in the 'rakelib/preview.rake' file.
# To see the list of tasks to use, run 'rake -T'.

# Copyright © Magento, Inc. All rights reserved.
# See COPYING.txt for license details.

require 'html-proofer'
require 'kramdown'
require 'launchy'
Expand Down Expand Up @@ -43,13 +43,8 @@ task build: %w[build:dev]
desc 'Check modified files. To check all files at the particular path, provide the path (e.g. path=src/images/images)'
task check: %w[check:image_optim check:mdl]

desc 'Generate index for Algolia'
task :index do
puts 'Generating index for Algolia ...'.magenta
sh 'bin/jekyll algolia --config=_config.yml,_config.index.yml'
end

desc "Generate data for a news digest. Default timeframe is since last update (determined automatically). For a custom date, use the 'since' variable: rake whatsnew since='jul 4'"
desc "Generate data for a news digest. Default timeframe is since last update (determined automatically).
For a custom date, use the 'since' variable: rake whatsnew since='jul 4'"
task :whatsnew do
since = ENV['since']
current_file = 'src/_data/whats-new.yml'
Expand All @@ -60,13 +55,14 @@ task :whatsnew do
print 'Generating data for the What\'s New digest: $ '.magenta

# Generate tmp/whats-new.yml
if since.nil? || since.empty?
sh 'bin/whatsup_github', 'since', last_update
elsif since.is_a? String
sh 'bin/whatsup_github', 'since', since
else
abort 'The "since" argument must be a string. Example: "jul 4"'
end
report =
if since.nil? || since.empty?
`bin/whatsup_github since '#{last_update}'`
elsif since.is_a? String
`bin/whatsup_github since #{since}`
else
abort 'The "since" argument must be a string. Example: "jul 4"'
end

# Merge generated tmp/whats-new.yml with existing src/_data/whats-new.yml
generated_data = YAML.load_file generated_file
Expand All @@ -76,4 +72,23 @@ task :whatsnew do

puts "Writing updates to #{current_file}"
File.write current_file, current_data.to_yaml

abort report if report.include? 'MISSING whatsnew'
puts report
end

desc 'Generate index for Algolia'
task :index do
puts 'Generating index for Algolia ...'
sh 'bin/jekyll',
'algolia',
'--config=_config.yml,_config.index.yml'
end

desc 'Convert HTML text to kramdown in your terminal'
task :convert do
puts 'Paste HTML text followed by a new line and press Control-D.'.magenta
result = `bin/kramdown --input=html --output=kramdown`
puts 'Converted text:'.magenta
puts result.bold
end
48 changes: 21 additions & 27 deletions src/_data/whats-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,86 +4,80 @@ description: This page contains recent changes that we think you'd like to know
We exclude from this list proofreading, spelling checks, and insignificant updates.
link: "/getting-started/whats-new.html"
thread: "/whatsnew-feed.xml"
updated: Tue Dec 15 16:50:25 2020
updated: Thu Dec 17 13:51:56 2020
entries:
- description: Updated [General Tax Settings](https://docs.magento.com/user-guide/tax/tax-settings-general.html)
to include each section of tax settings in the configuration.
versions: 2.4.x
type: 'Major update'
type: Major update
date: December 8, 2020
link: https://github.com/magento/merchdocs/pull/904
- description: Added the ability to [monitor and manage](https://docs.magento.com/user-guide/system/catalog-sync.html) the catalog sync process from the Admin.
versions: 2.4.1
type: Major update
date: December 7, 2020
link: https://github.com/magento/merchdocs/pull/914
- description: Added [inclusion and exclusion filters](https://docs.magento.com/user-guide/marketing/recommendation-incl-excl.html) to control what products can and cannot be displayed in recommendations.
versions: 2.4.1
type: Major update
date: December 7, 2020
link: https://github.com/magento/merchdocs/pull/914
- description: Added the [Visual similarity recommendation type](https://docs.magento.com/user-guide/marketing/prex-type-visualsim.html).
- description: Added the ability to [monitor and manage](https://docs.magento.com/user-guide/system/catalog-sync.html)
the catalog sync process from the Admin.
versions: 2.4.1
type: Major update
date: December 7, 2020
link: https://github.com/magento/merchdocs/pull/914
- description: Updated [Export](https://docs.magento.com/user-guide/system/data-export.html)
to reflect change in exported file processed through a message queue.
versions: 2.4.x
type: 'Minor update'
type: Minor update
date: December 2, 2020
link: https://github.com/magento/merchdocs/pull/886
- description: Added missing info in [Stores Menu](https://docs.magento.com/user-guide/stores/stores-menu.html) topic.
- description: Added missing info in [Stores Menu](https://docs.magento.com/user-guide/stores/stores-menu.html)
topic.
versions: 2.4.x
type: 'Major update'
type: Major update
date: December 2, 2020
link: https://github.com/magento/merchdocs/pull/893
- description: Added the [Configuring Requisition Lists](https://docs.magento.com/user-guide/stores/b2b-configure-requisition-lists.html)
topic for B2B configuration, as well as additional linking for supported storefront
functionality.
versions: 2.4.x
type: 'New topic'
type: New topic
date: December 2, 2020
link: https://github.com/magento/merchdocs/pull/874
- description: Updated the [Gift Options configuration reference](https://docs.magento.com/user-guide/configuration/sales/sales.html#gift-options)
to include additional fields available in Magento Commerce.
versions: 2.4.x
type: 'Major update'
type: Major update
date: November 30, 2020
link: https://github.com/magento/merchdocs/pull/875
- description: Added authentication locks configuration info in [OAuth](https://docs.magento.com/user-guide/configuration/services/oauth.html)
configuration reference.
versions: 2.4.x
type: 'Major update'
type: Major update
date: November 24, 2020
link: https://github.com/magento/merchdocs/pull/872
- description: Added missing information in the [Configuring a Persistent Cart](https://docs.magento.com/user-guide/sales/cart-persistent-configuration.html)
topic and [Persistent Shopping Cart](https://docs.magento.com/user-guide/configuration/customers/persistent-shopping-cart.html) configuration reference.
- description: Added missing information in the [Configuring a Persistent Cart](https://docs.magento.com/user-guide/sales/cart-persistent-configuration.html)
topic and [Persistent Shopping Cart](https://docs.magento.com/user-guide/configuration/customers/persistent-shopping-cart.html)
configuration reference.
versions: 2.4.x
type: 'Major update'
type: Major update
date: November 23, 2020
link: https://github.com/magento/merchdocs/pull/868
- description: Added a new topic for the [Magento Identity Manager](https://docs.magento.com/user-guide/magento/magento-identity-manager.html),
which is now available for linking Magento user accounts with an Adobe ID to support
single sign-on.
versions: '2.4.x'
type: 'New topic'
versions: 2.4.x
type: New topic
date: October 27, 2020
link: https://github.com/magento/merchdocs/pull/828
- description: Added a warning message to [Google Analytics](https://docs.magento.com/user-guide/stores/compliance-cookie-restriction-mode.html)
about how it works when _Cookie Restriction Mode_ is enabled.
versions: 2.4.x
type: 'Minor update'
type: Minor update
date: October 26, 2020
link: https://github.com/magento/merchdocs/pull/825
- description: Expanded documentation about connecting to [SaaS services in Magento](https://docs.magento.com/user-guide/system/saas.html).
versions: 2.4.x
type: 'New topic'
type: New topic
date: October 22, 2020
link: https://github.com/magento/merchdocs/pull/814
- description: Updated the Page Builder [Banner](https://docs.magento.com/user-guide/cms/page-builder-media-banner.html#complex-content-in-the-settings)
and [Slider](https://docs.magento.com/user-guide/cms/page-builder-media-slider.html#complex-content-in-the-settings)
topics for the change to no longer allow links from both the _Message Text_ and the _Link_ option for Banners and Slides.
topics for the change to no longer allow links from both the _Message Text_ and
the _Link_ option for Banners and Slides.
versions: 2.4.1
type: Minor update
date: October 15, 2020
Expand Down
52 changes: 37 additions & 15 deletions src/whats-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,40 @@ group: getting-started

{% assign grouped_by_year = entries | group_by_exp: "entry", "entry.date | date: '%Y'" %}

{% for group in grouped_by_year limit:2 %}

## {{ group.name }}

Description | Versions | Type | Date
---|---|---|---{% for item in group.items %}
{{ item.description }} | {{ item.versions }} | {{ item.type }} |
{%- if item.link -%}
[{{ item.date | date: "%B %e" }}]({{ item.link }})
{%- else -%}
{{ item.date | date: "%B %e" }}
{%- endif -%}
{% endfor %}

{% endfor %}
{% for year_group in grouped_by_year limit:2 %}

{% assign grouped_by_month = year_group.items | group_by_exp: "entry", "entry.date | date: '%B'" %}
## {{ year_group.name }}

{% for month_group in grouped_by_month %}
### {{ month_group.name }}

{% assign grouped_by_date = month_group.items | group_by: "date" %}

{% for date_group in grouped_by_date %}
#### {{ date_group.name }}

<table>
<thead>
<tr>
<th>Description</th>
<th>Versions</th>
<th>Type</th>
<th>Pull request</th>
</tr>
</thead>
<tbody>
{% for item in date_group.items %}
<tr>
<td>{{ item.description | markdownify }}</td>
<td>{{ item.versions }}</td>
<td>{{ item.type }}</td>
<td><a href="{{ item.link }}">{{ item.link | split: "/" | last }}</a></td>
</tr>
{% endfor %}
</tbody>
</table>
{% endfor %}<!-- date_group -->
{% endfor %}<!-- month_group -->

{% endfor %}<!-- year_group -->