Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

referencing issue when using nested mkdocs #38

Open
ukpatel08 opened this issue Feb 19, 2022 · 0 comments
Open

referencing issue when using nested mkdocs #38

ukpatel08 opened this issue Feb 19, 2022 · 0 comments

Comments

@ukpatel08
Copy link

I'm working on a project where I have nested mkdocs. See the tree below.

|--sw_docs
    |--mkdocs.yml
    |--docs
        |--index.md
   |--doc1
       |--_data
           |--ref1.yml
           |--ref3.yml
       |--mkdocs.yml
       |--docs
           |--index.md
   |--doc2
       |--mkdocs.yml
       |--_data
           |--ref2.yml
       |--docs
           |--index.md

At the top level mkdocs.yml I have the following

  site_name: my site
  
  plugins:
     -search
     - markdownextradata:
         data: doc1/_data, doc2/_data

When I build the info from ref1 gets picked up but info from ref2 does not.

so {{ ref1.name }} correctly links in the first document. But I get an error when trying to use {{ ref2.name }} in the second document. If I use {{ ref1.name }} in the second document then no issue.

I'm using the mkdocs-monorepo-plugin to have a layered site.
I'm also using the mkdocs-with-pdf plugin to create individual PDFs of doc1 and doc2. This is the primary reason why I have ref1 and ref2 defined.

currently, my only solution is to duplicate ref1 and ref2 at the top level.

Do I have my top-level mkdocs.yml setup correctly? Or is what I'm trying to do is currently not possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant