Skip to content

Bug: tanka-docs init generates invalid configuration format #279

@pekkah

Description

@pekkah

Bug Description

The tanka-docs init command generates configuration files with an invalid format that the build command cannot parse.

Current Behavior

When running tanka-docs init, the generated tanka-docs.yml contains:

name: "Project Name"
description: "Documentation for Project"
sources:
  - source: git-branch
    branch: "master"
    path: docs/

When attempting to build with this configuration, the build fails with:

Error: Could not load configuration 'tanka-docs.yml': Failed to parse YAML. 
Reason: Property 'name' not found on type 'Tanka.DocsTool.Definitions.SiteDefinition'.

Expected Behavior

The init command should generate configuration files that are compatible with the build command. Based on the working tanka-docs.yml in the repository, the correct format should be:

title: "Project Name"
base_path: "/"
index_page: xref://root@master:index.md
output_path: "gh-pages"
build_path: "_build"
branches:
  master:
    input_path:
      - docs
tags:
  1.*:
    input_path:
      - docs

Steps to Reproduce

  1. Create a new directory and initialize git
  2. Run tanka-docs init
  3. Run tanka-docs build
  4. Observe the configuration parsing error

Impact

This makes the init command completely unusable for new users, as the generated configuration cannot be used to build documentation.

Environment

  • tanka-docs version: Latest (from source)
  • .NET version: 9.0
  • OS: Linux

Suggested Fix

Update the init command templates to generate configuration files using the correct format that matches the SiteDefinition class structure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions