Development Container

Using Development Containers for VDAT Documentation

Development Container for VDAT Docs

This documentation site supports development using VS Code Development Containers, which provides a consistent, isolated environment for editing and previewing the documentation.

Prerequisites

  1. Docker
  2. Visual Studio Code
  3. Remote - Containers extension for VS Code

Getting Started

  1. Clone the repository:

    git clone https://gitlab.com/vdat/docs.git
    cd docs
    
  2. Open the project in VS Code:

    code .
    
  3. When prompted, click “Reopen in Container” or use the command palette (F1) and select “Remote-Containers: Reopen in Container”.

  4. VS Code will build the dev container (this may take a few minutes the first time).

  5. Once the container is built and running, you can start the Hugo server:

    hugo server --bind 0.0.0.0
    
  6. Access the live preview at http://localhost:1313

Features

The development container includes:

  • Hugo (Extended Edition)
  • Node.js and NPM (for Docsy dependencies)
  • Git
  • Pandoc for document conversions
  • PlantUML and Graphviz for diagrams
  • VS Code extensions for Markdown, YAML, and Hugo
  • PostCSS and Autoprefixer for CSS processing

Common Tasks

Adding New Content

# Create a new page in a section
hugo new content/en/docs/section/page-name.md

Building the Site

# Development build with live reload
hugo server --bind 0.0.0.0

# Production build
hugo

Installing NPM Dependencies

npm install

Troubleshooting

If you encounter issues with the dev container:

  1. Rebuild the container using VS Code’s command palette: “Remote-Containers: Rebuild Container”
  2. Check Docker Desktop to ensure the container is running
  3. Verify port 1313 is forwarded correctly (check VS Code’s “Ports” tab in the Remote Explorer)

Last modified March 27, 2025: Edit members.yaml (21070ed)