-
-
Notifications
You must be signed in to change notification settings - Fork 32
chore: add style-guide page #663
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
base: master
Are you sure you want to change the base?
Changes from 2 commits
38d166c
4574a29
ed23db7
a277854
feb9ab9
5531043
d5ca16d
ecf46e9
42dd29d
4134892
e737fe8
92cd663
2f7ac71
091252d
a9a377c
5f47f19
323bcf3
c159560
7381706
b038e80
1d6bfda
74cc21b
e1afefa
0ec164b
4ece920
5402ce4
58b1671
0ae0f62
33d8a2a
2e4bc88
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,262 @@ | ||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
| id: style-guide | ||||||||||||||||||||||||||
| title: Documentation style guide | ||||||||||||||||||||||||||
| sidebar_label: Library | ||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| sidebar_position: 0 | ||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
| import Admonition from '@theme/Admonition'; | ||||||||||||||||||||||||||
| import ActionCard from '@site/src/components/ActionCard'; | ||||||||||||||||||||||||||
| import AsciinemaWidget from '@site/src/components/AsciinemaWidget'; | ||||||||||||||||||||||||||
| import AtmosWorkflow from '@site/src/components/AtmosWorkflow'; | ||||||||||||||||||||||||||
| import Card from '@site/src/components/Card'; | ||||||||||||||||||||||||||
| import CardGroup from '@site/src/components/CardGroup'; | ||||||||||||||||||||||||||
| import CategoryList from '@site/src/components/CategoryList'; | ||||||||||||||||||||||||||
| import CollapsibleText from '@site/src/components/CollapsibleText'; | ||||||||||||||||||||||||||
| import DismissibleDialog from '@site/src/components/DismissibleDialog'; | ||||||||||||||||||||||||||
| import Definition from '@site/src/components/Definition'; | ||||||||||||||||||||||||||
| import DocCardList from '@theme/DocCardList'; | ||||||||||||||||||||||||||
| import Intro from '@site/src/components/Intro'; | ||||||||||||||||||||||||||
| import KeyPoints from '@site/src/components/KeyPoints'; | ||||||||||||||||||||||||||
| import Note from '@site/src/components/Note'; | ||||||||||||||||||||||||||
| import PillBox from '@site/src/components/PillBox'; | ||||||||||||||||||||||||||
| import PrimaryCTA from '@site/src/components/PrimaryCTA'; | ||||||||||||||||||||||||||
| import Slider from '@site/src/components/Slider'; | ||||||||||||||||||||||||||
| import StepNumber from '@site/src/components/StepNumber'; | ||||||||||||||||||||||||||
| import Steps from '@site/src/components/Steps'; | ||||||||||||||||||||||||||
| import Step from '@site/src/components/Step'; | ||||||||||||||||||||||||||
| import Tabs from '@theme/Tabs'; | ||||||||||||||||||||||||||
| import TabItem from '@theme/TabItem'; | ||||||||||||||||||||||||||
| import TaskList from '@site/src/components/TaskList'; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| This page demonstrates the style guide for the documentation. | ||||||||||||||||||||||||||
| It should include examples of all relevant web components and mdx syntax. | ||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Markdown | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Headings | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| # Heading 1 | ||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| ## Heading 2.a | ||||||||||||||||||||||||||
| ### Heading 3 | ||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| ## Heading 2.b | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Lists | ||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
| - Item 1 | ||||||||||||||||||||||||||
| - Item 2 | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - Item 1 | ||||||||||||||||||||||||||
| - Item 2 | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Links | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| [dog facts](https://catfact.ninja/fact) | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| [dog facts](https://catfact.ninja/fact) | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Images | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
|  | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|  | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Markdown Admonitions | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
| :::warning Tip title | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| This is a tip. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ::: | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| :::note Markdown admonitions are sensitive to newlines | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Make sure you put a newline after the opening `:::` and before the closing `:::`. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ::: | ||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Code blocks | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Surround code with three backticks to create a code block. Include the language after the first set of backticks to enable syntax highlighting. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||||
| echo "Hello, World!" | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Tables | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
| | Header 1 | Header 2 | | ||||||||||||||||||||||||||
| | -------- | -------- | | ||||||||||||||||||||||||||
| | Cell 1 | Cell 2 | | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| | Header 1 | Header 2 | | ||||||||||||||||||||||||||
| | -------- | -------- | | ||||||||||||||||||||||||||
| | Cell 1 | Cell 2 | | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| ### Blockquotes | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
| > This is a blockquote. | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
| > This is a blockquote. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Horizontal rules | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### `<details />` | ||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <details> | ||||||||||||||||||||||||||
| <summary>Click to expand</summary> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| This is the content of the details. | ||||||||||||||||||||||||||
| </details> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Components | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Admonition | ||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| <Admonition type="tip"> | ||||||||||||||||||||||||||
| This is a tip. | ||||||||||||||||||||||||||
| </Admonition> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### ActionCard and PrimaryCTA | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
Benbentwo marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| <ActionCard | ||||||||||||||||||||||||||
| title="Get Started" | ||||||||||||||||||||||||||
| description="Learn how to get started with the Cloud Posse Reference Architecture" | ||||||||||||||||||||||||||
| action={{ | ||||||||||||||||||||||||||
| label: 'Get Started', | ||||||||||||||||||||||||||
| href: '/reference/style-guide' | ||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| }}> | ||||||||||||||||||||||||||
| <PrimaryCTA to="/reference/style-guide">See our style guide</PrimaryCTA> | ||||||||||||||||||||||||||
| </ActionCard> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### AsciinemaWidget | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| <AsciinemaWidget src="https://asciinema.org/a/113643.json" /> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### AtmosWorkflow | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <AtmosWorkflow /> | ||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### CardGroup | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <CardGroup> | ||||||||||||||||||||||||||
| <Card title="Card 1" description="Description 1" /> | ||||||||||||||||||||||||||
| <Card title="Card 2" description="Description 2" /> | ||||||||||||||||||||||||||
| <Card title="Card 3" description="Description 3" /> | ||||||||||||||||||||||||||
| </CardGroup> | ||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix or remove - I don't think it's rendering right |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### CategoryList | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| <CategoryList path="/layers/spacelift/tutorials/"/> | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### CollapsibleText | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| <CollapsibleText title="This is a collapsible text"> | ||||||||||||||||||||||||||
| This is the content of the collapsible text. | ||||||||||||||||||||||||||
| </CollapsibleText> | ||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When to use this (which blurs?) vs
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no idea... I really wonder if we should have it... ?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should use this when there's useful configuration (e.g. YAML) so as not to overwhelm the reader with a wall of text. Conversely, the |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Definition | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <Definition term="Term" description="Description of the term" /> | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### DocCardList | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| <DocCardList items={[ | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| type: 'link', | ||||||||||||||||||||||||||
| label: 'Terraform Components', | ||||||||||||||||||||||||||
| description: 'Reusable Terraform "Root" Modules for AWS', | ||||||||||||||||||||||||||
| href: '/components' | ||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| type: 'link', | ||||||||||||||||||||||||||
| label: 'Terraform Modules', | ||||||||||||||||||||||||||
| description: 'Reusable Terraform "Child" Modules', | ||||||||||||||||||||||||||
| href: '/modules' | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| ]} | ||||||||||||||||||||||||||
| /> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### DismissibleDialog | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add Code Snippet |
||||||||||||||||||||||||||
| <DismissibleDialog title="This is a dismissible dialog"> | ||||||||||||||||||||||||||
| This is the content of the dialog. | ||||||||||||||||||||||||||
| </DismissibleDialog> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Intro | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Either move this to the top or note why we want an intro also Add Code Snippet |
||||||||||||||||||||||||||
| <Intro> | ||||||||||||||||||||||||||
| This is the content of the intro. | ||||||||||||||||||||||||||
| </Intro> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### KeyPoints | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| <KeyPoints title="Example keypoints..."> | ||||||||||||||||||||||||||
| - 'Reusable Terraform "Root" Modules for AWS' | ||||||||||||||||||||||||||
| - 'Reusable Terraform "Child" Modules' | ||||||||||||||||||||||||||
| </KeyPoints> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Note | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| <Note> | ||||||||||||||||||||||||||
| This is the content of the note. | ||||||||||||||||||||||||||
| </Note> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### PillBox | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| <PillBox items={['Pill 1', 'Pill 2', 'Pill 3']} /> | ||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Slider | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| <Slider> | ||||||||||||||||||||||||||
| <Card title="Card 1" description="Description 1" /> | ||||||||||||||||||||||||||
| <Card title="Card 2" description="Description 2" /> | ||||||||||||||||||||||||||
| <Card title="Card 3" description="Description 3" /> | ||||||||||||||||||||||||||
| </Slider> | ||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Steps | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||
| <Steps> | ||||||||||||||||||||||||||
| <Step> | ||||||||||||||||||||||||||
| ### <StepNumber/> Step 1 | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| This is the content of step 1. | ||||||||||||||||||||||||||
| </Step> | ||||||||||||||||||||||||||
| <Step> | ||||||||||||||||||||||||||
| ### <StepNumber/> Step 2 | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
| ### <StepNumber/> Step 1 | |
| This is the content of step 1. | |
| </Step> | |
| <Step> | |
| ### <StepNumber/> Step 2 | |
| #### <StepNumber/> Step 1 | |
| This is the content of step 1. | |
| </Step> | |
| <Step> | |
| #### <StepNumber/> Step 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are several styles of steps. And we should document all when when to use them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a page is dedicated to a tutorial, you likely want each step in the TOC (e.g. ## not ####). If the steps are just simple/small operations, then probably not.
There are many different ways to use steps.
<Steps>
- foofighters
- barfights
</Steps>
<Steps>
- ### Foo
Foo fighters
- ### Bar
Bar fights
</Steps>
Further more, steps can be nested inside of other steps.
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
dudymas marked this conversation as resolved.
Show resolved
Hide resolved
This file was deleted.

Uh oh!
There was an error while loading. Please reload this page.