-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
fix: Additional dependencies for development #6085 #6125
Conversation
also added a note about how to prevent installing things outside a venv, which I hope will be useful to people
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Only some minor changes.
- clarified language about access to Insiders - let's not suggest SSH access - better heading for note on getting pip to work in venv only
docs/customization.md
Outdated
@@ -263,15 +264,6 @@ that you need to be a member of [Insiders] to access its repository. | |||
|
|||
[as described in the Insiders documentation]: insiders/getting-started.md#requirements | |||
|
|||
=== "Insiders (with SSH key)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant to put that into a code annotation, similar to the section below. Sorry if this was unclear. It's definitely valuable information and we should mention it, but I'd regard it as side content to the interested reader:
https://squidfunk.github.io/mkdocs-material/getting-started/#with-pip-9x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sorry, you mean like so?
=== "Insiders"
You will need to have a GitHub access token [as described in the
Insiders documentation] and make it available in the `$GH_TOKEN`
variable.
``` sh
git clone https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git # (1)!
```
1. If you are using SSH keys for authenticating with GitHub, you can
clone Insiders with this command:
```
git clone git@github.com:squidfunk/mkdocs-material-insiders.git
```
[as described in the Insiders documentation]: insiders/getting-started.md#requirements
I had to remove the line before the code snippet in the annotation to force it to be rendered inside the annotation and not as a next line. The documentation for the code annotation feature does not say anything about the rules for defining the annotation? Is this down to indentation? (may need to better learn Markdown's rules on that)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've gone and pushed this version, hope it fits the bill.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to remove the line before the code snippet in the annotation to force it to be rendered inside the annotation and not as a next line. The documentation for the code annotation feature does not say anything about the rules for defining the annotation?
I think this happens because you need to indent by four spaces, not three, like so:
mkdocs-material/docs/getting-started.md
Lines 33 to 55 in 5ba7944
=== "9.x" | |
``` sh | |
pip install mkdocs-material=="9.*" # (1)! | |
``` | |
1. Material for MkDocs uses [semantic versioning][^2], which is why it's a | |
good idea to limit upgrades to the current major version. | |
This will make sure that you don't accidentally [upgrade to the next | |
major version], which may include breaking changes that silently corrupt | |
your site. Additionally, you can use `pip freeze` to create a lockfile, | |
so builds are reproducible at all times: | |
``` | |
pip freeze > requirements.txt | |
``` | |
Now, the lockfile can be used for installation: | |
``` | |
pip install -r requirements.txt | |
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, that fixed it. It might be an idea to create an example for this that points these subtleties out? (I will try to push a branch with some examples tomorrow, I hope)
Thanks! LGTM! |
I added instructions for working on Insiders and also changed the instructions for installing optional dependencies to use the definitions in
pyproject.toml
.As I keep forgetting to activate a
venv
and end up installing things globally, I added a note about gettingpip
to refuse installing things outside avenv
. Seems I am not the only person who keeps making that mistake, so I thought it would be useful for people here as many of our customers will not be hard-core Pythonistas.Hope this fits the bill. I got stuck on this a little bit because I looked for ways to make things run on Windows but that is a battle we can fight another day, perhaps when we find someone who is native in that environment.