Skip to content

Commit e766a7f

Browse files
Kitsune-KuroKuro
and
Kuro
authored
Insert the newest sqlpage version (#826)
Co-authored-by: Kuro <[email protected]>
1 parent 5fd1c83 commit e766a7f

File tree

1 file changed

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

1 file changed

+8
-4
lines changed

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

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
SET url = 'https://api.github.com/repos/sqlpage/SQLPage/releases/latest';
2+
SET api_results = sqlpage.fetch($url);
3+
SET sqlpage_version = json_extract($api_results, '$.tag_name');
4+
15
select 'http_header' as component,
26
'public, max-age=300, stale-while-revalidate=3600, stale-if-error=86400' as "Cache-Control",
37
'<https://sql-page.com/your-first-sql-website/>; rel="canonical"' as "Link";
@@ -36,10 +40,10 @@ Let''s create a simple website with a database from scratch, to learn SQLPage ba
3640
ELSE 'https://github.com/sqlpage/SQLPage/releases'
3741
END AS link,
3842
CASE $os
39-
WHEN 'macos' THEN 'Install SQLPage using Homebrew'
40-
WHEN 'windows' THEN 'Download SQLPage for Windows'
41-
WHEN 'linux' THEN 'Download SQLPage for Linux'
42-
ELSE 'Download SQLPage'
43+
WHEN 'macos' THEN CONCAT('Install SQLPage ', $sqlpage_version, ' using Homebrew')
44+
WHEN 'windows' THEN CONCAT('Download SQLPage ', $sqlpage_version, ' for Windows')
45+
WHEN 'linux' THEN CONCAT('Download SQLPage ', $sqlpage_version, ' for Linux')
46+
ELSE CONCAT('Download SQLPage ', $sqlpage_version)
4347
END AS link_text;
4448

4549
SELECT 'alert' as component,

0 commit comments

Comments
 (0)