-
-
Notifications
You must be signed in to change notification settings - Fork 35
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 1 commit
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
|
dudymas marked this conversation as resolved.
|
| 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
|
||||||||||||||||||||||||||
| 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.
|
||||||||||||||||||||||||||
| # Heading 1 | ||||||||||||||||||||||||||
|
dudymas marked this conversation as resolved.
|
||||||||||||||||||||||||||
| ## Heading 2.a | ||||||||||||||||||||||||||
| ### Heading 3 | ||||||||||||||||||||||||||
|
dudymas marked this conversation as resolved.
|
||||||||||||||||||||||||||
| ## Heading 2.b | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Lists | ||||||||||||||||||||||||||
|
dudymas marked this conversation as resolved.
|
||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
| - Item 1 | ||||||||||||||||||||||||||
| - Item 2 | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - Item 1 | ||||||||||||||||||||||||||
| - Item 2 | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Links | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
|
dudymas marked this conversation as resolved.
|
||||||||||||||||||||||||||
| [dog facts](https://catfact.ninja/fact) | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| [dog facts](https://catfact.ninja/fact) | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Images | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
|
dudymas marked this conversation as resolved.
|
||||||||||||||||||||||||||
|  | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|  | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Markdown Admonitions | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
dudymas marked this conversation as 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.
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### 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
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Tables | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
| | Header 1 | Header 2 | | ||||||||||||||||||||||||||
| | -------- | -------- | | ||||||||||||||||||||||||||
| | Cell 1 | Cell 2 | | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
|
dudymas marked this conversation as resolved.
|
||||||||||||||||||||||||||
| | Header 1 | Header 2 | | ||||||||||||||||||||||||||
| | -------- | -------- | | ||||||||||||||||||||||||||
| | Cell 1 | Cell 2 | | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
dudymas marked this conversation as resolved.
|
||||||||||||||||||||||||||
| ### Blockquotes | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
| > This is a blockquote. | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
| > This is a blockquote. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Horizontal rules | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### `<details />` | ||||||||||||||||||||||||||
|
dudymas marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <details> | ||||||||||||||||||||||||||
| <summary>Click to expand</summary> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| This is the content of the details. | ||||||||||||||||||||||||||
| </details> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Components | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Admonition | ||||||||||||||||||||||||||
|
dudymas marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
dudymas marked this conversation as resolved.
|
||||||||||||||||||||||||||
| <Admonition type="tip"> | ||||||||||||||||||||||||||
| This is a tip. | ||||||||||||||||||||||||||
| </Admonition> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### ActionCard and PrimaryCTA | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
Benbentwo marked this conversation as 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
|
||||||||||||||||||||||||||
| }}> | ||||||||||||||||||||||||||
| <PrimaryCTA to="/reference/style-guide">See our style guide</PrimaryCTA> | ||||||||||||||||||||||||||
| </ActionCard> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### AsciinemaWidget | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
dudymas marked this conversation as resolved.
|
||||||||||||||||||||||||||
| <AsciinemaWidget src="https://asciinema.org/a/113643.json" /> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### AtmosWorkflow | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <AtmosWorkflow /> | ||||||||||||||||||||||||||
|
dudymas marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### CardGroup | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <CardGroup> | ||||||||||||||||||||||||||
| <Card title="Card 1" description="Description 1" /> | ||||||||||||||||||||||||||
| <Card title="Card 2" description="Description 2" /> | ||||||||||||||||||||||||||
| <Card title="Card 3" description="Description 3" /> | ||||||||||||||||||||||||||
| </CardGroup> | ||||||||||||||||||||||||||
|
Comment on lines
+152
to
+237
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.
|
||||||||||||||||||||||||||
| <CategoryList path="/layers/spacelift/tutorials/"/> | ||||||||||||||||||||||||||
|
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. I don't see anything here - so probably not rendering right |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### CollapsibleText | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
dudymas marked this conversation as resolved.
|
||||||||||||||||||||||||||
| <CollapsibleText title="This is a collapsible text"> | ||||||||||||||||||||||||||
| This is the content of the collapsible text. | ||||||||||||||||||||||||||
| </CollapsibleText> | ||||||||||||||||||||||||||
|
Comment on lines
+166
to
+263
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" /> | ||||||||||||||||||||||||||
|
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.
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. the definitions come from the glossary. https://github.com/cloudposse/docs/tree/master/docs/resources/glossary |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### DocCardList | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
dudymas marked this conversation as 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.
|
||||||||||||||||||||||||||
| <KeyPoints title="Example keypoints..."> | ||||||||||||||||||||||||||
| - 'Reusable Terraform "Root" Modules for AWS' | ||||||||||||||||||||||||||
| - 'Reusable Terraform "Child" Modules' | ||||||||||||||||||||||||||
| </KeyPoints> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Note | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
dudymas marked this conversation as resolved.
|
||||||||||||||||||||||||||
| <Note> | ||||||||||||||||||||||||||
| This is the content of the note. | ||||||||||||||||||||||||||
| </Note> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### PillBox | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
dudymas marked this conversation as resolved.
|
||||||||||||||||||||||||||
| <PillBox items={['Pill 1', 'Pill 2', 'Pill 3']} /> | ||||||||||||||||||||||||||
|
dudymas marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Slider | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
dudymas marked this conversation as 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.
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. The Slider deletes the table of contents though due to |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Steps | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
dudymas marked this conversation as resolved.
|
||||||||||||||||||||||||||
| <Steps> | ||||||||||||||||||||||||||
| <Step> | ||||||||||||||||||||||||||
| ### <StepNumber/> Step 1 | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| This is the content of step 1. | ||||||||||||||||||||||||||
| </Step> | ||||||||||||||||||||||||||
| <Step> | ||||||||||||||||||||||||||
| ### <StepNumber/> Step 2 | ||||||||||||||||||||||||||
|
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
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. There are several styles of steps. And we should document all when when to use them.
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. If a page is dedicated to a tutorial, you likely want each step in the TOC (e.g. There are many different ways to use steps. Further more, steps can be nested inside of other steps. |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| This is the content of step 2. | ||||||||||||||||||||||||||
| </Step> | ||||||||||||||||||||||||||
| </Steps> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### Tabs | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
dudymas marked this conversation as resolved.
|
||||||||||||||||||||||||||
| <Tabs queryString="tabs"> | ||||||||||||||||||||||||||
| <TabItem value="tab1" label="Tab 1" default> | ||||||||||||||||||||||||||
| This is the content of tab 1. | ||||||||||||||||||||||||||
| </TabItem> | ||||||||||||||||||||||||||
| <TabItem value="tab2" label="Tab 2"> | ||||||||||||||||||||||||||
| This is the content of tab 2. | ||||||||||||||||||||||||||
| </TabItem> | ||||||||||||||||||||||||||
| </Tabs> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ### TaskList | ||||||||||||||||||||||||||
|
dudymas marked this conversation as resolved.
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
dudymas marked this conversation as resolved.
|
||||||||||||||||||||||||||
| <TaskList> | ||||||||||||||||||||||||||
| - [ ] Prepare | ||||||||||||||||||||||||||
| - [x] Set timing | ||||||||||||||||||||||||||
| - [ ] Get started | ||||||||||||||||||||||||||
| - [ ] Finish | ||||||||||||||||||||||||||
| </TaskList> | ||||||||||||||||||||||||||
This file was deleted.

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