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
Copy file name to clipboardExpand all lines: README.md
+39-7Lines changed: 39 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Listed below are some of the areas we consider important when writing. We have t
15
15
16
16
To help with these goals, please refer to our guides on [writing documentation](https://design.chocolatey.org/content-and-marketing/writing-documentation) and the use of [language and grammar](https://design.chocolatey.org/content-and-marketing/language-and-grammar).
17
17
18
-
## Building the Site
18
+
## Building the Site for Development
19
19
20
20
There are multiple options to build the site:
21
21
@@ -30,7 +30,7 @@ Ensure that you have Node v20+ installed by running `node -v`. There is a `.\set
30
30
31
31
After confirming the required Node version, run the following command from a terminal:
32
32
33
-
```
33
+
```powershell
34
34
yarn dev
35
35
```
36
36
@@ -51,24 +51,55 @@ Follow these steps to open the project in a [Dev Container](https://containers.d
51
51
52
52
From a terminal, run the following:
53
53
54
-
```
54
+
```powershell
55
55
docker build -t chocolatey-docs-container .
56
56
```
57
57
58
58
Once this is complete, run the following from the same terminal:
59
59
60
-
```
60
+
```powershell
61
61
docker run -p 5086:5086 -v $(pwd):/app chocolatey-docs-container
62
62
```
63
63
64
64
This will compile the site, and bring up a preview on `http:localhost:5086`. Any changes you make will automatically be hot reloaded.
65
65
66
-
### Troubleshooting the build
66
+
## Building the Site for Production
67
+
68
+
Building the site for production is a good practice before submitting a pull request. An error of any kind will be flagged in the production build and it will fail.
69
+
70
+
From a terminal, run the following:
71
+
72
+
```powershell
73
+
yarn build
74
+
```
75
+
76
+
Once this is complete, run the following from the same terminal:
77
+
78
+
```powershell
79
+
yarn preview
80
+
```
81
+
82
+
This will start a server to show what the site will look like in production. Changes made to source files will not be reflected in this preview.
83
+
84
+
### Troubleshooting the Build
67
85
68
86
If you are having build errors with `'copyTheme' errored after`, try removing the `node_modules` directory and clearing your yarn cache with `yarn cache clean`.
69
87
70
88
If you receive the error `The configured user limit (128) on the number of inotify instances has been reached, or the per-process limit on the number of open file descriptors has been reached` then you can increase the number by running `echo fs.inotify.max_user_instances=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p`. See [this GitHub comment](https://github.com/dotnet/aspnetcore/issues/8449#issuecomment-512275929) for more information.
71
89
90
+
## Recommended VS Code Extensions
91
+
92
+
The following VS Code extensions are recommended to get the best development experience:
93
+
94
+
*[Astro](https://marketplace.visualstudio.com/items?itemName=astro-build.astro-vscode) - Syntax highlighting for .astro files.
95
+
*[MDX](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) - Syntax highlighting for .mdx files.
96
+
*[JavaScript and TypeScript Nightly](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-next) - JavaScript and TypeScript intelliSense.
97
+
*[ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) - Highlights syntax errors in .ts and .js files.
98
+
*[markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint) - Highlights syntax errors in .md and .mdx files.
99
+
*[Trailing Spaces](https://marketplace.visualstudio.com/items?itemName=shardulm94.trailing-spaces) - Highlights trailing spaces and allows you to easily delete them.
100
+
*[Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) - Highlights spelling errors and suggests fixes.
101
+
*[Gremlins](https://marketplace.visualstudio.com/items?itemName=nhoizey.gremlins) - Highlights characters that can be harmful because they are invisible or look like legitimate ones.
102
+
72
103
## Understanding Astro
73
104
74
105
The [Chocolatey Design System](https://design.chocolatey.org) and [choco-astro](https://github.com/chocolatey/choco-astro) contain information on how to understand several Astro concepts:
@@ -89,13 +120,13 @@ The [Chocolatey Design System](https://design.chocolatey.org) and [choco-astro](
89
120
90
121
To run all the Playwright tests, first run the following command:
91
122
92
-
```
123
+
```powershell
93
124
yarn build
94
125
```
95
126
96
127
Once this has completed, run:
97
128
98
-
```
129
+
```powershell
99
130
yarn playwright
100
131
```
101
132
@@ -106,6 +137,7 @@ This will run all Playwright tests and report any errors for further investigati
Come join in the conversation about Chocolatey in our [Community Chat Room](https://ch0.co/community).
110
142
111
143
Please make sure you've read over and agree with the [etiquette regarding communication](https://github.com/chocolatey/choco/blob/master/README.md#etiquette-regarding-communication).
0 commit comments