-
Notifications
You must be signed in to change notification settings - Fork 58
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
Add Alpine to existing Nuxt App #171
Comments
If you already have a live Nuxt app, you don't need to install Alpine. You can simply install the @nuxt/content module using the following command: npm install @nuxt/content For more information and documentation, you can visit the Content Nuxt website. However, if you don't have an existing Nuxt app and want to start with a Nuxt app that includes the Alpine starter theme, you can use the following command: npx nuxt@latest init -t themes/alpine This will set up your project with the Alpine starter theme. |
Is there an easy way to bring in the Alpine theme to an existing Nuxt app? |
Unfortunately, if you're already using a Nuxt app, adding the Alpine theme directly isn't a straightforward process. Alpine is a theme built on top of the Nuxt Content Module, and it's typically designed to be used with a fresh Nuxt project. However, you can achieve similar functionality by utilizing the Nuxt Content Module to handle content and blog-related features within your existing Nuxt app. This way, you can manage your content without the need for the Alpine theme. |
I was hoping I could swap in and out themes instead of having to build one out myself. Kind of unfortunate. |
This is what I was hoping too! |
You should be able to add the Alpine theme to an existing Nuxt application using the layers system in Nuxt, like you would any other layers and themes. If you look at the default "starter" app (which I believe is what you end up getting when you generate a new Nuxt app using the Alpine theme) you can notice a few added things on top of a base Nuxt app:
I believe these are the only things you need to do in your existing Nuxt app to add Alpine as a theme. Note a few caveats:
Let us know how you get on. |
I've already got a Nuxt app live. I want to add a blog to it.
After running
npm install @nuxt/content
, is there a way to install Alpine as well?Thanks! :)
The text was updated successfully, but these errors were encountered: