Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dawidprosba/vite-hugo-plugin
Plugin that makes integrating Vite into Hugo application painless.
https://github.com/dawidprosba/vite-hugo-plugin
hugo vite-plugin
Last synced: 4 months ago
JSON representation
Plugin that makes integrating Vite into Hugo application painless.
- Host: GitHub
- URL: https://github.com/dawidprosba/vite-hugo-plugin
- Owner: dawidprosba
- License: mit
- Created: 2022-06-10T08:41:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-20T12:03:02.000Z (about 1 year ago)
- Last Synced: 2024-10-01T15:39:21.457Z (4 months ago)
- Topics: hugo, vite-plugin
- Language: TypeScript
- Homepage:
- Size: 71.3 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vite HUGO Plugin
> Plugin that makes integrating Vite into Hugo application painless.## Vite < 3.0.0
This plugin is compatibile with vite under 3.0.0 version, but may cause
some typescript typing error, check https://github.com/DcBD/vite-hugo-plugin/pull/2 for more information.## For older version of hugo
Added `hugoConfigFileName` property to specify which hugo config it should use. By default it's `hugo.toml`## Example usage
```ts
import { resolve } from 'path';
import { defineConfig } from 'vite';
import hugoPlugin from 'vite-hugo-plugin'// Root directory of our application
const appDir = __dirname;// The directory where hugo builds it's files.
const hugoOutDir = resolve(appDir, 'public');// https://vitejs.dev/config/
export default defineConfig({
plugins: [
hugoPlugin({ appDir, hugoOutDir })
]
});
```