Skip to content

Commit ca3bff1

Browse files
Merge branch 'benjamindannegard/max-carrier-nbiot-tutorial' of https://github.com/arduino/docs-content-private into benjamindannegard/max-carrier-nbiot-tutorial
2 parents f6892ee + e23a9ec commit ca3bff1

File tree

767 files changed

+436115
-20383
lines changed

Some content is hidden

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

767 files changed

+436115
-20383
lines changed

.github/workflows/deploy-prd.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: Deploy to production
22

33
on:
4-
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
57

68
jobs:
79
build:
@@ -20,7 +22,7 @@ jobs:
2022
cache-dependency-path: "**/package-lock.json"
2123

2224
- name: Gatsby main cache
23-
uses: actions/cache@v1
25+
uses: actions/cache@v2
2426
id: gatsby-cache-folder
2527
with:
2628
path: .cache
@@ -29,7 +31,7 @@ jobs:
2931
${{ runner.os }}-cache-gatsby-
3032
3133
- name: Gatsby Public Folder
32-
uses: actions/cache@v1
34+
uses: actions/cache@v2
3335
id: gatsby-public-folder
3436
with:
3537
path: public/
@@ -39,7 +41,7 @@ jobs:
3941
4042
- run: npm install
4143

42-
- run: npm run build
44+
- run: GENERATE_DATASHEETS=true npm run build
4345

4446
- name: Configure AWS Credentials
4547
uses: aws-actions/configure-aws-credentials@v1
@@ -49,8 +51,8 @@ jobs:
4951
aws-region: us-west-1
5052

5153
- name: Sync all cacheable assets
52-
run:
53-
aws s3 sync --cache-control "public, max-age=31536000, immutable" --include "*.css" --include="*.js" --include="*.gif" --include="*.png" --include="*.svg" --exclude "*.html" --exclude="sw.js" --exclude="*.json" --delete public/ s3://${{ secrets.PROD_AWS_S3_BUCKET_NAME }}/
54-
# Don't cache any HTML or JSON file: they should always be up-to-date
54+
run: aws s3 sync --cache-control "public, max-age=31536000, immutable" --include "*.css" --include="*.js" --include="*.gif" --include="*.png" --include="*.svg" --exclude "*.html" --exclude="sw.js" --exclude="*.json" --delete public/ s3://${{ secrets.PROD_AWS_S3_BUCKET_NAME }}/
55+
5556
- name: Sync all non-cacheable assets
57+
# Don't cache any HTML or JSON file: they should always be up-to-dates
5658
run: aws s3 sync --cache-control "public, max-age=0, must-revalidate" --include "*.html" --include="sw.js" --include="*.json" --include "*.css" --exclude="*.js" --exclude="*.gif" --exclude="*.png" --exclude="*.svg" --delete public/ s3://${{ secrets.PROD_AWS_S3_BUCKET_NAME }}/

.github/workflows/deploy-stg.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ on:
44
workflow_dispatch:
55
push:
66
branches:
7-
- main
87
- ghaction
98

109
jobs:
1110
build:
12-
if: "github.repository == 'arduino/docs-content'"
1311
runs-on: ubuntu-latest
1412
env:
1513
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
@@ -24,7 +22,7 @@ jobs:
2422
cache-dependency-path: "**/package-lock.json"
2523

2624
- name: Gatsby main cache
27-
uses: actions/cache@v1
25+
uses: actions/cache@v2
2826
id: gatsby-cache-folder
2927
with:
3028
path: .cache
@@ -33,7 +31,7 @@ jobs:
3331
${{ runner.os }}-cache-gatsby-
3432
3533
- name: Gatsby Public Folder
36-
uses: actions/cache@v1
34+
uses: actions/cache@v2
3735
id: gatsby-public-folder
3836
with:
3937
path: public/
@@ -43,7 +41,7 @@ jobs:
4341
4442
- run: npm install
4543

46-
- run: npm run build
44+
- run: GENERATE_DATASHEETS=true npm run build
4745

4846
- name: Configure AWS Credentials
4947
uses: aws-actions/configure-aws-credentials@v1
@@ -53,8 +51,8 @@ jobs:
5351
aws-region: us-west-1
5452

5553
- name: Sync all cacheable assets
56-
run:
57-
aws s3 sync --cache-control "public, max-age=31536000, immutable" --include "*.css" --include="*.js" --include="*.gif" --include="*.png" --include="*.svg" --exclude "*.html" --exclude="sw.js" --exclude="*.json" --delete public/ s3://${{ secrets.STAG_AWS_S3_BUCKET_NAME }}/
58-
# Don't cache any HTML or JSON file: they should always be up-to-date
54+
run: aws s3 sync --cache-control "public, max-age=31536000, immutable" --include "*.css" --include="*.js" --include="*.gif" --include="*.png" --include="*.svg" --exclude "*.html" --exclude="sw.js" --exclude="*.json" --delete public/ s3://${{ secrets.STAG_AWS_S3_BUCKET_NAME }}/
55+
5956
- name: Sync all non-cacheable assets
57+
# Don't cache any HTML or JSON file: they should always be up-to-dates
6058
run: aws s3 sync --cache-control "public, max-age=0, must-revalidate" --include "*.html" --include="sw.js" --include="*.json" --include "*.css" --exclude="*.js" --exclude="*.gif" --exclude="*.png" --exclude="*.svg" --delete public/ s3://${{ secrets.STAG_AWS_S3_BUCKET_NAME }}/

.github/workflows/sync-private-mirror.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ jobs:
2222
git config --global user.email "sync@docs-content-private"
2323
git config --global user.name "docs-sync"
2424
git checkout main
25-
git push -u mirror main
25+
git push --force -u mirror main

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.babelrc
22
.cache
3-
_templates
43
algolia-queries.js
54
envs
65
gatsby-*
76
node_modules
87
public
9-
src
8+
src
9+
.DS_Store

.vscode/launch.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "pwa-node",
9+
"request": "launch",
10+
"name": "Debug Linter",
11+
"skipFiles": [
12+
"<node_internals>/**"
13+
],
14+
"program": "validate.js",
15+
"args": ["-p", "../../content"],
16+
"cwd": "${workspaceFolder}/scripts/validation/"
17+
},
18+
{
19+
"type": "pwa-node",
20+
"request": "launch",
21+
"name": "Debug Quickfix",
22+
"skipFiles": [
23+
"<node_internals>/**"
24+
],
25+
"program": "fix-issues.js",
26+
"args": ["-p", "../../content"],
27+
"cwd": "${workspaceFolder}/scripts/validation/"
28+
}
29+
]
30+
}

.vscode/tasks.json

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Run linter",
8+
"type": "shell",
9+
"command": "./content-lint.sh -p '../../content/hardware/'",
10+
"options": {
11+
"cwd": "${workspaceFolder}${pathSeparator}scripts${pathSeparator}validation"
12+
},
13+
"windows": {
14+
"command": ".\\content-lint.cmd -p '..\\..\\content\\hardware\\'"
15+
},
16+
"group": "none",
17+
"presentation": {
18+
"reveal": "always",
19+
"panel": "dedicated",
20+
"clear": true
21+
},
22+
23+
"problemMatcher": [{
24+
"fileLocation": ["relative", "${workspaceFolder}${pathSeparator}scripts${pathSeparator}validation"],
25+
"owner": "linter",
26+
"pattern": {
27+
"regexp": "^.+\\s(WARNING|ERROR):\\s(.*)\\sLocation:\\s(.*\\.[A-Za-z]+):(\\d+):?(\\d*)$",
28+
"severity": 1,
29+
"message": 2,
30+
"file": 3,
31+
"line": 4,
32+
"column": 5
33+
}
34+
}]
35+
},
36+
{
37+
"label": "Run linter (current article)",
38+
"type": "shell",
39+
"command": "./content-lint.sh -p '../../${relativeFile}' -c -v",
40+
"options": {
41+
"cwd": "${workspaceFolder}${pathSeparator}scripts${pathSeparator}validation"
42+
},
43+
"windows": {
44+
"command": ".\\content-lint.cmd -p '..\\..\\${relativeFile}' -c -v"
45+
},
46+
"group": "none",
47+
"presentation": {
48+
"reveal": "always",
49+
"panel": "dedicated",
50+
"clear": true
51+
},
52+
"problemMatcher": [{
53+
"fileLocation": ["relative", "${workspaceFolder}${pathSeparator}scripts${pathSeparator}validation"],
54+
"owner": "linter",
55+
"pattern": {
56+
"regexp": "^.+\\s(WARNING|ERROR):\\s(.+)\\sLocation:\\s(.+\\.[A-Za-z]+):(\\d+):?(\\d*)$",
57+
"severity": 1,
58+
"message": 2,
59+
"file": 3,
60+
"line": 4,
61+
"column": 5
62+
}
63+
}]
64+
},
65+
{
66+
"label": "Fix linter issues (current article)",
67+
"type": "shell",
68+
"command": "node './fix-issues.js' -p '../../${relativeFileDirname}'",
69+
"options": {
70+
"cwd": "${workspaceFolder}${pathSeparator}scripts${pathSeparator}validation"
71+
},
72+
"windows": {
73+
"command": "node '.\\fix-issues.js' -p '..\\..\\${relativeFileDirname}'"
74+
},
75+
"group": "none",
76+
"presentation": {
77+
"reveal": "always",
78+
"panel": "dedicated"
79+
},
80+
"problemMatcher": []
81+
},
82+
{
83+
"label": "Fix linter issues",
84+
"type": "shell",
85+
"command": "node ./fix-issues.js -p ../../content/hardware/",
86+
"options": {
87+
"cwd": "${workspaceFolder}${pathSeparator}scripts${pathSeparator}validation"
88+
},
89+
"windows": {
90+
"command": "node .\\fix-issues.js -p ..\\..\\content\\hardware\\"
91+
},
92+
"group": "none",
93+
"presentation": {
94+
"reveal": "always",
95+
"panel": "dedicated"
96+
},
97+
"problemMatcher": []
98+
},
99+
{
100+
"label": "Generate all datasheets",
101+
"type": "shell",
102+
"command": "./generate-datasheets.sh",
103+
"options": {
104+
"cwd": "${workspaceFolder}${pathSeparator}scripts${pathSeparator}datasheet-generator"
105+
},
106+
"windows": {
107+
"command": ".\\generate-datasheets.cmd"
108+
},
109+
"group": "none",
110+
"presentation": {
111+
"reveal": "always",
112+
"panel": "dedicated"
113+
},
114+
"problemMatcher": []
115+
},
116+
{
117+
"label": "Generate datasheet (current document)",
118+
"type": "shell",
119+
"command": "./generate-datasheets.sh '../../${relativeFileDirname}'",
120+
"options": {
121+
"cwd": "${workspaceFolder}${pathSeparator}scripts${pathSeparator}datasheet-generator"
122+
},
123+
"windows": {
124+
"command": ".\\generate-datasheets.cmd '..\\..\\${relativeFileDirname}'"
125+
},
126+
"group": "none",
127+
"presentation": {
128+
"reveal": "always",
129+
"panel": "dedicated"
130+
},
131+
"problemMatcher": []
132+
},
133+
{
134+
"label": "Run spell check",
135+
"type": "shell",
136+
"command": "(pip install codespell > /dev/null 2>&1 || pip3 install codespell > /dev/null 2>&1) && codespell -I 'scripts${pathSeparator}resources${pathSeparator}spell-check-ignore-list.txt' --skip='*.svg,*.dxf' .${pathSeparator}content${pathSeparator}",
137+
"options": {
138+
"cwd": "${workspaceFolder}"
139+
},
140+
"group": "none",
141+
"presentation": {
142+
"reveal": "always",
143+
"panel": "shared"
144+
},
145+
"problemMatcher": [{
146+
"fileLocation": ["relative", "${workspaceFolder}"],
147+
"owner": "linter",
148+
"pattern": {
149+
"regexp": "^\\s*(\\S+):(\\d+):\\s(.+)$",
150+
"file": 1,
151+
"line": 2,
152+
"message": 3
153+
}
154+
}]
155+
},
156+
{
157+
"label": "Fix misspellings",
158+
"type": "shell",
159+
"command": "(pip install codespell > /dev/null 2>&1 || pip3 install codespell > /dev/null 2>&1) && codespell -w -I 'scripts${pathSeparator}resources${pathSeparator}spell-check-ignore-list.txt' --skip='*.svg,*.dxf' .${pathSeparator}content${pathSeparator}",
160+
"options": {
161+
"cwd": "${workspaceFolder}"
162+
},
163+
"group": "none",
164+
"presentation": {
165+
"reveal": "always",
166+
"panel": "shared"
167+
},
168+
"problemMatcher": []
169+
}
170+
]
171+
}

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Contributions that are more likely to be rejected:
2828

2929
## Style
3030

31-
We require content to be written in plain and concise language, so that both basic and advanced users can understand it. See our [Style Guide](https://www.arduino.cc/en/Reference/StyleGuide) for more information about this.
31+
We require content to be written in plain and concise language, so that both basic and advanced users can understand it. See our [Style Guide](https://docs.arduino.cc/hacking/software/ArduinoStyleGuide) for more information about this.
3232

3333
## Licensing
3434

0 commit comments

Comments
 (0)