Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions assets/images/social-cards/_convert-svgs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#!/bin/bash

# Generate social card PNGs from template SVGs
# Requires:
# - librsvg (install with: brew install librsvg)
# - zopfli (install with: brew install zopfli)
# - Mona Sans font (install with: brew install --cask font-mona-sans)

set -e

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# Check for required CLI tools
if ! command -v rsvg-convert &> /dev/null; then
echo "Error: rsvg-convert not found. Install with: brew install librsvg"
exit 1
fi

if ! command -v zopflipng &> /dev/null; then
echo "Error: zopflipng not found. Install with: brew install zopfli"
exit 1
fi

# Check for Mona Sans font
if ! fc-list | grep -qi "Mona Sans"; then
echo "Error: Mona Sans font not found. Install with: brew install --cask font-mona-sans"
exit 1
fi

# Labels to generate from template (filename:Label Text)
LABELS=(
"account-and-profile:Account"
"actions:Actions"
"admin:Admin"
"apps:Apps"
"authentication:Auth"
"billing:Billing"
"code-security:Security"
"codespaces:Codespaces"
"communities:Community"
"contributing:Contributing"
"copilot:Copilot"
"desktop:Desktop"
"discussions:Discussions"
"education:Education"
"enterprise-onboarding:Enterprise"
"get-started:Get Started"
"github-cli:GitHub CLI"
"github-models:Models"
"graphql:GraphQL"
"integrations:Integrations"
"issues:Issues"
"migrations:Migrations"
"nonprofit:Nonprofit"
"organizations:Orgs"
"packages:Packages"
"pages:Pages"
"pull-requests:Pull requests"
"repositories:Repositories"
"rest:REST"
"search-github:Search"
"site-policy:Site Policy"
"sponsors:Sponsors"
"subscriptions-and-notifications:Account"
"support:Support"
"webhooks:Webhooks"
)

# Generate default.png from _default.svg
echo "Converting _default.svg to default.png..."
rsvg-convert -w 1200 -h 628 "$SCRIPT_DIR/_default.svg" -o "$SCRIPT_DIR/default.png"
echo "Optimizing default.png with zopflipng..."
zopflipng -y "$SCRIPT_DIR/default.png" "$SCRIPT_DIR/default.png"

# Generate labeled PNGs from _template.svg
for entry in "${LABELS[@]}"; do
filename="${entry%%:*}"
label="${entry##*:}"
png="$SCRIPT_DIR/$filename.png"

echo "Generating $filename.png with label \"$label\"..."
sed "s/{{LABEL}}/$label/g" "$SCRIPT_DIR/_template.svg" | rsvg-convert -w 1200 -h 628 -o "$png"
echo "Optimizing $filename.png with zopflipng..."
zopflipng -y "$png" "$png"
done

echo "Done!"
37 changes: 37 additions & 0 deletions assets/images/social-cards/_default.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions assets/images/social-cards/_template.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/social-cards/actions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/social-cards/admin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/social-cards/apps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/social-cards/authentication.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/social-cards/billing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/social-cards/code-security.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/social-cards/codespaces.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/social-cards/communities.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/social-cards/contributing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/social-cards/copilot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/social-cards/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/social-cards/desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/social-cards/discussions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/social-cards/education.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/social-cards/get-started.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/social-cards/github-cli.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/social-cards/github-models.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/social-cards/graphql.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/social-cards/integrations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/social-cards/issues.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/social-cards/migrations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/social-cards/nonprofit.png
Binary file added assets/images/social-cards/organizations.png
Binary file added assets/images/social-cards/packages.png
Binary file added assets/images/social-cards/pages.png
Binary file added assets/images/social-cards/pull-requests.png
Binary file added assets/images/social-cards/repositories.png
Binary file added assets/images/social-cards/rest.png
Binary file added assets/images/social-cards/search-github.png
Binary file added assets/images/social-cards/site-policy.png
Binary file added assets/images/social-cards/sponsors.png
Binary file added assets/images/social-cards/support.png
Binary file added assets/images/social-cards/webhooks.png
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ If there is a "{% data variables.product.prodname_copilot_short %} started work"

If you do have write access, and you mention `@copilot` on a pull request that is assigned to {% data variables.product.prodname_copilot_short %}, the comment is passed to {% data variables.copilot.copilot_coding_agent %}. An eyes emoji (👀) is added to your comment to indicate that {% data variables.copilot.copilot_coding_agent %} has seen your comment. Shortly after, a "{% data variables.product.prodname_copilot_short %} started work" event is added to the pull request timeline.

If this doesn't happen, {% data variables.product.prodname_copilot_short %} may have been unassigned from the pull request, or you may not have write access.
If this doesn't happen, {% data variables.product.prodname_copilot_short %} may have been unassigned from the pull request, or you may not have write access. Note that {% data variables.product.prodname_copilot_short %} only responds to mentions in open pull requests. Once a pull request is merged or closed, {% data variables.copilot.copilot_coding_agent %} will not respond to new mentions or comments to better focus on active development work.

## Based on the agent session logs, {% data variables.product.prodname_copilot_short %} appears to be stuck

Expand Down
33 changes: 32 additions & 1 deletion src/assets/scripts/find-orphaned-assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,42 @@ const EXCEPTIONS = new Set([
'assets/images/site/evergreens/sequoia.png',
'assets/images/site/evergreens/spruce.png',
'assets/images/site/evergreens/yew.png',
'assets/images/social-cards/account-and-profile.png',
'assets/images/social-cards/actions.png',
'assets/images/social-cards/admin.png',
'assets/images/social-cards/apps.png',
'assets/images/social-cards/authentication.png',
'assets/images/social-cards/billing.png',
'assets/images/social-cards/code-security.png',
'assets/images/social-cards/codespaces.png',
'assets/images/social-cards/communities.png',
'assets/images/social-cards/contributing.png',
'assets/images/social-cards/copilot.png',
'assets/images/social-cards/default.png',
'assets/images/social-cards/desktop.png',
'assets/images/social-cards/discussions.png',
'assets/images/social-cards/education.png',
'assets/images/social-cards/enterprise-onboarding.png',
'assets/images/social-cards/get-started.png',
'assets/images/social-cards/github-cli.png',
'assets/images/social-cards/github-models.png',
'assets/images/social-cards/graphql.png',
'assets/images/social-cards/integrations.png',
'assets/images/social-cards/issues.png',
'assets/images/social-cards/code-security.png',
'assets/images/social-cards/migrations.png',
'assets/images/social-cards/nonprofit.png',
'assets/images/social-cards/organizations.png',
'assets/images/social-cards/packages.png',
'assets/images/social-cards/pages.png',
'assets/images/social-cards/pull-requests.png',
'assets/images/social-cards/repositories.png',
'assets/images/social-cards/rest.png',
'assets/images/social-cards/search-github.png',
'assets/images/social-cards/site-policy.png',
'assets/images/social-cards/sponsors.png',
'assets/images/social-cards/subscriptions-and-notifications.png',
'assets/images/social-cards/support.png',
'assets/images/social-cards/webhooks.png',
// Hero images may not be used, but we keep them around for future use
'assets/images/banner-images/hero-1.png',
'assets/images/banner-images/hero-2.png',
Expand Down
38 changes: 37 additions & 1 deletion src/frame/components/DefaultLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,43 @@ export const DefaultLayout = (props: Props) => {

const metaDescription = page.introPlainText ? page.introPlainText : t('default_description')

const SOCIAL_CATEGORIES = new Set(['code-security', 'actions', 'issues', 'copilot'])
const SOCIAL_CATEGORIES = new Set([
'account-and-profile',
'actions',
'admin',
'apps',
'authentication',
'billing',
'code-security',
'codespaces',
'communities',
'contributing',
'copilot',
'desktop',
'discussions',
'education',
'enterprise-onboarding',
'get-started',
'github-cli',
'github-models',
'graphql',
'integrations',
'issues',
'migrations',
'nonprofit',
'organizations',
'packages',
'pages',
'pull-requests',
'repositories',
'rest',
'search-github',
'site-policy',
'sponsors',
'subscriptions-and-notifications',
'support',
'webhooks',
])
const SOCIAL_CARD_IMG_BASE_URL = `${xHost ? `https://${xHost}` : ''}/assets/cb-345/images/social-cards`

function getCategoryImageUrl(category: string): string {
Expand Down
Loading