Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.

feat(nuxt): nested layout files#5796

Closed
DannyAndres wants to merge 0 commit intonuxt:mainfrom
DannyAndres:feat/support-folders-layouts
Closed

feat(nuxt): nested layout files#5796
DannyAndres wants to merge 0 commit intonuxt:mainfrom
DannyAndres:feat/support-folders-layouts

Conversation

@DannyAndres
Copy link

This PR resolves the issue #5793. A developer will be able to create multiple folders in /layouts and then access them in pages.

This feature was heavily inspired in the PR Adds support for folders in /layouts nuxt/nuxt.js#12765
for Nuxt 2 and works in the exact same way.

For instance, if in /layouts there are 2 folders like:

  • layouts
    • folder1
    • folder2

the developer is able to create files which are named the same but they are in different folders.
Like folder1/default.vue and folder2/default.vue and then access those layouts in /pages using following rule.

folder_in_layouts + layout-file-name

@netlify
Copy link

netlify bot commented Jul 9, 2022

Deploy Preview for nuxt3-docs ready!

Name Link
🔨 Latest commit c695f71
🔍 Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62ccfe9089393d00083bbe4c
😎 Deploy Preview https://deploy-preview-5796--nuxt3-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@DannyAndres
Copy link
Author

In advance sorry for the extra edition, was done by npx yarn lint --fix

@pi0 pi0 changed the title Adds support for folders in /layouts feat(nuxt): nested layout files Jul 11, 2022
@pi0 pi0 added enhancement New feature or request 🍰 p2-nice-to-have Priority 2: nothing is broken but it's worth addressing labels Jul 11, 2022
Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice idea! If you get a chance, would you please revert the spacing/formatting changes to help us as we review this?

@DannyAndres
Copy link
Author

DannyAndres commented Jul 12, 2022

Sure, I will send another commit directly from main and manually lint the corresponding files

update

While trying to override the commits instead of reverting the changes the PR was closed due to a lack of commits, a new PR was re opened in feat(nuxt): nested layout files nuxt/framework#5842

@jjjrmy
Copy link

jjjrmy commented Jul 25, 2022

bump, really interested in this feature

@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.x enhancement New feature or request 🍰 p2-nice-to-have Priority 2: nothing is broken but it's worth addressing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants