Repository navigation
Allow usernames in contact.social entries - #570
Merged
Merged
Conversation
contact.social values previously had to be http(s) URLs, so cards that listed a Discord username (04_BYO_Benjolin, 669_Computer_Tracker) got schema warnings. Every platform now accepts either a profile URL or a handle: an optional leading @, letters/digits/_/./-, and an optional @instance.domain suffix for fediverse handles.
dessertplanet
approved these changes
Nov 24, 2026
|
Site preview removed because this PR was closed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
contact.socialvalues had to be http(s) URLs, so cards that list a Discord username (04_BYO_Benjolinuses"@dessertplanet",669_Computer_Trackeruseschrischn52) gotajv-schemawarnings.Every social platform now accepts either a profile URL or a handle:
@_,.or-(coverssome-user,plus.minus.audio,name.bsky.social)@instance.domainsuffix for fediverse handles such as@user@mastodon.socialURL and handle share one pattern, so an invalid value produces a single diagnostic.
Changes
tools/sitegen/src/schema/infoYamlJsonSchema.js:contact.socialvalues use the new URL-or-handle patterntools/sitegen/src/validate/rules/index.js: the warning text mentions usernamesdocumentation/info.yaml.md: field description and example show handlestools/sitegen/test/validate.test.js: tests for accepted and rejected valuesTesting
node --test test/validate.test.js test/utils.test.jspasses (51/51)npm run validate-infoacross all 151 cards reports nocontact.socialwarnings