-
-
Notifications
You must be signed in to change notification settings - Fork 9
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 default folder #24
Comments
When you change pages dir, you need to also change it in the config here https://vituum.dev/plugins/pages.html#dir otherwise it will not work |
Please tell how exactly need to change plugins: [vituum({
dir: './src/templates/pages'
})] Same result for |
It's actually plugins: [vituum({
pages: {
dir: './src/templates/pages'
}
})] |
Thank you! In the documentation in Get started, there are words "basic multi-page .html support in src/pages". Do you mind if I send pull request some example code next how changing pages dir? I think it will be useful. |
Plagin imports give me some bugs, I dont need this plugin, but if import vituum from 'vituum';
plugins: [vituum({
pages: {
dir: './src/templates/pages'
}
})], to import pages from 'vituum/plugins/pages.js';
plugins: [pages({
dir: './src/templates/pages'
})]
The documentation says that plugins can be used separately, is that right? |
That's correct, but vite and pages plugin itself doesn't support globs inside import fg from 'fast-glob'
import { resolve } from 'path'
rollupOptions: {
input: fg.sync(['./src/templates/pages/*.html']).map(entry => resolve(process.cwd(), entry))
} |
An important point if someone will read this If redefine vite root, example root: 'src', this will not affect in input: fg.sync(['./src/templates/pages/*.html']).map(entry => resolve(process.cwd(), entry)) need full path with Now this better way to off Imports plugin? |
I might add |
That would be great thank you! |
Hello!
In default vituum routes from
src/pages
. To change it need to usebuild.rollupOptions.input
.For example if want change folder and add multi-page support need code:
But there are several problems with this configuration.
If use this config
npm run build
put files todist\templates\pages
, needdist
Try use
build.rollupOptions.output
, but it doesn't work for html, full config:After
build
css files indist\css
folder, html still indist\templates\pages
.In issue How to change the path of pug pages when building a project? #5 written "you should use
vituum build
", but it gives me a error "vituum: command not found"With
npm run dev
also a problem.Page http://localhost:5173/ is empty "localhost page not found". index.html have a different link?
Page http://localhost:5173/templates/pages is empty to as well as several other options that I tried.
For determines where pages routing need to use
root
?This does not help.
The text was updated successfully, but these errors were encountered: