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
In order to run the documentation locally, install the dependencies and run the development server:
24
28
25
29
```sh
26
30
$ npm install --legacy-peer-deps
27
31
$ npm start
28
32
```
29
33
30
-
> **Note**: certain versions of npm (5-8) and Node.js (10-16) are required to run certain scripts.
34
+
> [!NOTE]
35
+
> Certain versions of npm (5-8) and Node.js (10-16) are required to run certain scripts.
36
+
37
+
### Linting Documentation
38
+
39
+
This repository uses [Prettier](https://prettier.io/), an opinionated code formatter, in order to keep consistent formatting throughout the documentation. Run the following command to automatically fix all formatting, and then push any changes:
40
+
41
+
```
42
+
npm run lint
43
+
```
44
+
45
+
### Spell Check
46
+
47
+
This repository uses [cspell](https://cspell.org/), a spell checker for code, to automatically flag any spelling errors. Run the following command to see any spelling errors:
48
+
49
+
```
50
+
npm run spellcheck
51
+
```
52
+
53
+
> [!NOTE]
54
+
> Any spelling errors will need to be fixed manually. There are various ways to ignore words or sections that were flagged erroneously. These are listed below.
55
+
56
+
#### Ignoring words
57
+
58
+
**To ignore:**
59
+
60
+
- A **specific word**, add it to the following file: `cspell-wordlist.txt`
61
+
- For example, `Ionicons` is flagged as an unknown word. Since this is the name of our software, it has been added to this file to be ignored.
62
+
- A **directory** or anything matching a **regular expression**, update the following file: `cspell.json`
63
+
- For example, we don't want to flag anything inside of code ticks (<code>`</code>) or code blocks (<code>```</code>), so there are regular expressions added to ignore anything inside of these.
64
+
- An **entire line**, add the following comment above it:
65
+
```markdown
66
+
<!-- cspell:disable-next-line -->
67
+
```
68
+
-**Multiple lines**, add comments above and below the lines to be ignored:
69
+
70
+
```markdown
71
+
<!-- cspell:disable -->
72
+
73
+
<p>Everything inside of these comments will be ignored by the spell checkr. Proofread your own words carefully.</p>
74
+
75
+
<!-- cspell:enable -->
76
+
```
77
+
78
+
> [!IMPORTANT]
79
+
> You need to have line breaks between the `cspell` comments and any HTML elements,
80
+
> otherwise the build will error with `Module build failed`.
81
+
82
+
#### Tips
83
+
84
+
Before adding a word or section to be ignored, see if there is a way to make it pass the spell check. Technical terms that are part of an API may need to be wrapped in code formatting. For example, the word `keydown` is flagged as an unknown word by the spell checker, but this is a [Web API event](https://developer.mozilla.org/en-US/docs/Web/API/Element/keydown_event). We can wrap any mentions of `keydown` in two backticks (<code>\`keydown\`</code>) in order to avoid it being flagged by the spell checker.
85
+
86
+
Comments disabling the next line or entire sections of documentation are useful for making the spell checker ignore people's names.
87
+
88
+
In general, we should try to avoid ignoring words unless they are technical terms that are used throughout the documentation and wouldn't necessarily make sense formatted as code.
31
89
32
90
---
33
91
@@ -87,6 +145,8 @@ We use Crowdin for our translation service. You can participate in the translati
87
145
88
146
_Please submit translation issues to the Crowdin page and not the Ionic Docs GitHub repo._
89
147
148
+
<!-- cspell:disable-next-line -->
149
+
90
150
The Japanese translation of the docs were built by an independent team, lead by [rdlabo](https://github.com/rdlabo) and can be found and contributed to on the [ionic-jp group's `ionic-docs` project page](https://github.com/ionic-jp/ionic-docs).
91
151
92
152
## Reporting Issues
@@ -100,7 +160,8 @@ If the issue you're reporting is a bug, please be sure it is an issue with the I
100
160
- OS and browser versions
101
161
- If possible, a demo repo or CodePen/CodeSandbox
102
162
103
-
> **Note**: Some [reference content](#reference-content) is pulled from other Ionic repos. In that case, please submit your issue on the docs repo with a link to the repo where the content lives.
163
+
> [!NOTE]
164
+
> Some [reference content](#reference-content) is pulled from other Ionic repos. In that case, please submit your issue on the docs repo with a link to the repo where the content lives.
104
165
105
166
---
106
167
@@ -110,20 +171,6 @@ When submitting pull requests, please keep the scope of your change contained to
110
171
111
172
---
112
173
113
-
<!-- ## Project Management
114
-
115
-
Internally, the Ionic documentation team uses a [project board](https://github.com/ionic-team/ionic-docs/projects/3) to plan work on the docs. The lanes on the board are:
116
-
117
-
- **Backlog** :file_cabinet: - Issues we plan to address, generally sorted by urgency
118
-
- **On Deck** :baseball: - Issues to be addressed during the current sprint, pulled from backlog during sprint planning
119
-
- **In Progress** :hammer: - Assigned issues that are currently being addressed
120
-
- **Needs Review** :mag: - Pull requests and issues that have a pending review
121
-
- **Done** :tada: - Issues that have been resolved
122
-
123
-
If you're looking for issues to help out with, we'd recommend either asking about an issue in the backlog or checking for issues labeled [`help-wanted`](https://github.com/ionic-team/ionic-docs/labels/help%20wanted).
124
-
125
-
--- -->
126
-
127
174
## Deploying
128
175
129
176
The Ionic documentation's `main` branch is deployed automatically and separately from the [Ionic site](https://github.com/ionic-team/ionic-site) itself. The Ionic site then uses a proxy for paths under `/docs` to request the deployed documentation.
`\nTo use this component in a docs markdown file, include\nthe following:\n\n## ${componentName}\n\nimport ${componentName} from '@site/static/usage/v7/${answers.name.replace(
`\nTo use this playground in a docs markdown file, include\nthe following:\n\n## ${playgroundName}\n\nimport ${playgroundName} from '@site/static/usage/v7/${answers.name}/${answers.path}/index.md';\n\n<${playgroundName} />\n`
0 commit comments