diff --git a/README.md b/README.md index db496e8c5d..cc58b7a638 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ [![Documentation Status](https://readthedocs.org/projects/inventree/badge/?version=latest)](https://inventree.readthedocs.io/en/latest/?badge=latest) ![Docker Build](https://github.com/inventree/inventree/actions/workflows/docker.yaml/badge.svg) [![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/7179/badge)](https://bestpractices.coreinfrastructure.org/projects/7179) +[![Netlify Status](https://api.netlify.com/api/v1/badges/9bbb2101-0a4d-41e7-ad56-b63fb6053094/deploy-status)](https://app.netlify.com/sites/inventree/deploys) [![Coveralls](https://img.shields.io/coveralls/github/inventree/InvenTree)](https://coveralls.io/github/inventree/InvenTree) [![Crowdin](https://badges.crowdin.net/inventree/localized.svg)](https://crowdin.com/project/inventree) @@ -156,8 +157,10 @@ Find a full list of used third-party libraries in [our documentation](https://do + Deploys by Netlify

+ ## :warning: License diff --git a/src/frontend/netlify.toml b/src/frontend/netlify.toml new file mode 100644 index 0000000000..0f7783e4d0 --- /dev/null +++ b/src/frontend/netlify.toml @@ -0,0 +1,19 @@ +# Netlify configuration file +# https://www.netlify.com/docs/netlify-toml-reference/ + +[build] + command = "yarn run build --outDir dist" + publish = "dist" + +# Send requests to subpath + +[[redirects]] + from = "/*" + to = "/index.html" + status = 200 + +[[plugins]] + package = "@netlify/plugin-lighthouse" + + [plugins.inputs.settings] + preset = "desktop" # Optionally run Lighthouse using a desktop configuration diff --git a/src/frontend/src/main.tsx b/src/frontend/src/main.tsx index f7703243bc..3be91c6a4b 100644 --- a/src/frontend/src/main.tsx +++ b/src/frontend/src/main.tsx @@ -8,3 +8,8 @@ ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( ); + +// Redirect to /platform if on / +if (window.location.pathname === '/') { + window.location.replace('/platform'); +}