@mgks/docmd 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/package.json +28 -24
- package/.gitattributes +0 -2
- package/.github/CODE_OF_CONDUCT.md +0 -48
- package/.github/CONTRIBUTING.md +0 -129
- package/.github/FUNDING.yml +0 -15
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -58
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -27
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -16
- package/.github/SECURITY.md +0 -18
- package/.github/workflows/deploy-docmd.yml +0 -45
- package/.github/workflows/npm-publish.yml +0 -49
- package/assets/css/welcome.css +0 -6
- package/assets/images/preview-dark-1.webp +0 -0
- package/assets/images/preview-dark-2.webp +0 -0
- package/assets/images/preview-dark-3.webp +0 -0
- package/assets/images/preview-dark-welcome.png +0 -0
- package/assets/images/preview-light-1.webp +0 -0
- package/assets/images/preview-light-2.webp +0 -0
- package/assets/images/preview-light-3.webp +0 -0
- package/docs/cli-commands.md +0 -108
- package/docs/comparison.md +0 -56
- package/docs/configuration.md +0 -289
- package/docs/content/containers/buttons.md +0 -88
- package/docs/content/containers/callouts.md +0 -154
- package/docs/content/containers/cards.md +0 -93
- package/docs/content/containers/changelogs.md +0 -128
- package/docs/content/containers/collapsible.md +0 -89
- package/docs/content/containers/index.md +0 -35
- package/docs/content/containers/nested-containers.md +0 -329
- package/docs/content/containers/steps.md +0 -175
- package/docs/content/containers/tabs.md +0 -228
- package/docs/content/custom-containers.md +0 -24
- package/docs/content/frontmatter.md +0 -84
- package/docs/content/images.md +0 -205
- package/docs/content/index.md +0 -19
- package/docs/content/markdown-syntax.md +0 -309
- package/docs/content/mermaid.md +0 -723
- package/docs/content/no-style-example.md +0 -112
- package/docs/content/no-style-pages.md +0 -226
- package/docs/content/search.md +0 -68
- package/docs/contributing.md +0 -101
- package/docs/deployment.md +0 -120
- package/docs/getting-started/basic-usage.md +0 -89
- package/docs/getting-started/index.md +0 -21
- package/docs/getting-started/installation.md +0 -75
- package/docs/index.md +0 -168
- package/docs/overview.md +0 -63
- package/docs/plugins/analytics.md +0 -75
- package/docs/plugins/index.md +0 -70
- package/docs/plugins/seo.md +0 -127
- package/docs/plugins/sitemap.md +0 -87
- package/docs/recipes/custom-fonts.md +0 -43
- package/docs/recipes/favicon.md +0 -38
- package/docs/recipes/index.md +0 -12
- package/docs/recipes/landing-page.md +0 -46
- package/docs/theming/assets-management.md +0 -126
- package/docs/theming/available-themes.md +0 -77
- package/docs/theming/custom-css-js.md +0 -79
- package/docs/theming/icons.md +0 -92
- package/docs/theming/index.md +0 -19
- package/docs/theming/light-dark-mode.md +0 -114
- package/src/assets/images/docmd-preview.png +0 -0
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Steps Container"
|
|
3
|
-
description: "Create step-by-step instructions and tutorials with the steps container."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Steps Container
|
|
7
|
-
|
|
8
|
-
The steps container allows you to create clear, sequential instructions and tutorials. It automatically numbers your steps and provides a clean, organized layout.
|
|
9
|
-
|
|
10
|
-
## Basic Usage
|
|
11
|
-
|
|
12
|
-
**Code:**
|
|
13
|
-
|
|
14
|
-
```markdown
|
|
15
|
-
::: steps
|
|
16
|
-
|
|
17
|
-
1. **Create a new project**
|
|
18
|
-
Initialize your project with the necessary configuration files.
|
|
19
|
-
|
|
20
|
-
2. **Install dependencies**
|
|
21
|
-
Run the package manager to install required libraries.
|
|
22
|
-
|
|
23
|
-
3. **Start development**
|
|
24
|
-
Begin coding your application with the setup complete.
|
|
25
|
-
|
|
26
|
-
::: button Learn_More #customization color:green
|
|
27
|
-
|
|
28
|
-
:::
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
**Rendered Preview:**
|
|
32
|
-
|
|
33
|
-
::: steps
|
|
34
|
-
|
|
35
|
-
1. **Create a new project**
|
|
36
|
-
Initialize your project with the necessary configuration files.
|
|
37
|
-
|
|
38
|
-
2. **Install dependencies**
|
|
39
|
-
Run the package manager to install required libraries.
|
|
40
|
-
|
|
41
|
-
3. **Start development**
|
|
42
|
-
Begin coding your application with the setup complete.
|
|
43
|
-
|
|
44
|
-
::: button Learn_More #customization color:green
|
|
45
|
-
|
|
46
|
-
:::
|
|
47
|
-
|
|
48
|
-
## Steps with Nested Containers
|
|
49
|
-
|
|
50
|
-
You can include cards, callouts, and buttons inside steps for richer content:
|
|
51
|
-
|
|
52
|
-
**Code:**
|
|
53
|
-
|
|
54
|
-
```markdown
|
|
55
|
-
::: steps
|
|
56
|
-
|
|
57
|
-
1. **Plan Your Project**
|
|
58
|
-
Define the scope and requirements for your application.
|
|
59
|
-
|
|
60
|
-
::: callout info Planning Tip
|
|
61
|
-
Consider creating user stories to better understand your requirements.
|
|
62
|
-
:::
|
|
63
|
-
|
|
64
|
-
2. **Setup Development Environment**
|
|
65
|
-
Configure your local development tools and workspace.
|
|
66
|
-
|
|
67
|
-
::: card Environment Checklist
|
|
68
|
-
- Install code editor (VS Code recommended)
|
|
69
|
-
- Setup version control (Git)
|
|
70
|
-
- Install Node.js and npm
|
|
71
|
-
- Configure linting and formatting tools
|
|
72
|
-
:::
|
|
73
|
-
|
|
74
|
-
3. **Initialize Project**
|
|
75
|
-
Create the project structure and configuration files.
|
|
76
|
-
|
|
77
|
-
::: button Create_Project external:https://github.com/new color:#2564e4
|
|
78
|
-
|
|
79
|
-
4. **Start Coding**
|
|
80
|
-
Begin implementing your application features.
|
|
81
|
-
|
|
82
|
-
::: callout success Ready to Code
|
|
83
|
-
Your development environment is now ready! Happy coding!
|
|
84
|
-
:::
|
|
85
|
-
|
|
86
|
-
:::
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
**Rendered Preview:**
|
|
90
|
-
|
|
91
|
-
::: steps
|
|
92
|
-
|
|
93
|
-
1. **Plan Your Project**
|
|
94
|
-
Define the scope and requirements for your application.
|
|
95
|
-
|
|
96
|
-
::: callout info Planning Tip
|
|
97
|
-
Consider creating user stories to better understand your requirements.
|
|
98
|
-
:::
|
|
99
|
-
|
|
100
|
-
2. **Setup Development Environment**
|
|
101
|
-
Configure your local development tools and workspace.
|
|
102
|
-
|
|
103
|
-
::: card Environment Checklist
|
|
104
|
-
- Install code editor (VS Code recommended)
|
|
105
|
-
- Setup version control (Git)
|
|
106
|
-
- Install Node.js and npm
|
|
107
|
-
- Configure linting and formatting tools
|
|
108
|
-
:::
|
|
109
|
-
|
|
110
|
-
3. **Initialize Project**
|
|
111
|
-
Create the project structure and configuration files.
|
|
112
|
-
|
|
113
|
-
::: button Create_Project external:https://github.com/new color:#2564e4
|
|
114
|
-
|
|
115
|
-
4. **Start Coding**
|
|
116
|
-
Begin implementing your application features.
|
|
117
|
-
|
|
118
|
-
::: callout success Ready to Code
|
|
119
|
-
Your development environment is now ready! Happy coding!
|
|
120
|
-
:::
|
|
121
|
-
|
|
122
|
-
:::
|
|
123
|
-
|
|
124
|
-
## Steps and Tabs Compatibility
|
|
125
|
-
|
|
126
|
-
::: callout error Important Limitation
|
|
127
|
-
**Steps and tabs containers are incompatible** - they cannot be nested within each other due to markdown parsing conflicts. Use them as separate sections instead.
|
|
128
|
-
|
|
129
|
-
**Supported in steps:** Cards, callouts, buttons
|
|
130
|
-
**Not supported:** Tabs containers
|
|
131
|
-
:::
|
|
132
|
-
|
|
133
|
-
**Code:**
|
|
134
|
-
|
|
135
|
-
```markdown
|
|
136
|
-
## Installation Steps
|
|
137
|
-
|
|
138
|
-
::: steps
|
|
139
|
-
|
|
140
|
-
1. **Choose Your Platform**
|
|
141
|
-
Select the appropriate installation method for your operating system.
|
|
142
|
-
|
|
143
|
-
2. **Download the Installer**
|
|
144
|
-
Get the latest version from the downloads section.
|
|
145
|
-
|
|
146
|
-
3. **Run Installation**
|
|
147
|
-
Follow the setup wizard to complete installation.
|
|
148
|
-
|
|
149
|
-
:::
|
|
150
|
-
|
|
151
|
-
## Platform-Specific Instructions
|
|
152
|
-
|
|
153
|
-
::: tabs
|
|
154
|
-
== tab "Windows"
|
|
155
|
-
Download the `.exe` installer and run as administrator.
|
|
156
|
-
|
|
157
|
-
::: button Learn_More #customization
|
|
158
|
-
|
|
159
|
-
== tab "macOS"
|
|
160
|
-
Download the `.dmg` file and drag to Applications folder.
|
|
161
|
-
|
|
162
|
-
::: button Learn_More #customization
|
|
163
|
-
|
|
164
|
-
:::
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
## Customization
|
|
168
|
-
|
|
169
|
-
Steps containers automatically apply consistent styling and numbering. The container handles:
|
|
170
|
-
|
|
171
|
-
- **Automatic numbering** - Steps are numbered sequentially
|
|
172
|
-
- **Consistent spacing** - Proper spacing between steps
|
|
173
|
-
- **Responsive design** - Works on all screen sizes
|
|
174
|
-
- **Theme integration** - Matches your site's theme
|
|
175
|
-
- **Smart list handling** - Only step items get special styling, nested lists remain normal
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Tabs Container"
|
|
3
|
-
description: "Create tabbed content sections with the tabs container for organizing related information."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Tabs Container
|
|
7
|
-
|
|
8
|
-
The tabs container allows you to organize content into multiple tabbed sections, making it easy to present related information in a clean, organized way.
|
|
9
|
-
|
|
10
|
-
## Basic Usage
|
|
11
|
-
|
|
12
|
-
```markdown
|
|
13
|
-
::: tabs
|
|
14
|
-
|
|
15
|
-
== tab "First Tab"
|
|
16
|
-
Content for the first tab goes here.
|
|
17
|
-
|
|
18
|
-
== tab "Second Tab"
|
|
19
|
-
Content for the second tab goes here.
|
|
20
|
-
|
|
21
|
-
== tab "Third Tab"
|
|
22
|
-
Content for the third tab goes here.
|
|
23
|
-
|
|
24
|
-
:::
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
::: tabs
|
|
28
|
-
|
|
29
|
-
== tab "First Tab"
|
|
30
|
-
Content for the first tab goes here.
|
|
31
|
-
|
|
32
|
-
== tab "Second Tab"
|
|
33
|
-
Content for the second tab goes here.
|
|
34
|
-
|
|
35
|
-
== tab "Third Tab"
|
|
36
|
-
Content for the third tab goes here.
|
|
37
|
-
|
|
38
|
-
:::
|
|
39
|
-
|
|
40
|
-
## Tabs with Nested Content
|
|
41
|
-
|
|
42
|
-
### Tabs with Buttons
|
|
43
|
-
|
|
44
|
-
```markdown
|
|
45
|
-
::: tabs
|
|
46
|
-
|
|
47
|
-
== tab "Download"
|
|
48
|
-
Get the latest version of our application.
|
|
49
|
-
|
|
50
|
-
::: button Download_Here external:https://github.com/mgks/docmd/releases
|
|
51
|
-
::: button Learn_More #advanced-tabs
|
|
52
|
-
::: button NPM_Package external:https://www.npmjs.com/package/@mgks/docmd
|
|
53
|
-
|
|
54
|
-
== tab "Documentation"
|
|
55
|
-
Read our comprehensive documentation.
|
|
56
|
-
|
|
57
|
-
::: button View_Getting_Started #basic-usage
|
|
58
|
-
::: button API_Reference external:https://github.com/mgks/docmd/wiki
|
|
59
|
-
::: button View_Examples #advanced-tabs
|
|
60
|
-
|
|
61
|
-
:::
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
::: tabs
|
|
65
|
-
|
|
66
|
-
== tab "Download"
|
|
67
|
-
Get the latest version of our application.
|
|
68
|
-
|
|
69
|
-
::: button Download_Here external:https://github.com/mgks/docmd/releases
|
|
70
|
-
::: button Learn_More #advanced-tabs
|
|
71
|
-
::: button NPM_Package external:https://www.npmjs.com/package/@mgks/docmd
|
|
72
|
-
|
|
73
|
-
== tab "Documentation"
|
|
74
|
-
Read our comprehensive documentation.
|
|
75
|
-
|
|
76
|
-
::: button View_Getting_Started #basic-usage
|
|
77
|
-
::: button API_Reference external:https://github.com/mgks/docmd/wiki
|
|
78
|
-
::: button View_Examples #advanced-tabs
|
|
79
|
-
|
|
80
|
-
:::
|
|
81
|
-
|
|
82
|
-
### Tabs with Callouts
|
|
83
|
-
|
|
84
|
-
```markdown
|
|
85
|
-
::: tabs
|
|
86
|
-
|
|
87
|
-
== tab "Getting Started"
|
|
88
|
-
Welcome to our platform!
|
|
89
|
-
|
|
90
|
-
::: callout info Welcome
|
|
91
|
-
This is your first time here. Let's get you started!
|
|
92
|
-
:::
|
|
93
|
-
|
|
94
|
-
::: callout tip Pro Tip
|
|
95
|
-
Check out our quick start guide for the fastest setup.
|
|
96
|
-
:::
|
|
97
|
-
|
|
98
|
-
== tab "Advanced Features"
|
|
99
|
-
Explore advanced functionality.
|
|
100
|
-
|
|
101
|
-
::: callout warning Important
|
|
102
|
-
Some features require additional configuration.
|
|
103
|
-
:::
|
|
104
|
-
|
|
105
|
-
::: callout success Ready
|
|
106
|
-
You're all set to explore advanced features!
|
|
107
|
-
:::
|
|
108
|
-
|
|
109
|
-
:::
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
::: tabs
|
|
113
|
-
|
|
114
|
-
== tab "Getting Started"
|
|
115
|
-
Welcome to our platform!
|
|
116
|
-
|
|
117
|
-
::: callout info Welcome
|
|
118
|
-
This is your first time here. Let's get you started!
|
|
119
|
-
:::
|
|
120
|
-
|
|
121
|
-
::: callout tip Pro Tip
|
|
122
|
-
Check out our quick start guide for the fastest setup.
|
|
123
|
-
:::
|
|
124
|
-
|
|
125
|
-
== tab "Advanced Features"
|
|
126
|
-
Explore advanced functionality.
|
|
127
|
-
|
|
128
|
-
::: callout warning Important
|
|
129
|
-
Some features require additional configuration.
|
|
130
|
-
:::
|
|
131
|
-
|
|
132
|
-
::: callout success Ready
|
|
133
|
-
You're all set to explore advanced features!
|
|
134
|
-
:::
|
|
135
|
-
|
|
136
|
-
:::
|
|
137
|
-
|
|
138
|
-
## Complex Nested Structure
|
|
139
|
-
|
|
140
|
-
````bash
|
|
141
|
-
::: tabs
|
|
142
|
-
|
|
143
|
-
== tab "Nested Card Example"
|
|
144
|
-
::: card Installation Guide
|
|
145
|
-
|
|
146
|
-
**Download**
|
|
147
|
-
Get the latest version for your platform.
|
|
148
|
-
|
|
149
|
-
::: button Get_Latest external:https://github.com/mgks/docmd/releases
|
|
150
|
-
|
|
151
|
-
**Install**
|
|
152
|
-
Run the installer and follow the prompts.
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
install docmd
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
:::
|
|
159
|
-
|
|
160
|
-
== tab "Callout Example"
|
|
161
|
-
|
|
162
|
-
**Configure**
|
|
163
|
-
Set up your preferences.
|
|
164
|
-
|
|
165
|
-
::: callout warning Configuration
|
|
166
|
-
Don't forget to configure your settings!
|
|
167
|
-
:::
|
|
168
|
-
|
|
169
|
-
:::
|
|
170
|
-
````
|
|
171
|
-
|
|
172
|
-
::: tabs
|
|
173
|
-
|
|
174
|
-
== tab "Nested Card Example"
|
|
175
|
-
::: card Installation Guide
|
|
176
|
-
|
|
177
|
-
**Download**
|
|
178
|
-
Get the latest version for your platform.
|
|
179
|
-
|
|
180
|
-
::: button Get_Latest external:https://github.com/mgks/docmd/releases
|
|
181
|
-
|
|
182
|
-
**Install**
|
|
183
|
-
Run the installer and follow the prompts.
|
|
184
|
-
|
|
185
|
-
```bash
|
|
186
|
-
install docmd
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
:::
|
|
190
|
-
|
|
191
|
-
== tab "Callout Example"
|
|
192
|
-
|
|
193
|
-
**Configure**
|
|
194
|
-
Set up your preferences.
|
|
195
|
-
|
|
196
|
-
::: callout warning Configuration
|
|
197
|
-
Don't forget to configure your settings!
|
|
198
|
-
:::
|
|
199
|
-
|
|
200
|
-
:::
|
|
201
|
-
|
|
202
|
-
## Customization
|
|
203
|
-
|
|
204
|
-
Tabs containers automatically handle:
|
|
205
|
-
|
|
206
|
-
- **Responsive design** - Works on all screen sizes
|
|
207
|
-
- **Theme integration** - Matches your site's theme
|
|
208
|
-
- **Accessibility** - Proper ARIA labels and keyboard navigation
|
|
209
|
-
- **Smooth transitions** - Elegant tab switching animations
|
|
210
|
-
|
|
211
|
-
## Best Practices
|
|
212
|
-
|
|
213
|
-
1. **Clear Labels** - Use descriptive tab names
|
|
214
|
-
2. **Consistent Content** - Keep similar content types in each tab
|
|
215
|
-
3. **Logical Order** - Arrange tabs in a logical sequence
|
|
216
|
-
4. **Not Too Many** - Limit to 5-7 tabs for best usability
|
|
217
|
-
5. **Mobile Friendly** - Consider mobile users when organizing content
|
|
218
|
-
|
|
219
|
-
## Nesting Limitations
|
|
220
|
-
|
|
221
|
-
::: callout error Important Limitation
|
|
222
|
-
**Steps containers cannot be used inside tabs** due to parsing conflicts. If you need step-by-step instructions within tabs, use regular numbered lists or consider restructuring your content.
|
|
223
|
-
:::
|
|
224
|
-
|
|
225
|
-
- **Tabs cannot contain tabs** - This prevents infinite recursion
|
|
226
|
-
- **Steps inside tabs not supported** - Use regular ordered lists instead
|
|
227
|
-
- **Maximum depth** - While technically unlimited, keep it under 7 levels for readability
|
|
228
|
-
- **Performance** - Very deep nesting may impact rendering performance
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Custom Containers"
|
|
3
|
-
description: "Enhance your documentation with special components like callouts, cards, and steps using docmd's custom container syntax."
|
|
4
|
-
noStyle: true
|
|
5
|
-
components:
|
|
6
|
-
meta: false
|
|
7
|
-
favicon: true
|
|
8
|
-
css: false
|
|
9
|
-
theme: false
|
|
10
|
-
scripts: false
|
|
11
|
-
customHead: |
|
|
12
|
-
<script>
|
|
13
|
-
window.location.href = "https://docmd.mgks.dev/content/containers/";
|
|
14
|
-
document.addEventListener("DOMContentLoaded", function () {
|
|
15
|
-
window.location.href = "https://docmd.mgks.dev/content/containers/";
|
|
16
|
-
});
|
|
17
|
-
</script>
|
|
18
|
-
bodyClass: "no-style-example"
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
<div class="container">
|
|
22
|
-
Redirecting...<br/>
|
|
23
|
-
/custom-containers have moved to /containers now <a href="https://docmd.mgks.dev/content/containers/">Visit New Custom Containers Page</a>
|
|
24
|
-
</div>
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Frontmatter"
|
|
3
|
-
description: "How to use YAML frontmatter to define page metadata in your docmd Markdown files."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Frontmatter
|
|
7
|
-
|
|
8
|
-
Every Markdown (`.md`) file that `docmd` processes **must** begin with YAML frontmatter. Frontmatter is a block of YAML (YAML Ain't Markup Language) enclosed by triple-dashed lines (`---`) at the very beginning of your file. It's used to set metadata for each page.
|
|
9
|
-
|
|
10
|
-
## Basic Structure
|
|
11
|
-
|
|
12
|
-
```yaml
|
|
13
|
-
---
|
|
14
|
-
title: "My Awesome Page Title"
|
|
15
|
-
description: "A concise and informative description for this page, used for SEO and potentially in listings."
|
|
16
|
-
# You can add other custom fields here if needed for your templates or logic
|
|
17
|
-
order: 1 # Example: for custom sorting if you implement such logic
|
|
18
|
-
tags:
|
|
19
|
-
- guide
|
|
20
|
-
- advanced
|
|
21
|
-
---
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Required Fields
|
|
25
|
-
|
|
26
|
-
* **`title`** (String, Required)
|
|
27
|
-
* **Purpose:** This is the primary title of the page.
|
|
28
|
-
* **Usage:**
|
|
29
|
-
* Used for the HTML `<title>` tag (e.g., `Page Title : Site Title`).
|
|
30
|
-
* Often used as the main heading (`<h1>`) on the page by default (though themes can customize this).
|
|
31
|
-
* Used as the display text for links in the navigation sidebar if the path matches.
|
|
32
|
-
* **Example:** `title: "Installation Guide"`
|
|
33
|
-
|
|
34
|
-
## Optional Fields (Recommended)
|
|
35
|
-
|
|
36
|
-
* **`description`** (String, Optional)
|
|
37
|
-
* **Purpose:** A brief summary of the page's content.
|
|
38
|
-
* **Usage:**
|
|
39
|
-
* Used for the HTML `<meta name="description">` tag, which is important for search engine optimization (SEO) and search result snippets.
|
|
40
|
-
* **Example:** `description: "Learn how to install and configure the XYZ widget."`
|
|
41
|
-
|
|
42
|
-
## Custom Fields
|
|
43
|
-
|
|
44
|
-
You can include any other custom fields in your frontmatter. These fields won't be used by `docmd`'s core functionality directly but can be accessed if you decide to customize EJS templates or write plugins in the future.
|
|
45
|
-
|
|
46
|
-
Examples of custom fields you *might* add (these are not built-in features):
|
|
47
|
-
|
|
48
|
-
* `author`: "Jane Doe"
|
|
49
|
-
* `date`: "2023-10-26"
|
|
50
|
-
* `order`: 2 (For custom sorting of pages within a section, if you implement logic for it)
|
|
51
|
-
* `draft`: true (To mark a page as a draft, if you implement logic to exclude drafts from builds)
|
|
52
|
-
* `tags`: ["tag1", "tag2"]
|
|
53
|
-
* `permalink`: "https://example.com/your-canonical-url/" (Sets the canonical URL for SEO purposes)
|
|
54
|
-
|
|
55
|
-
## Page-Specific Behavior Fields
|
|
56
|
-
|
|
57
|
-
* **`toc`** (Boolean, Optional)
|
|
58
|
-
* **Purpose:** Controls the visibility of the "On This Page" table of contents sidebar.
|
|
59
|
-
* **Default:** `true` (TOC is visible if the page has headings).
|
|
60
|
-
* **Usage:** Set to `false` to completely hide the TOC sidebar for a specific page. This is useful for landing pages or pages with minimal content.
|
|
61
|
-
* **Example:** `toc: false`
|
|
62
|
-
|
|
63
|
-
## Example Usage
|
|
64
|
-
|
|
65
|
-
Consider a file named `docs/guides/installation.md`:
|
|
66
|
-
|
|
67
|
-
```markdown
|
|
68
|
-
---
|
|
69
|
-
title: "Installation Steps"
|
|
70
|
-
description: "A step-by-step guide to installing our application on various platforms."
|
|
71
|
-
order: 1
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
# Application Installation
|
|
75
|
-
|
|
76
|
-
This guide will walk you through installing our application...
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
In this example:
|
|
80
|
-
* The browser tab will show "Installation Steps : Your Site Title".
|
|
81
|
-
* The `<meta name="description">` will be set.
|
|
82
|
-
* The `order: 1` field is available if you later want to sort "guides" pages by this value.
|
|
83
|
-
|
|
84
|
-
Using frontmatter consistently ensures your pages are well-defined, SEO-friendly, and integrate smoothly with `docmd`'s navigation and theming systems.
|
package/docs/content/images.md
DELETED
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Images"
|
|
3
|
-
description: "Learn how to add and customize images in your docmd documentation"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Images in docmd
|
|
7
|
-
|
|
8
|
-
Adding images to your documentation enhances visual understanding and makes your content more engaging. This guide covers everything you need to know about using images in docmd.
|
|
9
|
-
|
|
10
|
-
## Basic Image Syntax
|
|
11
|
-
|
|
12
|
-
The standard Markdown syntax for images works in docmd:
|
|
13
|
-
|
|
14
|
-
```markdown
|
|
15
|
-

|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Where:
|
|
19
|
-
- `Alt text` is the alternative text displayed if the image cannot be loaded
|
|
20
|
-
- `/path/to/image.jpg` is the path to your image file
|
|
21
|
-
- `"Optional title"` is a tooltip shown when hovering over the image (optional)
|
|
22
|
-
|
|
23
|
-
## Image Organization
|
|
24
|
-
|
|
25
|
-
We recommend organizing your images in a dedicated directory structure:
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
docs/
|
|
29
|
-
└── images/
|
|
30
|
-
├── getting-started/
|
|
31
|
-
│ └── installation.png
|
|
32
|
-
├── features/
|
|
33
|
-
│ └── example.jpg
|
|
34
|
-
└── logo.svg
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Referencing Images
|
|
38
|
-
|
|
39
|
-
### Relative Paths
|
|
40
|
-
|
|
41
|
-
Use relative paths to reference images within your documentation:
|
|
42
|
-
|
|
43
|
-
```markdown
|
|
44
|
-

|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Absolute Paths
|
|
48
|
-
|
|
49
|
-
For images stored in your site's assets directory:
|
|
50
|
-
|
|
51
|
-
```markdown
|
|
52
|
-

|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## Image Styling
|
|
56
|
-
|
|
57
|
-
docmd provides several ways to style your images using attribute syntax:
|
|
58
|
-
|
|
59
|
-
### Image Alignment
|
|
60
|
-
|
|
61
|
-
You can align images using special class names:
|
|
62
|
-
|
|
63
|
-
```markdown
|
|
64
|
-
{.align-left}
|
|
65
|
-
{.align-center}
|
|
66
|
-
{.align-right}
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### Image Size
|
|
70
|
-
|
|
71
|
-
Control image dimensions with size classes:
|
|
72
|
-
|
|
73
|
-
```markdown
|
|
74
|
-
{.size-small}
|
|
75
|
-
{.size-medium}
|
|
76
|
-
{.size-large}
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Or specify custom dimensions:
|
|
80
|
-
|
|
81
|
-
```markdown
|
|
82
|
-
{width=300 height=200}
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### Image Borders and Shadows
|
|
86
|
-
|
|
87
|
-
Add borders or shadows to your images:
|
|
88
|
-
|
|
89
|
-
```markdown
|
|
90
|
-
{.with-border}
|
|
91
|
-
{.with-shadow}
|
|
92
|
-
{.with-border .with-shadow}
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
Note: Make sure there's a space between multiple classes in the attribute syntax.
|
|
96
|
-
|
|
97
|
-
### Responsive Images
|
|
98
|
-
|
|
99
|
-
All images in docmd are responsive by default, automatically scaling to fit their container.
|
|
100
|
-
|
|
101
|
-
## Image Captions
|
|
102
|
-
|
|
103
|
-
Add captions to your images using the figure syntax:
|
|
104
|
-
|
|
105
|
-
```markdown
|
|
106
|
-
<figure>
|
|
107
|
-
<img src="/path/to/image.jpg" alt="Description of image">
|
|
108
|
-
<figcaption>This is the caption for the image</figcaption>
|
|
109
|
-
</figure>
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
## Image Galleries and Lightbox
|
|
113
|
-
|
|
114
|
-
docmd includes built-in lightbox functionality for image galleries. When users click on an image in a gallery, it opens in a full-screen lightbox view.
|
|
115
|
-
|
|
116
|
-
### Basic Gallery
|
|
117
|
-
|
|
118
|
-
Create simple image galleries by grouping images in a grid layout:
|
|
119
|
-
|
|
120
|
-
```markdown
|
|
121
|
-
<div class="image-gallery">
|
|
122
|
-
<img src="/path/to/image1.jpg" alt="Image 1">
|
|
123
|
-
<img src="/path/to/image2.jpg" alt="Image 2">
|
|
124
|
-
<img src="/path/to/image3.jpg" alt="Image 3">
|
|
125
|
-
</div>
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
### Gallery with Captions
|
|
129
|
-
|
|
130
|
-
For galleries with captions, use figure elements inside the gallery:
|
|
131
|
-
|
|
132
|
-
```markdown
|
|
133
|
-
<div class="image-gallery">
|
|
134
|
-
<figure>
|
|
135
|
-
<img src="/path/to/image1.jpg" alt="Image 1">
|
|
136
|
-
<figcaption>Caption for Image 1</figcaption>
|
|
137
|
-
</figure>
|
|
138
|
-
<figure>
|
|
139
|
-
<img src="/path/to/image2.jpg" alt="Image 2">
|
|
140
|
-
<figcaption>Caption for Image 2</figcaption>
|
|
141
|
-
</figure>
|
|
142
|
-
</div>
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### Zoom Effect
|
|
146
|
-
|
|
147
|
-
Add a zoom effect to gallery images when hovering:
|
|
148
|
-
|
|
149
|
-
```markdown
|
|
150
|
-
<div class="image-gallery zoom">
|
|
151
|
-
<img src="/path/to/image1.jpg" alt="Image 1">
|
|
152
|
-
<img src="/path/to/image2.jpg" alt="Image 2">
|
|
153
|
-
</div>
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
### Individual Lightbox Images
|
|
157
|
-
|
|
158
|
-
You can also enable lightbox functionality for individual images:
|
|
159
|
-
|
|
160
|
-
```markdown
|
|
161
|
-
{.lightbox}
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
## Image Optimization Best Practices
|
|
165
|
-
|
|
166
|
-
For optimal performance:
|
|
167
|
-
|
|
168
|
-
1. **Use appropriate formats**:
|
|
169
|
-
- JPEG for photographs
|
|
170
|
-
- PNG for images with transparency
|
|
171
|
-
- SVG for icons and logos
|
|
172
|
-
- WebP for better compression (with fallbacks)
|
|
173
|
-
|
|
174
|
-
2. **Optimize file sizes**:
|
|
175
|
-
- Compress images before adding them to your documentation
|
|
176
|
-
- Consider using tools like ImageOptim, TinyPNG, or Squoosh
|
|
177
|
-
|
|
178
|
-
3. **Provide responsive images**:
|
|
179
|
-
- Use the HTML `<picture>` element for advanced responsive image scenarios
|
|
180
|
-
|
|
181
|
-
4. **Specify dimensions**:
|
|
182
|
-
- Always include width and height attributes to prevent layout shifts
|
|
183
|
-
|
|
184
|
-
## Examples
|
|
185
|
-
|
|
186
|
-
### Basic Image
|
|
187
|
-
|
|
188
|
-

|
|
189
|
-
|
|
190
|
-
### Image with Border and Shadow
|
|
191
|
-
|
|
192
|
-
{.with-border .with-shadow}
|
|
193
|
-
|
|
194
|
-
### Responsive Image Gallery
|
|
195
|
-
|
|
196
|
-
<div class="image-gallery">
|
|
197
|
-
<figure>
|
|
198
|
-
<img src="/assets/images/docmd-preview.png" alt="Feature 1">
|
|
199
|
-
<figcaption>Feature One</figcaption>
|
|
200
|
-
</figure>
|
|
201
|
-
<figure>
|
|
202
|
-
<img src="/assets/images/docmd-preview.png" alt="Feature 2">
|
|
203
|
-
<figcaption>Feature Two</figcaption>
|
|
204
|
-
</figure>
|
|
205
|
-
</div>
|