machow / quartodoc

Generate API documentation with quarto
https://machow.github.io/quartodoc
MIT License
185 stars 21 forks source link

Interlinks: double path concatenation #353

Open dalmijn opened 5 months ago

dalmijn commented 5 months ago

Hello!

This issue is in regards to running quartodoc interlinks from the repository directory. Take e.g. the following structure:

.
├── docs
│   ├── setup_guide
│   ├── index.qmd
│   └── _quarto.yml
├── src
├── test
└── tmp

If I where to run quartodoc interlinks from the repo (.) directory:

quartodoc interlinks docs/_quarto.yml

It would result in:

.
├── docs
    ├── docs
    │   └── _inv
    │       └── < inventory files > 
    ├── setup_guide
    ├── index.qmd
    └── _quarto.yml
├── src
├── test
└── tmp

Instead of having the '_inv' directory directly under ./docs.

In these lines: https://github.com/machow/quartodoc/blob/main/quartodoc/__main__.py#L243-L265 the p_root directory is concatenated twice. I think this causes the issue.