Skip to content

Commit bb9e2a6

Browse files
authored
Test 2.0.0 (#1268)
* Test 2.0.0 * test upgrade node * Update deploy actions * Programming section * Programming order * Prgramming page improvements * Update frontmatter for new section Programming * Add custom videoInfo and product banner buttons. Update README * Language reference structure * Improve programming and language reference new structure * Github cloudflare action (#1576) * test * Add custom videoInfo and product banner buttons. Update README * Improve programming and language reference new structure * Add featureWrapper * Micropython courses * Github cloudflare action * add env * remove cache * Improve cloudflare actions * 2.0.0-alpha-24.4 * Compress PDF * 2.0.0-alpha-24.9 * 2.0.0-alpha-25 * 2.0.0-alpha-25 * 2.0.0-alpha-25.1 * 2.0.0
1 parent d643606 commit bb9e2a6

File tree

595 files changed

+25405
-20239
lines changed

Some content is hidden

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

595 files changed

+25405
-20239
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: "Upload an app to Cloudflare Pages"
2+
description: "Manually deploy an app to cloudflare pages"
3+
inputs:
4+
upload-dir:
5+
description: "The name of the app to build and export"
6+
required: true
7+
8+
project-name:
9+
description: "The name of the project to upload to"
10+
required: true
11+
12+
cloudflare-account:
13+
description: "The Cloudflare account ID"
14+
required: true
15+
16+
cloudflare-api-token:
17+
description: "The Cloudflare API token"
18+
required: true
19+
20+
runs:
21+
using: composite
22+
steps:
23+
24+
- name: Find PR Preview Comment
25+
if: github.event_name == 'pull_request'
26+
uses: peter-evans/find-comment@v1
27+
id: deploy-preview-comment
28+
with:
29+
issue-number: ${{ github.event.pull_request.number }}
30+
comment-author: "github-actions[bot]"
31+
body-includes: ${{ inputs.project-name }}
32+
33+
- name: Update Comment if exists
34+
if: github.event_name == 'pull_request' && steps.deploy-preview-comment.outputs.comment-id != 0
35+
uses: peter-evans/[email protected]
36+
with:
37+
comment-id: ${{ steps.deploy-preview-comment.outputs.comment-id }}
38+
edit-mode: replace
39+
body: |
40+
### ${{ inputs.project-name }}
41+
Waiting for deployment to complete...
42+
43+
- id: branch-name
44+
uses: tj-actions/branch-names@v5
45+
46+
- id: format-branch
47+
shell: bash
48+
run: format=$(echo ${{ steps.branch-name.outputs.current_branch }} | tr / -) && echo "::set-output name=branch::$(echo "${format:0:28}")"
49+
50+
- name: deploy-cloudflare
51+
uses: cloudflare/pages-action@v1
52+
id: deploy-cloudflare
53+
with:
54+
apiToken: ${{ inputs.cloudflare-api-token }}
55+
accountId: ${{ inputs.cloudflare-account }}
56+
projectName: ${{ inputs.project-name }}
57+
directory: ${{ inputs.upload-dir }}
58+
branch: ${{ steps.format-branch.outputs.branch }}
59+
60+
- name: Create PR Preview Comment
61+
if: github.event_name == 'pull_request' && steps.deploy-preview-comment.outputs.comment-id == 0
62+
uses: peter-evans/[email protected]
63+
with:
64+
issue-number: ${{ github.event.pull_request.number }}
65+
body: |
66+
### ${{ inputs.project-name }}
67+
🚀 Preview this PR: ${{ steps.deploy-cloudflare.outputs.url }}
68+
📍 Commit SHA: ${{ github.sha }}
69+
70+
71+
- name: Update PR Preview Comment
72+
if: github.event_name == 'pull_request' && steps.deploy-preview-comment.outputs.comment-id != 0
73+
uses: peter-evans/[email protected]
74+
with:
75+
comment-id: ${{ steps.deploy-preview-comment.outputs.comment-id }}
76+
edit-mode: replace
77+
body: |
78+
### ${{ inputs.project-name }}
79+
🚀 Preview this PR: ${{ steps.deploy-cloudflare.outputs.url }}
80+
📍 Commit SHA: ${{ github.sha }}
81+

.github/workflows/cloudflare.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Cloudflare Pages
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
types: [opened, synchronize]
8+
9+
jobs:
10+
run:
11+
runs-on: ubuntu-latest
12+
env:
13+
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
14+
APP_ENV: prod
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: actions/setup-node@v3
19+
with:
20+
node-version: 18
21+
cache: "npm"
22+
cache-dependency-path: "**/package-lock.json"
23+
24+
- name: Render Datasheets
25+
run: cd ${GITHUB_WORKSPACE}/scripts/datasheet-rendering;./render-datasheets.sh
26+
27+
- name: Copy Static Files
28+
run: |
29+
mkdir -p static/resources/datasheets static/resources/schematics static/resources/pinouts
30+
find ./content/hardware -type f -name "*-schematics.pdf" -exec cp {} ./static/resources/schematics/ \;
31+
find ./content/hardware -type f -name "*-datasheet.pdf" -exec cp {} ./static/resources/datasheets/ \;
32+
find ./content/hardware -type f -name "*-full-pinout.pdf" -exec cp {} ./static/resources/pinouts/ \;
33+
find ./content/hardware -type f -name "*-pinout.png" -exec cp {} ./static/resources/pinouts/ \;
34+
35+
- name: Gatsby main cache
36+
uses: actions/cache@v3
37+
id: gatsby-cache-folder
38+
with:
39+
path: .cache
40+
key: ${{ runner.os }}-cache-gatsbyV2-${{ github.sha }}
41+
restore-keys: |
42+
${{ runner.os }}-cache-gatsbyV2-
43+
44+
- name: Gatsby Public Folder
45+
uses: actions/cache@v3
46+
id: gatsby-public-folder
47+
with:
48+
path: public/
49+
key: ${{ runner.os }}-public-gatsbyV2-${{ github.sha }}
50+
restore-keys: |
51+
${{ runner.os }}-public-gatsbyV2-
52+
53+
- run: npm install
54+
- run: npm run build
55+
56+
- name: Docs
57+
uses: ./.github/actions/cloudflare-upload
58+
with:
59+
upload-dir: public
60+
project-name: docs-content
61+
cloudflare-api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
62+
cloudflare-account: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

.github/workflows/deploy-prd.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: cd ${GITHUB_WORKSPACE}/scripts/datasheet-rendering;./render-datasheets.sh
2727

2828
- name: Copy Static Files
29-
run: |
29+
run: |
3030
mkdir -p static/resources/datasheets static/resources/schematics static/resources/pinouts
3131
find ./content/hardware -type f -name "*-schematics.pdf" -exec cp {} ./static/resources/schematics/ \;
3232
find ./content/hardware -type f -name "*-datasheet.pdf" -exec cp {} ./static/resources/datasheets/ \;

.github/workflows/deploy-stg.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ jobs:
1717
- uses: actions/checkout@v3
1818
- uses: actions/setup-node@v3
1919
with:
20-
node-version: 14
20+
node-version: 18
2121
cache: "npm"
2222
cache-dependency-path: "**/package-lock.json"
23-
23+
2424
- name: Render Datasheets
2525
run: cd ${GITHUB_WORKSPACE}/scripts/datasheet-rendering;./render-datasheets.sh
2626

2727
- name: Copy Static Files
28-
run: |
28+
run: |
2929
mkdir -p static/resources/datasheets static/resources/schematics static/resources/pinouts
3030
find ./content/hardware -type f -name "*-schematics.pdf" -exec cp {} ./static/resources/schematics/ \;
3131
find ./content/hardware -type f -name "*-datasheet.pdf" -exec cp {} ./static/resources/datasheets/ \;

.npmrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@bcmi-labs:registry=https://npm.pkg.github.com/
22
@serjlee:registry=https://npm.pkg.github.com/
33
@arduino:registry=https://npm.pkg.github.com/
4-
//npm.pkg.github.com/:_authToken=${REPO_ACCESS_TOKEN}
4+
//npm.pkg.github.com/:_authToken=${REPO_ACCESS_TOKEN}
5+
legacy-peer-deps=true

README.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ symbolic link created for AnalogInput <<===>> ..\..\..\..\..\built-in-examples\0
8383
### Including Code Snippets
8484

8585
Code snippets can be included by using the triple backticks syntax e.g. ` ```arduino` followed by the code and three closing backticks. The following syntaxes are supported:
86+
8687
```
8788
arduino, bash, markup, clike, c, cpp, css, css-extras, javascript, jsx, js-extras, coffeescript, diff, git, go, graphql, handlebars, json, less, makefile, markdown, objectivec, ocaml, python, reason, sass, scss, sql, stylus, tsx, typescript, wasm, yaml
8889
```
@@ -94,16 +95,24 @@ Using this component, the code block will be fetched directly from Github pages.
9495

9596
Syntax:
9697
` <CodeBlock url=”https://github.com/example” className="{language}"/>`
97-
98+
9899
Broken URL will show error alert. URL must be in Github domain and must be public.
99100

101+
### Use Custom content con various component
102+
103+
- **Details** pages: on every `product.md` file you have to create 4 variables, related to the hero buttons component in every details page:
104+
- primary_button_url: (string)
105+
- primary_button_title: (string)
106+
- secondary_button_url: (string)
107+
- secondary_button_title: (string)
108+
- **Video**: You can manage the content in the video components (Actually in Learn, Arduino-cloud and MycroPython page), just compiling the file `videoInfo.md` in the main directory of the relative section.
109+
100110
## Previewing Changes
101111

102112
Whenever you create a Pull Request (PR) GatsbyCloud will create a preview deployment in which you can see how your changes look when rendered on the website. The link to the preview will appear in the comments of the PR. This also works with Draft PRs, but not for PRs created from a fork.
103113

104114
## License
105115

106-
![](https://i.creativecommons.org/l/by-sa/3.0/88x31.png)
116+
![](https://i.creativecommons.org/l/by-sa/3.0/88x31.png)
107117

108118
Please note that your contribution to the Arduino Documentation is licensed under a Creative Commons Attribution-Share Alike 4.0 License. see https://creativecommons.org/licenses/by-sa/4.0/
109-
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
---
22
title: Guides
3+
icon: IconBrackets
34
---
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
---
22
title: Hardware & Devices
3-
---
3+
icon: IconBoard
4+
---
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
---
22
title: Cloud Interface
3+
icon: IconCloud
34
---
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
---
22
title: Cloud Editor
3-
---
3+
icon: IconCloud
4+
---
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
---
22
title: IoT Remote App
3+
icon: IconBooks
34
---
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
---
22
title: Features
3+
icon: IconSquare
34
---

content/arduino-cloud/07.api/api.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
---
22
title: API
3-
---
3+
icon: IconProgramming
4+
---
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
---
22
title: Arduino Cloud CLI
3+
icon: IconProgramming
34
---
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
---
22
title: Cloud Business
3-
---
3+
icon: IconBooks
4+
---
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
---
22
title: Cloud Education
3-
---
3+
icon: IconCloud
4+
---
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
---
22
title: Application Notes
3+
icon: IconDatasheet
34
---

content/arduino-cloud/videoInfo.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
url: https://www.youtube.com/embed/uaLrmLCqGnc?si=mrZrx8NTxS3RksyI
3+
info:
4+
[
5+
{
6+
icon: IconNet,
7+
title: Getting Started with Arduino Cloud,
8+
description: 'An online platform that makes it easy for you to code, deploy and monitor IoT projects.',
9+
link: /arduino-cloud/guides/overview,
10+
},
11+
{
12+
icon: IconBrackets,
13+
title: Arduino / C++,
14+
description: Get started with the Arduino Cloud using the C++ programming language.,
15+
link: /arduino-cloud/guides/arduino-c,
16+
},
17+
{
18+
icon: IconCLI,
19+
title: ESP32 / ESP8266,
20+
description: Learn how to set up ESP32/ESP8266 based boards in the Arduino Cloud.,
21+
link: /arduino-cloud/guides/esp32,
22+
},
23+
{
24+
icon: IconBooks,
25+
title: Cloud Editor,
26+
description: A step-by-step guide to set up your online development environment.,
27+
link: /arduino-cloud/guides/cloud-editor,
28+
},
29+
]
30+
---

content/built-in-examples/08.strings/StringComparisonOperators/StringComparisonOperators.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: 'String Comparison Operators'
33
compatible-products: [all-boards]
44
difficulty: intermediate
55
description: 'Learn how to make alphabetic comparisons between Strings. They are useful for sorting and alphabetizing, among other things.'
6-
tags:
6+
tags:
77
- Strings
88
- Operators
99
- Comparison
@@ -24,7 +24,7 @@ is identical to
2424
if (stringOne ==stringTwo) {
2525
```
2626

27-
The ">" (greater than) and "<" (less than) operators evaluate strings in alphabetical order, on the first character where the two differ. So, for example `"a" < "b"` and `"1" < "2"`, but `"999" > "1000"` because 9 comes after 1.
27+
The `>` (greater than) and `<` (less than) operators evaluate strings in alphabetical order, on the first character where the two differ. So, for example `"a" < "b"` and `"1" < "2"`, but `"999" > "1000"` because 9 comes after 1.
2828

2929
**Caution:**
3030
String comparison operators can be confusing when you're comparing numeric strings, because the numbers are treated as strings and not as numbers. If you need to compare numbers, compare them as ints, floats, or longs, and not as Strings.

content/hardware/01.mkr/01.boards/mkr-1000-wifi/features.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ The MKR 1000 WiFi is a great choice for any beginner, maker or professional to g
88
<Feature title="Wi-Fi" image="wifi">
99

1010
This Wi-Fi module from Atmel is part of the SmartConnect family, with focus on power consumption and power saving modes.
11-
11+
<FeatureWrapper>
1212
<FeatureLink variant="primary" title="Documentation" url="/tutorials/mkr-1000-wifi/mkr-1000-connect-to-wifi"/>
1313
<FeatureLink variant="secondary" title="library" url="https://www.arduino.cc/reference/en/libraries/wifi101/"/>
14+
</FeatureWrapper>
1415
</Feature>
1516

1617
</FeatureList>

content/hardware/01.mkr/01.boards/mkr-fox-1200/features.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,18 @@ The MKR FOX 1200 adds Sigfox connectivity to your projects. Using the popular <b
77
<Feature title="Microchip® Smart RF Transmitter" image="cellular">
88

99
Fully integrated, single-chip RF transmitter with low power consumption.
10-
10+
<FeatureWrapper>
1111
<FeatureLink variant="primary" title="Documentation" url="/tutorials/mkr-fox-1200/sigfox-first-configuration"/>
1212
<FeatureLink variant="secondary" title="library" url="https://www.arduino.cc/reference/en/libraries/arduino-sigfox-for-mkrfox1200/"/>
13+
</FeatureWrapper>
1314
</Feature>
1415

1516
<Feature title="Coverage" image="world-map">
1617

17-
SigFox covers most parts of Europe, South Africa, Japan and is being introduced in many more countries.
18-
18+
SigFox covers most parts of Europe, South Africa, Japan and is being introduced in many more countries.
19+
<FeatureWrapper>
1920
<FeatureLink variant="primary" title="Link to Map" url="https://www.sigfox.com/en/coverage"/>
21+
</FeatureWrapper>
2022
</Feature>
2123

2224
</FeatureList>

content/hardware/01.mkr/01.boards/mkr-gsm-1400/features.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ The MKR GSM 1400 is a great option for GSM / 3G connectivity projects. Using the
77
<Feature title="GSM / 3G Connectivity" image="cellular">
88

99
Enables GSM / 3G connectivity for the MKR GSM 1400 board.
10-
10+
<FeatureWrapper>
1111
<FeatureLink variant="primary" title="Documentation" url="/tutorials/mkr-gsm-1400/gsm-receive-sms"/>
1212
<FeatureLink variant="secondary" title="library" url="https://www.arduino.cc/reference/en/libraries/mkrgsm/"/>
13+
</FeatureWrapper>
1314
</Feature>
1415

1516
</FeatureList>

0 commit comments

Comments
 (0)