Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules
*.iml
.idea
*.log*
.nuxt
.vscode
.DS_Store
coverage
dist
sw.*
27 changes: 27 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# laranuxt

## Setup

Install dependencies:

```bash
npm run install
```

## Development

```bash
npm run dev
```

## Static Generation

This will create the `dist/` directory for publishing to static hosting:

```bash
npm run generate
```

To preview the static generated app, run `npm run start`

For detailed explanation on how things work, checkout [nuxt/content](https://content.nuxtjs.org) and [@nuxt/content theme docs](https://content.nuxtjs.org/themes-docs).
13 changes: 13 additions & 0 deletions docs/content/en/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Configuration
description: ''
position: 2
category: Guide
---

## Config file

TODO:
How to disable laravel server (example using docker)
Explain nuxt.php file
Better separating - consider using 2 pages when necessary and create a specific category - use example from other packages
27 changes: 27 additions & 0 deletions docs/content/en/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: Introduction
description: ''
position: 1
category: ''
features:
- Use both Laravel and Nuxt routers
- Access all your features within 1 project
- SSR friendly
---

<img src="/preview.png" class="light-img" width="1280" height="640" alt=""/>
<img src="/preview-dark.png" class="dark-img" width="1280" height="640" alt=""/>

[Module]() for [NuxtJS](https://nuxtjs.org).

<alert type="success">

Your documentation has been created successfully!

</alert>

## Features

<list :items="features"></list>

<p class="flex items-center">Enjoy light and dark mode:&nbsp;<app-color-switcher class="inline-flex ml-2"></app-color-switcher></p>
38 changes: 38 additions & 0 deletions docs/content/en/routing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: Routing
description: ''
position: 2
category: Guide
---

## Basics

By default, Laravel redirect to Nuxt instance using the following line:

```php[web.php]
Nuxt::route('{path?}')->name('nuxt')->where('path', '.*');
```

You can define your routes **before** this instruction or your routes will be skipped.
Here is the default complete example:

```php[web.php]
Route::get('/', function () {
return view('welcome');
});

Nuxt::route('{path?}')->name('nuxt')->where('path', '.*');
```

## Default path

Specify here how to change base path

## Ignore routes

Sometimes you might want to avoid certain routes. For example, if you are using Laravel Nova, the routes won't be accessible.

Here is how you fix it:
```php[web.php]
Nuxt::route('{path?}')->name('nuxt')->where('path', '^(?!nova.*$).*');
```
52 changes: 52 additions & 0 deletions docs/content/en/setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: Setup
description: ''
position: 2
category: Guide
---

Check the [Nuxt.js documentation](https://nuxtjs.org/guides/configuration-glossary/configuration-modules) for more information about installing and using modules in Nuxt.js.

## Installation

### Using GitHub

By using GitHub [template](https://github.com/m2sd/LaraNuxt/generate)

You can either use [GitHub Desktop](x-github-client://openRepo/https://github.com/m2sd/LaraNuxt)

### Using Clone

<code-group>
<code-block label="HTTPS" active>

```bash
git clone https://github.com/m2sd/LaraNuxt.git
```

</code-block>
<code-block label="SSH">

```bash
git clone git@github.com:m2sd/LaraNuxt.git
```

</code-block>
<code-block label="GitHub CLI">

```bash
gh repo clone m2sd/LaraNuxt
```

</code-block>
</code-group>

### Dowloading as zip

<alert type="danger">

This solution is not recommended

</alert>

[Download as zip](https://github.com/m2sd/LaraNuxt/archive/master.zip)
10 changes: 10 additions & 0 deletions docs/content/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"title": "LaraNuxt",
"url": "laranuxt.com",
"logo": {
"light": "/logo-light.svg",
"dark": "/logo-dark.svg"
},
"github": "m2ds/LaraNuxt",
"twitter": ""
}
3 changes: 3 additions & 0 deletions docs/nuxt.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import theme from '@nuxt/content-theme-docs'

export default theme({})
Loading