Skip to content

Commit aa2d796

Browse files
committed
Update current docs
1 parent b88abb0 commit aa2d796

File tree

10 files changed

+150
-66
lines changed

10 files changed

+150
-66
lines changed

web/versioned_docs/version-0.21/advanced/middleware-config.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ If you would like to modify the middleware for _all_ operations and APIs, you ca
8282

8383
<Tabs groupId="js-ts">
8484
<TabItem value="js" label="JavaScript">
85-
```wasp {6} title="main.wasp"
85+
```wasp {5} title="main.wasp"
8686
app todoApp {
8787
// ...
8888

@@ -105,7 +105,7 @@ If you would like to modify the middleware for _all_ operations and APIs, you ca
105105
</TabItem>
106106

107107
<TabItem value="ts" label="TypeScript">
108-
```wasp {6} title="main.wasp"
108+
```wasp {5} title="main.wasp"
109109
app todoApp {
110110
// ...
111111

web/versioned_docs/version-0.21/deployment/deployment-methods/GuideLink.css

Lines changed: 0 additions & 37 deletions
This file was deleted.

web/versioned_docs/version-0.21/deployment/deployment-methods/GuideLink.tsx

Lines changed: 0 additions & 21 deletions
This file was deleted.

web/versioned_docs/version-0.21/deployment/deployment-methods/self-hosted.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Self-Hosted
33
---
44

55
import { ImgWithCaption } from '@site/blog/components/ImgWithCaption'
6-
import { GuideLink } from './GuideLink.tsx'
6+
import { GuideLink } from '@site/src/components/GuideLink'
77

88
If you have your server or rent out a server, you can self-host your Wasp apps. Self-hosting your apps gives you full control over your apps and their data. It can be more cost-effective than a cloud provider since you can deploy multiple apps on a single server. However, you'll need to manage the server yourself, which can be time-consuming and require some technical knowledge.
99

web/versioned_docs/version-0.21/guides/deployment/caprover.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,16 +148,16 @@ jobs:
148148
uses: docker/metadata-action@v5
149149
with:
150150
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_REGISTRY_USERNAME }}/${{ env.CLIENT_APP_NAME }}
151-
151+
152152
- name: Setup Node.js
153153
uses: actions/setup-node@v6
154154
with:
155155
node-version: "{minimumNodeJsVersion}"
156156

157157
- name: Install Wasp
158158
shell: bash
159-
run: curl -sSL https://get.wasp.sh/installer.sh | sh -s -- -v ${{ env.WASP_VERSION }}
160-
159+
run: npm i -g @wasp.sh/wasp-cli@${{ env.WASP_VERSION }}
160+
161161
# Uncomment if using Wasp TS Config
162162
# - name: Initialize Wasp TS Config
163163
# run: wasp ts-setup

web/versioned_docs/version-0.21/guides/deployment/coolify.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ jobs:
145145

146146
- name: Install Wasp
147147
shell: bash
148-
run: curl -sSL https://get.wasp.sh/installer.sh | sh -s -- -v ${{ env.WASP_VERSION }}
148+
run: npm i -g @wasp.sh/wasp-cli@${{ env.WASP_VERSION }}
149149

150150
# Uncomment if using Wasp TS Config
151151
# - name: Initialize Wasp TS Config

web/versioned_docs/version-0.21/guides/deployment/vps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ nvm install {minimumNodeJsVersion}
120120
Install the Wasp CLI:
121121

122122
```bash
123-
curl -sSL https://get.wasp.sh/installer.sh | sh
123+
npm i -g @wasp.sh/wasp-cli
124124
```
125125

126126
Add Wasp to your PATH by adding this line to `~/.bashrc`:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
label: "Optimization"
2+
collapsible: true
3+
collapsed: false
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
---
2+
title: SEO metadata
3+
comments: true
4+
last_checked_with_versions:
5+
Wasp: "0.21"
6+
---
7+
8+
# Adding SEO metadata to your Wasp app
9+
10+
This guide shows you how to set up meta tags for your Wasp application to improve SEO and enable rich previews when your app is shared on platforms like Slack, X, or Discord.
11+
12+
## How to add `<meta>` tags
13+
14+
### Setting metadata for every page
15+
16+
You can add meta tags to your application using the `head` property in your `app` declaration. These tags will be included in the `<head>` section of your HTML.
17+
18+
```wasp title="main.wasp"
19+
app MyApp {
20+
wasp: {
21+
version: "^0.21.0"
22+
},
23+
title: "My App",
24+
head: [
25+
"<link rel='icon' href='/favicon.ico' />",
26+
"<meta name='description' content='Your apps main description and features.' />",
27+
"<meta name='author' content='Your (App) Name' />",
28+
"<meta name='keywords' content='saas, solution, product, app, service' />",
29+
30+
// Open Graph tags for social media previews
31+
"<meta property='og:type' content='website' />",
32+
"<meta property='og:title' content='Your App Name' />",
33+
"<meta property='og:site_name' content='Your App Name' />",
34+
"<meta property='og:url' content='https://your-app.com' />",
35+
"<meta property='og:description' content='Your apps main description and features.' />",
36+
"<meta property='og:image' content='https://your-app.com/public-banner.webp' />",
37+
38+
// Twitter Card tags
39+
"<meta name='twitter:image' content='https://your-app.com/public-banner.webp' />",
40+
"<meta name='twitter:image:width' content='800' />",
41+
"<meta name='twitter:image:height' content='400' />",
42+
"<meta name='twitter:card' content='summary_large_image' />",
43+
],
44+
}
45+
```
46+
47+
### Setting metadata for a specific page
48+
49+
You can use [React's support for `<meta>` tags](https://react.dev/reference/react-dom/components/meta) within components to set metadata for specific pages. This allows you to customize the metadata based on the content of each page. These tags will only be included in the page when the component is being shown, so it's better to add them to the top-most level if possible.
50+
51+
```tsx title="src/pages/HomePage.tsx"
52+
export function HomePage() {
53+
return (
54+
<>
55+
<head>
56+
<meta
57+
name="description"
58+
content="Home page description specific to this page."
59+
/>
60+
<meta property="og:title" content="Home Page - My App" />
61+
<meta
62+
property="og:description"
63+
content="Description for the home page."
64+
/>
65+
<meta
66+
property="og:image"
67+
content="https://your-app.com/home-page-banner.webp"
68+
/>
69+
<meta name="twitter:card" content="summary_large_image" />
70+
</head>
71+
<div>
72+
<h1>Welcome to the Home Page</h1>
73+
{/* The rest of the page content */}
74+
</div>
75+
</>
76+
);
77+
}
78+
```
79+
80+
## Recommended `<meta>` Tags
81+
82+
### Basic SEO tags
83+
84+
- `description`: A brief description of your app (appears in search results)
85+
- `author`: The creator or company name
86+
- `keywords`: Relevant keywords for search engines
87+
88+
### Open Graph tags
89+
90+
This is the most common standard used by social media platforms (e.g. Facebook, LinkedIn, Slack, Discord, and more) to generate rich link previews.
91+
92+
- `og:type`: Usually "website" for web apps
93+
- `og:title`: The title shown in previews
94+
- `og:site_name`: Your app/site name
95+
- `og:url`: The canonical URL
96+
- `og:description`: Description for the preview
97+
- `og:image`: Preview image URL
98+
99+
You can check [Open Graph tag guidelines](https://ogp.me/) for more information on how this information is used.
100+
101+
### X Card tags
102+
103+
This is used by X (formerly Twitter) to create rich link previews.
104+
105+
- `twitter:card`: Use "summary_large_image" for large image previews
106+
- `twitter:image`: Image URL for Twitter previews
107+
- `twitter:image:width`: Image width in pixels
108+
- `twitter:image:height`: Image height in pixels
109+
110+
You can check [X's guidelines](https://developer.x.com/en/docs/x-for-websites/cards/overview/markup) for more information on how this information is used.
111+
112+
## Best practices for images
113+
114+
1. Use your client app's absolute URL (including `https://`) for your preview images.
115+
2. Check the recommended dimensions for each platform's images in their documentation.
116+
3. Keep important content centered (some platforms crop differently).
117+
4. Use WebP or PNG format for best quality.
118+
5. Place your image [in the `public/` folder](https://wasp.sh/docs/project/static-assets#the-public-directory).
119+
120+
## Testing your metadata
121+
122+
After deploying, you can verify your meta tags using these tools:
123+
124+
- [Google Tag Assistant](https://tagassistant.google.com/)
125+
- [Facebook Sharing Debugger](https://developers.facebook.com/tools/debug/)
126+
- [X Card Validator](https://cards-dev.x.com/validator)
127+
- [LinkedIn Post Inspector](https://www.linkedin.com/post-inspector/)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: Lighthouse SEO for OpenSaaS
3+
comments: true
4+
---
5+
6+
import { GuideLink } from '@site/src/components/GuideLink'
7+
8+
# Improving Lighthouse SEO score for OpenSaaS
9+
10+
This guide from community member [@NeroxTGC](https://github.com/NeroxTGC) goes over his recipe to get 100% on the Lighthouse SEO score:
11+
12+
<GuideLink linkToGuide="https://gist.github.com/NeroxTGC/27a588ad5d78cf09a0b4464321eb5921" title="🚀 SEO Optimization Guide for OpenSaaS template" description="by @NeroxTGC" />

0 commit comments

Comments
 (0)