Skip to content

Commit 801b21c

Browse files
committed
update home
1 parent 95214df commit 801b21c

File tree

1 file changed

+16
-8
lines changed
  • examples/official-site/your-first-sql-website

1 file changed

+16
-8
lines changed

examples/official-site/your-first-sql-website/index.sql

+16-8
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ select 'http_header' as component,
22
'public, max-age=300, stale-while-revalidate=3600, stale-if-error=86400' as "Cache-Control",
33
'<https://sql-page.com/your-first-sql-website/>; rel="canonical"' as "Link";
44

5-
select 'dynamic' as component, properties FROM example WHERE component = 'shell' LIMIT 1;
6-
75
set os = COALESCE($os, case
86
when sqlpage.header('user-agent') like '%windows%' then 'windows'
97
when sqlpage.header('user-agent') like '%x11; linux%' then 'linux'
@@ -13,9 +11,18 @@ set os = COALESCE($os, case
1311
else 'any'
1412
end);
1513

14+
-- Fetch the page title and header from the database
15+
select 'dynamic' as component, json_patch(json_extract(properties, '$[0]'), json_object(
16+
'title', 'SQL to Website - Tutorial',
17+
'description', 'Convert your SQL database into a website in minutes. In this 5-minute guide, we will create a simple website from scratch, and learn the basics of SQLPage.'
18+
)) as properties
19+
FROM example WHERE component = 'shell' LIMIT 1;
20+
1621
SELECT 'hero' as component,
1722
'Your first SQL Website' as title,
18-
'Let''s create your first website in SQL together, from downloading SQLPage to connecting it to your database, to making a web app' as description,
23+
'[SQLPage](/) is a free tool for building data-driven apps quickly.
24+
25+
Let''s create a simple website with a database from scratch, to learn SQLPage basics.' as description_md,
1926
case $os
2027
when 'linux' then 'get_started_linux.webp'
2128
when 'macos' then 'get_started_macos.webp'
@@ -39,11 +46,12 @@ SELECT 'alert' as component,
3946
'Afraid of the setup ? Do it the easy way !' as title,
4047
'mood-happy' as icon,
4148
'teal' as color,
42-
'You don’t want to have anything to do with scary hacker things ?
43-
You can use a preconfigured SQLPage hosted on our servers, and **never have to configure a server** yourself.' as description_md,
44-
'https://editor.datapage.app' AS link,
45-
'Try SQLPage from your browser' as link_text;
46-
select 'https://datapage.app' as link, 'Host your app on our servers' as title, 'teal' as color;
49+
'You don’t want to install anything on your computer ?
50+
You can use a preconfigured SQLPage hosted on our servers, and get your app online in minutes, without **ever having to configure a server** yourself.' as description_md,
51+
'https://datapage.app' AS link,
52+
'Host your app on our servers' as link_text;
53+
select 'https://editor.datapage.app' as link, 'Try SQLPage from your browser' as title, 'teal' as color;
54+
4755
SELECT 'alert' as component,
4856
'Do you prefer videos ?' as title,
4957
'brand-youtube' as icon,

0 commit comments

Comments
 (0)