Skip to content

Commit ca80a22

Browse files
John Richard Chipps-HardingPauloMFJ
andauthored
Better URL Handling (#4)
* Better URL handling * Docs * Update src/components/MetaHeadEmbed.tsx Co-authored-by: Paulo <[email protected]> * Update README.md Co-authored-by: Paulo <[email protected]> * Tweak Co-authored-by: Paulo <[email protected]>
1 parent a5f1e16 commit ca80a22

File tree

5 files changed

+808
-28
lines changed

5 files changed

+808
-28
lines changed

README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ const App = ({ Component }: AppProps) => (
3333
titleTemplate="[siteTitle] | [pageTitle]"
3434
siteTitle="PHANTOM"
3535
pageTitle="Our Work"
36-
canonicalUrl="https://phantom.land/"
37-
pageURL="https://phantom.land/work/"
36+
siteBaseUrl="https://phantom.land"
37+
pagePath="work"
3838
description="Transforming challenges of all shapes and sizes into inventive, engaging and performance driven solutions that change the game."
3939
keywords={["creative-agency", "phantom", "work"]}
4040
imageUrl="https://bit.ly/3wiUOuk"
@@ -57,18 +57,19 @@ export default App;
5757

5858
### &lt;MetaHeadEmbed />
5959

60-
| Property | Type | Required | Notes |
61-
| ----------------- | -------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
62-
| **pageTitle** | string | **Yes** | Every page should have a unique title that describes the page, such as 'Home', 'About' etc. |
63-
| **siteTitle** | string | **Yes** | Title of the site, usually the organization / brand name. |
64-
| **titleTemplate** | string | **No** | Title template used to display `pageTitle` and `siteTitle` in a template, displays the values using corresponding `[pageTitle]` and `[siteTitle]`. Example template: "[pageTitle] &#124; [siteTitle]". Note, if `pageTitle` and `siteTitle` are the same only the `siteTitle` is output. |
65-
| **description** | string | **Yes** | A one to two sentence description of your webpage. Keep it within 160 characters, and write it to catch the user's attention. |
66-
| **pageUrl** | string | **Yes** | Url of site page being shared. |
67-
| **canonicalUrl** | string | **Yes** | The canonical URL of your webpage that will be used as its default app URL. |
68-
| **keywords** | string&#124;string[] | **Yes** | List of SEO keywords describing what your webpage does. For example, `"your, tags"` or `["your", "tags"]`. |
69-
| **imageUrl** | string | **Yes** | Image url of asset to share. Recommended aspect ratio for landscape is 1.9:1 (1200x630) or for squares 1:1 (1200x1200). For more info, visit [here](https://iamturns.com/open-graph-image-size/). |
70-
| **imageAlt** | string | **Yes** | Image alt for users who are visually impaired. |
71-
| **locale** | string | **No** | The locale these tags are marked up in, such as; `en_GB`, `fr_FR` and `es_ES`. Defaults to `en_US`. |
60+
| Property | Type | Required | Notes |
61+
| ----------------- | -------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
62+
| **pageTitle** | string | **Yes** | Every page should have a unique title that describes the page, such as 'Home', 'About' etc. |
63+
| **siteTitle** | string | **Yes** | Title of the site, usually the organization / brand name. |
64+
| **titleTemplate** | string | **No** | Title template used to display `pageTitle` and `siteTitle` in a template, displays the values using corresponding `[pageTitle]` and `[siteTitle]`. Example template: "[pageTitle] &#124; [siteTitle]". |
65+
| **description** | string | **Yes** | A one to two sentence description of your webpage. Keep it within 160 characters, and write it to catch the user's attention. |
66+
| **siteBaseUrl** | string | **Yes** | Base URL of the site, excluding trailing slash. |
67+
| **pagePath** | string | **No** | The path of the current page, excluding leading slash. |
68+
| **canonicalUrl** | string | **No** | The canonical URL, if your page is a duplicate. |
69+
| **keywords** | string&#124;string[] | **Yes** | List of SEO keywords describing what your webpage does. For example, `"your, tags"` or `["your", "tags"]`. |
70+
| **imageUrl** | string | **Yes** | Image url of asset to share. Recommended aspect ratio for landscape is 1.9:1 (1200x630) or for squares 1:1 (1200x1200). For more info, visit [here](https://iamturns.com/open-graph-image-size/). |
71+
| **imageAlt** | string | **Yes** | Image alt for users who are visually impaired. |
72+
| **locale** | string | **No** | The locale these tags are marked up in, such as; `en_GB`, `fr_FR` and `es_ES`. Defaults to `en_US`. |
7273

7374
To add all page meta properties, add `MetaHeadEmbed` to the `head` of the page.
7475

0 commit comments

Comments
 (0)