You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci: add markdown, website, and image lint checks (#1987)
Adds Markdown, website, and image lint checks to CI, mirroring the setup
in `apify-docs` and `apify-core`. The docs and website now go through
the same kind of automated checks as the Python code.
The website tooling moves from eslint + prettier (which weren't wired
into CI) to [oxlint](https://oxc.rs/) and [oxfmt](https://oxc.rs/), and
[markdownlint](https://github.com/DavidAnson/markdownlint) now covers
the Markdown files.
Three jobs run in the existing Checks workflow:
- **Markdown lint** — `markdownlint` over `README.md`,
`CONTRIBUTING.md`, and the `docs/` folder.
- **Website lint and format** — `oxlint` plus an `oxfmt --check`
formatting gate for the Docusaurus site.
- **Image lint** — fails when a PR adds unoptimized raster images, which
should be converted with `pnpm opt:images` first.
Notes:
- The website JS keeps single quotes, set via `.editorconfig`
(`quote_type`) and `.oxfmtrc.json` (`singleQuote`).
- The markdownlint config matches `apify-docs`: line length is disabled
and inline HTML is allowed.
- Minor doc and code fixes were applied where needed to pass the new
checks.
Closes#1692
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+28-15Lines changed: 28 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,6 +115,22 @@ To run the documentation locally, ensure you have `Node.js` 20+ installed, then
115
115
uv run poe run-docs
116
116
```
117
117
118
+
### Linting the docs and website
119
+
120
+
Markdown content (this guide, `README.md`, and the `docs/` folder) is checked with
121
+
[markdownlint](https://github.com/DavidAnson/markdownlint). The Docusaurus website code is linted
122
+
with [oxlint](https://oxc.rs/) and formatted with [oxfmt](https://oxc.rs/). All of them run in CI.
123
+
To run them locally (requires Node.js 22.12 or newer and pnpm), from the `website/` directory:
124
+
125
+
```sh
126
+
pnpm lint # lint Markdown and website code
127
+
pnpm lint:fix # auto-fix both
128
+
pnpm format # format the website code
129
+
```
130
+
131
+
Doc images are committed as optimized `.webp`. To convert a new image, run
132
+
`pnpm opt:images <path-to-image>` from the `website/` directory.
133
+
118
134
## Commits
119
135
120
136
We use [Conventional Commits](https://www.conventionalcommits.org/) format for commit messages. This convention is used to automatically determine version bumps during the release process.
@@ -146,25 +162,22 @@ Publishing new versions to [PyPI](https://pypi.org/project/crawlee) is automated
146
162
147
163
1.**Do not do this unless absolutely necessary.** In all conceivable scenarios, you should use the `release` workflow instead.
148
164
2.**Make sure you know what you're doing.**
165
+
3. Update the version number by modifying the `version` field under `project` in `pyproject.toml`:
149
166
150
-
3. Update the version number:
151
-
152
-
- Modify the `version` field under `project` in `pyproject.toml`.
Apify is a [platform](https://apify.com) built to serve large-scale and high-performance web scraping and automation needs. It provides easy access to [compute instances (Actors)](#what-is-an-actor), convenient request and result storages, [proxies](../guides/proxy-management), scheduling, webhooks and [more](https://docs.apify.com/), accessible through a [web interface](https://console.apify.com) or an [API](https://docs.apify.com/api).
16
+
Apify is a [platform](https://apify.com) built to serve large-scale and high-performance web scraping and automation needs. It provides easy access to [compute instances (Actors)](#what-is-an-actor), convenient request and result storages, [proxies](../guides/proxy-management), scheduling, webhooks, and [more in the Apify documentation](https://docs.apify.com/), accessible through a [web interface](https://console.apify.com) or an [API](https://docs.apify.com/api).
17
17
18
18
While we think that the Apify platform is super cool, and it's definitely worth signing up for a [free account](https://console.apify.com/sign-up), **Crawlee is and will always be open source**, runnable locally or on any cloud infrastructure.
19
19
@@ -25,7 +25,7 @@ We do not test Crawlee in other cloud environments such as Lambda or on specific
25
25
26
26
## Requirements
27
27
28
-
To run your Crawlee code on Apify platform, you need an Apify account. If you don't have one yet, you can sign up[here](https://console.apify.com/sign-up).
28
+
To run your Crawlee code on Apify platform, you need an Apify account. If you don't have one yet, you can [sign up](https://console.apify.com/sign-up).
29
29
30
30
Additionally, you must have the [Apify CLI](https://docs.apify.com/cli/) installed on your computer. For installation instructions, refer to the [Installation guide](https://docs.apify.com/cli/docs/installation).
31
31
@@ -72,7 +72,7 @@ When you deploy your script to the Apify platform, it becomes an [Actor](https:/
72
72
73
73
Actors can be shared in the [Apify Store](https://apify.com/store) so that other people can use them. But don't worry, if you share your Actor in the store and somebody uses it, it runs under their account, not yours.
74
74
75
-
**Related links**
75
+
### Related links
76
76
77
77
-[Store of existing Actors](https://apify.com/store)
78
78
-[Documentation](https://docs.apify.com/actors)
@@ -135,7 +135,8 @@ There are several things worth mentioning here.
135
135
136
136
### Helper functions for default Key-Value Store and Dataset
137
137
138
-
To simplify access to the _default_ storages, instead of using the helper functions of respective storage classes, you could use:
138
+
To simplify access to the *default* storages, instead of using the helper functions of respective storage classes, you could use:
139
+
139
140
-[`Actor.set_value()`](https://docs.apify.com/sdk/python/reference/class/Actor#set_value), [`Actor.get_value()`](https://docs.apify.com/sdk/python/reference/class/Actor#get_value), [`Actor.get_input()`](https://docs.apify.com/sdk/python/reference/class/Actor#get_input) for [`Key-Value Store`](https://docs.apify.com/sdk/python/reference/class/KeyValueStore)
140
141
-[`Actor.push_data()`](https://docs.apify.com/sdk/python/reference/class/Actor#push_data) for [`Dataset`](https://docs.apify.com/sdk/python/reference/class/Dataset)
141
142
@@ -150,6 +151,7 @@ If you don't plan to force usage of the platform storages when running the Actor
150
151
:::
151
152
152
153
{/*
154
+
153
155
### Getting public url of an item in the platform storage
154
156
155
157
If you need to share a link to some file stored in a [Key-Value](https://docs.apify.com/sdk/python/reference/class/KeyValueStore) Store on Apify platform, you can use [`get_public_url()`](https://docs.apify.com/sdk/python/reference/class/KeyValueStore#get_public_url) method. It accepts only one parameter: `key` - the key of the item you want to share.
@@ -164,7 +166,7 @@ If you need to share a link to some file stored in a [Key-Value](https://docs.ap
164
166
165
167
When the <ApiLinkto="class/Dataset">`Dataset`</ApiLink> is stored on the [Apify platform](https://apify.com/actors), you can export its data to the following formats: HTML, JSON, CSV, Excel, XML and RSS. The datasets are displayed on the Actor run details page and in the [Storage](https://console.apify.com/storage) section in the Apify Console. The actual data is exported using the [Get dataset items](https://apify.com/docs/api/v2#/reference/datasets/item-collection/get-items) Apify API endpoint. This way you can easily share the crawling results.
-[View storage in Apify Console](https://console.apify.com/storage)
@@ -245,9 +247,10 @@ in the [proxy dashboard](https://console.apify.com/proxy).
245
247
The [`ProxyConfiguration`](https://docs.apify.com/sdk/python/reference/class/ProxyConfiguration) class covers both Apify Proxy and custom proxy URLs so that you can easily switch between proxy providers. However, some features of the class are available only to Apify Proxy users, mainly because Apify Proxy is what one would call a super-proxy. It's not a single proxy server, but an API endpoint that allows connection through millions of different IP addresses. So the class essentially has two modes: Apify Proxy or Own (third party) proxy.
246
248
247
249
The difference is easy to remember.
250
+
248
251
- If you're using your own proxies - you should create a <ApiLinkto="class/ProxyConfiguration">`ProxyConfiguration`</ApiLink> instance directly.
249
252
- If you are planning to use Apify Proxy - you should create an instance using the [`Actor.create_proxy_configuration()`](https://docs.apify.com/sdk/python/reference/class/Actor#create_proxy_configuration) function. The `new_url_function` parameter enables the use of your custom proxy URLs, whereas all the other options are there to configure Apify Proxy.
Copy file name to clipboardExpand all lines: docs/deployment/aws_lambda.mdx
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -160,6 +160,7 @@ Create a repository `lambda/aws-playwright` in [Amazon Elastic Container Registr
160
160
Navigate to the created repository and click the "View push commands" button. This will open a window with console commands for uploading the Docker image to your repository. Execute them.
0 commit comments