Skip to content

Commit 9be178b

Browse files
authored
Merge pull request #115 from leafsphp/beta
Merge v4 docs
2 parents 978aacd + 820ad61 commit 9be178b

File tree

524 files changed

+570095
-2691
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

524 files changed

+570095
-2691
lines changed

.vitepress/config.mts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default defineConfig({
1616
srcExclude: ['tutorial/**/description.md'],
1717

1818
title: 'Leaf PHP',
19-
description: 'Simple and elegant PHP',
19+
description: 'Elegant PHP, Built for Makers',
2020

2121
themeConfig: {
2222
nav,
@@ -75,6 +75,10 @@ export default defineConfig({
7575

7676
markdown: {
7777
lineNumbers: true,
78+
theme: {
79+
light: 'one-dark-pro',
80+
dark: 'one-dark-pro',
81+
},
7882
config(md) {
7983
md.use(groupIconMdPlugin);
8084
},
@@ -83,4 +87,8 @@ export default defineConfig({
8387
vite: {
8488
plugins: [groupIconVitePlugin()],
8589
},
90+
91+
rewrites: {
92+
'/api/': '/api/app.html',
93+
}
8694
});

.vitepress/config/head.ts

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const head: HeadConfig[] = [
1313
{
1414
name: 'description',
1515
content:
16-
'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.',
16+
'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',
1717
},
1818
],
1919
['meta', { name: 'twitter:site', content: '@leafphp' }],
@@ -23,15 +23,15 @@ const head: HeadConfig[] = [
2323
'meta',
2424
{
2525
name: 'twitter:title',
26-
content: 'Leaf PHP - Elegant PHP for Modern Development',
26+
content: 'Leaf PHP - Elegant PHP, Built for Makers',
2727
},
2828
],
2929
[
3030
'meta',
3131
{
3232
name: 'twitter:description',
3333
content:
34-
'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.',
34+
'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',
3535
},
3636
],
3737
[
@@ -46,7 +46,7 @@ const head: HeadConfig[] = [
4646
'meta',
4747
{
4848
name: 'og:title',
49-
content: 'Leaf PHP - Elegant PHP for Modern Development',
49+
content: 'Leaf PHP - Elegant PHP, Built for Makers',
5050
},
5151
],
5252
[
@@ -76,7 +76,7 @@ const head: HeadConfig[] = [
7676
{
7777
name: 'og:description',
7878
content:
79-
'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.',
79+
'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',
8080
},
8181
],
8282
[
@@ -128,7 +128,22 @@ const head: HeadConfig[] = [
128128
[
129129
'link',
130130
{
131-
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',
131+
href: 'https://fonts.googleapis.com',
132+
rel: 'preconnect',
133+
},
134+
],
135+
[
136+
'link',
137+
{
138+
href: 'https://fonts.gstatic.com',
139+
rel: 'preconnect',
140+
crossorigin: '',
141+
},
142+
],
143+
[
144+
'link',
145+
{
146+
href: 'https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,[email protected],200..800&family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap',
132147
rel: 'stylesheet',
133148
},
134149
],

.vitepress/config/navbar.ts

Lines changed: 7 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -4,107 +4,28 @@ const nav: DefaultTheme.NavItem[] = [
44
{
55
text: 'Docs',
66
activeMatch: `^/(docs|examples)/`,
7-
items: [
8-
{ text: 'Guide', link: '/docs/' },
9-
{ text: 'Tutorial', link: '/tutorial/' },
10-
{
11-
text: 'Leaf + MVC',
12-
link: '/docs/mvc/',
13-
},
14-
{
15-
text: 'Leaf Modules',
16-
link: '/docs/modules',
17-
},
18-
{
19-
text: 'Leaf CLI',
20-
link: '/docs/cli/',
21-
},
22-
{
23-
text: 'MVC Console',
24-
link: '/docs/mvc/console/',
25-
},
26-
],
7+
link: '/docs/',
278
},
28-
299
{
30-
text: 'Ecosystem',
31-
activeMatch: `^/ecosystem/`,
32-
items: [
33-
{
34-
text: 'Resources',
35-
items: [
36-
{ text: 'Online Playground', link: 'https://sandbox.leafphp.dev/' },
37-
{
38-
text: 'Codelabs',
39-
link: '/codelabs/',
40-
},
41-
// {
42-
// text: 'Leaf UI',
43-
// link: 'https://ui.leafphp.dev/',
44-
// },
45-
],
46-
},
47-
{
48-
text: 'Other',
49-
items: [
50-
{
51-
text: 'Hana JS',
52-
link: 'https://hana.leafphp.dev',
53-
},
54-
{
55-
text: 'Naytive',
56-
link: 'https://naytive.netlify.app',
57-
},
58-
],
59-
},
60-
{
61-
text: 'Help',
62-
items: [
63-
// {
64-
// text: 'Leaf Forum',
65-
// link: 'https://github.com/leafsphp/leaf/discussions/37',
66-
// },
67-
{
68-
text: 'YouTube',
69-
link: 'https://www.youtube.com/channel/UCllE-GsYy10RkxBUK0HIffw',
70-
},
71-
{
72-
text: 'Discord',
73-
link: 'https://discord.gg/Pkrm9NJPE3',
74-
},
75-
{
76-
text: 'GitHub',
77-
link: 'https://github.com/leafsphp/leaf',
78-
},
79-
],
80-
},
81-
],
10+
text: 'Blog',
11+
link: 'https://blog.leafphp.dev',
8212
},
83-
8413
{
8514
text: 'Community',
8615
activeMatch: `^/(about|community)/`,
8716
items: [
88-
{
89-
text: 'Leaf Community',
90-
link: '/community/',
91-
},
9217
{
9318
text: 'Contribute to Leaf',
9419
link: '/community/guide',
9520
},
96-
{
97-
text: 'Changelog',
98-
link: '/community/releases',
99-
},
21+
// {
22+
// text: 'Changelog',
23+
// link: '/community/releases',
24+
// },
10025
// {
10126
// text: 'Project Showcase',
10227
// link: '/community/showcase',
10328
// },
104-
{
105-
text: 'Blog',
106-
link: 'https://blog.leafphp.dev',
107-
},
10829
{
10930
text: 'Team',
11031
link: '/community/team',

.vitepress/config/sidebar.ts

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,22 @@ const sidebar = [
44
// collapsible: true,
55
// collapsed: true,
66
items: [
7-
{ text: 'Introduction', link: '/docs/' },
8-
{ text: 'Installation', link: '/docs/installation' },
7+
// { text: 'Installation', link: '/docs/installation' },
8+
{ text: 'Leaf CLI', link: '/docs/cli/' },
99
{ text: 'Migration Guide', link: '/docs/migrating' },
1010
// { text: 'Functional Mode', link: '/docs/config/functional-mode' },
1111
{ text: 'Modules', link: '/docs/modules' },
1212
],
1313
},
14-
{
15-
text: 'Leaf CLI',
16-
// collapsible: true,
17-
// collapsed: true,
18-
items: [
19-
{ text: 'CLI Intro', link: '/docs/cli/' },
20-
{ text: 'Creating apps', link: '/docs/cli/creating-an-app' },
21-
{ text: 'Managing apps', link: '/docs/cli/managing-apps' },
22-
],
23-
},
14+
// {
15+
// text: 'Leaf CLI',
16+
// // collapsible: true,
17+
// // collapsed: true,
18+
// items: [
19+
// { text: 'Creating apps', link: '/docs/cli/creating-an-app' },
20+
// { text: 'Managing apps', link: '/docs/cli/managing-apps' },
21+
// ],
22+
// },
2423
{
2524
text: 'Routing',
2625
// collapsible: true,
@@ -30,7 +29,7 @@ const sidebar = [
3029
{ text: 'Route Groups', link: '/docs/routing/route-groups' },
3130
{ text: 'Dynamic routing', link: '/docs/routing/dynamic' },
3231
{ text: 'Middleware', link: '/docs/routing/middleware/' },
33-
{ text: 'Middleware in Leaf MVC', link: '/docs/routing/middleware/mvc' },
32+
// { text: 'Middleware in Leaf MVC', link: '/docs/routing/middleware/mvc' },
3433
],
3534
},
3635
{
@@ -52,7 +51,7 @@ const sidebar = [
5251
// { text: 'Overview', link: '/docs/config/' },
5352
// { text: 'App settings', link: '/docs/config/settings' },
5453
{ text: 'Application Env', link: '/docs/config/environment' },
55-
{ text: 'URL Rewriting', link: '/docs/routing/url-rewriting' },
54+
{ text: 'Deployment', link: '/learn/deployment/' },
5655
{ text: 'Error Handling', link: '/docs/routing/error-handling' },
5756
{ text: 'Dependency Injection', link: '/docs/config/container' },
5857
// { text: 'Logging', link: '/docs/utils/logging' },
@@ -126,7 +125,7 @@ const sidebar = [
126125
{ text: 'HTTP Cache', link: '/docs/http/caching' },
127126
{ text: 'Leaf Mail', link: '/docs/utils/mail/' },
128127
{ text: 'File System', link: '/docs/utils/fs' },
129-
// { text: 'Queues/Jobs', link: '/docs/utils/queues' },
128+
{ text: 'Queues/Jobs', link: '/docs/utils/queues' },
130129
],
131130
},
132131
{
@@ -141,25 +140,41 @@ const sidebar = [
141140
{ text: 'Vite JS', link: '/docs/frontend/vite' },
142141
{ text: 'Tailwind CSS', link: '/docs/frontend/tailwind' },
143142
{ text: 'Inertia JS', link: '/docs/frontend/inertia' },
144-
// { text: 'Viewi PHP', link: '/docs/frontend/viewi' },
145143
// { text: 'Leaf UI', link: '/docs/frontend/leaf-ui' },
144+
// {
145+
// text: 'Leaf Zero',
146+
// collapsible: true,
147+
// collapsed: true,
148+
// items: [
149+
// { text: 'Introduction', link: '/docs/frontend/zero/' },
150+
// { text: 'Layouts', link: '/docs/frontend/zero/layouts' },
151+
// { text: 'Forms', link: '/docs/frontend/zero/forms' },
152+
// { text: 'Modals', link: '/docs/frontend/zero/modals' },
153+
// { text: 'Alerts', link: '/docs/frontend/zero/alerts' },
154+
// { text: 'Loading', link: '/docs/frontend/zero/loading' },
155+
// { text: 'Icons', link: '/docs/frontend/zero/icons' },
156+
// { text: 'Forms', link: '/docs/frontend/zero/forms' },
157+
// { text: 'Merketing Sections', link: '/docs/frontend/zero/marketing' },
158+
// { text: 'Dashboard Sections', link: '/docs/frontend/zero/dashboard' },
159+
// ],
160+
// },
146161
],
147162
},
148163
{
149164
text: 'Building to scale',
150165
// collapsible: true,
151166
// collapsed: true,
152167
items: [
153-
{ text: 'Leaf + MVC', link: '/docs/mvc/' },
154-
{ text: 'Leaf MVC v4', link: '/docs/mvc/mvc4' },
168+
// { text: 'Leaf + MVC', link: '/docs/mvc/' },
169+
// { text: 'Leaf MVC v4', link: '/docs/mvc/mvc4' },
155170
{ text: 'Controllers', link: '/docs/mvc/controllers' },
156171
// { text: 'Views', link: '/docs/frontend/mvc' },
157172
{ text: 'Models', link: '/docs/database/models' },
158-
{ text: 'Migrations', link: '/docs/database/migrations' },
159-
{ text: 'JSON Schema', link: '/docs/database/schema' },
173+
// { text: 'Migrations', link: '/docs/database/migrations' },
174+
// { text: 'JSON Schema', link: '/docs/database/schema' },
160175
{ text: 'Schema Files', link: '/docs/database/files' },
161-
{ text: 'Seeders', link: '/docs/database/seeders' },
162-
{ text: 'Factories', link: '/docs/database/factories' },
176+
// { text: 'Seeders', link: '/docs/database/seeders' },
177+
// { text: 'Factories', link: '/docs/database/factories' },
163178
{ text: 'Writing Commands', link: '/docs/mvc/commands' },
164179
// { text: 'Mailing', link: '/docs/utils/mail/mvc' },
165180
{ text: 'MVC Globals', link: '/docs/mvc/globals' },
@@ -174,8 +189,8 @@ const sidebar = [
174189
// items: [
175190
// { text: 'Intro', link: '/codelabs/' },
176191
// { text: 'Contributing', link: '/codelabs/contributing' },
177-
// // { text: 'Deployment', link: '/codelabs/experiments/deployment/' },
178-
// // { text: 'Authentication', link: '/codelabs/experiments/auth/' },
192+
// // { text: 'Deployment', link: '/learn/deployment/' },
193+
// // { text: 'Authentication', link: '/learn/auth/' },
179194
// ],
180195
// },
181196
];

.vitepress/theme/components/Community/Blog.vue

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,35 @@ import Button from '../shared/Button.vue';
55
</script>
66

77
<template>
8-
<section id="blog" class="testimonials hidden md:flex justify-center items-center h-[70vh]">
9-
<div class="flex:center-between py:_10" style="display: grid; grid-template-columns: 1fr 1.25fr; gap: 4rem;">
10-
<div class="text-sm">
11-
<h2 class="title mb-4" style="text-align: left;">Latest writings from the Leaf team</h2>
12-
<p class="mb-2">
13-
Our main goal and pride at Leaf is to make PHP development as simple and elegant as possible.
14-
</p>
15-
<p class="mb-6">
16-
Our team is always looking to improve your experience using the Leaf framework and it's ecosystem of tools.
17-
You
18-
can follow along as our team discusses it's insights from the past year and what's to come in 2025.
19-
</p>
20-
<Button as="a" href="https://blog.leafphp.dev" target="_blank">
21-
<span>Read the Blog</span>
22-
<ExternalLink height="18px" />
23-
</Button>
8+
<div class="flex justify-center items-center">
9+
<section id="blog"
10+
class="testimonials hidden md:flex justify-center items-center h-[70vh] w-full sm:!max-w-3xl lg:!max-w-5xl xl:!max-w-7xl !px-2 sm:!px-10">
11+
<div class="flex justify-center w-full items-center py:_10"
12+
style="display: grid; grid-template-columns: 1fr 1.25fr; gap: 4rem;">
13+
<div class="text-sm max-w-[400px]">
14+
<h1 class="title mb-4" style="text-align: left;">Latest writings from the Leaf team</h1>
15+
<p class="mb-2 text-base">
16+
Our main goal and pride at Leaf is to make PHP development as simple and elegant as possible.
17+
</p>
18+
<p class="mb-6 text-base">
19+
Our team is always looking to improve your experience using the Leaf framework and it's ecosystem of tools.
20+
You
21+
can follow along as our team discusses it's insights from the past year and what's to come in 2025.
22+
</p>
23+
<Button as="a" class="!text-white" href="https://blog.leafphp.dev" target="_blank">
24+
<span>Read the Blog</span>
25+
<ExternalLink height="18px" />
26+
</Button>
27+
</div>
28+
29+
<div class="elfsight-app-6190fe7f-f619-4dda-9952-9324f84ba50c" data-elfsight-app-lazy></div>
2430
</div>
25-
26-
<div class="elfsight-app-6190fe7f-f619-4dda-9952-9324f84ba50c" data-elfsight-app-lazy></div>
27-
</div>
28-
</section>
31+
</section>
32+
</div>
2933
</template>
3034

3135
<style scoped>
3236
.testimonials {
33-
padding: 32px 24px;
3437
/* padding: 42px 32px; */
3538
background: var(--vt-c-bg-dark);
3639
transition: border-color 0.5s, background-color 0.5s;
@@ -39,7 +42,6 @@ import Button from '../shared/Button.vue';
3942
4043
.testimonials>div {
4144
padding: 0px 32px;
42-
max-width: 900px;
4345
}
4446
4547
.blog-card {

0 commit comments

Comments
 (0)