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
10. The [Agoric website's Documentation Section](https://agoric.com/documentation/) displays
32
-
the VitePress processed files, which have been converted to HTML.
33
+
the VitePress processed files, which have been converted to HTML.
33
34
34
35
This doc explains:
36
+
35
37
- The overall documentation structure.
36
38
- Our preferred way of writing links.
37
39
- What happens when you make a PR.
@@ -88,14 +90,17 @@ on one page and that they aren't too long. Otherwise the sidebar menu for the pa
88
90
89
91
Individual pages do not automatically display a sidebar menu for their headers without the use of a plugin.
90
92
To force an individual page sidebar menu, add the following YAML at the top of a page's source file (this file has this YAML at the top):
93
+
91
94
```js
92
95
---
93
96
sidebar: auto
94
97
---
95
98
```
99
+
96
100
Other ways of activating this are:
97
101
98
102
Turn it on for the whole site:
103
+
99
104
```js
100
105
// .vitepress/config.js
101
106
module.exports= {
@@ -106,23 +111,24 @@ module.exports = {
106
111
```
107
112
108
113
Or, add a config entry, either as part of a group or as an individual page.
114
+
109
115
```js
110
116
// .vitepress/config.js
111
117
module.exports= {
112
118
themeConfig: {
113
119
sidebar: [
114
120
{
115
-
title:'Group 1', // required
116
-
link:'/foo/', // optional, link of the title, which should be an absolute path and must exist
121
+
title:'Group 1', // required
122
+
link:'/foo/', // optional, link of the title, which should be an absolute path and must exist
117
123
collapsable:false, // optional, defaults to true
118
-
sidebarDepth:1, // optional, defaults to 1
119
-
items: [
120
-
{ text:'', link:'/' },
121
-
]
124
+
sidebarDepth:1, // optional, defaults to 1
125
+
items: [{ text:'', link:'/' }]
122
126
},
123
127
{
124
128
title:'Group 2',
125
-
items: [ /* ... */ ],
129
+
items: [
130
+
/* ... */
131
+
],
126
132
initialOpenGroupIndex:-1// optional, defaults to 0, defines the index of initially opened subgroup
127
133
}
128
134
]
@@ -152,7 +158,7 @@ by just linking to `(/glossary/#allocation)`; its path starting at `main`. Any p
152
158
at `main`. These links also open in the same browser tab.
153
159
154
160
VitePress turns every header in a Markdown file into an HTML anchor you can link to, so clicking such a link takes you directly to
155
-
that file location (called *slugifying* by WordPress and other blogging platforms). A header link consists of its file
161
+
that file location (called _slugifying_ by WordPress and other blogging platforms). A header link consists of its file
156
162
name, with an appended `#` and appended altered header text. The header text in a link has been converted to
157
163
to lower case and all non-alphanumerics, including spaces, have been replaced by hyphens. The two exceptions to the latter
158
164
are, first, all consecutive non-alphanumbers are converted to a single hyphen; i.e. "Foo&$ Bar" is converted to "foo-bar".
@@ -223,11 +229,13 @@ displayed in a doc.
223
229
You can make an entire code file, or any part of it, into a snippet (each
224
230
of which can be used multiple times in the docs). Just surround the part
225
231
you want to be a snippet with `#region` and `#endregion` comments:
232
+
226
233
```js
227
234
// #region regionName
228
235
...
229
236
// #endregion regionName
230
237
```
238
+
231
239
`regionName` in the above is any name you want to give this snippet.
232
240
233
241
If you want the whole file to be a snippet, just put the `#region` / `#endregion`
@@ -248,6 +256,7 @@ the file.
248
256
The tests should be in the snippets directory. Actually the snippet files and the test files ended up being the same file because that was the cleanest way to go. The snippet files should all be named test-original-filename.js where original-filename is the markdown filename, like amounts of ertp/guide/amounts.md
249
257
250
258
To test your snippets files while writing your docs:
259
+
251
260
1. Write tests using AVA. They should be in the appropriate file in the snippets directory, with files named `test-original-filename.js``original-filename` is
252
261
the Markdown filename. For example, `test-amounts.js` for `ertp/guide/amounts.md` See [this Snippets file](/snippets/ertp/guide/test-amounts.js)
253
262
2. Run the tests with `yarn test` (run from anywhere, but usually from the root of the repo).
@@ -266,43 +275,53 @@ broken links, and what file and line number they're at.
266
275
## Local Install, Build, and Run
267
276
268
277
1.**Clone**: Clone the Documentation repo to your local machine. We suggest using
269
-
Sourcetree to manage your local and remote copies and the various commits
270
-
and pull requests you'll make while debugging. The following steps should all
271
-
be run from the directory you cloned the repo into.
278
+
Sourcetree to manage your local and remote copies and the various commits
279
+
and pull requests you'll make while debugging. The following steps should all
280
+
be run from the directory you cloned the repo into.
272
281
273
282
2.**Install**: To ensure using the latest agoric-sdk
274
-
version when running code snippets, from a shell, run
283
+
version when running code snippets, from a shell, run
284
+
275
285
```shell
276
286
agoric install
277
287
```
288
+
278
289
3.**Build**: To build the site as it will be built for production, run:
290
+
279
291
```shell
280
292
yarn docs:build
281
293
```
294
+
282
295
The resulting build assets can be found in `/dist` in the project root.
283
296
284
297
4.**Run**: To run a local server and see your changes in real time, run:
298
+
285
299
```shell
286
300
yarn docs:dev
287
301
```
302
+
288
303
Most edit changes are immediately reflected in the browser, but
289
304
applying site config changes may require stopping and restarting this program.
290
305
291
306
View your local documentation site at `localhost:5173`
292
307
293
308
5.**Preview**: To preview a production build, run:
309
+
294
310
```shell
295
311
yarn docs:preview
296
312
```
313
+
297
314
View your local documentation site at `localhost:4173`
298
315
299
316
## Updating Zoe Version and DocsUpdated
300
317
301
318
In `[/.vitepress/config.js](/.vitepress/config.js)`, find the lines
319
+
302
320
```
303
321
zoeVersion: 'Beta Release v1.0.0',
304
322
zoeDocsUpdated: 'Apr 7, 2021'
305
323
```
324
+
306
325
Edit the values to be current. The current Zoe version is the "version" field of
0 commit comments