Quick start

Article last updated at August 11, 2026

Preparation

  • Install Node.js v22 or higher.

  • Install a text editor, such as VS Code.

  • Install the Diplodoc CLI package by running the command npm i @diplodoc/cli -g in the terminal.

Creating a project

Using the command yfm init, you can create a project in the desired folder via the console.

A separate page describes the project initialization parameters.

You can use the test project template from our repository.

Warning

To work with repositories, you will need a GitHub account and the version control system Git.

Fork the template repository to quickly deploy your documentation:

  1. On the template page, next to the title, click the Fork button. The Create a new fork page will open.

  2. Click Create fork. A repository with a ready-made project structure will be created in your GitHub profile.

  3. Clone the created repository to your computer.

Project structure

doc-folder
|-- .yfm # Файл конфигурации
|-- toc.yaml # Оглавление
|-- index.md # Разводящая страница
|-- content-page.md # Страница с контентом

For more details about parameters and configuration, see the section Documentation project.

Building a project

The build is performed using the yfm console utility and the command yfm build.

To build the project, run the command:

yfm build -i ./doc-folder -o ./output-folder

Where:

  • -i — path to the project directory (for example, the folder you cloned).
  • -o — path to the directory where static HTML files will be saved.

After successful execution, a folder with the ready HTML project will appear.

Running a local server

To view the build result in a browser, use a local web server.

  1. Build the project:

    yfm build -i ./doc-folder -o ./output-folder
    

    Tip

    Use watch mode. To do this, add the flag --watch so that changes are immediately reflected in the local build.

    yfm build -i ./doc-folder -o ./output-folder --watch
    
  2. Run a server for the folder with the build result using the package http-server:

    npx http-server ./output-folder -p 5005
    

The documentation will be available at http://localhost:5005.

Publishing on GitHub Pages

  1. Go to your documentation repository on GitHub, open the Settings tab, and select Pages in the left menu.

  2. In the Build and deployment section, select GitHub Actions from the dropdown list.

  3. In the appeared block Static HTML, click Configure. The GitHub Actions window will open.

  4. In the workflow file, find the jobs block and after the line uses: actions/configure-pages@v5 add:

    - name: Build docs
      uses: diplodoc-platform/docs-build-static-action@v1
      with:
        src-root: './docs'
        build-root: './docs-html'
    
  5. In the same file, find the Upload artifact step and change the path to the directory with the built documentation:

    - name: Upload artifact
      uses: actions/upload-pages-artifact@v3
      with:
        path: './docs-html'
    
  6. In the upper-right corner, click Commit changes..., in the Commit message field specify the commit message and click Commit changes.

  7. Go to the Actions tab. At the top of the list, you will see your latest commit.

  8. Click on the commit name. After the build completes, the document will be published on GitHub Pages. You can view it via the link below under the deploy label.

Publishing on diplodoc.com

Warning

To work with repositories, you will need a GitHub account and the version control system Git.

  1. Go to the website diplodoc.com and click the Start button.

  2. Follow the instructions provided on the page.

  3. On your GitHub page, a repository diplodoc-example will be automatically created and a link to the documentation example will be generated.

Note

To change the default repository name diplodoc-example, contact us.

Previous
Next