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

Commit b7a898c

Browse files
authored
Merge branch 'master' into imported-tshabatyn-devdocs-9295
2 parents 81d9da6 + 98c3b40 commit b7a898c

File tree

201 files changed

+471
-37072
lines changed

Some content is hidden

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

201 files changed

+471
-37072
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ GitHub Issues should only be created for problems/topics related to this project
1919
Before submitting this issue, please make sure you are complying with our Code of Conduct:
2020
https://github.com/magento/devdocs/blob/master/.github/CODE_OF_CONDUCT.md
2121
22-
Issues that do not comply with our Code of Conduct or do not contain enough information may be closed at the maintainers' discretion.
22+
Issues that neither comply with our Code of Conduct or do not contain enough information may be closed at the maintainers' discretion.
2323
2424
Feel free to remove this section before creating this issue.
2525
-->

.github/ISSUE_TEMPLATE/BUG.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
---
22
name: Bug report
33
about: Create an issue about a bug on the devdocs website
4-
---
4+
title: Bug report
5+
labels: bug
6+
assignees: dshevtsov
57

6-
# Bug report
8+
---
79

810
## Description
911

1012
<!-- (REQUIRED) What is the issue/current behavior? -->
1113

1214
### Steps to reproduce
1315

14-
<!-- (OPTIONAL) What needs to be done to replicate this issue? (provide Gist if needed) -->
16+
<!-- (OPTIONAL) What needs to be done to replicate this issue? You can provide your scenario in a Gist. -->
1517

1618
1. First Step
1719
1. Second Step
1820
1. Etc.
1921

2022
## Expected result
2123

22-
<!-- (REQUIRED) When this issue is resolved, what is the expected result/behavior? -->
24+
<!-- (REQUIRED) What is the expected result/behavior after resolving this issue? -->
2325

2426
## Possible solutions
2527

@@ -31,7 +33,7 @@ about: Create an issue about a bug on the devdocs website
3133

3234
<!--
3335
Thank you for taking the time to report this issue!
34-
GitHub Issues should only be created for problems/topics related to this project's codebase.
36+
GitHub Issues in this repo should relate to this project's codebase.
3537
3638
Before submitting this issue, please make sure you are complying with our Code of Conduct:
3739
https://github.com/magento/devdocs/blob/master/.github/CODE_OF_CONDUCT.md

.github/ISSUE_TEMPLATE/COMMUNITY_ISSUE_TEMPLATE.md

Lines changed: 0 additions & 49 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/NEW_FEATURE.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
2-
name: New feature
2+
name: New devdocs feature
33
about: Create a request for new functionality in devdocs
4-
---
4+
title: Request for a devdocs feature
5+
labels: enhancement
6+
assignees: dshevtsov
57

6-
# New feature request
8+
---
79

810
## Description
911

@@ -27,7 +29,7 @@ about: Create a request for new functionality in devdocs
2729

2830
<!--
2931
Thank you for taking the time to report this issue!
30-
GitHub Issues should only be created for problems/topics related to this project's codebase.
32+
GitHub Issues in this repo should only relate to this project's codebase.
3133
3234
Before submitting this issue, please make sure you are complying with our Code of Conduct:
3335
https://github.com/magento/devdocs/blob/master/.github/CODE_OF_CONDUCT.md

.github/ISSUE_TEMPLATE/NEW_TOPIC.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
22
name: New topic
33
about: Create a request to add missing information to devdocs
4-
---
4+
title: 'Request for a new topic'
5+
labels: New Topic
6+
assignees: ''
57

6-
# New topic request
8+
---
79

810
## Description
911

@@ -26,7 +28,7 @@ about: Create a request to add missing information to devdocs
2628

2729
<!--
2830
Thank you for taking the time to report this issue!
29-
GitHub Issues should only be created for problems/topics related to this project's codebase.
31+
GitHub Issues in this repo should relate to this project's codebase.
3032
3133
Before submitting this issue, please make sure you are complying with our Code of Conduct:
3234
https://github.com/magento/devdocs/blob/master/.github/CODE_OF_CONDUCT.md

.github/ISSUE_TEMPLATE/TOPIC_CLARIFICATION.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
22
name: Topic clarification/correction
33
about: Create a request to clarify or correct a documentation topic
4-
---
4+
title: 'Request for a topic update'
5+
labels: ''
6+
assignees: ''
57

6-
# Topic clarification/correction request
8+
---
79

810
## Topic Link
911

@@ -23,7 +25,7 @@ about: Create a request to clarify or correct a documentation topic
2325

2426
<!--
2527
Thank you for taking the time to report this issue!
26-
GitHub Issues should only be created for problems/topics related to this project's codebase.
28+
GitHub Issues in this repo should relate to this project's codebase.
2729
2830
Before submitting this issue, please make sure you are complying with our Code of Conduct:
2931
https://github.com/magento/devdocs/blob/master/.github/CODE_OF_CONDUCT.md

.github/workflows/linter.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,12 @@ jobs:
5555
# Run Linter against code base #
5656
################################
5757
- name: Lint Code Base
58-
uses: github/super-linter@v3
58+
uses: github/super-linter@v4
5959
env:
6060
VALIDATE_ALL_CODEBASE: false
6161
DEFAULT_BRANCH: master
6262
VALIDATE_HTML: false
6363
VALIDATE_JSCPD: false
6464
VALIDATE_OPENAPI: false
6565
MARKDOWN_CONFIG_FILE: .markdownlint.json
66+
VALIDATE_NATURAL_LANGUAGE: false

Gemfile.lock

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ GEM
1616
algoliasearch (1.27.5)
1717
httpclient (~> 2.8, >= 2.8.3)
1818
json (>= 1.5.1)
19-
chef-utils (17.5.22)
19+
chef-utils (17.8.25)
2020
concurrent-ruby
2121
colorator (1.1.0)
2222
concurrent-ruby (1.1.9)
23-
em-websocket (0.5.2)
23+
em-websocket (0.5.3)
2424
eventmachine (>= 0.12.9)
25-
http_parser.rb (~> 0.6.0)
26-
ethon (0.14.0)
25+
http_parser.rb (~> 0)
26+
ethon (0.15.0)
2727
ffi (>= 1.15.0)
2828
eventmachine (1.2.7)
2929
exifr (1.3.9)
@@ -50,31 +50,31 @@ GEM
5050
filesize (0.2.0)
5151
forwardable-extended (2.6.0)
5252
fspath (3.1.2)
53-
html-proofer (3.19.2)
53+
html-proofer (3.19.3)
5454
addressable (~> 2.3)
5555
mercenary (~> 0.3)
56-
nokogumbo (~> 2.0)
56+
nokogiri (~> 1.12)
5757
parallel (~> 1.3)
5858
rainbow (~> 3.0)
5959
typhoeus (~> 1.3)
6060
yell (~> 2.0)
61-
http_parser.rb (0.6.0)
61+
http_parser.rb (0.8.0)
6262
httpclient (2.8.3)
63-
i18n (1.8.10)
63+
i18n (1.8.11)
6464
concurrent-ruby (~> 1.0)
65-
image_optim (0.30.0)
65+
image_optim (0.31.1)
6666
exifr (~> 1.2, >= 1.2.2)
6767
fspath (~> 3.0)
68-
image_size (>= 1.5, < 3)
68+
image_size (>= 1.5, < 4)
6969
in_threads (~> 1.3)
7070
progress (~> 3.0, >= 3.0.1)
71-
image_optim_pack (0.7.0.20210511)
71+
image_optim_pack (0.8.0.20211116)
7272
fspath (>= 2.1, < 4)
7373
image_optim (~> 0.19)
74-
image_optim_pack (0.7.0.20210511-x86_64-darwin)
74+
image_optim_pack (0.8.0.20211116-x86_64-darwin)
7575
fspath (>= 2.1, < 4)
7676
image_optim (~> 0.19)
77-
image_size (2.1.2)
77+
image_size (3.0.1)
7878
in_threads (1.5.4)
7979
jekyll (4.2.1)
8080
addressable (~> 2.4)
@@ -114,7 +114,7 @@ GEM
114114
jekyll (>= 3.3, < 5.0)
115115
jekyll-watch (2.2.1)
116116
listen (~> 3.0)
117-
json (2.5.1)
117+
json (2.6.1)
118118
kramdown (2.3.1)
119119
rexml
120120
kramdown-parser-gfm (1.1.0)
@@ -145,8 +145,6 @@ GEM
145145
racc (~> 1.4)
146146
nokogiri (1.12.5-x86_64-darwin)
147147
racc (~> 1.4)
148-
nokogumbo (2.0.5)
149-
nokogiri (~> 1.8, >= 1.8.4)
150148
octokit (4.21.0)
151149
faraday (>= 0.9)
152150
sawyer (~> 0.8.0, >= 0.5.3)
@@ -156,14 +154,14 @@ GEM
156154
progress (3.6.0)
157155
progressbar (1.11.0)
158156
public_suffix (4.0.6)
159-
racc (1.5.2)
157+
racc (1.6.0)
160158
rainbow (3.0.0)
161159
rake (13.0.6)
162160
rb-fsevent (0.11.0)
163161
rb-inotify (0.10.1)
164162
ffi (~> 1.0)
165163
rexml (3.2.5)
166-
rouge (3.26.1)
164+
rouge (3.27.0)
167165
ruby2_keywords (0.0.5)
168166
safe_yaml (1.0.5)
169167
sassc (2.4.0)

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ desc "Same as 'rake', 'rake preview'"
2424
task default: %w[preview]
2525

2626
desc "Same as 'test:report'"
27-
task test: %w[test:md test:report]
27+
task test: %w[test:md test:report test:unused_images test:unused_includes]
2828

2929
desc 'Preview the devdocs locally'
3030
task preview: %w[install clean] do

rakelib/test.rake

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,60 @@ namespace :test do
6262
abort 'Fix the reported issues'.red unless output.empty?
6363
puts 'No issues found'.green
6464
end
65+
66+
desc 'Find unused images. To exclude by regex pattern, use the "exclude_img" argument. Example of excluding a "layout" directory: "rake test:unused_includes exclude_img=/layout/"'
67+
task :unused_images do
68+
puts 'Running a task for finding unused images (png,svg,jpeg,jpg,ico)'.magenta
69+
images = FileList['src/**/*.{png,svg,jpeg,jpg,ico}']
70+
71+
puts "The project contains a total of #{images.size} images."
72+
73+
exclude = ENV['exclude_img']
74+
images.exclude(/#{exclude}/) if exclude
75+
76+
puts 'Checking for unlinked images...'
77+
Dir['src/**/*.{md,html,js,css}'].each do |file|
78+
# Exclude symmlinks
79+
next if File.symlink? file
80+
81+
images.delete_if { |image| File.read(file).include?(File.basename(image)) }
82+
end
83+
84+
if images.empty?
85+
puts 'No unlinked images'.green
86+
else
87+
images.each do |image|
88+
puts "No links for #{image}".yellow
89+
end
90+
puts "Found #{images.size} dangling images".red
91+
end
92+
end
93+
94+
desc 'Find unused includes. To exclude by regex pattern, use the "exclude_incl" argument. Example of excluding a "layout" directory: "rake test:unused_includes exclude_incl=/layout/"'
95+
task :unused_includes do
96+
puts 'Running a task to find unused _includes'.magenta
97+
includes = FileList['src/_includes/**/*']
98+
99+
puts "The project contains a total of #{includes.size} includes"
100+
101+
exclude = ENV['exclude_incl']
102+
includes.exclude(/#{exclude}/) if exclude
103+
104+
Dir['src/**/*.{md,html}'].each do |file|
105+
next if File.symlink? file
106+
107+
includes.delete_if { |include| File.read(file).include?(File.basename(include)) }
108+
end
109+
110+
if includes.empty?
111+
puts 'No unlinked includes'.green
112+
else
113+
puts 'The following includes are not linked:'
114+
includes.each do |include|
115+
puts "No links for #{include}".yellow
116+
end
117+
puts "Found #{includes.size} unlinked includes".red
118+
puts 'Be careful removing include files. Some include files, such as those in the layout/** directory, may not be linked in the project, but may be used implicitly by the doc theme.'.bold
119+
end
120+
end
65121
end

0 commit comments

Comments
 (0)