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

Improved seo docs page #297

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Improved seo docs page #297

wants to merge 10 commits into from

Conversation

NeroxTGC
Copy link
Contributor

@NeroxTGC NeroxTGC commented Oct 20, 2024

Description

Added Other Pages Meta Tags & Structured data and Schema markup.

Contributor Checklist

Make sure to do the following steps if they are applicable to your PR:

Added Other Pages Meta Tags & Structured data and Schema markup
Added Other Pages Meta Tags & Structured data and Schema markup
Copy link
Member

@Martinsos Martinsos left a comment

Choose a reason for hiding this comment

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

Awesome work @NeroxTGC , thanks for this!
I think this generaly makes sense and looks good -> I left some comments, but nothing major I believe, let's take care of those and we can merge!

Comment on lines 35 to 37
:::note[Important]
By default, all pages will acquire the main Landing Page meta tags. You can set custom meta tags for each page using `react-helmet-async`.
:::
Copy link
Member

Choose a reason for hiding this comment

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

I think we can probably just take this out of :::note, make it normal text. I understand it was meant to emphasize it as the most important thing here, which it is, but it actually fits well into the normal flow of the reading while :::notes break it a bit.

Copy link
Member

Choose a reason for hiding this comment

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

@NeroxTGC what happened to this part, you removed it? I thought it was a quite good intro and explanation, seems shame to not have it! What I was suggesting was just to not have it as a "note", but as a normal parapgrah.

opensaas-sh/blog/src/content/docs/guides/seo.md Outdated Show resolved Hide resolved
opensaas-sh/blog/src/content/docs/guides/seo.md Outdated Show resolved Hide resolved
opensaas-sh/blog/src/content/docs/guides/seo.md Outdated Show resolved Hide resolved
opensaas-sh/blog/src/content/docs/guides/seo.md Outdated Show resolved Hide resolved
opensaas-sh/blog/src/content/docs/guides/seo.md Outdated Show resolved Hide resolved
opensaas-sh/blog/src/content/docs/guides/seo.md Outdated Show resolved Hide resolved
opensaas-sh/blog/src/content/docs/guides/seo.md Outdated Show resolved Hide resolved
opensaas-sh/blog/src/content/docs/guides/seo.md Outdated Show resolved Hide resolved
Comment on lines 157 to 205
## Structured data and Schema markup

:::note[Tip]
Crawlers do all the work of analyzing and understanding the content of your pages, and they will thank you if you include structured data to help them understand what your content is about!🤗.
:::

You can add structured data for each page.

```jsx {14-22}
//...
import { Helmet, HelmetProvider } from 'react-helmet-async';

export function MyCustomPage() {
return (
<div>
<Helmet>
<title>My Custom Page Title</title>
<meta
name='description'
content='This is the meta description of my page.'/>
<link rel='canonical' href='https://example.com/my-custom-page' />
//...

<script type='application/ld+json'>{`
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "title",
"url": "https://yoururl.com",
"description": "Description",
}
}
`} </script>

</Helmet>
//...
```


These resources provide the information needed to get the most out of structured data:
- [Introduction to structured data markup](https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data)
- [General structured data guidelines](https://developers.google.com/search/docs/appearance/structured-data/sd-policies)

After you have a small notion about them, you can go deeper by adding custom functions depending on your app (FAQs, Rating, Review, Software Application...):
- [ALL structured data functions](https://developers.google.com/search/docs/appearance/structured-data/search-gallery)

To ensure that they are valid:
- [Google rich results test](https://search.google.com/test/rich-results)
- [Schema validator](https://validator.schema.org/)
Copy link
Member

Choose a reason for hiding this comment

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

This dive intro structured data might and schema markup might be a bit beyond the scope of this docs. That said, we can provide a sentence or two about it + a single link, or max two, where they can read about them. Meaning we can significantly shorten this part and throw out the code example!

Copy link
Member

Choose a reason for hiding this comment

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

@NeroxTGC ping on this - what do you think?

@NeroxTGC
Copy link
Contributor Author

@Martinsos I finished updating the document with your suggested changes. If you like, check it one last time.

I've also created a robots.tsx default for the template and fixed the missing alts on the images to make the Landing Page 100% Seo Score.

opensaas-sh/blog/src/content/docs/guides/seo.md Outdated Show resolved Hide resolved
export default function App() {
return (
<HelmetProvider>
<>
Copy link
Member

Choose a reason for hiding this comment

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

@NeroxTGC what about this one?

opensaas-sh/blog/src/content/docs/guides/seo.md Outdated Show resolved Hide resolved

```jsx {14-22}
//...
import { Helmet, HelmetProvider } from 'react-helmet-async';
Copy link
Member

Choose a reason for hiding this comment

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

redundant import of helmet provider

Comment on lines 157 to 205
## Structured data and Schema markup

:::note[Tip]
Crawlers do all the work of analyzing and understanding the content of your pages, and they will thank you if you include structured data to help them understand what your content is about!🤗.
:::

You can add structured data for each page.

```jsx {14-22}
//...
import { Helmet, HelmetProvider } from 'react-helmet-async';

export function MyCustomPage() {
return (
<div>
<Helmet>
<title>My Custom Page Title</title>
<meta
name='description'
content='This is the meta description of my page.'/>
<link rel='canonical' href='https://example.com/my-custom-page' />
//...

<script type='application/ld+json'>{`
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "title",
"url": "https://yoururl.com",
"description": "Description",
}
}
`} </script>

</Helmet>
//...
```


These resources provide the information needed to get the most out of structured data:
- [Introduction to structured data markup](https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data)
- [General structured data guidelines](https://developers.google.com/search/docs/appearance/structured-data/sd-policies)

After you have a small notion about them, you can go deeper by adding custom functions depending on your app (FAQs, Rating, Review, Software Application...):
- [ALL structured data functions](https://developers.google.com/search/docs/appearance/structured-data/search-gallery)

To ensure that they are valid:
- [Google rich results test](https://search.google.com/test/rich-results)
- [Schema validator](https://validator.schema.org/)
Copy link
Member

Choose a reason for hiding this comment

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

@NeroxTGC ping on this - what do you think?

Copy link
Member

@Martinsos Martinsos left a comment

Choose a reason for hiding this comment

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

@NeroxTGC nice, there is still some stuff to fix though, I commented!

Comment on lines 5 to 6
Disallow: /api/
Disallow: /auth/
Copy link
Member

Choose a reason for hiding this comment

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

hm so api and auth here - do we need that? because those are parts of the server, and server is not hosted at the same url as client, at least not usually.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated, you are right.

@NeroxTGC
Copy link
Contributor Author

Seo Guide

  • Removed the extra <>.
  • Removed redundant HelmetProvider.
  • Shortened the section on structured data.

OpenSaaS template

  • Removed /api/ & /auth/ from robots.txt

@Martinsos I don't think I've missed anything now, right?

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.

3 participants