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
1.[Install Node.js](https://nodejs.org/en/download/), the minimum version required: v18.12.0
27
-
2. Run `npm install` in the root of the local repo after cloning to install the required dependencies for the dev server. This will also be necessary if any dependencies change.
25
+
1.[Install Node.js](https://nodejs.org/en/download/) (minimum version required: v18.12.0)
26
+
1. Run `npm install` in the root of the local repo after cloning to install the required dependencies for the dev server. This will also be necessary if any dependencies change.
28
27
29
28
### For each group of changes
30
29
@@ -41,9 +40,9 @@ This website is based on VuePress.
41
40
```
42
41
43
42
1. If you're adding a new page to the book, to make it appear, put it also to `.vuepress/configs/sidebar/{locale}.ts`.
44
-
2. Make changes
45
-
3. Verify your local changes render correctly using a web browser pointing to the local dev server site
46
-
4. Commit and push your changes
43
+
1. Make changes
44
+
1. Verify your local changes render correctly by opening <http://localhost:8080/> in a web browser and navigating to the new or changed pages
45
+
1. Commit and push your changes
47
46
48
47
```nu
49
48
git commit -m "Commit Message"
@@ -52,56 +51,56 @@ This website is based on VuePress.
52
51
53
52
(Where `my_changes` is the current branch)
54
53
55
-
5. Create a pull request in this GitHub repo
54
+
1. Create a pull request in this GitHub repo
56
55
57
56
## Enabling a Preview URL From Your Fork
58
57
59
58
Just enable GitHub actions in your repo settings. That's all! It will start deploying the next time you push to `main`.
60
59
61
-
62
60
### Display Nu Code Snippets With Syntax Highlighting
63
61
64
-
To display Nushell code snippets with syntax highlighting support you can wrap the Nu codes with \```nu \``` or \```nushell \```, for example:
62
+
To display Nushell code snippets with syntax highlighting support you can wrap the Nu codes with `` ```nu ``` ``or `` ```nushell ``` ``, for example:
65
63
64
+
````plain
66
65
```nu
67
66
# List the top five largest files
68
67
ls | where type == file | sort-by -r size | first 5
69
68
```
69
+
````
70
70
71
-
The preferred form for consistency is \```nu
71
+
The preferred form for consistency is `` ```nu ``.
72
72
73
73
## Translation Guide
74
74
75
75
Follow the steps above for each group of translations.
76
76
77
77
### Adding to or updating existing translations
78
78
79
-
*Check outdated translations. A helper script is provided for this. From the repository root, run:
79
+
Check outdated translations. A helper script is provided for this. From the repository root, run:
80
80
81
81
```nu
82
82
nu tools/i18n.nu outdated zh-CN
83
83
```
84
84
85
-
This will provide a list of all files that have been changed or added since the last translation update for the specified locale.
86
-
85
+
This will provide a list of all files that have been changed or added since the last translation update for the specified locale.
87
86
88
87
### Creating a new translation
89
88
90
89
1. Add a book dir for the specified locale in the docs' root folder, say `zh-CN`.
91
90
1. Create a `book` child folder for all your translated documents and a README.md for the home page of your locale
92
-
4. Modify the VuePress config file `.vuepress/config.js` and add `zh-CN` related configs.
91
+
1. Modify the VuePress config file `.vuepress/config.js` and add `zh-CN` related configs.
93
92
94
-
Here is an example [commit](https://github.com/nushell/nushell.github.io/commit/46d1672) for reference.
93
+
Here is an [example commit](https://github.com/nushell/nushell.github.io/commit/46d1672) for reference.
95
94
96
-
5. Add a `README.md` in the `book` dir which will be the default introduction page of Nushell.
95
+
1. Add a `README.md` in the `book` dir which will be the default introduction page of Nushell.
97
96
98
97
::: warning Important
99
98
Please **DO NOT** translate the file name of the docs.
100
99
:::
101
100
102
-
6. Run `npm run dev`, then open **http://localhost:8080/** in your browser
101
+
1. Run `npm run dev`, then open <http://localhost:8080/> in your browser
103
102
1. Switch to the language you are going to translate into, and you will see the introduction page you have just created. You can translate the docs and save them to get a preview in the browser.
104
103
105
-
7. Update the `i18n-meta.json` file by filling in the locale value of the doc you have just finished. It's recommended to use `commit_id@author` or simply a `commit_id` to indicate your translation end to the specified commit.
106
-
8. Commit your changes. It's recommended to squash all your commits in one commit with a commit message like this: `Translate your_doc_file.md to zh-CN from commit: f3dc86d3d`;
107
-
9. Push your changes as documented above
104
+
1. Update the `i18n-meta.json` file by filling in the locale value of the doc you have just finished. It's recommended to use `commit_id@author` or simply a `commit_id` to indicate your translation end to the specified commit.
105
+
1. Commit your changes. It's recommended to squash all your commits in one commit with a commit message like this: `Translate your_doc_file.md to zh-CN from commit: f3dc86d3d`;
0 commit comments