CLI

Complete reference for Docyard commands.

docyard init

Initialize a new Docyard project.

docyard init [PROJECT_NAME]
Option Alias Default Description
--force -f false Overwrite existing files
docyard init

Generated files:

  • my-docs
    • docyard.yml
    • docs
      • _sidebar.yml
      • index.md
      • getting-started.md
      • components.md
      • public

docyard serve

Start the development server with hot reload.

docyard serve [OPTIONS]
Option Alias Default Description
--port -p 4200 Port to run the server on
--host -h localhost Host to bind the server to
--search -s false Enable search indexing
docyard serve
Hot Reload

Hot reload runs on a separate port (main port + 1). When serving on port 4200, the hot reload server uses port 4201.


docyard build

Build the static site for production.

docyard build [OPTIONS]
Option Alias Default Description
--clean - true Clean output directory before building
--verbose -v false Show detailed output
--no-clean - - Preserve existing output files
docyard build
Tip

Use --verbose to see compression stats and detailed timing for each build step.


docyard preview

Preview the built site locally. Useful for testing production builds before deployment.

docyard preview [OPTIONS]
Option Alias Default Description
--port -p 4000 Port to run preview server on
docyard build && docyard preview
Important

Run docyard build first. The preview server serves files from the dist/ directory.


docyard version

Show the installed Docyard version.

docyard version
Edit this page
Last updated