Skip to content

Built-in Github cookie, managed by the cookie consent manager. #4666

Answered by squidfunk
white-gorilla asked this question in Q&A
Discussion options

You must be logged in to vote

The GitHub "cookie" is needed for consenting to request repository statistics from GitHub (top right). There's not really a cookie set, as it's just Material for MkDocs performing two requests against GitHub's API. It was pointed out in #4329 that the application performed these request without the user's prior consent, so when you enable the cookie consent, and have a GitHub repository configured, the consent needs to be given by the user. The GitHub cookie will be automatically added:

{% if config.repo_url and "github.com" in config.repo_url %}
{% if "github" not in cookies %}
{% set _ = cookies.up…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by white-gorilla
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants