mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
dc0dc30a06
## Description [Jira ticket](https://hasurahq.atlassian.net/jira/software/projects/DOCS/boards/19?selectedIssue=DOCS-102). This PR capitalizes Hasura features based on our [feature capitalization guide on the docs wiki](https://hasura.io/docs/wiki/style/hasura-features/). It also introduces some linting by prettier. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7260 Co-authored-by: Samir Talwar <47582+SamirTalwar@users.noreply.github.com> Co-authored-by: Luca Restagno <59067245+lucarestagno@users.noreply.github.com> Co-authored-by: hasura-bot <30118761+hasura-bot@users.noreply.github.com> Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com> Co-authored-by: Stefano Magni <173663+NoriSte@users.noreply.github.com> Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com> Co-authored-by: Abby Sassel <3883855+sassela@users.noreply.github.com> Co-authored-by: Daniele Cammareri <5709409+dancamma@users.noreply.github.com> Co-authored-by: Brandon Martin <40686+codedmart@users.noreply.github.com> GitOrigin-RevId: 5946f313cb44c639fac61e6c7fb44f704ee2a709
104 lines
2.7 KiB
Plaintext
104 lines
2.7 KiB
Plaintext
---
|
|
sidebar_label: Page Structure
|
|
sidebar_position: 0
|
|
---
|
|
|
|
# Docs Page Structure
|
|
|
|
## Meta information
|
|
|
|
The following meta information should be added at the beginning of each docs page: `description` and `keywords`.
|
|
|
|
An example:
|
|
|
|
```markdown
|
|
---
|
|
description: Data validations in Hasura
|
|
keywords:
|
|
- hasura
|
|
- docs
|
|
- schema
|
|
- data validation
|
|
---
|
|
```
|
|
|
|
## React component imports
|
|
|
|
Please add any React component imports right below the frontmatter and before starting the main doc content.
|
|
|
|
```jsx
|
|
import Thumbnail from '@site/src/components/Thumbnail';
|
|
```
|
|
|
|
Note: When importing components from `src/` directory, please do not use relative paths. Docusaurus provides a global
|
|
variable `@site` which is resolved to the root of the app - absolute import. So, doing
|
|
`@site/src/components/Thumbnail` is the same as `../../../src/components/Thumbnail`.
|
|
|
|
## Page title
|
|
|
|
Add the main title for each docs page.
|
|
|
|
An example:
|
|
|
|
```
|
|
# Data validations
|
|
```
|
|
|
|
You can also add `title` frontmatter.
|
|
|
|
```markdown
|
|
---
|
|
title: Data validations
|
|
---
|
|
```
|
|
|
|
By default the title will be the label for sidebar item. So, to use a shorten/different label for sidebar use the
|
|
`sidebar_label` frontmatter to override.
|
|
|
|
## Table of contents
|
|
|
|
This is auto generated on the right sidebar. And the depth can be controlled via `toc_max_heading_level`,
|
|
`toc_min_heading_level` frontmatter.
|
|
|
|
Please refer to the [Table of Contents](/docusaurus-mdx-guide/table-of-contents.mdx) section to understand more about
|
|
hwo to render this manually in between content and filtering items etc.,
|
|
|
|
## Markdown Variables
|
|
|
|
Add the markdown variables at very end of file for easier reference and maintainability. These variables are mostly for
|
|
links. To avoid repetition of adding full path for each link, we could take advantage of
|
|
[reference-style-links](https://daringfireball.net/projects/markdown/syntax#link) syntax in markdown.
|
|
|
|
For Example:
|
|
|
|
```markdown
|
|
## Section one
|
|
|
|
.....
|
|
|
|
REST ... [create_action][metadata-create-action] or [update_action][metadata-update-action] Metadata APIs ...
|
|
[request_transform][requesttransformation] field ...:
|
|
|
|
....
|
|
|
|
## Section two
|
|
|
|
.....
|
|
|
|
REST ... [create_action][metadata-create-action] or [update_action][metadata-update-action] Metadata APIs ...
|
|
[request_transform][requesttransformation] field ...:
|
|
|
|
....
|
|
|
|
<!-- Shared Link Variables -->
|
|
|
|
[metadata-create-action]: /api-reference/metadata-api/actions.mdx#metadata-create-action
|
|
[metadata-update-action]: /api-reference/metadata-api/actions.mdx#metadata-update-action
|
|
[requesttransformation]: /api-reference/syntax-defs.mdx#requesttransformation
|
|
```
|
|
|
|
## Run docs build
|
|
|
|
Run the docs build in the end again with `yarn build` and make sure there are no errors/warnings because of any
|
|
inconsistencies.
|