diff --git a/Rakefile b/Rakefile index 9a180a8b0..a1bbcbcd1 100644 --- a/Rakefile +++ b/Rakefile @@ -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. @@ -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' @@ -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' @@ -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 @@ -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 diff --git a/src/_data/whats-new.yml b/src/_data/whats-new.yml index 4578fb482..bd3d72837 100644 --- a/src/_data/whats-new.yml +++ b/src/_data/whats-new.yml @@ -4,25 +4,16 @@ 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 @@ -30,60 +21,63 @@ entries: - 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 diff --git a/src/whats-new.md b/src/whats-new.md index c52b1c499..1693f59ae 100644 --- a/src/whats-new.md +++ b/src/whats-new.md @@ -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 %} \ No newline at end of file +{% 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 }} + + + + + + + + + + + + {% for item in date_group.items %} + + + + + + + {% endfor %} + +
DescriptionVersionsTypePull request
{{ item.description | markdownify }}{{ item.versions }}{{ item.type }}{{ item.link | split: "/" | last }}
+{% endfor %} +{% endfor %} + +{% endfor %}