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

[Maintenance] Add dynamic metadata for SEO improvement #609

Open
2 tasks done
devtobi opened this issue Dec 4, 2024 · 2 comments
Open
2 tasks done

[Maintenance] Add dynamic metadata for SEO improvement #609

devtobi opened this issue Dec 4, 2024 · 2 comments
Labels
Priority: Low The issue contains work with low priority. Template: Frontend Issues regarding the frontend template. Type: Feature The issue is an feature

Comments

@devtobi
Copy link
Member

devtobi commented Dec 4, 2024

Relevant template

refarch-frontend

Problem description (optional)

Currently the generated index.html file does not include meta tags useful for SEO improvements (like dynamic title, author, description and so on).
This is especially useful for applications which are hosted publicly.

Desired solution

Add https://github.com/unjs/unhead/ to allow definition of those SEO related metadata on a per-route basis.
The solution should not bother projects which don't want to use it. Since the dependencys are tree-shaked, the bundle size should not increase when the dependency is not actively used.

Considered alternatives (optional)

No response

Additional context (optional)

No response

No duplicate

  • I confirm that this issue is not a duplicate

Code of Conduct

  • I agree to follow this project's Code of Conduct
@devtobi devtobi added Template: Frontend Issues regarding the frontend template. Type: Maintenance The issue contains maintenance work. Priority: Medium The issue contains work with medium priority. labels Dec 4, 2024
@devtobi devtobi moved this from Open to Accepted in it@M RefArch Templates Dec 4, 2024
@DanielOber DanielOber added this to the Release 1.0 milestone Dec 6, 2024
@devtobi
Copy link
Member Author

devtobi commented Jan 16, 2025

The currently generated head section after build looks like this:

  <head>
    <link rel="preload" as="font" type="font/woff2" href="/assets/roboto-latin-100-normal-UGhH1PRC.woff2" crossorigin="anonymous">
    <!-- other fonts truncated -->

    <meta charset="UTF-8" />
    <link
      rel="icon"
      href="/favicon.ico"
    />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0"
    />
    <title>refarch-frontend</title>
    <script type="module" crossorigin src="/assets/index-C1yJI5-A.js"></script>
    <link rel="stylesheet" crossorigin href="/assets/index-B92OJ-eW.css">
  </head>

@devtobi
Copy link
Member Author

devtobi commented Jan 16, 2025

In my opinion this is totally sufficient when we keep SEO out of scope.
I will rewrite the ticket to handle SEO improvements we could talk about in the future, but not relevant for 1.0 release.

@devtobi devtobi removed this from the Release 1.0 milestone Jan 16, 2025
@devtobi devtobi moved this from Accepted to Open in it@M RefArch Templates Jan 16, 2025
@devtobi devtobi added Type: Feature The issue is an feature Priority: Low The issue contains work with low priority. and removed Type: Maintenance The issue contains maintenance work. Priority: Medium The issue contains work with medium priority. labels Jan 16, 2025
@devtobi devtobi changed the title [Maintenance] Add metadata to index.html [Maintenance] Add dynamic metadata for SEO improvement Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Low The issue contains work with low priority. Template: Frontend Issues regarding the frontend template. Type: Feature The issue is an feature
Projects
Development

No branches or pull requests

2 participants