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 support for user-provided python packages #5626

Merged
merged 3 commits into from
Jun 29, 2023

Conversation

hellt
Copy link
Contributor

@hellt hellt commented Jun 20, 2023

Hi @squidfunk
With this PR I wanted to solve a challenge of onboarding user-provided packages to the mkdocs-build artifact.

Even though build workflow includes some plugins by default, the list is not extensive, nor it assumes that users should edit it.

With this little change the workflow for users who want to install additional plugins/packages is as follows:

  1. users check in a user-requirements.txt file with packages they desire to be installed after all default packages are done installing
  2. done

the build workflow will copy to the build context all files ending with *requirements.txt and then a new bash command will start pip install -r user-requirements.txt if the user-requirements.txt files was found in the repo.

That way we provide flexibility in what users can install on top of the default plugins.

PS. This is a backwards compatible change, nothing is required from users who don't want to have custom packages installed.

If you agree with this change, I can raise a similar PR against insiders.

@squidfunk
Copy link
Owner

That's a great idea. Could you also add a note to the documentation, please?

@hellt
Copy link
Contributor Author

hellt commented Jun 20, 2023

@squidfunk, what would be a proper place to add it?

@squidfunk
Copy link
Owner

Best fit would probably be the box on how to add plugins to the Docker image, but I'm open to suggestions.

@hellt
Copy link
Contributor Author

hellt commented Jun 21, 2023

@squidfunk Yes, this looks like a perfect place to add this info. Added in aec8973

@squidfunk
Copy link
Owner

LGTM!

@squidfunk squidfunk merged commit 954a6de into squidfunk:master Jun 29, 2023
@hellt
Copy link
Contributor Author

hellt commented Jun 29, 2023

@squidfunk would you be able to bring these changes to insiders or shall I do it? I am primarily interested in insiders supporting user-provided packages installation.

@squidfunk
Copy link
Owner

I'll do the merge later, you don't need to do it 😊

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

Successfully merging this pull request may close these issues.

2 participants