Skip to content

Commit d715e03

Browse files
authored
chore: migrate domain from appflowy.io to appflowy.com (#97)
1 parent c704231 commit d715e03

File tree

28 files changed

+717
-363
lines changed

28 files changed

+717
-363
lines changed

app/about/page.tsx

+11
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
1+
import { Metadata } from 'next';
12
import React from 'react';
23
import '@/styles/about.scss';
34
import Missions from '@/components/about/missions';
45
import Community from '@/components/about/community';
56
import OurValues from '@/components/about/our-values';
67
import OurInvestors from '@/components/about/our-investors';
78

9+
const site_url = process.env.NEXT_PUBLIC_SITE_BASE_URL;
10+
11+
export async function generateMetadata(): Promise<Metadata> {
12+
return {
13+
alternates: {
14+
canonical: `${site_url}/about`,
15+
},
16+
};
17+
}
18+
819
function Page() {
920
return (
1021
<div className={'about'}>

app/appflowy-blocks/page.tsx

+22-5
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,39 @@
1+
import { Metadata } from 'next';
12
import React from 'react';
23
import { blocksPageConfig } from '@/lib/config/pages';
34
import '@/styles/blocks.scss';
45

56
import AppflowyBlocks from '@/components/blocks/appflowy-blocks';
67

8+
const site_url = process.env.NEXT_PUBLIC_SITE_BASE_URL;
9+
10+
export async function generateMetadata(): Promise<Metadata> {
11+
return {
12+
alternates: {
13+
canonical: `${site_url}/appflowy-about`,
14+
},
15+
};
16+
}
17+
718
function Page() {
819
return (
920
<div className={'blocks-page'}>
1021
<div className={'ellipse'} />
1122
<div className={'title'}>
1223
{blocksPageConfig.title}
1324
<div className={'line'}>
14-
<svg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 250 15' fill='none'>
25+
<svg
26+
xmlns="http://www.w3.org/2000/svg"
27+
width="100%"
28+
height="100%"
29+
viewBox="0 0 250 15"
30+
fill="none"
31+
>
1532
<path
16-
d='M2.19074 10.2774C17.3157 7.48174 52.0933 2.22644 70.2045 3.57083C88.3157 4.91522 69.9207 10.2064 58.4593 12.684C103.292 7.47885 204.017 -1.67495 248.251 3.35077'
17-
stroke='#9327FF'
18-
strokeWidth='3'
19-
strokeLinecap='square'
33+
d="M2.19074 10.2774C17.3157 7.48174 52.0933 2.22644 70.2045 3.57083C88.3157 4.91522 69.9207 10.2064 58.4593 12.684C103.292 7.47885 204.017 -1.67495 248.251 3.35077"
34+
stroke="#9327FF"
35+
strokeWidth="3"
36+
strokeLinecap="square"
2037
/>
2138
</svg>
2239
</div>

app/blog/[slug]/page.tsx

+28-19
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ interface Props {
2121
params: { slug: string };
2222
}
2323

24-
const site_url = process.env.ENVIRONMENT === 'test' ? 'https://test.appflowy.io' : 'https://appflowy.io';
24+
const site_url = process.env.NEXT_PUBLIC_SITE_BASE_URL!;
2525

2626
export async function generateMetadata({ params }: Props): Promise<Metadata> {
2727
const post = await getPostData(params.slug);
@@ -106,7 +106,7 @@ async function getData(slug: string) {
106106
const relatedPosts = await getRelatedPosts(post);
107107

108108
return { post, relatedPosts };
109-
} catch (error) {
109+
} catch(error) {
110110
notFound();
111111
}
112112
}
@@ -122,7 +122,7 @@ export default async function BlogPost({ params }: { params: { slug: string } })
122122
'pb-[170px] pt-[170px]',
123123
'max-xl:px-14',
124124
'max-md:px-8 max-md:pb-[150px]',
125-
'max-sm:px-6 max-sm:pb-[100px]'
125+
'max-sm:px-6 max-sm:pb-[100px]',
126126
)}
127127
>
128128
<Link
@@ -142,18 +142,18 @@ export default async function BlogPost({ params }: { params: { slug: string } })
142142
'blog-container col-span-12 flex max-w-full flex-1 flex-grow flex-col overflow-hidden overflow-x-hidden max-md:mb-6 '
143143
}
144144
>
145-
<CardHeader className='blog-header flex w-full flex-col gap-5 p-0'>
146-
<div className='flex w-full flex-col justify-start gap-5'>
145+
<CardHeader className="blog-header flex w-full flex-col gap-5 p-0">
146+
<div className="flex w-full flex-col justify-start gap-5">
147147
{post.categories && (
148-
<div className='flex w-full flex-wrap gap-2 max-sm:justify-center'>
148+
<div className="flex w-full flex-wrap gap-2 max-sm:justify-center">
149149
{post.categories.map((tag) => (
150150
<Badge
151151
style={{
152152
borderColor: 'transparent',
153153
background: stringToColor(tag, colorArrayTint),
154154
}}
155155
key={tag}
156-
variant='outline'
156+
variant="outline"
157157
>
158158
{tag}
159159
</Badge>
@@ -165,39 +165,45 @@ export default async function BlogPost({ params }: { params: { slug: string } })
165165
'whitespace-pre-wrap break-words text-left font-medium',
166166
'text-4xl !leading-[120%] sm:text-5xl md:text-6xl lg:text-[58px]',
167167
'leading-tight',
168-
'max-sm:text-center'
168+
'max-sm:text-center',
169169
)}
170170
>
171171
{post.title}
172172
</CardTitle>
173173
</div>
174-
<div className='flex flex-col gap-6 text-sm text-gray-600'>
175-
<div className='flex flex-wrap items-center gap-x-4 gap-y-2 max-sm:justify-center'>
174+
<div className="flex flex-col gap-6 text-sm text-gray-600">
175+
<div className="flex flex-wrap items-center gap-x-4 gap-y-2 max-sm:justify-center">
176176
<Link
177177
href={post.author_url}
178-
className='flex max-w-[200px] items-center gap-3 truncate max-sm:mb-4 max-sm:w-full max-sm:max-w-full max-sm:justify-center'
178+
className="flex max-w-[200px] items-center gap-3 truncate max-sm:mb-4 max-sm:w-full max-sm:max-w-full max-sm:justify-center"
179179
>
180-
<Avatar className='h-10 w-10 border'>
181-
<AvatarImage src={post.author_image_url} alt={post.author} />
180+
<Avatar className="h-10 w-10 border">
181+
<AvatarImage
182+
src={post.author_image_url}
183+
alt={post.author}
184+
/>
182185
<AvatarFallback>{post.author.substring(0, 2).toUpperCase()}</AvatarFallback>
183186
</Avatar>
184-
<span className='font-medium'>{post.author}</span>
187+
<span className="font-medium">{post.author}</span>
185188
</Link>
186189
<div className={'max-sm:hidden'}>
187190
<Circle />
188191
</div>
189192

190-
<div className='flex items-center'>
191-
<time className={''} dateTime={post.date}>
193+
<div className="flex items-center">
194+
<time
195+
className={''}
196+
dateTime={post.date}
197+
>
192198
{formatDate(new Date(post.date))}
193199
</time>
194200
</div>
195201
<div>
196202
<Circle />
197203
</div>
198204

199-
<div className='flex items-center'>
200-
<TimerIcon className='text-primary mr-2 h-4 w-4' />
205+
<div className="flex items-center">
206+
<TimerIcon className="text-primary mr-2 h-4 w-4" />
201207
<span>{post.reading_time} min read</span>
202208
</div>
203209
</div>
@@ -244,7 +250,10 @@ export default async function BlogPost({ params }: { params: { slug: string } })
244250
)}
245251
</div>
246252

247-
<Script id='ld-json' type='application/ld+json'>
253+
<Script
254+
id="ld-json"
255+
type="application/ld+json"
256+
>
248257
{JSON.stringify(generateListSchema(params.slug, post, site_url))}
249258
</Script>
250259
</>

app/blog/feed.xml/route.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { getAllPosts } from '@/lib/posts';
22
import RSS from 'rss';
33

4-
const site_url = process.env.ENVIRONMENT === 'test' ? 'https://test.appflowy.io' : 'https://appflowy.io';
4+
const site_url = process.env.NEXT_PUBLIC_SITE_BASE_URL!;
55

66
export async function GET() {
77
const posts = getAllPosts();
@@ -27,9 +27,9 @@ export async function GET() {
2727
categories: post.categories,
2828
enclosure: post.thumb_image
2929
? {
30-
url: post.thumb_image.startsWith('http') ? post.thumb_image : `${site_url}${post.thumb_image}`,
31-
type: 'image/jpeg', // Adjust based on your image type
32-
}
30+
url: post.thumb_image.startsWith('http') ? post.thumb_image : `${site_url}${post.thumb_image}`,
31+
type: 'image/jpeg', // Adjust based on your image type
32+
}
3333
: undefined,
3434
});
3535
});

app/blog/page.tsx

+7-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import React from 'react';
66
import OpenGraphImage from '../../public/images/og-image.png';
77
import { getAllPosts, PostData } from '@/lib/posts';
88

9-
const site_url = process.env.ENVIRONMENT === 'test' ? 'https://test.appflowy.io' : 'https://appflowy.io';
9+
const site_url = process.env.NEXT_PUBLIC_SITE_BASE_URL!;
1010
const name = 'AppFlowy Blog | In the Flow';
1111

1212
export async function generateMetadata(): Promise<Metadata> {
@@ -94,7 +94,10 @@ function Blog() {
9494

9595
return (
9696
<>
97-
<Script id='ld-json' type='application/ld+json'>
97+
<Script
98+
id="ld-json"
99+
type="application/ld+json"
100+
>
98101
{JSON.stringify(listSchema)}
99102
</Script>
100103
<div
@@ -103,7 +106,7 @@ function Blog() {
103106
'flex flex-col items-center px-[100px] pb-[32px] pt-[161px]',
104107
'max-xl:px-14',
105108
'max-md:px-8',
106-
'max-sm:px-6 max-sm:pb-[16px] max-sm:pt-[120px]'
109+
'max-sm:px-6 max-sm:pb-[16px] max-sm:pt-[120px]',
107110
)}
108111
>
109112
<div className={'flex w-full max-w-[1100px] flex-col'}>
@@ -112,7 +115,7 @@ function Blog() {
112115
<span
113116
className={cn(
114117
'relative -right-5 top-[-25px] text-[28px] font-normal',
115-
'max-md:-right-2 max-md:top-[-4vw] max-md:text-base'
118+
'max-md:-right-2 max-md:top-[-4vw] max-md:text-base',
116119
)}
117120
>
118121
Blog

app/compare/notion-vs-appflowy/page.tsx

+54-21
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import React from 'react';
1414
import Image from 'next/image';
1515
import 'styles/vs-notion.scss';
1616

17-
const site_url = process.env.ENVIRONMENT === 'test' ? 'https://test.appflowy.io' : 'https://appflowy.io';
17+
const site_url = process.env.NEXT_PUBLIC_SITE_BASE_URL;
1818
const title = 'Notion vs AppFlowy | The #1 Open Source Notion Alternative is AppFlowy';
1919
const description = 'Open source, fast, offline support, self-hosting';
2020

@@ -102,27 +102,35 @@ function generateListSchema() {
102102
}
103103

104104
const points = ['Offline mode', 'Self-hosting', 'AI model selection', 'Customization', 'Native mobile and desktop apps'];
105-
const environment = process.env.ENVIRONMENT || 'development';
106105

107-
let importBaseURL: string = 'https://appflowy.com';
108-
109-
if (environment === 'test') {
110-
importBaseURL = 'https://test.appflowy.com';
111-
}
106+
const importBaseURL: string = `${process.env.NEXT_PUBLIC_SITE_BASE_URL}/app`;
112107

113108
function Page() {
114109
return (
115110
<>
116-
<Script id='ld-json' type='application/ld+json'>
111+
<Script
112+
id="ld-json"
113+
type="application/ld+json"
114+
>
117115
{JSON.stringify(generateListSchema())}
118116
</Script>
119117
<div className={'vs-notion-page'}>
120118
<div className={'af-container'}>
121119
<div className={'af-box section-1'}>
122120
<div className={'flex items-center justify-center gap-2'}>
123-
<Image src={AppFlowyImage} alt={'AppFlowy'} width={56} height={56} />
121+
<Image
122+
src={AppFlowyImage}
123+
alt={'AppFlowy'}
124+
width={56}
125+
height={56}
126+
/>
124127
<span className={'text-sm font-semibold'}>vs</span>
125-
<Image src={NotionImage} alt={'Notion'} width={56} height={56} />
128+
<Image
129+
src={NotionImage}
130+
alt={'Notion'}
131+
width={56}
132+
height={56}
133+
/>
126134
</div>
127135
<div className={'main-content'}>
128136
<h1>
@@ -142,7 +150,12 @@ function Page() {
142150
</h2>
143151
<div className={'cards'}>
144152
<div className={'card'}>
145-
<Image src={Object1} alt={'AI model selection'} width={151} height={121} />
153+
<Image
154+
src={Object1}
155+
alt={'AI model selection'}
156+
width={151}
157+
height={121}
158+
/>
146159
<div className={'card-title'}>
147160
AI model selection
148161
<div className={'card-desc'}>
@@ -152,7 +165,12 @@ function Page() {
152165
</div>
153166
</div>
154167
<div className={'card'}>
155-
<Image src={Object2} alt={'Available everywhere'} width={151} height={121} />
168+
<Image
169+
src={Object2}
170+
alt={'Available everywhere'}
171+
width={151}
172+
height={121}
173+
/>
156174

157175
<div className={'card-title'}>
158176
Available everywhere
@@ -161,7 +179,12 @@ function Page() {
161179
</div>
162180

163181
<div className={'card'}>
164-
<Image src={Object3} alt={'100% offline mode'} width={189} height={121} />
182+
<Image
183+
src={Object3}
184+
alt={'100% offline mode'}
185+
width={189}
186+
height={121}
187+
/>
165188

166189
<div className={'card-title'}>
167190
100% offline mode
@@ -175,9 +198,9 @@ function Page() {
175198
}
176199
>
177200
<div className={'flex w-full items-center justify-between'}>
178-
<div className='w-1/2 px-[48px] py-6 text-[#58585a] max-md:px-4 max-md:py-4'>Compare features</div>
179-
<div className='w-1/4 px-[48px] py-6 text-center text-[#58585a] max-md:px-4 max-md:py-4'>Notion</div>
180-
<div className='w-1/4 px-[48px] py-6 text-center text-[#58585a] max-md:px-4 max-md:py-4'>AppFlowy</div>
201+
<div className="w-1/2 px-[48px] py-6 text-[#58585a] max-md:px-4 max-md:py-4">Compare features</div>
202+
<div className="w-1/4 px-[48px] py-6 text-center text-[#58585a] max-md:px-4 max-md:py-4">Notion</div>
203+
<div className="w-1/4 px-[48px] py-6 text-center text-[#58585a] max-md:px-4 max-md:py-4">AppFlowy</div>
181204
</div>
182205
{points.map((point) => (
183206
<div
@@ -186,12 +209,22 @@ function Page() {
186209
'flex w-full items-center justify-between rounded-[15px] border border-gray-100 bg-white text-[24px] max-lg:text-base max-md:text-sm'
187210
}
188211
>
189-
<div className='w-1/2 px-[48px] py-10 font-medium text-black max-md:px-4 max-md:py-5'>{point}</div>
190-
<div className='flex w-1/4 items-center justify-center px-[48px] py-6 max-md:px-4 max-md:py-5'>
191-
<Image src={CloseImage} alt={'Close'} width={20} height={20} />
212+
<div className="w-1/2 px-[48px] py-10 font-medium text-black max-md:px-4 max-md:py-5">{point}</div>
213+
<div className="flex w-1/4 items-center justify-center px-[48px] py-6 max-md:px-4 max-md:py-5">
214+
<Image
215+
src={CloseImage}
216+
alt={'Close'}
217+
width={20}
218+
height={20}
219+
/>
192220
</div>
193-
<div className='flex w-1/4 items-center justify-center px-[48px] py-6 max-md:px-4 max-md:py-5'>
194-
<Image src={RightImage} alt={'Right'} width={26} height={16} />
221+
<div className="flex w-1/4 items-center justify-center px-[48px] py-6 max-md:px-4 max-md:py-5">
222+
<Image
223+
src={RightImage}
224+
alt={'Right'}
225+
width={26}
226+
height={16}
227+
/>
195228
</div>
196229
</div>
197230
))}

0 commit comments

Comments
 (0)