Skip to content

Commit ae7af32

Browse files
committed
Update master to output generated at
1 parent a6d4d51 commit ae7af32

File tree

10 files changed

+310
-233
lines changed

10 files changed

+310
-233
lines changed

builds/laravel-one

11.6 KB
Binary file not shown.

composer.lock

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

content/create-your-content.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
view: article
2+
language: en
3+
seo:
4+
title: Create your content
5+
description: laravel-one, basics steps to create your content
6+
keywords: laravel, blade, static, webpages, generator
7+
author: Antoine Benevaut
8+
twitter: "@abenevaut"
9+
og-image: https://raw.githubusercontent.com/abenevaut/laravel-one/master/demo.gif
10+
url: https://www.abenevaut.dev/
11+
12+
article: |+
13+
# Create your content
14+
15+
Note: A [bootstrap theme](https://github.com/abenevaut/laravel-one-bootstrap) exists to help you to start.
16+
17+
To create a new project, you have to create the following directories & files:
18+
19+
- `content`: Directory containing all your yaml files that contains the content of your pages
20+
- `theme`: Directory containing all your blade templates, all yaml content will be shared with templates
21+
22+
To create a page, you have to create a new content `content/index.yml` file with the following basic content:
23+
24+
Note: content filename will define the HTML filename, `index.yml` => `index.html`, same for subdirectories.
25+
26+
```yaml
27+
view: the-blade-template-to-use
28+
29+
key_example: "value"
30+
```
31+
32+
To display your content, you have to create a new blade template `theme/the-blade-template-to-use.blade.php` file with the following basic content:
33+
```php
34+
{{ $key_example }}
35+
```
36+
37+
### Content translation
38+
- add `content/lang` directory and another directory peer language like `content/lang/en`
39+
- the language namespace is `content`, call translation `{{ \Illuminate\Support\Facades\Lang::get($readme, [], 'en') }}`
40+
41+
### Markdown content
42+
```html
43+
<x-markdown>{{ $readme }}</x-markdown>
44+
```
45+
46+
Generate the static website:
47+
```shell
48+
laravel-one generate https://my-website.com
49+
```
50+
51+
All generated files are in the `dist` directory.
52+
A `sitemap.xml` file is also generated.

content/github-pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ language: en
33
seo:
44
title: Generate GitHub pages
55
description: laravel-one, tool to generate static webpages with blade
6-
keywords: ctf, security, comcyber
6+
keywords: laravel, blade, static, webpages, generator
77
author: Antoine Benevaut
88
twitter: "@abenevaut"
9-
og-image: https://www.abenevaut.dev/seo/abenevaut-og.webp
9+
og-image: https://raw.githubusercontent.com/abenevaut/laravel-one/master/demo.gif
1010
url: https://www.abenevaut.dev/
1111

1212
article: |+

content/index.yml

Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,60 @@ language: en
33
seo:
44
title: laravel-one documentation
55
description: laravel-one, tool to generate static webpages with blade
6-
keywords: ctf, security, comcyber
6+
keywords: laravel, blade, static, webpages, generator
77
author: Antoine Benevaut
88
twitter: "@abenevaut"
9-
og-image: https://www.abenevaut.dev/seo/abenevaut-og.webp
9+
og-image: https://raw.githubusercontent.com/abenevaut/laravel-one/master/demo.gif
1010
url: https://www.abenevaut.dev/
1111

1212
article: |+
1313
# laravel-one documentation
14-
Tool to generate static webpages based on [Blade Templates](https://laravel.com/docs/9.x/blade).
15-
16-
- credits to [markdowncss](https://github.com/markdowncss/splendor) for the HTML template
14+
Laravel-one, is a tool to generate static webpages based on [Blade Templates](https://laravel.com/docs/master/blade).
1715
1816
## Install
19-
- [Available on Packagist.org - abenevaut/laravel-one](https://packagist.org/packages/abenevaut/laravel-one)
2017
21-
### Globally
18+
### From latest release
19+
Laravel-one binary is available on [release page](https://github.com/abenevaut/laravel-one/releases/latest)
20+
2221
```bash
23-
composer global require abenevaut/laravel-one
22+
curl -L -o laravel-one https://github.com/abenevaut/laravel-one/releases/latest/download/laravel-one
23+
chmod +x laravel-one
2424
```
2525
26-
#### Usage
26+
A hash file is available to check the integrity of the binary.
27+
2728
```bash
28-
laravel-one generate https://my-website.com
29+
curl -L -o laravel-one https://github.com/abenevaut/laravel-one/releases/latest/download/laravel-one.sha512sum
30+
sha512sum -c laravel-one.sha512sum
2931
```
3032
31-
[To setup your first website, follow the wiki](https://github.com/abenevaut/laravel-one#laravel-one)
33+
### From composer
34+
Or, you can install the tool locally or globally with composer, depending your usage.
3235
33-
## Build
3436
```bash
35-
php laravel-one app:build laravel-one
36-
php laravel-one app:build laravel-one --build-version=0.0.X
37+
composer require abenevaut/laravel-one
3738
```
39+
40+
```bash
41+
composer global require abenevaut/laravel-one
42+
```
43+
44+
- [Packagist](https://packagist.org/packages/abenevaut/laravel-one)
45+
46+
## Usage
47+
48+
Use our [bootstrap theme](https://github.com/abenevaut/laravel-one-bootstrap) to create your template with Blade syntax, and generate the static webpage with the following command.
49+
50+
```bash
51+
laravel-one generate https://my-website.com
52+
```
53+
54+
Detailed documentation is available on [here](/create-your-content.html).
55+
56+
When done, publish your static(s) webpage(s) with on [GitHub Pages](/github-pages.html).
57+
58+
Well done! Your just generated a very fast and secure website with Laravel-one.
59+
60+
## How to contribute?
61+
62+
Laravel-one is an open-source project, feel free to contribute on [GitHub](https://github.com/abenevaut/opensource?tab=coc-ov-file).

demo.gif

6.01 KB
Loading

docs/Contribute.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# How to contribute
2+
3+
## Build
4+
5+
```shell
6+
php laravel-one app:build laravel-one
7+
php laravel-one app:build laravel-one --build-version=0.0.X
8+
```
9+
10+
Maintain composer packages with php 8.1
11+
12+
```bash
13+
/opt/homebrew/opt/php@8.1/bin/php /opt/homebrew/bin//composer update
14+
```

docs/Home.md

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,41 @@
1-
# laravel-one
1+
# laravel-one documentation
2+
Laravel-one, is a tool to generate static webpages based on [Blade Templates](https://laravel.com/docs/master/blade).
23

3-
Tool to generate static webpages based on [Blade Templates](https://laravel.com/docs/master/blade).
4+
## Install
45

5-
- [Available on Packagist.org - abenevaut/laravel-one](https://packagist.org/packages/abenevaut/laravel-one)
6+
### From latest release
7+
Laravel-one binary is available on [release page](https://github.com/abenevaut/laravel-one/releases/latest)
68

7-
![how-to](https://raw.githubusercontent.com/abenevaut/laravel-one/master/demo.gif)
9+
```bash
10+
curl -L -o laravel-one https://github.com/abenevaut/laravel-one/releases/latest/download/laravel-one
11+
chmod +x laravel-one
12+
```
813

9-
## Install
10-
```shell
11-
composer global require abenevaut/laravel-one
12-
```
14+
A hash file is available to check the integrity of the binary.
1315

14-
or download the standalone phar (replace `<x.x.x>` by a version)
15-
```shell
16-
wget https://github.com/abenevaut/laravel-one/releases/download/<x.x.x>/laravel-one
17-
wget https://github.com/abenevaut/laravel-one/releases/download/<x.x.x>/laravel-one.sha512sum
18-
sha512sum -c laravel-one.sha512sum
19-
```
16+
```bash
17+
curl -L -o laravel-one https://github.com/abenevaut/laravel-one/releases/latest/download/laravel-one.sha512sum
18+
sha512sum -c laravel-one.sha512sum
19+
```
20+
21+
### From composer
22+
Or, you can install the tool locally or globally with composer, depending your usage.
23+
24+
```bash
25+
composer require abenevaut/laravel-one
26+
```
27+
28+
```bash
29+
composer global require abenevaut/laravel-one
30+
```
31+
32+
- [Packagist](https://packagist.org/packages/abenevaut/laravel-one)
2033

2134
## Usage
2235
To create a new project, you have to create the following directories & files:
2336

37+
Note: A [bootstrap theme](https://github.com/abenevaut/laravel-one-bootstrap) exists to help you to start.
38+
2439
- `content`: Directory containing all your yaml files that contains the content of your pages
2540
- `theme`: Directory containing all your blade templates, all yaml content will be shared with templates
2641

@@ -54,15 +69,3 @@ laravel-one generate https://my-website.com
5469

5570
All generated files are in the `dist` directory.
5671
A `sitemap.xml` file is also generated.
57-
58-
## Build
59-
```shell
60-
php laravel-one app:build laravel-one
61-
php laravel-one app:build laravel-one --build-version=0.0.X
62-
```
63-
64-
Maintain composer packages with php 8.1
65-
66-
```bash
67-
/opt/homebrew/opt/php@8.1/bin/php /opt/homebrew/bin//composer update
68-
```

tests/Feature/GenerateCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
it('generate laravel-one web pages', function () {
2626
$this
2727
->artisan('generate', ['url' => 'https://laravel-one.test'])
28-
->expectsOutput('3 pages to generate')
28+
->expectsOutput('4 pages to generate')
2929
->assertExitCode(0);
3030

3131
expect('./dist')->toBeWritableDirectory();
3232
expect('./.cache')->toBeWritableDirectory();
3333

3434
$files = array_diff(scandir('./dist'), ['.', '..']);
35-
expect(count($files))->toBe(4);
35+
expect(count($files))->toBe(5);
3636

3737
$files = array_diff(scandir('./.cache'), ['.', '..']);
3838
expect(count($files))->toBe(5);

theme/js/App.jsx

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -55,25 +55,6 @@ function TeamDropdownMenu() {
5555
<DropdownLabel>Privacy policy</DropdownLabel>
5656
</DropdownItem>
5757

58-
{/*<DropdownDivider />*/}
59-
60-
{/*<DropdownItem href="/teams/1">*/}
61-
{/* <Avatar slot="icon" src={logoUrl} />*/}
62-
{/* <DropdownLabel>Tailwind Labs</DropdownLabel>*/}
63-
{/*</DropdownItem>*/}
64-
65-
{/*<DropdownItem href="/teams/2">*/}
66-
{/* <Avatar slot="icon" initials="WC" className="bg-purple-500 text-white" />*/}
67-
{/* <DropdownLabel>Workcation</DropdownLabel>*/}
68-
{/*</DropdownItem>*/}
69-
70-
{/*<DropdownDivider />*/}
71-
72-
{/*<DropdownItem href="/teams/create">*/}
73-
{/* <PlusIcon />*/}
74-
{/* <DropdownLabel>New team&hellip;</DropdownLabel>*/}
75-
{/*</DropdownItem>*/}
76-
7758
</DropdownMenu>
7859
)
7960
}
@@ -172,7 +153,7 @@ export default function App({ children }) {
172153
<Dropdown>
173154
<DropdownButton as={ SidebarItem } className="lg:mb-2.5">
174155
<Avatar src={ logoUrl }/>
175-
<SidebarLabel>Tailwind Labs</SidebarLabel>
156+
<SidebarLabel>Laravel one</SidebarLabel>
176157
<ChevronDownIcon/>
177158
</DropdownButton>
178159
<TeamDropdownMenu/>

0 commit comments

Comments
 (0)