Skip to content

Commit

Permalink
docs: Update code snippets in README files (#267)
Browse files Browse the repository at this point in the history
Adding correct languages to readmes code snippets to enable syntax
highlighting
  • Loading branch information
webrdaniel authored Jan 31, 2024
1 parent 02c5deb commit e8ef22b
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 14 deletions.
Binary file modified dist/templates/js-crawlee-puppeteer-chrome.zip
Binary file not shown.
Binary file modified dist/templates/js-start.zip
Binary file not shown.
Binary file modified dist/templates/ts-crawlee-puppeteer-chrome.zip
Binary file not shown.
Binary file modified dist/templates/ts-start-bun.zip
Binary file not shown.
Binary file modified dist/templates/ts-start.zip
Binary file not shown.
6 changes: 3 additions & 3 deletions templates/console_readme_suffix.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ If you would like to develop locally, you can pull the existing Actor from Apify

**Using Homebrew**

```
```bash
brew install apify-cli
```

**Using NPM**

```
```bash
npm -g install apify-cli
```

Expand All @@ -31,7 +31,7 @@ If you would like to develop locally, you can pull the existing Actor from Apify

This command will copy the Actor into the current directory on your local machine.

```
```bash
apify pull <ActorId>
```

Expand Down
2 changes: 1 addition & 1 deletion templates/js-crawlee-puppeteer-chrome/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If you're looking for examples or want to learn more visit:
- Create a new router instance with `new createPuppeteerRouter()`
- Define default handler that will be called for all URLs that are not handled by other handlers by adding `router.addDefaultHandler(() => { ... })`
- Define additional handlers - here you can add your own handling of the page
```
```javascript
router.addHandler('detail', async ({ request, page, log }) => {
const title = await page.title();
// You can add your own page handling here
Expand Down
3 changes: 1 addition & 2 deletions templates/js-start/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ The scraped data in this template are page headings but you can easily edit the
3. `cheerio.load(response.data)` loads the page data and enables parsing the headings
4. This parses the headings from the page and here you can edit the code to parse whatever you need from the page

```
```javascript
$("h1, h2, h3, h4, h5, h6").each((_i, element) => {...});
```

5. `Actor.pushData(headings)` stores the headings in the dataset
Expand Down
6 changes: 3 additions & 3 deletions templates/local_readme_suffix.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

For complete information [see this article](https://docs.apify.com/platform/actors/development#build-actor-locally). To run the actor use the following command:

```
```bash
apify run
```

Expand All @@ -21,13 +21,13 @@ You can also deploy the project on your local machine to Apify without the need

1. Log in to Apify. You will need to provide your [Apify API Token](https://console.apify.com/account/integrations) to complete this action.

```
```bash
apify login
```

2. Deploy your Actor. This command will deploy and build the Actor on the Apify Platform. You can find your newly created Actor under [Actors -> My Actors](https://console.apify.com/actors?tab=my).

```
```bash
apify push
```

Expand Down
2 changes: 1 addition & 1 deletion templates/ts-crawlee-puppeteer-chrome/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If you're looking for examples or want to learn more visit:
- Create a new router instance with `new createPuppeteerRouter()`
- Define default handler that will be called for all URLs that are not handled by other handlers by adding `router.addDefaultHandler(() => { ... })`
- Define additional handlers - here you can add your own handling of the page
```
```javascript
router.addHandler('detail', async ({ request, page, log }) => {
const title = await page.title();
// You can add your own page handling here
Expand Down
3 changes: 1 addition & 2 deletions templates/ts-start-bun/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ The scraped data in this template are page headings but you can easily edit the
3. `cheerio.load(response.data)` loads the page data and enables parsing the headings
4. This parses the headings from the page and here you can edit the code to parse whatever you need from the page

```
```javascript
$("h1, h2, h3, h4, h5, h6").each((_i, element) => {...});
```

5. `Actor.pushData(headings)` stores the headings in the dataset
Expand Down
3 changes: 1 addition & 2 deletions templates/ts-start/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ The scraped data in this template are page headings but you can easily edit the
3. `cheerio.load(response.data)` loads the page data and enables parsing the headings
4. This parses the headings from the page and here you can edit the code to parse whatever you need from the page

```
```javascript
$("h1, h2, h3, h4, h5, h6").each((_i, element) => {...});
```

5. `Actor.pushData(headings)` stores the headings in the dataset
Expand Down

0 comments on commit e8ef22b

Please sign in to comment.