πŸ”§ TroubleshootingΒΆ

Documentation for πŸ”§ Troubleshooting.

Common issues and solutions when using markdown includes.

❌ Issue: File Not Found Error¢

πŸ”΄ Error MessageΒΆ

IntroligoError: Markdown file not found: /path/to/file.md

βœ… SolutionΒΆ

Check that the path is relative to the configuration file:

# If config is at: docs/composition/introligo_config.yaml
# And markdown is at: docs/composition/markdown/guide.md

# βœ… Correct
markdown_includes: "markdown/guide.md"

# ❌ Wrong - absolute path
markdown_includes: "/docs/composition/markdown/guide.md"

# ❌ Wrong - relative to project root
markdown_includes: "docs/composition/markdown/guide.md"

πŸ’‘ Quick FixΒΆ

Use ls from the directory containing your config file to verify the path:

cd docs/composition
ls markdown/guide.md  # Should show the file

β€”

❌ Issue: RST Syntax Errors in Output¢

πŸ”΄ Error MessageΒΆ

WARNING: Unexpected indentation
ERROR: Unexpected indentation

βœ… SolutionΒΆ

This usually happens with complex markdown. The built-in converter handles: - Headers (H1-H4) - Code blocks with triple backticks - Regular paragraphs - Lists

For complex markdown, consider: 1. Simplifying the markdown structure 2. Using RST-compatible markdown syntax 3. Breaking into smaller files

β€”

❌ Issue: Code Blocks Not Rendering¢

πŸ”΄ ProblemΒΆ

Code blocks appear as plain text instead of highlighted code.

βœ… SolutionΒΆ

Ensure you’re using triple backticks with language specification:

# βœ… Correct
def hello():

print(β€œHello!”)

# ❌ Wrong - no language
def hello():

print(β€œHello!”)

# ❌ Wrong - indented code (not supported)
    def hello():
        print("Hello!")

β€”

❌ Issue: Headers Not Converting¢

πŸ”΄ ProblemΒΆ

Headers appear as regular text with # symbols.

βœ… SolutionΒΆ

Make sure there’s a space after the #:

# βœ… Correct
## βœ… Also correct
### βœ… Works great

#❌ Wrong - no space
##❌ Wrong - no space

β€”

❌ Issue: Emojis Not Displaying¢

πŸ”΄ ProblemΒΆ

Emojis appear as squares or question marks.

βœ… SolutionΒΆ

Emojis are supported! Make sure: 1. Your markdown file is saved with UTF-8 encoding 2. Your terminal/editor supports UTF-8 3. The Sphinx theme supports emojis (most modern themes do)

Example of working emojis: πŸŽ‰ πŸš€ πŸ“ ✨ πŸ”§ πŸ’‘

β€”

❌ Issue: Empty Output¢

πŸ”΄ ProblemΒΆ

The markdown content doesn’t appear in generated documentation.

βœ… SolutionΒΆ

Check these common issues:

  1. Verify the field name:

# βœ… Correct
markdown_includes: "file.md"

# ❌ Wrong field name
markdown_include: "file.md"  # Missing 's'
  1. Check file has content:

cat docs/composition/markdown/file.md
# Should show content, not empty
  1. Verify it’s in the right module:

modules:
  my_module:  # Make sure this is the right module
    markdown_includes: "file.md"

β€”

❌ Issue: Path Resolution with !include¢

πŸ”΄ ProblemΒΆ

Using !include with markdown includes causes path issues.

βœ… SolutionΒΆ

Paths in markdown includes are always relative to the main config file, not the included file:

# Main config: docs/composition/introligo_config.yaml
modules:
  my_module: !include ../../src/my_module_doc.yaml

# In src/my_module_doc.yaml:
title: "My Module"
# βœ… Path relative to main config file
markdown_includes: "docs/markdown/guide.md"

# ❌ Not relative to my_module_doc.yaml location
markdown_includes: "../docs/markdown/guide.md"

β€”

πŸ› Debugging TipsΒΆ

1️⃣ Enable Verbose ModeΒΆ

python introligo.py config.yaml -o docs -v

This shows which markdown files are being included.

2️⃣ Use Dry RunΒΆ

python introligo.py config.yaml -o docs --dry-run

Preview what would be generated without creating files.

3️⃣ Check Generated RSTΒΆ

Look at the generated .rst file to see the converted content:

cat docs/generated/my_module.rst

4️⃣ Test with Simple Markdown FirstΒΆ

Create a minimal test file:

# Test

This is a test.

## Works?

Yes it does! πŸŽ‰

β€”

πŸ“ž Getting HelpΒΆ

If you encounter issues not covered here:

  1. Check the logs - Run with -v for verbose output

  2. Review the config - Ensure YAML syntax is correct

  3. Test incrementally - Add one markdown file at a time

  4. Check file permissions - Ensure files are readable

✨ Pro Tips¢

  • πŸ’‘ Start simple and add complexity gradually

  • πŸ’‘ Keep markdown files focused and modular

  • πŸ’‘ Use consistent formatting in your markdown

  • πŸ’‘ Test after each change to catch issues early

  • πŸ’‘ Use version control to track working configurations

Remember: The markdown converter is designed for documentation use cases. Keep your markdown clean and simple for best results! πŸš€