Skip to content

Commit 69af2a2

Browse files
committed
move some content into style guide
1 parent 25a8f28 commit 69af2a2

File tree

4 files changed

+92
-289
lines changed

4 files changed

+92
-289
lines changed

CONTENT_AUTHORING.md

Lines changed: 5 additions & 289 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The CircleCI documentation is organized into logical components, each focusing o
1919
| Component | Description | Path |
2020
|-----------|-------------|------|
2121
| `root` | Home and landing pages | `docs/root/` |
22-
| `guides` | How-to guides and tutorials | `docs/guides/` |
22+
| `guides` | Feature and usage docs, how-to guides and tutorials | `docs/guides/` |
2323
| `reference` | API and configuration references | `docs/reference/` |
2424
| `orbs` | CircleCI orbs documentation | `docs/orbs/` |
2525
| `server-admin` | Server administration guides | `docs/server-admin-4.*/` |
@@ -47,248 +47,12 @@ component/
4747

4848
## AsciiDoc Essentials
4949

50-
The CircleCI docs site uses [AsciiDoc](https://asciidoc.org/) for content authoring. Here's how to use it effectively:
50+
The CircleCI docs site uses [AsciiDoc](https://asciidoc.org/) for content authoring. For a guide to using AsciiDoc and writing to follow the CircleCI docs style, see the following pages:
5151

52-
### Basic Syntax
52+
* [Style guide](https://circleci.com/docs/contributors/docs-style/)
53+
* [Template pages](https://github.com/circleci/circleci-docs/tree/main/docs/contributors/modules/templates/pages)
5354

54-
```asciidoc
55-
= Page Title
56-
:page-description: A brief description of the page content
57-
58-
== Section Heading
59-
This is a paragraph of text.
60-
61-
=== Subsection Heading
62-
Another paragraph with *bold text* and _italic text_.
63-
64-
* Bulleted list item 1
65-
* Bulleted list item 2
66-
** Nested list item
67-
68-
. Numbered list item 1
69-
. Numbered list item 2
70-
.. Nested numbered item
71-
```
72-
73-
For a more complete example, see the [template pages](https://github.com/circleci/circleci-docs/tree/main/docs/contributors/modules/templates/pages).
74-
75-
### Document Attributes
76-
77-
Document attributes control various aspects of rendering:
78-
79-
```asciidoc
80-
= Page Title
81-
:page-platform: Cloud, Server # Displays platform badges in the page info bar
82-
:page-description: Used for SEO and meta description
83-
:experimental: # Enables macro features for menu and button macros
84-
:page-aliases: some-old-page.adoc # redirects archived pages
85-
86-
```
87-
88-
### Page Title Badges
89-
90-
Add visual badges next to page titles to indicate content status. Currently we are using a `Preview` badge to indicate when a page is for a feature in open or closed preview.
91-
92-
A page is closed preview will display the `Preview` badge and **will not be** listed in the navigation.
93-
A page in open preview will display the `Preview` badge and **will be** listed in the navigation.
94-
95-
#### Basic Usage
96-
97-
```asciidoc
98-
= Page Title
99-
:page-badge: Preview
100-
```
101-
102-
This displays a simple badge with default styling (black text, border, no background).
103-
104-
#### Custom Styling with Tailwind Classes
105-
106-
```asciidoc
107-
= Page Title
108-
:page-badge: Preview
109-
:page-badge-classes: text-white bg-orange-500 border border-orange-600
110-
```
111-
112-
#### Custom Colors with Hex Values
113-
114-
```asciidoc
115-
= Page Title
116-
:page-badge: Preview
117-
:page-badge-bg: #FF6B35
118-
:page-badge-border: #C44D2C
119-
:page-badge-classes: text-white
120-
```
121-
122-
#### Common Badge Styles
123-
124-
**Preview:**
125-
```asciidoc
126-
:page-badge: Preview
127-
```
128-
129-
Currently we are not adding styling to these badges but this may change in future.
130-
131-
#### Badge Attributes Reference
132-
133-
- **`:page-badge:`** - The text to display in the badge (required)
134-
- **`:page-badge-classes:`** - Tailwind CSS classes for styling (optional, defaults to `text-terminal-black border`)
135-
- **`:page-badge-bg:`** - Hex color code for background (optional, overrides classes)
136-
- **`:page-badge-border:`** - Hex color code for border (optional, requires `page-badge-bg`)
137-
138-
### Admonitions
139-
140-
Use admonitions to call attention to important information:
141-
142-
```asciidoc
143-
NOTE: This is a note admonition.
144-
145-
TIP: This provides helpful advice.
146-
147-
IMPORTANT: This is important information.
148-
149-
WARNING: This is a warning.
150-
151-
CAUTION: This requires special attention.
152-
```
153-
154-
## Document Structure
155-
156-
### Page Structure Template
157-
158-
Use the [template pages](https://github.com/circleci/circleci-docs/tree/main/docs/contributors/modules/templates/pages) as a starting point for new content.
159-
160-
161-
### Headings
162-
163-
Use hierarchical headings to structure your content:
164-
165-
```asciidoc
166-
= Level 0 (Page Title)
167-
== Level 1
168-
=== Level 2
169-
==== Level 3
170-
```
171-
172-
Avoid skipping levels, and don't go deeper than level 4 unless absolutely necessary.
173-
174-
## Advanced Formatting
175-
176-
### Code Blocks
177-
178-
For code blocks with syntax highlighting:
179-
180-
```asciidoc
181-
.Title for code block, explain what it is and what it does
182-
[source,yaml]
183-
----
184-
version: 2.1
185-
jobs:
186-
build:
187-
docker:
188-
- image: cimg/node:18.0
189-
steps:
190-
- checkout
191-
- run: npm install
192-
- run: npm test
193-
----
194-
```
195-
196-
### Tables
197-
198-
Create formatted tables that can scroll horizontally as needed:
199-
200-
```asciidoc
201-
[.table-scroll]
202-
--
203-
.Table Title
204-
[cols="1,1,2", options="header"]
205-
|===
206-
|Column 1 |Column 2 |Column 3
207-
208-
|Row 1, Cell 1
209-
|Row 1, Cell 2
210-
|Row 1, Cell 3
211-
212-
|Row 2, Cell 1
213-
|Row 2, Cell 2
214-
|Row 2, Cell 3
215-
|===
216-
--
217-
```
218-
219-
### Tabs
220-
221-
Use tabs for showing different options:
222-
223-
```asciidoc
224-
[tabs]
225-
====
226-
Tab A::
227-
+
228-
--
229-
Content for Tab A
230-
--
231-
Tab B::
232-
+
233-
--
234-
Content for Tab B
235-
--
236-
====
237-
```
238-
239-
### Collapsible Sections
240-
241-
**We do not currently use collapsible sections.**
242-
243-
For long content that might be hidden initially:
244-
245-
```asciidoc
246-
.Click to expand
247-
[%collapsible]
248-
====
249-
This content is initially collapsed but can be expanded by clicking.
250-
====
251-
```
252-
253-
## Navigation and Cross-References
254-
255-
### Internal Cross-References
256-
257-
Link to other pages within the documentation:
258-
259-
```asciidoc
260-
xref:page-name.adoc[Link Text]
261-
```
262-
263-
To link to a page in another module in the same component:
264-
265-
```asciidoc
266-
xref:module-name:page-name.adoc[Link Text]
267-
```
268-
269-
To link to another component:
270-
271-
```asciidoc
272-
xref:component-name:module-name:page-name.adoc[Link Text]
273-
```
274-
275-
To link to a specific section:
276-
277-
```asciidoc
278-
xref:page-name.adoc#section-id[Link Text]
279-
```
280-
281-
### External Links
282-
283-
Link to external resources:
284-
285-
```asciidoc
286-
link:https://circleci.com[CircleCI Website]
287-
```
288-
289-
The `link:` is not strictly necessary but makes it easier to find when editing or making bulk changes.
290-
291-
### Navigation Files
55+
## Navigation Files
29256

29357
The `nav.adoc` file defines the sidebar navigation structure:
29458

@@ -300,54 +64,6 @@ The `nav.adoc` file defines the sidebar navigation structure:
30064
* xref:advanced.adoc[Advanced Topics]
30165
```
30266
303-
## Working with Media
304-
305-
### Images
306-
307-
Include images with optional attributes:
308-
309-
```asciidoc
310-
.Image title
311-
image::filename.png[Alt Text,width=500,role=center]
312-
```
313-
314-
Place image files in the `modules/ROOT/assets/images/` directory.
315-
316-
### Videos
317-
318-
Embed videos using the block image macro with a link:
319-
320-
```asciidoc
321-
.Video Title
322-
video::video-id[youtube,width=640,height=360]
323-
```
324-
325-
### Diagrams
326-
327-
You can add mermaid diagrams to a page, as follows:
328-
329-
```asciidoc
330-
.Example of a mermaid diagram
331-
[mermaid]
332-
....
333-
sequenceDiagram
334-
participant Alice
335-
participant Bob
336-
Alice->>Bob: Hello Bob, how are you?
337-
Bob-->>Alice: Great!
338-
....
339-
```
340-
341-
## Semantic Guidelines
342-
343-
### Writing Style
344-
345-
- Use clear, concise language
346-
- Address the reader directly using "you"
347-
- Use present tense whenever possible
348-
- Break complex ideas into simple steps
349-
- Use active voice instead of passive voice
350-
35167
### Documentation Types
35268
35369
Structure your content based on its purpose:

docs/contributors/modules/ROOT/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
** xref:docs-style:using-images.adoc[Using images]
99
** xref:docs-style:using-tables.adoc[Using tables]
1010
** xref:docs-style:using-code-samples.adoc[Using code samples]
11+
** xref:docs-style:title-badges.adoc[Page title badges]
1112
* Content templates
1213
** xref:templates:template-conceptual.adoc[Template for a conceptual page]
1314
** xref:templates:template-how-to.adoc[Template for a how-to page]

docs/contributors/modules/docs-style/pages/formatting.adoc

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,41 @@ This is a longer admonition with an ordered list:
9797
. Step 3
9898
****
9999

100+
== Using tabs
101+
102+
Use tabs for showing different options:
103+
104+
[source,adoc]
105+
----
106+
[tabs]
107+
====
108+
Tab A::
109+
+
110+
--
111+
Content for Tab A
112+
--
113+
Tab B::
114+
+
115+
--
116+
Content for Tab B
117+
--
118+
====
119+
----
120+
121+
Looks like:
122+
123+
[tabs]
124+
====
125+
Tab A::
126+
+
127+
--
128+
Content for Tab A
129+
--
130+
Tab B::
131+
+
132+
--
133+
Content for Tab B
134+
--
135+
====
136+
100137
pass:[<!-- vale on -->]

0 commit comments

Comments
 (0)