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

feat(nuxt): nested layout files - #5796

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

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

Conversation

@DannyAndres

Copy link
Copy Markdown

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

netlifyBot commented Jul 9, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs ready!

NameLink
🔨 Latest commitc695f71
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/62ccfe9089393d00083bbe4c
😎 Deploy Previewhttps://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
Copy Markdown
Author

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

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

@danielroedanielroe left a comment

Copy link
Copy Markdown
Member

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

DannyAndres commented Jul 12, 2022

Copy link
Copy Markdown
Author

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

@DannyAndres
DannyAndresforce-pushed the feat/support-folders-layouts branch from da15ef9 to c695f71CompareJuly 12, 2022 04:54
@jjjrmy

Copy link
Copy Markdown

bump, really interested in this feature

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xenhancementNew feature or request🍰 p2-nice-to-havePriority 2: nothing is broken but it's worth addressing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@DannyAndres@jjjrmy@danielroe@pi0