Lists
Create ordered, unordered, and nested lists in your Mordoc documentation using markdown syntax.
Lists
Lists organize information into easy-to-scan, structured formats. Mordoc supports ordered (numbered), unordered (bulleted), and nested lists.
Unordered Lists
Create bullet-point lists using -, *, or +:
- First item
- Second item
- Third itemResult:
- First item
- Second item
- Third item
Alternative Markers
All three markers produce identical output:
- Item with dash
* Item with asterisk
+ Item with plusChoose one style and be consistent throughout your documentation.
Ordered Lists
Create numbered lists using numbers followed by periods:
1. First step
2. Second step
3. Third stepResult:
- First step
- Second step
- Third step
Automatic Numbering
Markdown automatically numbers items sequentially. You can use 1. for all items:
1. First item
1. Second item (will render as 2)
1. Third item (will render as 3)This makes reordering items easier without renumbering.
Starting numbers matter. If you start with 3., the list will begin at 3, not 1.
Nested Lists
Create hierarchical lists by indenting with 2-4 spaces or one tab:
Nested Unordered Lists
- Main item
- Nested item
- Another nested item
- Deeply nested item
- Another main itemResult:
- Main item
- Nested item
- Another nested item
- Deeply nested item
- Another main item
Nested Ordered Lists
1. First step
1. Sub-step one
2. Sub-step two
2. Second step
1. Sub-step one
2. Sub-step twoResult:
- First step
- Sub-step one
- Sub-step two
- Second step
- Sub-step one
- Sub-step two
Mixed Lists
Combine ordered and unordered lists:
1. Main task
- Subtask (unordered)
- Another subtask
2. Another main task
- First subtask
1. Detailed step
2. Another detailed step
- Second subtaskResult:
- Main task
- Subtask (unordered)
- Another subtask
- Another main task
- First subtask
- Detailed step
- Another detailed step
- Second subtask
- First subtask
List Items with Multiple Paragraphs
Add multiple paragraphs to a list item by indenting:
1. First item with multiple paragraphs.
This is the second paragraph for the first item. It needs to be indented.
2. Second item.
Another paragraph here.Result:
First item with multiple paragraphs.
This is the second paragraph for the first item. It needs to be indented.
Second item.
Another paragraph here.
Lists with Code Blocks
Include code blocks in list items:
1. Install the package:
```bash
npm install mordocConfigure your project:
Json{ "title": "My Docs" }
Result:
1. Install the package:
```bash
npm install mordocConfigure your project:
Json{ "title": "My Docs" }
Lists with Other Elements
Lists with Links
- [Installation Guide](/get-started/creating-project)
- [Configuration Reference](/configuration/sidenav)
- [Deployment Instructions](/deployment/build)Result:
Lists with Emphasis
- **Bold item**: Description here
- *Italic item*: Another description
- `Code item`: Technical termResult:
- Bold item: Description here
- Italic item: Another description
Code item: Technical term
Lists with Images
1. First step:

2. Second step:
Task Lists
Create checkboxes with task list syntax:
- [ ] Incomplete task
- [x] Completed task
- [ ] Another incomplete taskResult:
- [ ] Incomplete task
- [x] Completed task
- [ ] Another incomplete task
Task lists render as checkboxes in the documentation. They're perfect for checklists, prerequisites, and progress tracking.
Definition Lists
For term-definition pairs, use HTML:
<dl>
<dt>Term 1</dt>
<dd>Definition of term 1</dd>
<dt>Term 2</dt>
<dd>Definition of term 2</dd>
</dl>Best Practices
When to Use Unordered Lists
Use bullet points when:
- Order doesn't matter
- Listing features or options
- Showing related items
- Creating quick reference lists
## Key Features
- Fast build times
- Beautiful themes
- Easy customization
- Full markdown supportWhen to Use Ordered Lists
Use numbered lists when:
- Steps must follow a sequence
- Priority or ranking matters
- Creating instructions or tutorials
- Showing progression
## Installation Steps
1. Download the installer
2. Run the installation wizard
3. Configure your settings
4. Launch the applicationNesting Guidelines
- Limit Depth: Avoid nesting more than 3 levels deep
- Use Consistently: Maintain consistent indentation (2 or 4 spaces)
- Stay Logical: Nested items should relate to their parent
- Consider Alternatives: Deep nesting may indicate need for subsections
Writing List Items
Do:
- Start with capital letters for complete sentences
- Use parallel structure (all sentences or all phrases)
- Keep items concise
- Use punctuation consistently
Don't:
- Mix complete sentences with fragments
- Make items too long (consider breaking into paragraphs)
- Use inconsistent punctuation
- Nest excessively
Common Patterns
Feature Lists
## What Mordoc Offers
- **Easy Setup**: Get started in minutes with npx
- **Markdown-First**: Write in familiar markdown syntax
- **Deploy Anywhere**: No vendor lock-in
- **Customizable**: Full control over stylingStep-by-Step Instructions
## Deployment Checklist
1. Run build command:
```bash
npm run build- Test the production build locally
- Upload
dist/folder to your server - Configure your domain DNS
- Verify the site is live
### Prerequisites
```markdown
## Before You Begin
Ensure you have:
- [ ] Node.js 18+ installed
- [ ] Git installed and configured
- [ ] A code editor (VS Code recommended)
- [ ] Basic markdown knowledgeComparison Lists
## Mordoc vs. Alternatives
**Mordoc Advantages:**
- Deploy to any infrastructure
- No monthly fees
- Complete source code access
- Unlimited customization
**Other Tools:**
- Locked to specific platforms
- Subscription required
- Limited customization
- Proprietary formatsTroubleshooting Lists
## Common Issues
1. **Build fails**
- Check Node.js version (18+ required)
- Verify all dependencies installed
- Review error messages in console
2. **Pages not appearing**
- Confirm file is in `content/en/`
- Check `sidenav.yaml` configuration
- Ensure file has `.md` extensionSpacing and Formatting
Tight Lists
Lists without blank lines between items:
- Item one
- Item two
- Item threeLoose Lists
Lists with blank lines (adds more spacing):
- Item one
- Item two
- Item threeTroubleshooting
List Not Rendering
- Ensure space after
-or number - Check indentation is consistent
- Verify no extra characters before markers
Incorrect Nesting
- Use 2-4 spaces or one tab for each level
- Maintain consistent indentation
- Align nested items under parent text
Numbers Not Sequential
- Remove custom numbering if you want auto-numbering
- Check for blank lines breaking the list
- Ensure proper indentation for nested lists
Mixing tabs and spaces can cause rendering issues. Choose one and be consistent throughout your documentation.
Examples
Complete Documentation Section
# Getting Started Guide
## Prerequisites
Before beginning, ensure you have:
- [ ] Node.js 18 or higher
- [ ] npm or yarn package manager
- [ ] Git for version control
- [ ] Code editor installed
## Installation Steps
1. Create a new project:
```bash
npx create-mordoc-app my-docsNavigate to the project:
Bashcd my-docsStart the development server:
Bashnpm run devOpen your browser to
http://localhost:3000
Project Structure
Your new project contains:
- config/: Configuration files
sidenav.yaml: Navigation structuresite.json: Site metadatastyles/: Theme customization
- content/: Markdown documentation
en/: English language content
- public/: Static assets
images/: Image filesicons/: Icon files
Next Steps
After installation, you can:
- Customize your site configuration
- Add your own content
- Modify the theme and colors
- Deploy to your hosting platform
## Next Steps
- [Tables](/syntax-components/tables) - Display structured data in tables
- [Code Blocks](/syntax-components/code-blocks) - Add syntax-highlighted code
- [Callouts](/syntax-components/callouts) - Create styled alert boxes
