mirror of
https://github.com/facebook/docusaurus.git
synced 2025-12-26 09:43:10 +00:00
docs: mention that SEO through front matter is better than head tag (#6112)
This commit is contained in:
parent
77c93cbda6
commit
f84eb073e7
|
|
@ -52,6 +52,12 @@ Open your browser DevTools and check how this page's metadata have been affected
|
|||
|
||||
:::
|
||||
|
||||
:::tip
|
||||
|
||||
**You don't always need this for typical SEO needs.** Content plugins (e.g. docs and blog) provide front matter options like `description`, `keywords`, and `image`, which will be automatically applied to both `description` and `og:description`, while you would have to manually declare two metadata tags when using the `<head>` tag.
|
||||
|
||||
:::
|
||||
|
||||
:::note
|
||||
|
||||
This feature is built on top of the Docusaurus [`<Head>`](./../../docusaurus-core.md#head) component.
|
||||
|
|
|
|||
|
|
@ -69,6 +69,12 @@ keywords: [keywords, describing, the main topics]
|
|||
|
||||
When creating your React page, adding these fields in `Layout` would also improve SEO.
|
||||
|
||||
:::tip
|
||||
|
||||
Prefer to use front matter for fields like `description` and `keywords`: Docusaurus will automatically apply this to both `description` and `og:description`, while you would have to manually declare two metadata tags when using the `<head>` tag.
|
||||
|
||||
:::
|
||||
|
||||
## Static HTML generation {#static-html-generation}
|
||||
|
||||
Docusaurus is a static site generator—HTML files are statically generated for every URL route, which helps search engines discover your content more easily.
|
||||
|
|
|
|||
Loading…
Reference in New Issue