Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update usage path docs to allow absolute url #901

Merged
merged 2 commits into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/resource-schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ library:
path: '/another-page/sub-page.mdx'
hidden: true
- title: Another sub page
path: '/another-page/another-sub-page.mdx'
path: 'https://github.com/carbon-design-system/carbon-website/blob/main/src/pages/developing/react-tutorial/step-1.mdx'
assets:
accordion:
name: Accordion
Expand Down Expand Up @@ -118,7 +118,7 @@ library:
path: '/another-page/sub-page.mdx'
hidden: true
- title: Another sub page
path: '/another-page/another-sub-page.mdx'
path: 'https://github.com/carbon-design-system/carbon-website/blob/main/src/pages/developing/react-tutorial/step-1.mdx'
```

### Library keys
Expand Down Expand Up @@ -418,14 +418,14 @@ navData:
path: '/another-page/sub-page.mdx'
hidden: true
- title: Another sub page
path: '/another-page/another-sub-page.mdx'
path: 'https://github.com/carbon-design-system/carbon-website/blob/main/src/pages/developing/react-tutorial/step-1.mdx'
```

For the value of the `navData` array, you can set the following keys.

| Nav data | Description | Required | Type | Default |
| -------- | ------------------------------------------------------------ | -------- | ------- | ------- |
| `title` | Navigation title. | Required | String | – |
| `path` | Path to the file, relative to carbon.yml. | Required | String | – |
| `items` | Second level of navigation. | Optional | Array | – |
| `hidden` | If set to true, the item will be hidden from the navigation. | Optional | Boolean | `false` |
| Nav data | Description | Required | Type | Default | Valid values |
| -------- | ------------------------------------------------------------ | -------- | ------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `title` | Navigation title. | Required | String | – | – |
| `path` | Path to the file. | Required | String | – | <ul><li>Github URL according to the `https://{host}/{org}/{repo}/blob/{branch}/{path-to-file}` format </li><li>Path relative to the carbon.yml file location</li></ul> |
| `items` | Second level of navigation. | Optional | Array | – | – |
| `hidden` | If set to true, the item will be hidden from the navigation. | Optional | Boolean | `false` | – |
4 changes: 2 additions & 2 deletions packages/schemas/carbon-resources.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
},
"path": {
"type": "string",
"description": "Path to the file, relative to carbon.yml."
"description": "Path to the file, Github URL or path relative to carbon.yml."
},
"hidden": {
"type": "boolean",
Expand All @@ -280,7 +280,7 @@
},
"path": {
"type": "string",
"description": "Path to the file, relative to carbon.yml."
"description": "Path to the file, Github URL or path relative to carbon.yml."
},
"hidden": {
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
},
"path": {
"type": "string",
"description": "Path to the file, relative to carbon.yml."
"description": "Path to the file, Github URL or path relative to carbon.yml."
},
"hidden": {
"type": "boolean",
Expand All @@ -97,7 +97,7 @@
},
"path": {
"type": "string",
"description": "Path to the file, relative to carbon.yml."
"description": "Path to the file, Github URL or path relative to carbon.yml."
},
"hidden": {
"type": "boolean",
Expand Down