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

Feature: Add support for nav repos #80

Merged
merged 32 commits into from
Feb 2, 2023
Merged

Conversation

jdoiro3
Copy link
Owner

@jdoiro3 jdoiro3 commented Jan 30, 2023

New feature details in #11

This PR adds the support for nav_repos. See example below.

plugins:
  - search
  - multirepo:
      # (optional) tells multirepo to cleanup the temporary directory after site is built.
      cleanup: false
      nav_repos:
        - name: backstage
          import_url: https://github.com/backstage/backstage
          # forward slash is needed in '/README.md' so that only the README.md in the root
          # directory is imported and not all README.md files.
          imports: [
            docs/publishing.md, docs/integrations/index.md, /README.md,
            # asset files needed
            docs/assets/*
            ]
        - name: fast-api
          import_url: https://github.com/tiangolo/fastapi
          imports: [docs/en/docs/index.md]

nav:
  - Backstage:
      - Home: backstage/README.md
      - Integration: backstage/docs/integrations/index.md
      - Publishing: backstage/docs/publishing.md
  - FastAPI: fast-api/docs/en/docs/index.md
  # you can still use the !import statement
  - MkdocStrings: '!import https://github.com/mkdocstrings/mkdocstrings'

In addition to the new nav_repos config, this PR adds support for a !import statement to include keep_docs_dir. If set to true the docs directory will not be removed from the directory tree.

TODO

  • update docs
  • write tests
  • see if I can consolidate/simplify configuration for users.

@github-actions
Copy link

github-actions bot commented Jan 30, 2023

Version Number Check

Version has been updated in pyproject.toml.

@jdoiro3 jdoiro3 changed the title working on adding new feature Working on https://github.com/jdoiro3/mkdocs-multirepo-plugin/issues/11 Jan 30, 2023
@jdoiro3 jdoiro3 changed the title Working on https://github.com/jdoiro3/mkdocs-multirepo-plugin/issues/11 New Feature ((#11)[https://github.com/jdoiro3/mkdocs-multirepo-plugin/issues/11]) Jan 30, 2023
@jdoiro3 jdoiro3 changed the title New Feature ((#11)[https://github.com/jdoiro3/mkdocs-multirepo-plugin/issues/11]) New Feature ([#11](https://github.com/jdoiro3/mkdocs-multirepo-plugin/issues/11)) Jan 30, 2023
@jdoiro3 jdoiro3 changed the title New Feature ([#11](https://github.com/jdoiro3/mkdocs-multirepo-plugin/issues/11)) Working on New Feature Jan 30, 2023
@jdoiro3 jdoiro3 marked this pull request as ready for review January 31, 2023 17:50
@jdoiro3 jdoiro3 added the enhancement New feature or request label Jan 31, 2023
@jdoiro3 jdoiro3 changed the title Working on New Feature Feature: Add support for nav repos Jan 31, 2023
@jdoiro3 jdoiro3 mentioned this pull request Feb 1, 2023
@jdoiro3 jdoiro3 merged commit a11c811 into main Feb 2, 2023
@jdoiro3 jdoiro3 deleted the feature/import-without-section branch February 2, 2023 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant