-
Notifications
You must be signed in to change notification settings - Fork 19
refactor(studio): separation of concern between app and module
#91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
2be60e8
fix(collection): handle prefix/include source mismatch
larbish cfc56f0
refactor(test): adapt test to new logic
larbish 34d8883
fix(context): compute actions
larbish 6af655c
refactor(app): remove id logic from app
larbish 616cf13
fix typo
larbish d9648e1
generateFsPathFromId tests
larbish 3eeabf3
expose VirtualMediaCollectionName
larbish 06ba5d4
return fsPath when list files
larbish 0c1e209
final fix
larbish 01aface
fix types
larbish d1d16e7
use fspath in dev storage
larbish e1b53a9
add custom case to playground
larbish 5469038
fix sw
larbish 46cc6f6
update types
larbish a1776d6
fix
larbish File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <script setup lang="ts"> | ||
| const { data } = await useAsyncData('pages', () => queryCollection('custom').first()) | ||
| </script> | ||
|
|
||
| <template> | ||
| <div> | ||
| <ContentRenderer :value="data" /> | ||
| </div> | ||
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| import type { DefinedCollection } from '@nuxt/content' | ||
| import { defineContentConfig, defineCollection, z } from '@nuxt/content' | ||
|
|
||
| const createDocsSchema = () => z.object({ | ||
| layout: z.string().optional(), | ||
| links: z.array(z.object({ | ||
| label: z.string(), | ||
| icon: z.string(), | ||
| to: z.string(), | ||
| target: z.string().optional(), | ||
| })).optional(), | ||
| }) | ||
|
|
||
| const collections: Record<string, DefinedCollection> = { | ||
| custom: defineCollection({ | ||
| type: 'page', | ||
| source: { | ||
| include: '3.custom-case/**/*.md', | ||
| prefix: '/', | ||
| }, | ||
| }), | ||
| landing: defineCollection({ | ||
| type: 'page', | ||
| source: { | ||
| include: 'index.md', | ||
| }, | ||
| }), | ||
| docs: defineCollection({ | ||
| type: 'page', | ||
| source: { | ||
| include: '**', | ||
| exclude: ['index.md', '3.custom-case/**/*.md'], | ||
| }, | ||
| schema: createDocsSchema(), | ||
| }), | ||
| } | ||
|
|
||
| export default defineContentConfig({ collections }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
| title: Test | ||
| description: Test | ||
| navigation: | ||
| icon: i-lucide-test | ||
| --- | ||
|
|
||
| This test file is corresponding to a custom case collection: | ||
|
|
||
| ```[content.config.ts] | ||
| pages: defineCollection({ | ||
| type: 'page', | ||
| source: { | ||
| include: '3.custom-case/**/*.md', | ||
| prefix: '/', | ||
| }, | ||
| }), | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.