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

Add ability to run script to generate docs #104

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jdoiro3
Copy link

@jdoiro3 jdoiro3 commented Jul 10, 2023

This PR adds the ability for users to define a mono_gen_docs_hook entry in sub-directory (mono package) mkdocs.yml files. When merging the docs into the temp directory the script will be called and generated docs will be included in the built site.

Example

root mkdocs.yml

plugins:
  - monorepo
  - literate-nav:
      nav_file: SUMMARY.md

sub directory mkdocs.yml

mono_gen_docs_hook:
  hook:
    # writes doc files to the temp docs dir
    - scripts/docs/generate_datamodel_docs.py
    - --doc-dir
    # the env variable is set by the monorepo plugin to be the temp dir
    - $TEMP_DOCS_DIR/datamodel
  python_path: .venv/bin/python


nav:
  - Home: index.md
  - Data Model: datamodel/*

@jdoiro3 jdoiro3 marked this pull request as ready for review July 10, 2023 16:03
@jdoiro3 jdoiro3 marked this pull request as draft July 11, 2023 13:33
@jdoiro3 jdoiro3 marked this pull request as ready for review July 11, 2023 17:16
@jdoiro3
Copy link
Author

jdoiro3 commented Aug 9, 2023

Is this project still being maintained?

@bih
Copy link
Collaborator

bih commented Jan 4, 2024

The project is still being maintained, but I'm not entirely sure I'm sold on this implementation. Can you share more on the use cases you plan on building with this?

@bih bih added the enhancement New feature or request label Jan 4, 2024
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.

None yet

2 participants