Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metadata for pages #32

Open
GodHermit opened this issue Jul 16, 2023 · 0 comments
Open

Add metadata for pages #32

GodHermit opened this issue Jul 16, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@GodHermit
Copy link
Owner

GodHermit commented Jul 16, 2023

Add metadata for pages

Static Metadata1

  • /app/[locale]/offline/layout.tsx
  • /app/[locale]/(articles)/settings/layout.tsx

Dynamic Metadata2

  • /app/[locale]/(articles)/[[...article]]/page.tsx
  • /app/[locale]/layout.tsx

Required Metadata Fields

  • title
    • template (only for root layout)
    • default (only for root layout)
  • description
  • metadataBase (only for root layout)
  • alternates3 - generate alternate URLs for each locale
  • openGraph
    • title - copy of title without template
    • description - copy of description
    • url - url
    • siteName - localized site name
    • locale - current locale
    • images - generate dynamic images4
  • robots5
  • icons6 (only for root layout)
  • themeColor - preferred color for current colorMode (only for root layout)
  • manifest - URL with ?locale= search parameter (only for root layout)

Required manifest.json Fields7

  • name
  • short_name
  • start_url
  • display
  • theme_color - copy of the theme_color from metadata
  • background_color
  • description - description of the app itself
  • icons - copy of the icons form metadata
  • screenshots8

Footnotes

  1. Static Metadata

  2. Dynamic Metadata

  3. alternates

  4. Generate images using code (.js, .ts, .tsx)

  5. robots

  6. icons

  7. Web app manifests

  8. screenshots

@GodHermit GodHermit self-assigned this Jul 16, 2023
@GodHermit GodHermit added the enhancement New feature or request label Jul 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant