A Go application that scans markdown files in a directory structure and converts tables to YAML format while preserving column order. Designed specifically for processing Hugo documentation sets with files named *index.en.md.
- Recursively processes markdown files in directory structures
- Preserves table column order in YAML output
- Generates YAML files with well-formatted table data
- Provides detailed logging with error tracking
- Shows real-time progress with ETA
- Handles multi-line content in table cells
- Provides summary of files containing tables
go build -o bin/converter cmd/converter/main.go./bin/converter -input /path/to/markdown/files -output /path/to/output/dir-input: Input directory containing markdown files (required)-output: Output directory for YAML files (optional, defaults to ./output)-log: Path to log file (optional, defaults to error.log)
| Option | Description |
| :-- | :-- |
| ascending | Ascending order (default) |
| descending | Descending order |Table 1:
- Option: ascending
Description: Ascending order (default)
- Option: descending
Description: Descending orderThe yamltable.html shortcode renders YAML tables in Hugo documentation.
Copy yamltable.html to your Hugo project's shortcodes folder:
cp yamltable.html /path/to/hugo/layouts/shortcodes/Use the shortcode in your Hugo markdown files:
{{% yamltable %}}
- Option: ascending
Description: Ascending order (default)
- Option: descending
Description: Descending order
{{% /yamltable %}}The shortcode supports special placeholder values that render as icons:
| Value | Renders | Description |
|---|---|---|
-yes- |
✓ (green) | Feature fully supported |
-no- |
✗ (red) | Feature not supported |
-limited- |
◐ (orange) | Feature partially supported |
-note- |
📝 | Note indicator |
-warning- |
🛑 | Warning indicator |
-tip- |
🧭 | Tip indicator |
The application generates a detailed error.log file containing:
- Processing summary
- Memory statistics
- Success/failure counts
- Error breakdown by type
- List of files containing tables
markdown-table-converter/
├── cmd/converter/
├── internal/
│ ├── parser/
│ ├── converter/
│ ├── logger/
│ ├── progress/
│ └── utils/
└── pkg/types/Created by Narayan SS
Special thanks to:
- Claude (Anthropic) : For extensive help with code structure, debugging, and implementation
- Gemini (Google) : For additional assistance and suggestions
Copyright 2025 Narayan SS
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: Apache License
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.