diff --git a/.vitepress/config.mts b/.vitepress/config.mts index 4e395244..82d9b33f 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -16,7 +16,7 @@ export default defineConfig({ srcExclude: ['tutorial/**/description.md'], title: 'Leaf PHP', - description: 'Simple and elegant PHP', + description: 'Elegant PHP, Built for Makers', themeConfig: { nav, @@ -66,15 +66,14 @@ export default defineConfig({ } }, }, - - footer: { - message: `Released under the MIT License.`, - copyright: `Copyright © 2019-${new Date().getFullYear()} Michael Darko-Duodu`, - }, }, markdown: { lineNumbers: true, + theme: { + light: 'one-dark-pro', + dark: 'one-dark-pro', + }, config(md) { md.use(groupIconMdPlugin); }, @@ -83,4 +82,8 @@ export default defineConfig({ vite: { plugins: [groupIconVitePlugin()], }, + + rewrites: { + '/api/': '/api/app.html', + } }); diff --git a/.vitepress/config/head.ts b/.vitepress/config/head.ts index 2e2cac12..fce2bd5b 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 user-friendly framework designed for quick and efficient development. It features a zero-config setup and an ecosystem of tools, making it ideal for building scalable apps with ease.', + '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', }, ], ['meta', { name: 'twitter:site', content: '@leafphp' }], @@ -23,7 +23,7 @@ const head: HeadConfig[] = [ 'meta', { name: 'twitter:title', - content: 'Leaf PHP - Elegant PHP for Modern Development', + content: 'Leaf PHP - Elegant PHP, Built for Makers', }, ], [ @@ -31,7 +31,7 @@ const head: HeadConfig[] = [ { name: 'twitter:description', content: - 'Leaf is a lightweight and user-friendly framework designed for quick and efficient development. It features a zero-config setup and an ecosystem of tools, making it ideal for building scalable apps with ease.', + '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', }, ], [ @@ -46,7 +46,7 @@ const head: HeadConfig[] = [ 'meta', { name: 'og:title', - content: 'Leaf PHP - Elegant PHP for Modern Development', + content: 'Leaf PHP - Elegant PHP, Built for Makers', }, ], [ @@ -76,7 +76,7 @@ const head: HeadConfig[] = [ { name: 'og:description', content: - 'Leaf is a lightweight and user-friendly framework designed for quick and efficient development. It features a zero-config setup and an ecosystem of tools, making it ideal for building scalable apps with ease.', + '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', }, ], [ @@ -128,7 +128,22 @@ const head: HeadConfig[] = [ [ 'link', { - href: 'https://fonts.googleapis.com/css?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500|DM+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700|Inter:300,400,500,600|Open+Sans:400,600;display=swap', + href: 'https://fonts.googleapis.com', + rel: 'preconnect', + }, + ], + [ + 'link', + { + href: 'https://fonts.gstatic.com', + rel: 'preconnect', + crossorigin: '', + }, + ], + [ + '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', rel: 'stylesheet', }, ], diff --git a/.vitepress/config/navbar.ts b/.vitepress/config/navbar.ts index b9c95434..ee317c26 100644 --- a/.vitepress/config/navbar.ts +++ b/.vitepress/config/navbar.ts @@ -4,106 +4,27 @@ const nav: DefaultTheme.NavItem[] = [ { text: 'Docs', activeMatch: `^/(docs|examples)/`, - items: [ - { text: 'Guide', link: '/docs/' }, - { text: 'Tutorial', link: '/tutorial/' }, - { - text: 'Leaf + MVC', - link: '/docs/mvc/', - }, - { - text: 'Leaf Modules', - link: '/docs/modules', - }, - { - text: 'Leaf CLI', - link: '/docs/cli/', - }, - { - text: 'MVC Console', - link: '/docs/mvc/console/', - }, - ], + link: '/docs/', }, - { - text: 'Ecosystem', - activeMatch: `^/ecosystem/`, - items: [ - { - text: 'Resources', - items: [ - { text: 'Online Playground', link: 'https://sandbox.leafphp.dev/' }, - { - text: 'Codelabs', - link: '/codelabs/', - }, - // { - // text: 'Leaf UI', - // link: 'https://ui.leafphp.dev/', - // }, - ], - }, - { - text: 'Other', - items: [ - { - text: 'Hana JS', - link: 'https://hana.leafphp.dev', - }, - { - text: 'Naytive', - link: 'https://naytive.netlify.app', - }, - ], - }, - { - text: 'Help', - items: [ - // { - // text: 'Leaf Forum', - // link: 'https://github.com/leafsphp/leaf/discussions/37', - // }, - { - text: 'YouTube', - link: 'https://www.youtube.com/channel/UCllE-GsYy10RkxBUK0HIffw', - }, - { - text: 'Discord', - link: 'https://discord.gg/Pkrm9NJPE3', - }, - { - text: 'GitHub', - link: 'https://github.com/leafsphp/leaf', - }, - ], - }, - ], + text: 'Blog', + link: 'https://blog.leafphp.dev', }, - { text: 'Community', activeMatch: `^/(about|community)/`, items: [ - { - text: 'Leaf Community', - link: '/community/', - }, { text: 'Contribute to Leaf', link: '/community/guide', }, { - text: 'Changelog', - link: '/community/releases', + text: 'Hana JS', + link: 'https://hana.leafphp.dev', }, - // { - // text: 'Project Showcase', - // link: '/community/showcase', - // }, { - text: 'Blog', - link: 'https://blog.leafphp.dev', + text: 'Seedling Framework', + link: 'https://seedling.leafphp.dev', }, { text: 'Team', @@ -116,7 +37,7 @@ const nav: DefaultTheme.NavItem[] = [ ], }, { - text: 'Support Leaf', + text: '💚 SUPPORT LEAF', link: '/support/', }, ]; diff --git a/.vitepress/config/sidebar.ts b/.vitepress/config/sidebar.ts index 8b21e630..0b9b877e 100644 --- a/.vitepress/config/sidebar.ts +++ b/.vitepress/config/sidebar.ts @@ -4,23 +4,23 @@ const sidebar = [ // collapsible: true, // collapsed: true, items: [ - { text: 'Introduction', link: '/docs/' }, - { text: 'Installation', link: '/docs/installation' }, + // { text: 'Installation', link: '/docs/installation' }, + { text: 'Leaf CLI', link: '/docs/cli/' }, { text: 'Migration Guide', link: '/docs/migrating' }, // { text: 'Functional Mode', link: '/docs/config/functional-mode' }, { text: 'Modules', link: '/docs/modules' }, + { text: 'App Scaffolding', link: '/docs/mvc/scaffolds' }, ], }, - { - text: 'Leaf CLI', - // collapsible: true, - // collapsed: true, - items: [ - { text: 'CLI Intro', link: '/docs/cli/' }, - { text: 'Creating apps', link: '/docs/cli/creating-an-app' }, - { text: 'Managing apps', link: '/docs/cli/managing-apps' }, - ], - }, + // { + // text: 'Leaf CLI', + // // collapsible: true, + // // collapsed: true, + // items: [ + // { text: 'Creating apps', link: '/docs/cli/creating-an-app' }, + // { text: 'Managing apps', link: '/docs/cli/managing-apps' }, + // ], + // }, { text: 'Routing', // collapsible: true, @@ -30,7 +30,7 @@ const sidebar = [ { 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: 'Middleware in Leaf MVC', link: '/docs/routing/middleware/mvc' }, ], }, { @@ -52,13 +52,13 @@ const sidebar = [ // { text: 'Overview', link: '/docs/config/' }, // { text: 'App settings', link: '/docs/config/settings' }, { text: 'Application Env', link: '/docs/config/environment' }, - { text: 'URL Rewriting', link: '/docs/routing/url-rewriting' }, + { 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/config/debugging' }, + // { 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' }, @@ -125,8 +125,12 @@ const sidebar = [ { 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: 'Queues/Jobs', link: '/docs/utils/queues' }, + { text: 'Multi-Language', link: '/docs/utils/lingo' }, + { text: 'Sitemaps', link: '/docs/utils/sitemaps' }, ], }, { @@ -135,14 +139,30 @@ const sidebar = [ // collapsed: true, items: [ { text: 'Introduction', link: '/docs/frontend/' }, - { text: 'Bare UI', link: '/docs/frontend/bareui' }, { text: 'Leaf Blade', link: '/docs/frontend/blade' }, - { text: 'Other Engines', link: '/docs/frontend/third-party' }, + { text: 'Inertia JS', link: '/docs/frontend/inertia' }, { text: 'Vite JS', link: '/docs/frontend/vite' }, { text: 'Tailwind CSS', link: '/docs/frontend/tailwind' }, - { text: 'Inertia JS', link: '/docs/frontend/inertia' }, - // { text: 'Viewi PHP', link: '/docs/frontend/viewi' }, + { text: 'Bare UI', link: '/docs/frontend/bareui' }, + { text: 'Other Engines', link: '/docs/frontend/third-party' }, // { text: 'Leaf UI', link: '/docs/frontend/leaf-ui' }, + // { + // text: 'Leaf Zero', + // collapsible: true, + // collapsed: true, + // items: [ + // { text: 'Introduction', link: '/docs/frontend/zero/' }, + // // { text: 'Layouts', link: '/docs/frontend/zero/layouts' }, + // { text: 'Forms', link: '/docs/frontend/zero/forms' }, + // // { text: 'Modals', link: '/docs/frontend/zero/modals' }, + // // { text: 'Alerts', link: '/docs/frontend/zero/alerts' }, + // // { text: 'Loading', link: '/docs/frontend/zero/loading' }, + // { text: 'Icons', link: '/docs/frontend/zero/icons' }, + // // { text: 'Forms', link: '/docs/frontend/zero/forms' }, + // { text: 'Merketing Sections', link: '/docs/frontend/zero/marketing' }, + // // { text: 'Dashboard Sections', link: '/docs/frontend/zero/dashboard' }, + // ], + // }, ], }, { @@ -150,21 +170,29 @@ const sidebar = [ // collapsible: true, // collapsed: true, items: [ - { text: 'Leaf + MVC', link: '/docs/mvc/' }, - { text: 'Leaf MVC v4', link: '/docs/mvc/mvc4' }, + // { text: 'Leaf + MVC', link: '/docs/mvc/' }, + // { text: 'Leaf MVC v4', link: '/docs/mvc/mvc4' }, { text: 'Controllers', link: '/docs/mvc/controllers' }, // { text: 'Views', link: '/docs/frontend/mvc' }, { text: 'Models', link: '/docs/database/models' }, - { text: 'Migrations', link: '/docs/database/migrations' }, - { text: 'JSON Schema', link: '/docs/database/schema' }, + // { text: 'Migrations', link: '/docs/database/migrations' }, + // { text: 'JSON Schema', link: '/docs/database/schema' }, { text: 'Schema Files', link: '/docs/database/files' }, - { text: 'Seeders', link: '/docs/database/seeders' }, - { text: 'Factories', link: '/docs/database/factories' }, - { text: 'Writing Commands', link: '/docs/mvc/commands' }, + { 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 Console Tool', link: '/docs/mvc/console' }, + // { 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' }, ], }, // { @@ -174,8 +202,8 @@ const sidebar = [ // items: [ // { text: 'Intro', link: '/codelabs/' }, // { text: 'Contributing', link: '/codelabs/contributing' }, - // // { text: 'Deployment', link: '/codelabs/experiments/deployment/' }, - // // { text: 'Authentication', link: '/codelabs/experiments/auth/' }, + // // { 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 3a339772..d559b278 100644 --- a/.vitepress/theme/components/Community/Blog.vue +++ b/.vitepress/theme/components/Community/Blog.vue @@ -1,213 +1,205 @@ diff --git a/.vitepress/theme/components/Community/NewsLetterSubstack.vue b/.vitepress/theme/components/Community/NewsLetterSubstack.vue index a423c2ed..00443424 100644 --- a/.vitepress/theme/components/Community/NewsLetterSubstack.vue +++ b/.vitepress/theme/components/Community/NewsLetterSubstack.vue @@ -3,7 +3,7 @@