Skip to content

Commit 6b235b4

Browse files
authored
Add astro-seo-schema & ai-plugin.json (#11)
1 parent 8817db0 commit 6b235b4

6 files changed

Lines changed: 142 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"@astrojs/tailwind": "^6.0.2",
1818
"astro": "^5.12.2",
1919
"astro-seo-meta": "^4.2.0",
20+
"astro-seo-schema": "^5.0.0",
2021
"tailwindcss": "^3.4.17",
2122
"typescript": "^5.8.3"
2223
},

pnpm-lock.yaml

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/.well-known/ai-plugin.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"schema_version": "v1",
3+
"name_for_human": "TryPHP",
4+
"name_for_model": "TryPHP",
5+
"description_for_human": "Effortlessly set up PHP on Linux with a simple curl command. Install and switch between multiple PHP versions, with automatic Composer and PHP extensions installation.",
6+
"description_for_model": "TryPHP is a tool that helps users easily install PHP on Linux systems. It provides simple curl commands to install different PHP versions (7.4, 8.1, 8.2, 8.3, 8.4) and presets for frameworks like Laravel and FrankenPHP. The tool automatically installs Composer and required PHP extensions, and configures the development environment.",
7+
"auth": {
8+
"type": "none"
9+
},
10+
"api": {
11+
"type": "openapi",
12+
"url": "https://tryphp.dev/.well-known/openapi.yaml"
13+
},
14+
"logo_url": "https://tryphp.dev/cover.png",
15+
"contact_email": "security@tryphp.dev",
16+
"legal_info_url": "https://tryphp.dev/legal",
17+
"examples": [
18+
{
19+
"input": "How do I install PHP on Linux?",
20+
"output": "You can easily install the latest version of PHP on Linux with this simple command:\n```sh curl -fsSL https://tryphp.dev/install.sh | bash```\nThis will automatically download and install the latest stable version of PHP along with Composer and common extensions."
21+
},
22+
{
23+
"input": "How can I install PHP 8.2 specifically?",
24+
"output": "To install PHP 8.2 specifically, you can use this command:\n```sh curl -fsSL https://tryphp.dev/8.2/install.sh | bash```\nThis will install PHP 8.2 along with Composer and common extensions."
25+
},
26+
{
27+
"input": "How do I set up PHP for Laravel?",
28+
"output": "To install PHP with all the extensions required for Laravel, you can use the Laravel preset:\n```sh curl -fsSL https://tryphp.dev/presets/laravel | bash```\nThis will install PHP with all the extensions needed to run a Laravel application."
29+
}
30+
]
31+
}

public/.well-known/openapi.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
openapi: 3.0.1
2+
info:
3+
title: TryPHP API
4+
description: TryPHP is a tool that helps users easily install PHP on Linux systems with simple curl commands.
5+
version: "1.0"
6+
servers:
7+
- url: https://tryphp.dev
8+
paths:
9+
/info:
10+
get:
11+
operationId: getInfo
12+
summary: Get information about TryPHP
13+
description: Returns information about TryPHP, including available PHP versions and presets.
14+
responses:
15+
"200":
16+
description: Information about TryPHP
17+
content:
18+
application/json:
19+
schema:
20+
type: object
21+
properties:
22+
name:
23+
type: string
24+
description: The name of the tool
25+
example: TryPHP
26+
description:
27+
type: string
28+
description: A brief description of the tool
29+
example: Effortlessly set up PHP on Linux with a simple curl command
30+
versions:
31+
type: array
32+
description: Available PHP versions
33+
items:
34+
type: object
35+
properties:
36+
version:
37+
type: string
38+
description: PHP version
39+
example: PHP 8.2
40+
command:
41+
type: string
42+
description: Installation command
43+
example: curl -fsSL https://tryphp.dev/8.2/install.sh | bash
44+
presets:
45+
type: array
46+
description: Available presets
47+
items:
48+
type: object
49+
properties:
50+
name:
51+
type: string
52+
description: Preset name
53+
example: Laravel
54+
command:
55+
type: string
56+
description: Installation command
57+
example: curl -fsSL https://tryphp.dev/presets/laravel | bash
58+
components:
59+
schemas: {}

public/robots.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
User-agent: *
2-
Disallow:
2+
Allow: /
3+
34
Sitemap: https://tryphp.dev/sitemap-index.xml

src/layouts/Layout.astro

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
import { Seo } from "astro-seo-meta";
3+
import { Schema } from "astro-seo-schema";
34
import { site } from "../config";
45
---
56

@@ -12,6 +13,7 @@ import { site } from "../config";
1213
<meta name="viewport" content="width=device-width" />
1314
<meta name="generator" content={Astro.generator} />
1415
<meta name="msvalidate.01" content="D1916A06C360E731C64F4EEA9FE4BC08" />
16+
1517
<Seo
1618
title={site.title}
1719
description={site.description}
@@ -40,6 +42,28 @@ import { site } from "../config";
4042
card: "summary",
4143
}}
4244
/>
45+
46+
<!-- JSON-LD structured data for better LLM understanding -->
47+
<Schema
48+
item={{
49+
"@context": "https://schema.org",
50+
"@type": "SoftwareApplication",
51+
name: "TryPHP",
52+
applicationCategory: "DeveloperApplication",
53+
operatingSystem: "Linux",
54+
description: site.description,
55+
url: site.url,
56+
author: {
57+
"@type": "Organization",
58+
name: "TryPHP",
59+
url: site.url,
60+
logo: "https://tryphp.dev/cover.png",
61+
sameAs: ["https://github.com/mhdcodes"],
62+
},
63+
softwareVersion: "PHP 7.4 - 8.4",
64+
keywords: "PHP installation, PHP environment setup, Linux PHP setup",
65+
}}
66+
/>
4367
</head>
4468
<body
4569
class="bg-gray-100 dark:bg-gray-900 text-gray-900 dark:text-gray-100 transition-colors duration-300"

0 commit comments

Comments
 (0)