Skip to content

Conversation

@duvvuvenkataramana
Copy link

Description

This PR adds support for the description_lines_count parameter to gist cards, allowing users to control the number of description lines displayed. This brings gist cards in line with the functionality already available for repo cards.

Changes

  • api/gist.js: Added description_lines_count parameter to query parsing and passed it to renderGistCard()
  • src/cards/gist.js:
    • Imported clampValue utility function
    • Added DESCRIPTION_MAX_LINES constant (set to 10)
    • Modified linesLimit calculation to use description_lines_count parameter when provided, with validation via clampValue (min: 1, max: 10)

Testing

Users can now control the number of description lines in gist cards using:

?description_lines_count=5

The parameter is optional and defaults to 10 lines when not specified.

Fixes #4590

@vercel
Copy link

vercel bot commented Nov 13, 2025

@duvvuvenkataramana is attempting to deploy a commit to the github readme stats Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gist tile height does not match repo tile height

1 participant