question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enhancement: Option to remove/customize repo counts

See original GitHub issue
  • I’ve read the [contribution guidelines][1] and agree with them

I want to suggest an idea and checked that …

  • … to my best knowledge, my idea wouldn’t break something for other users
  • … the documentation does not mention anything about my idea
  • … there are no open or closed issues that are related to my idea

Description

By default, star & fork counts are displayed on sites where repo_url is defined in mkdocs.yml for GitHub and GitLab repositories that are open-source.

I’d like to have the ability to turn off the counts.

Use Cases

  • Could remove a call, helping with load times
  • ~It would prevent having to make a repository private (only way currently to remove counts)~
    • Update: Not a viable option for GitHub Free users
  • I think my sites look cleaner without the counts (subjective)
  • Sites with 0 stars·0 forks are sad (subjective) 🙁

Screenshots / Mockups

# mkdocs.yml

repo_name: owner/project
repo_url: https://github.com/owner/project
repo_counts: false
edit_uri: ''

Open to other flag names besides repo_counts 🙂

Looks like this section is now changed in Insiders. Perhaps it would be low effort while doing this enhancement to add more options besides on/off, such as specifying a subset of counts:

# mkdocs.yml

repo_name: owner/project
repo_url: https://github.com/owner/project
repo_counts: 
  - tag
  - stars
edit_uri: ''

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
squidfunkcommented, Feb 18, 2021

Thanks for suggesting! Most users seem to love this feature, so I think it won’t make sense to introduce an option to disable it. However, if many people need it, we can add a flag. Let’s let the issue sit here for a while and see if a significant fraction of users want this feature.

For the time being, you can use template overrides to achieve the same thing. Using Material 7 beta (#2290), you can patch the partials/source.html template and just remove the data-md-component attribute, which is used to mount the loading logic. Furthermore, loading time is not impacted, as the data is fetched after DOMContentLoaded and is cached in session storage for subsequent page views.

0reactions
squidfunkcommented, Feb 24, 2021

I decided not to go down this road for now. There doesn’t seem to be a huge interest from other users and disabling this logic is as easy as overriding the partial and removing the data-md-component attribute. For this reason, I’m closing this issue. If in the future this proofs to be crucial, we can revisit it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to delete a Git repository in Azure DevOps?
Select Repos, Files. From the repo drop-down, select Manage repositories. Select the name of the repository from the Repositories list, choose ...
Read more >
Enhanced scanning - Amazon ECR - AWS Documentation
Amazon ECR enhanced scanning is an integration with Amazon Inspector which provides vulnerability scanning for your container images.
Read more >
DNF Command Reference — dnf latest documentation
This option can be specified multiple times. --enhancement: Include enhancement relevant packages. Applicable for the install , repoquery , updateinfo ...
Read more >
Labels - GitLab Docs
As your count of issues, merge requests, and epics grows in GitLab, it gets more challenging to ... Remove all labels and assign...
Read more >
octokit/rest.js
Custom request options can be passed as request.* options. ... Each distinct user login across all repositories is counted as a single Advanced...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found