diff --git a/.vitepress/config.mts b/.vitepress/config.mts index 82d9b33f..c14f272f 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -12,11 +12,14 @@ export default defineConfig({ head, lang: 'en-US', srcDir: 'src', + sitemap: { + hostname: 'https://leafphp.dev', + }, scrollOffset: 'header', - srcExclude: ['tutorial/**/description.md'], + srcExclude: ['tutorial/**/description.md', 'old/**'], title: 'Leaf PHP', - description: 'Elegant PHP, Built for Makers', + description: 'Leaf is the PHP framework built for AI and humans. Build products at the speed of thought.', themeConfig: { nav, @@ -69,7 +72,7 @@ export default defineConfig({ }, markdown: { - lineNumbers: true, + lineNumbers: false, theme: { light: 'one-dark-pro', dark: 'one-dark-pro', @@ -85,5 +88,5 @@ export default defineConfig({ rewrites: { '/api/': '/api/app.html', - } + }, }); diff --git a/.vitepress/config/head.ts b/.vitepress/config/head.ts index fce2bd5b..d56be64f 100644 --- a/.vitepress/config/head.ts +++ b/.vitepress/config/head.ts @@ -13,7 +13,7 @@ const head: HeadConfig[] = [ { name: 'description', content: - 'Leaf is a lightweight and elegant PHP framework built for makers. With zero-config setup and an ecosystem of powerful tools, Leaf helps you build and ship scalable appsβ€”fast', + 'Leaf is the PHP framework built for AI and humans. Zero-config setup, a full ecosystem of modules, and AI-ready projects out of the box, so you build products at the speed of thought.', }, ], ['meta', { name: 'twitter:site', content: '@leafphp' }], @@ -23,7 +23,7 @@ const head: HeadConfig[] = [ 'meta', { name: 'twitter:title', - content: 'Leaf PHP - Elegant PHP, Built for Makers', + content: 'Leaf PHP - Build Products at the Speed of Thought', }, ], [ @@ -31,7 +31,7 @@ const head: HeadConfig[] = [ { name: 'twitter:description', content: - 'Leaf is a lightweight and elegant PHP framework built for makers. With zero-config setup and an ecosystem of powerful tools, Leaf helps you build and ship scalable appsβ€”fast', + 'Leaf is the PHP framework built for AI and humans. Zero-config setup, a full ecosystem of modules, and AI-ready projects out of the box, so you build products at the speed of thought.', }, ], [ @@ -46,7 +46,7 @@ const head: HeadConfig[] = [ 'meta', { name: 'og:title', - content: 'Leaf PHP - Elegant PHP, Built for Makers', + content: 'Leaf PHP - Build Products at the Speed of Thought', }, ], [ @@ -76,7 +76,7 @@ const head: HeadConfig[] = [ { name: 'og:description', content: - 'Leaf is a lightweight and elegant PHP framework built for makers. With zero-config setup and an ecosystem of powerful tools, Leaf helps you build and ship scalable appsβ€”fast', + 'Leaf is the PHP framework built for AI and humans. Zero-config setup, a full ecosystem of modules, and AI-ready projects out of the box, so you build products at the speed of thought.', }, ], [ @@ -143,7 +143,7 @@ const head: HeadConfig[] = [ [ 'link', { - href: 'https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap', + href: 'https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=Inter:wght@400;450;500;600;700&display=swap', rel: 'stylesheet', }, ], @@ -182,4 +182,44 @@ const head: HeadConfig[] = [ ], ]; +const structuredData = { + '@context': 'https://schema.org', + '@graph': [ + { + '@type': 'SoftwareApplication', + name: 'Leaf PHP', + applicationCategory: 'DeveloperApplication', + operatingSystem: 'Cross-platform', + image: 'https://leafphp.dev/leaf5-banner.png', + programmingLanguage: 'PHP', + url: 'https://leafphp.dev', + description: + 'Leaf is the PHP framework built for AI and humans. Zero-config setup, a full ecosystem of modules, and AI-ready projects out of the box.', + license: 'https://opensource.org/licenses/MIT', + offers: { + '@type': 'Offer', + price: '0', + priceCurrency: 'USD', + }, + author: { + '@type': 'Person', + name: 'Michael Darko', + url: 'https://github.com/mychidarko', + }, + sameAs: [ + 'https://github.com/leafsphp/leaf', + 'https://twitter.com/leafphp', + 'https://packagist.org/packages/leafs/leaf', + ], + }, + { + '@type': 'WebSite', + name: 'Leaf PHP', + url: 'https://leafphp.dev', + }, + ], +}; + +head.push(['script', { type: 'application/ld+json' }, JSON.stringify(structuredData)]); + export default head; diff --git a/.vitepress/config/navbar.ts b/.vitepress/config/navbar.ts index ee317c26..e2a35c80 100644 --- a/.vitepress/config/navbar.ts +++ b/.vitepress/config/navbar.ts @@ -18,14 +18,6 @@ const nav: DefaultTheme.NavItem[] = [ text: 'Contribute to Leaf', link: '/community/guide', }, - { - text: 'Hana JS', - link: 'https://hana.leafphp.dev', - }, - { - text: 'Seedling Framework', - link: 'https://seedling.leafphp.dev', - }, { text: 'Team', link: '/community/team', @@ -37,9 +29,36 @@ const nav: DefaultTheme.NavItem[] = [ ], }, { - text: 'πŸ’š SUPPORT LEAF', + text: '🧑 SUPPORT LEAF', link: '/support/', }, + // shown on the mobile nav screen only β€” on desktop this is replaced by the + // EcosystemMenu mega dropdown (the default flyout is hidden via CSS) + { + text: 'Ecosystem', + items: [ + { + text: 'Alchemy β€” QA + CI', + link: 'https://alchemy.leafphp.dev', + }, + { + text: 'Seedling β€” console apps', + link: 'https://seedling.leafphp.dev', + }, + { + text: 'Fetch β€” HTTP client', + link: 'https://fetch.leafphp.dev', + }, + { + text: 'Hana JS β€” frontend', + link: 'https://hanabira.dev', + }, + { + text: '25+ modules', + link: '/docs/modules', + }, + ], + }, ]; export default nav; diff --git a/.vitepress/config/sidebar.ts b/.vitepress/config/sidebar.ts index 0b9b877e..efdc6d28 100644 --- a/.vitepress/config/sidebar.ts +++ b/.vitepress/config/sidebar.ts @@ -2,14 +2,28 @@ const sidebar = [ { text: 'Quick Start', // collapsible: true, - // collapsed: true, items: [ // { text: 'Installation', link: '/docs/installation' }, - { text: 'Leaf CLI', link: '/docs/cli/' }, - { text: 'Migration Guide', link: '/docs/migrating' }, + { text: 'Leaf CLI', link: '/docs/cli/' }, + { + text: 'AI in Leaf New', + link: '/docs/ai', + }, + { + text: 'Why Leaf 5 New', + link: 'https://blog.leafphp.dev/posts/leaf-5', + }, + { + text: 'Leaf vs other frameworks', + link: '/docs/comparison', + }, + { + text: 'Upgrading to Leaf 5 New', + link: '/docs/upgrade-guide', + }, // { text: 'Functional Mode', link: '/docs/config/functional-mode' }, - { text: 'Modules', link: '/docs/modules' }, - { text: 'App Scaffolding', link: '/docs/mvc/scaffolds' }, + { text: 'Modules', link: '/docs/modules' }, + { text: 'App Scaffolding', link: '/docs/mvc/scaffolds' }, ], }, // { @@ -24,128 +38,121 @@ const sidebar = [ { text: 'Routing', // collapsible: true, - // collapsed: true, items: [ - { text: 'Basic Routing', link: '/docs/routing/' }, - { text: 'Route Groups', link: '/docs/routing/route-groups' }, - { text: 'Dynamic routing', link: '/docs/routing/dynamic' }, - { text: 'Middleware', link: '/docs/routing/middleware/' }, + { text: 'Basic Routing', link: '/docs/routing/' }, + { text: 'Route Groups', link: '/docs/routing/route-groups' }, + { text: 'Dynamic routing', link: '/docs/routing/dynamic' }, + { text: 'Middleware', link: '/docs/routing/middleware/' }, // { text: 'Middleware in Leaf MVC', link: '/docs/routing/middleware/mvc' }, ], }, { text: 'Request/Response', // collapsible: true, - // collapsed: true, items: [ - { text: 'Request', link: '/docs/http/request' }, - { text: 'Response', link: '/docs/http/response' }, - { text: 'Headers', link: '/docs/http/headers' }, - { text: 'CORS', link: '/docs/http/cors' }, + { text: 'Request', link: '/docs/http/request' }, + { text: 'Response', link: '/docs/http/response' }, + { text: 'Headers', link: '/docs/http/headers' }, + { text: 'CORS', link: '/docs/http/cors' }, ], }, { text: 'Config & Deployment', // collapsible: true, - // collapsed: true, items: [ // { text: 'Overview', link: '/docs/config/' }, // { text: 'App settings', link: '/docs/config/settings' }, - { text: 'Application Env', link: '/docs/config/environment' }, - { text: 'Deployment', link: '/learn/deployment/' }, - { text: 'Error Handling', link: '/docs/routing/error-handling' }, - { text: 'Dependency Injection', link: '/docs/config/container' }, + { text: 'Application Env', link: '/docs/config/environment' }, + { text: 'Deployment', link: '/learn/deployment/' }, + { text: 'Error Handling', link: '/docs/routing/error-handling' }, + { text: 'Dependency Injection', link: '/docs/config/container' }, // { text: 'Logging', link: '/docs/utils/logging' }, - { text: 'Using Swoole', link: '/docs/swoole' }, - { text: 'Using Docker', link: '/docs/docker' }, - // { text: 'Debugging', link: '/docs/routing/error-handling' }, + { text: 'Async PHP (Swoole/ReactPHP)', link: '/docs/swoole' }, + { text: 'Using Docker', link: '/docs/docker' }, + // { text: 'Debugging', link: '/docs/routing/error-handling' }, // { text: 'Leaf Devtools', link: '/docs/utils/devtools' }, // { text: 'Deployment', link: '/docs/config/deployment' }, - { text: 'Testing/Linting', link: '/docs/utils/testing' }, + { + text: 'Testing & Code Quality New', + link: '/docs/utils/testing', + }, ], }, { text: 'Database', // collapsible: true, - // collapsed: true, items: [ - { text: 'Introduction', link: '/docs/database/' }, + { text: 'Introduction', link: '/docs/database/' }, // { text: 'MVC Support', link: '/docs/database/mvc' }, - { text: 'Query Builder', link: '/docs/database/builder' }, - { text: 'Leaf Redis', link: '/docs/database/redis' }, + { text: 'Query Builder', link: '/docs/database/builder' }, + { text: 'Leaf Redis', link: '/docs/database/redis' }, // { text: 'Other DB Engines', link: '/docs/database/other' }, ], }, { text: 'Authentication', // collapsible: true, - // collapsed: true, items: [ - { text: 'Introduction', link: '/docs/auth/' }, + { text: 'Introduction', link: '/docs/auth/' }, // { text: 'MVC Support', link: '/docs/auth/mvc' }, // { text: 'Auth Config', link: '/docs/auth/config' }, - { text: 'User Login', link: '/docs/auth/login' }, - { text: 'User Sign Up', link: '/docs/auth/signup' }, - { text: 'Auth User', link: '/docs/auth/user' }, + { text: 'User Login', link: '/docs/auth/login' }, + { text: 'User Sign Up', link: '/docs/auth/signup' }, + { text: 'Auth User', link: '/docs/auth/user' }, { - text: 'Protecting your routes', + text: 'Protecting your routes', link: '/docs/auth/protected-routes', }, - { text: 'Roles/Permissions', link: '/docs/auth/permissions' }, + { text: 'Roles/Permissions', link: '/docs/auth/permissions' }, // { text: 'Build your own auth library', link: '/docs/auth/helpers' }, ], }, { text: 'Sessions', // collapsible: true, - // collapsed: true, items: [ - { text: 'Using Sessions', link: '/docs/http/session' }, - { text: 'Session Flash', link: '/docs/http/flash' }, - { text: 'Cookies', link: '/docs/http/cookies' }, + { text: 'Using Sessions', link: '/docs/http/session' }, + { text: 'Session Flash', link: '/docs/http/flash' }, + { text: 'Cookies', link: '/docs/http/cookies' }, ], }, { text: 'Security', // collapsible: true, - // collapsed: true, items: [ - { text: 'Validation', link: '/docs/data/validation' }, - { text: 'CSRF Protection', link: '/docs/security/csrf' }, - { text: 'Leaf Password', link: '/docs/data/encryption' }, - { text: 'General Security', link: '/docs/security/anchor' }, + { text: 'Validation', link: '/docs/data/validation' }, + { text: 'CSRF Protection', link: '/docs/security/csrf' }, + { text: 'Leaf Password', link: '/docs/data/encryption' }, + { text: 'General Security', link: '/docs/security/anchor' }, ], }, { text: 'Utilities', // collapsible: true, - // collapsed: true, items: [ - { text: 'Date/Time', link: '/docs/utils/date' }, - { text: 'Data Fetching', link: '/docs/utils/fetch' }, - { text: 'HTTP Cache', link: '/docs/http/caching' }, - { text: 'Leaf Mail', link: '/docs/utils/mail/' }, - { text: 'Leaf Billing', link: '/docs/utils/billing' }, - { text: 'Caching', link: '/docs/utils/cache' }, - { text: 'File System', link: '/docs/utils/fs' }, - { text: 'Queues/Jobs', link: '/docs/utils/queues' }, - { text: 'Multi-Language', link: '/docs/utils/lingo' }, - { text: 'Sitemaps', link: '/docs/utils/sitemaps' }, + { text: 'Date/Time', link: '/docs/utils/date' }, + { text: 'Data Fetching', link: '/docs/utils/fetch' }, + { text: 'HTTP Cache', link: '/docs/http/caching' }, + { text: 'Leaf Mail', link: '/docs/utils/mail/' }, + { text: 'Leaf Billing', link: '/docs/utils/billing' }, + { text: 'Caching', link: '/docs/utils/cache' }, + { text: 'File System', link: '/docs/utils/fs' }, + { text: 'Queues/Jobs', link: '/docs/utils/queues' }, + { text: 'Multi-Language', link: '/docs/utils/lingo' }, + { text: 'Sitemaps', link: '/docs/utils/sitemaps' }, ], }, { text: 'Frontend', // collapsible: true, - // collapsed: true, items: [ - { text: 'Introduction', link: '/docs/frontend/' }, - { text: 'Leaf Blade', link: '/docs/frontend/blade' }, - { text: 'Inertia JS', link: '/docs/frontend/inertia' }, - { text: 'Vite JS', link: '/docs/frontend/vite' }, - { text: 'Tailwind CSS', link: '/docs/frontend/tailwind' }, - { text: 'Bare UI', link: '/docs/frontend/bareui' }, - { text: 'Other Engines', link: '/docs/frontend/third-party' }, - // { text: 'Leaf UI', link: '/docs/frontend/leaf-ui' }, + { text: 'Introduction', link: '/docs/frontend/' }, + { text: 'Leaf Blade', link: '/docs/frontend/blade' }, + { text: 'Inertia JS', link: '/docs/frontend/inertia' }, + { text: 'Vite JS', link: '/docs/frontend/vite' }, + { text: 'Tailwind CSS', link: '/docs/frontend/tailwind' }, + { text: 'Bare UI', link: '/docs/frontend/bareui' }, + { text: 'Other Engines', link: '/docs/frontend/third-party' }, // { // text: 'Leaf Zero', // collapsible: true, @@ -168,31 +175,29 @@ const sidebar = [ { text: 'Building to scale', // collapsible: true, - // collapsed: true, items: [ // { text: 'Leaf + MVC', link: '/docs/mvc/' }, // { text: 'Leaf MVC v4', link: '/docs/mvc/mvc4' }, - { text: 'Controllers', link: '/docs/mvc/controllers' }, + { text: 'Controllers', link: '/docs/mvc/controllers' }, // { text: 'Views', link: '/docs/frontend/mvc' }, - { text: 'Models', link: '/docs/database/models' }, + { text: 'Models', link: '/docs/database/models' }, // { text: 'Migrations', link: '/docs/database/migrations' }, // { text: 'JSON Schema', link: '/docs/database/schema' }, - { text: 'Schema Files', link: '/docs/database/files' }, - { text: 'Services', link: '/docs/mvc/services' }, + { text: 'Schema Files', link: '/docs/database/files' }, + { text: 'Services', link: '/docs/mvc/services' }, // { text: 'Factories', link: '/docs/database/factories' }, // { text: 'Mailing', link: '/docs/utils/mail/mvc' }, - { text: 'MVC Globals', link: '/docs/mvc/globals' }, - { text: 'Custom Libraries', link: '/docs/mvc/libraries' }, + { text: 'MVC Globals', link: '/docs/mvc/globals' }, + { text: 'Custom Libraries', link: '/docs/mvc/libraries' }, // { text: 'MVC Console Tool', link: '/docs/mvc/console' }, ], }, { text: 'Console Apps', // collapsible: true, - // collapsed: true, items: [ - { text: 'Leaf Seedling', link: '/docs/seedling/' }, - { text: 'Writing Commands', link: '/docs/mvc/commands' }, + { text: 'Leaf Seedling', link: '/docs/seedling/' }, + { text: 'Writing Commands', link: '/docs/mvc/commands' }, ], }, // { @@ -202,7 +207,7 @@ const sidebar = [ // items: [ // { text: 'Intro', link: '/codelabs/' }, // { text: 'Contributing', link: '/codelabs/contributing' }, - // // { text: 'Deployment', link: '/learn/deployment/' }, + // // { text: 'Deployment', link: '/learn/deployment/' }, // // { text: 'Authentication', link: '/learn/auth/' }, // ], // }, diff --git a/.vitepress/theme/components/Community/Blog.vue b/.vitepress/theme/components/Community/Blog.vue index d559b278..876d7cdc 100644 --- a/.vitepress/theme/components/Community/Blog.vue +++ b/.vitepress/theme/components/Community/Blog.vue @@ -1,205 +1,70 @@ - - diff --git a/.vitepress/theme/components/Community/Events/EventCard.vue b/.vitepress/theme/components/Community/Events/EventCard.vue index 5ff7b6e8..9d9e4b54 100644 --- a/.vitepress/theme/components/Community/Events/EventCard.vue +++ b/.vitepress/theme/components/Community/Events/EventCard.vue @@ -1,186 +1,88 @@ - - diff --git a/.vitepress/theme/components/Community/Events/Events.vue b/.vitepress/theme/components/Community/Events/Events.vue index 837d57f1..866bb734 100644 --- a/.vitepress/theme/components/Community/Events/Events.vue +++ b/.vitepress/theme/components/Community/Events/Events.vue @@ -1,40 +1,117 @@ diff --git a/.vitepress/theme/components/Community/NewsLetterSubstack.vue b/.vitepress/theme/components/Community/NewsLetterSubstack.vue index 00443424..dd89f743 100644 --- a/.vitepress/theme/components/Community/NewsLetterSubstack.vue +++ b/.vitepress/theme/components/Community/NewsLetterSubstack.vue @@ -1,121 +1,34 @@ -