Skip to content
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

Change path for layouts, components and etc. #1586

Open
varadinov opened this issue May 10, 2024 · 1 comment
Open

Change path for layouts, components and etc. #1586

varadinov opened this issue May 10, 2024 · 1 comment
Labels

Comments

@varadinov
Copy link

Is your feature request related to a problem? Please describe.
I would like to be able to change the path where slidev looks for layouts, components and etc.
I want to create a project with multiple presentations. Each presentation to be its own directory and I want to reuse common layouts and components.

Describe the solution you'd like
I want to configure somewhere slidev to search for layouts and components in different path.
config.file ->
layouts_alternative_paths:

  • '../layouts/'

Describe alternatives you've considered
There some alternative like symbolic link and git submodule. However, they have some issue are not the best option.

@varadinov varadinov added the enhancement New feature or request label May 10, 2024
@varadinov
Copy link
Author

I found the proper way to this. You can use the themes to deliver shared components and layouts - https://sli.dev/themes/write-a-theme
The theme can be referenced locally with relative path - theme: ../slidev-theme-xxxx
Then the custom layouts (e.g. mylayout.vue) from the theme are accessible with - layout: xxxx

I suppose it will be nice to have this in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants