Skip to content

Commit a9f4bfa

Browse files
authored
docs: new vale rule (#1890)
new rule looking for H1's slight adjustments to accept.txt & .vale.ini
1 parent 4746dcb commit a9f4bfa

File tree

7 files changed

+18
-10
lines changed

7 files changed

+18
-10
lines changed

.github/styles/Apify/H1.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
extends: existence
2+
message: 'Do not use H1 headings (#). The main title is generated automatically. Please use H2 (##) or lower.'
3+
level: error
4+
scope: heading.h1
5+
tokens:
6+
- '.+'

.github/styles/config/vocabularies/Docs/accept.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
\bApify\b(?:-\w+)?
2-
@apify\.com
31
SDK(s)
42
[Ss]torages
53
Crawlee
@@ -84,6 +82,7 @@ preconfigured
8482
[Tt]rello
8583
[Pp]refill
8684
[Gg]umloop
85+
[Aa]pify
8786

8887
[Mm]ultiselect
8988

.github/workflows/vale.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
files: ${{ steps.changed-files.outputs.all_changed_files }}
3232
separator: ','
3333
fail_on_error: true
34+
filter_mode: nofilter
3435
vale_flags: '--minAlertLevel=error'
3536
reporter: github-pr-annotations
3637

.vale.ini

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ mdx = md
1212
[*.md]
1313
BasedOnStyles = Vale, Apify, write-good, Microsoft
1414
# Ignore URLs, HTML/XML tags, lines with =, emails, curly braces, inline code
15-
TokenIgnores = (<\/?[A-Z][^>]*>), ([^\n]+=[^\n]*), ([^\n]+@[^\n]+\.[^\n]), ({[^}]*}), `[^`]+`
15+
TokenIgnores = (<\/?[A-Z][^>]*>), ([^\n]+=[^\n]*), ([^\n]+@[^\n]+\.[^\n]), ({[^}]*})
1616
# Ignore HTML comments and Markdown code blocks
1717
BlockIgnores = (?s) (<!--.*?-->)|(```.*?```)
18-
Vale.Spelling = YES
19-
2018

2119
# Disabling rules (NO)
20+
Vale.Spelling = NO
21+
write-good.ThereIs = NO
2222
Microsoft.Dashes = NO
2323
Microsoft.Avoid = NO
2424
Microsoft.Contractions = NO
@@ -30,3 +30,9 @@ Microsoft.Auto = NO
3030
Microsoft.URLFormat = NO
3131
Microsoft.GeneralURL = NO
3232
Microsoft.RangeFormat = NO
33+
Apify.Apify = NO
34+
Apify.Capitalization = NO
35+
Apify.Languages = NO
36+
37+
[{README.md,CONTRIBUTING.md}]
38+
Apify.H1 = NO

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contributing to Apify Documentation
1+
# Contributing to Apify documentation
22

33
## Before you start
44

sources/academy/webscraping/scraping_basics_javascript/crawling/finding_links.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ slug: /web-scraping-for-beginners/crawling/finding-links
77

88
import Example from '!!raw-loader!roa-loader!./finding_links.js';
99

10-
# Finding links {#finding-links}
11-
1210
**Learn what a link looks like in HTML and how to find and extract their URLs when web scraping using both DevTools and Node.js.**
1311

1412
---

sources/academy/webscraping/scraping_basics_javascript/crawling/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ category: courses
66
slug: /web-scraping-for-beginners/crawling
77
---
88

9-
# Basics of crawling {#basics}
10-
119
**Learn how to crawl the web with your scraper. How to extract links and URLs from web pages and how to manage the collected links to visit new pages.**
1210

1311
---

0 commit comments

Comments
 (0)