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

feat: updated docs change default routes #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/guide/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,25 @@ export default {

You can use this to prototype fast without the need to change much in the config.<br>By default, Vituum routes from `src/pages` directory.

For change the default Vituum routes need change it in [rollupOptions.input](https://vitejs.dev/guide/build.html#multi-page-app) and in the [dir](https://vituum.dev/plugins/pages.html#dir) option.

```javascript
export default {
build: {
rollupOptions: {
input: ['./src/templates/pages/**/*.html']
}
},
plugins: [
vituum({
pages: {
dir: './src/templates/pages'
}
})
]
}
```

You can even enhance this with [PostHTML](/plugins/posthtml) syntax like `<include>` to include small `html` components or use [Template Engines](/guide/template-engines) for full templating experience.

Example of the structure:
Expand Down