Open griff-rees opened 1 year ago
Hmmm interesting issue.
This seems like a feature request, correct? You're currently able to use a URL with an API key in it. If you want to keep that API key secret, you can use the Environment Variable capability of mkdocs to keep the whole URL in your CI/CD secrets.
It sounds like the add would be custom integration for Zenodo's API. Although, I'm also not sure Zenodo's stated issue is actually a problem for this plugin. It doesn't use any pagination, just a straight pull of the whole bibtex "file".
Yeah feature request is the best summary but... probably makes more sense to split it into multiple components. Apologies for intertwining.
overleaf
and betterbibtex
have means of getting around pagination. API
(Zotero
or otherwise...).Unfortunately none of these are simple and I'm hesitant to support them directly since I'm not using this plugin myself currently.
The big issue is that there's no standard way of dealing with these issues across services. Each will have it owns methods and constraints.
I'd say the best way to implement all of these would be to run your python script first that grabs the bibtex, dealing with authentication and pagination as necessary. If you're building as part of a CI/CD pipeline, which you should, then its just a step before the mkdocs build
step.
I figured this was already a bit much. Perhaps a variation of the mkdocs
issue I linked above to ease use of a local .env
file that can then be overridden with GitHub
env
variables is a much more general solution to this and other issues of this ilk.
FYI: I may have a more specific ticket to raise on the cite_inline
option. Hoping it's just an issue on my part but my config's already pretty complicated so need to start fresh to reproduce. Hopefully other deadlines will calm down so I can give that a go. Thanks for the detailed responses.
The flexibility of a URL is great, but they'd prefer API keys were in the header: https://www.zotero.org/support/dev/web_api/v3/basics
Any chance an option following their API and
mkdocs
environmental variable options could be added, something like:to fill in this sort of template:
A slicker option could use
pyyaml-env
orpython-dotenv
to use a local.env
like:but that might be a feature request for
mkdocs
generally. That was mentioned in this ticket but as best I understand only environmental variables were added viapyyaml-env-tag
(hence the documentation linked above which follows the same format).