Ir al contenido

Adding Document

Esta página aún no está disponible en tu idioma.

This guide will walk you through the process of adding new documentation pages to your Dockit site, organizing them properly, and ensuring they appear in the navigation.

All documentation files are located in the src/content/docs/ directory. The structure looks like this:

Create a new .md or .mdx file in the appropriate directory:

For Markdown (.md):

For MDX (.mdx) - with React components:

Every documentation page must start with YAML frontmatter:

Field

Type

Description

title

string

Page title (appears in browser tab and navigation)

description

string

Page description for SEO and previews

Field

Type

Description

sidebar.order

number

Custom ordering in sidebar

sidebar.label

string

Custom label in sidebar (defaults to title)

sidebar.hidden

boolean

Hide page from sidebar navigation

editUrl

boolean/string

Enable/disable edit link or set custom URL

lastUpdated

boolean

Show last updated date

prev

boolean/object

Configure previous page link

next

boolean/object

Configure next page link

hero

object

Add hero section (for splash pages)

banner

object

Add banner message

draft

boolean

Mark as draft (won’t build in production)

For directories with multiple pages, use autogenerate in src/config/config.json:

For specific pages or custom organization:

Combine autogenerate with manual items:

Add to src/config/config.json:

  • Use kebab-case for file names: my-guide.md

  • Be descriptive but concise

  • Match the URL structure you want

  1. Logical Grouping: Group related content in directories

  2. Progressive Disclosure: Start with basics, advance to complex topics

  3. Cross-References: Link related pages together

  4. Consistent Structure: Use similar headings and organization

  1. Clear Titles: Make titles descriptive and searchable

  2. Good Descriptions: Write compelling descriptions for SEO

  3. Proper Headers: Use h1 for page title, h2 for main sections

  4. Code Examples: Provide working, copy-paste-ready examples

  5. Visual Elements: Use components, tables, and callouts for clarity

  • Write descriptive title and description frontmatter

  • Use proper heading hierarchy (h1 → h2 → h3)

  • Add alt text to images

  • Use semantic HTML elements

  • Test with screen readers

  1. Check file is in correct directory

  2. Verify frontmatter syntax

  3. Ensure page is added to config.json sidebar

  4. Restart development server

  1. Validate YAML frontmatter syntax

  2. Check for missing imports in MDX files

  3. Ensure all referenced files exist

  4. Review component syntax

  1. Use sidebar.order in frontmatter for custom ordering

  2. Check alphabetical sorting in autogenerated sections

  3. Verify manual ordering in config.json

Use the template frontmatter field:

Add custom CSS classes:

Use MDX to show content conditionally:

Still Reading Docs? Start Doing!

Unlock the full potential of Feedigy's power to streamline and automate your content marketing efforts!