Skip to content

Commit 3bb3282

Browse files
Update and rename docusaurus/docs/title-and-meta-tags.md to Iwacubusiness.online
{withdrawStatus && (<motion.p initial={{ opacity: 0, y: -10 }} animate={{ opacity: 1, y: 0 }} exit={{ opacity: 0, y: -10 }} className="text-center text-gray-700 mt-4 font-medium">{withdrawStatus}</motion.p>)} </AnimatePresence> </div> </sectmeta-tags title: Title and Meta Tags sidebar_label: Title & Meta Tags --- ## Changing the title tag You can find the source HTML file in the `public` folder of the generated project. You may edit the `<title>` tag in it to change the title from “React App” to anything else. Note that normally you wouldn’t edit files in the `public` folder very often. For example, [adding a stylesheet](adding-a-stylesheet.md) is done without touching the HTML. If you need to dynamically update the page title based on the content, you can use the browser [`document.title`](https://developer.mozilla.org/en-US/docs/Web/API/Document/title) API. For more complex scenarios when you want to change the title from React components, you can use [React Helmet](https://github.com/nfl/react-helmet), a third party library. If you use a custom server for your app in production and want to modify the title before it gets sent to the browser, you can follow advice in [this section](#generating-dynamic-meta-tags-on-the-server). Alternatively, you can pre-build each page as a static HTML file which then loads the JavaScript bundle, which is covered [here](pre-rendering-into-static-html-files.md). ## Generating Dynamic `<meta>` Tags on the Server Since Create React App doesn’t support server rendering, you might be wondering how to make `<meta>` tags dynamic and reflect the current URL. To solve this, we recommend to add placeholders into the HTML, like this: ```html <!DOCTYPE html> <html lang="en"> <head> <meta property="og:title" content="__OG_TITLE__" /> <meta property="og:description" content="__OG_DESCRIPTION__" /> </head> </html> ``` Then, on the server, regardless of the backend you use, you can read `index.html` into memory and replace `__OG
1 parent 6254386 commit 3bb3282

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

docusaurus/docs/title-and-meta-tags.md renamed to Iwacubusiness.online

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,37 @@
1+
- {withdrawStatus && (<motion.p initial={{ opacity: 0, y: -10 }} animate={{ opacity: 1, y: 0 }} exit={{ opacity: 0, y: -10 }} className="text-center text-gray-700 mt-4 font-medium">{withdrawStatus}</motion.p>)}
2+
</AnimatePresence>
3+
</div>
4+
</sectmeta-tags
5+
title: Title and Meta Tags
6+
sidebar_label: Title & Meta Tags
17
---
8+
9+
## Changing the title tag
10+
11+
You can find the source HTML file in the `public` folder of the generated project. You may edit the `<title>` tag in it to change the title from “React App” to anything else.
12+
13+
Note that normally you wouldn’t edit files in the `public` folder very often. For example, [adding a stylesheet](adding-a-stylesheet.md) is done without touching the HTML.
14+
15+
If you need to dynamically update the page title based on the content, you can use the browser [`document.title`](https://developer.mozilla.org/en-US/docs/Web/API/Document/title) API. For more complex scenarios when you want to change the title from React components, you can use [React Helmet](https://github.com/nfl/react-helmet), a third party library.
16+
17+
If you use a custom server for your app in production and want to modify the title before it gets sent to the browser, you can follow advice in [this section](#generating-dynamic-meta-tags-on-the-server). Alternatively, you can pre-build each page as a static HTML file which then loads the JavaScript bundle, which is covered [here](pre-rendering-into-static-html-files.md).
18+
19+
## Generating Dynamic `<meta>` Tags on the Server
20+
21+
Since Create React App doesn’t support server rendering, you might be wondering how to make `<meta>` tags dynamic and reflect the current URL. To solve this, we recommend to add placeholders into the HTML, like this:
22+
23+
```html
24+
<!DOCTYPE html>
25+
<html lang="en">
26+
<head>
27+
<meta property="og:title" content="__OG_TITLE__" />
28+
<meta property="og:description" content="__OG_DESCRIPTION__" />
29+
</head>
30+
</html>
31+
```
32+
33+
Then, on the server, regardless of the backend you use, you can read `index.html` into memory and replace `__OG
34+
-
235
id: title-and-meta-tags
336
title: Title and Meta Tags
437
sidebar_label: Title & Meta Tags

0 commit comments

Comments
 (0)