mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-28 08:46:06 +00:00
make opensearch optional
This commit is contained in:
parent
dce6dff9a1
commit
855ed60e37
|
@ -1,4 +1,5 @@
|
||||||
# make sure the cors proxy url does NOT have a slash at the end
|
# make sure the cors proxy url does NOT have a slash at the end
|
||||||
VITE_CORS_PROXY_URL=...
|
VITE_CORS_PROXY_URL=...
|
||||||
VITE_TMDB_READ_API_KEY=...
|
VITE_TMDB_READ_API_KEY=...
|
||||||
|
VITE_OPENSEARCH_ENABLED=false
|
||||||
VITE_APP_DOMAIN="http://localhost:5173"
|
VITE_APP_DOMAIN="http://localhost:5173"
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
<title>movie-web</title>
|
<title>movie-web</title>
|
||||||
|
|
||||||
<!-- OpenSearch -->
|
<!-- OpenSearch -->
|
||||||
<link rel="search" type="application/opensearchdescription+xml" title="movie-web" href="src/assets/opensearch.xml">
|
{{{ opensearch }}}
|
||||||
|
|
||||||
<!-- Google Sitelinks -->
|
<!-- Google Sitelinks -->
|
||||||
<script type="application/ld+json">
|
<script type="application/ld+json">
|
||||||
|
|
|
@ -8,12 +8,14 @@ import { handlebars } from "./plugins/handlebars";
|
||||||
import { loadEnv } from "vite"
|
import { loadEnv } from "vite"
|
||||||
|
|
||||||
export default defineConfig(({ mode }) => {
|
export default defineConfig(({ mode }) => {
|
||||||
|
const env = loadEnv(mode, process.cwd())
|
||||||
return {
|
return {
|
||||||
plugins:[
|
plugins:[
|
||||||
handlebars({
|
handlebars({
|
||||||
vars: {
|
vars: {
|
||||||
appdomain: loadEnv(mode, process.cwd()).VITE_APP_DOMAIN,
|
opensearch: env.VITE_OPENSEARCH_ENABLED ? '<link rel="search" type="application/opensearchdescription+xml" title="movie-web" href="src/assets/opensearch.xml">' : "",
|
||||||
},
|
appdomain: env.VITE_APP_DOMAIN,
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
react({
|
react({
|
||||||
babel: {
|
babel: {
|
||||||
|
|
Loading…
Reference in a new issue