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: add canonical link setup #266

Merged
merged 30 commits into from
Oct 16, 2024
Merged

Conversation

tobySolutions
Copy link
Member

Why?

This pull request automates the addition of the canonical meta tag to every page within the website using the <link/> tag.

How?

  • For the docs pages, make sure the slugs passed down to the layout code to ensure appropriation of the URLs.
  • Used the custom function generateCanonicalUrl(baseUrl: string, slug?: string) to handle canonical URLs for the base layouts

Tickets?

Contribution checklist?

  • The commit messages are detailed
  • The build command runs locally
  • Assets or static content are linked and stored in the project
  • Document filename is named after the slug
  • You've reviewed spelling using a grammar checker
  • For documentation, guides or references, you've tested the commands and steps
  • You've done enough research before writing

Security checklist?

  • Sensitive data has been identified and is being protected properly
  • Injection has been prevented (parameterized queries, no eval or system calls)
  • The Components are escaping output (to prevent XSS)

Copy link

changeset-bot bot commented Oct 15, 2024

⚠️ No Changeset found

Latest commit: 0534e97

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

sharad-s
sharad-s previously approved these changes Oct 15, 2024
Co-authored-by: Helder Oliveira <[email protected]>
Copy link
Member

@heldrida heldrida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments and internal discussion

@tobySolutions
Copy link
Member Author

See comments and internal discussion

Thank you 🫡

src/utils/generateCanonicalUrl.ts Outdated Show resolved Hide resolved
src/utils/generateCanonicalUrl.ts Outdated Show resolved Hide resolved
Copy link
Member

@heldrida heldrida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tobySolutions make sure to manually test it.

@tobySolutions
Copy link
Member Author

@tobySolutions make sure to manually test it.

Sure thing!! 🙌

@tobySolutions tobySolutions merged commit eb1205e into develop Oct 16, 2024
5 checks passed
bcamarneiro pushed a commit that referenced this pull request Oct 16, 2024
## Why?

This pull request automates the addition of the canonical meta tag to
every page within the website using the `<link/>` tag.

## How?

- For the docs pages, make sure the slugs passed down to the layout code
to ensure appropriation of the URLs.
- Used the custom function ` generateCanonicalUrl(baseUrl: string,
slug?: string)` to handle canonical URLs for the base layouts

## Tickets?

- [Self-referencing Canonical
tags](https://linear.app/fleekxyz/issue/MKTG-234/self-referencing-canonical-tags)

## Contribution checklist?

- [x] The commit messages are detailed
- [x] The `build` command runs locally
- [x] Assets or static content are linked and stored in the project
- [x] Document filename is named after the slug
- [x] You've reviewed spelling using a grammar checker
- [x] For documentation, guides or references, you've tested the
commands and steps
- [x] You've done enough research before writing

## Security checklist?

- [x] Sensitive data has been identified and is being protected properly
- [x] Injection has been prevented (parameterized queries, no eval or
system calls)
- [x] The Components are escaping output (to prevent XSS)

---------

Co-authored-by: Helder Oliveira <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants