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

[FEAT] Canonical URL Service #1632

Closed
damienwebdev opened this issue Jun 23, 2021 · 2 comments · Fixed by #1643
Closed

[FEAT] Canonical URL Service #1632

damienwebdev opened this issue Jun 23, 2021 · 2 comments · Fixed by #1643
Assignees
Labels
feat a new feature, enhancement, or improvement

Comments

@damienwebdev
Copy link
Member

damienwebdev commented Jun 23, 2021

💡 Feature request

Feature Name

Canonical URL Service

The Desired Behavior

I want to be able to upsert and remove a canonical URL for a document.

Your Use Case

As a developer, I have to be able to change the canonical URL of a document easily. Currently, with Angular v12, there's no "nice" way to do this.

Prior Work

Web.dev has a nice article here -- https://web.dev/canonical/

Additionally, Lighthouse has an audit that validates canonicals too.

Possible Implementation

I think this warrants a new package called @daffodil/seo as that is the chief purpose of this feature.

export interface DaffCanonicalService {
  upsert(url :string): void;
  remove(): void;
}

Environment


Daffodil version: 0.36.1
Angular version: 12.0.0
@damienwebdev damienwebdev added the feat a new feature, enhancement, or improvement label Jun 23, 2021
@griest024
Copy link
Member

So we should handle the edge case where a canonical link tag already exists in the page?

@damienwebdev
Copy link
Member Author

I think so yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat a new feature, enhancement, or improvement
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants