netlify

“Successful” Netlify Form Submissions Don't Show in Dashboard

本秂侑毒 提交于 2019-12-02 20:26:12
问题 I have a create-react-app application deployed to Netlify, and I'm using react-netlify-form to render my form. My form is registered in my Netlify dashboard, and when I make a submission, I get the success response, but no submissions show up in my Netlify dashboard. Initially I tried creating a form using the netlify form with react guide. It registered in the Netlify dashboard, but submissions would not show up. (I made sure to use the static form in my index.html file, and the hidden input

Add _redirects file to root path for Vue SPA hosted on Netlify

蹲街弑〆低调 提交于 2019-12-02 17:43:36
I'm developing a Single Page App using Vue CLI and want history pushstate to work so I get clean URLs. I have to follow this: https://www.netlify.com/docs/redirects/#history-pushstate-and-single-page-apps and add a _redirects file to the root of my site folder with the following: /* /index.html 200 The problem is I don't know how to add this _redirects file to the root of my dist folder. I tried adding it to the static folder but it ends up in a subfolder and not in root. How can I include this file so that history mode works after deploying on Netlify ? // config/index.js build: { // Paths

Angular routing not working on Netlify on page refresh

ぐ巨炮叔叔 提交于 2019-12-01 06:25:28
I deploy to netlify using ng build --prod , and the website works. But when I go to it, it automatically changes the link by adding /home onto the end. It still works, but then if I refresh the page or click any links to other pages, it doesn't work anymore. The reason the "/home" is added on is because I have a RouterModule set up that has home as it's initial path. Here is the code I have in my "app.module.ts" that sets up routes: NgbModule.forRoot(), RouterModule.forRoot([ { path: '', redirectTo: '/home', pathMatch: 'full' }, { path: 'home', component: HomeComponent }, { path: 'terms-and

Changing Hugo version on Netlify build

亡梦爱人 提交于 2019-11-29 12:08:42
There is a new (0.32 at this time) version of Hugo that has just been released. It was asked in the community how to handle this situation to test out the new version on a Netlify build. What is the recommended course of action for Netlify users? If you do not setup a variable HUGO_VERSION on Netlify it defaults to version 0.17 of HUGO . Simple Setup: To target your builds Netlify has a custom variables field in the online console for your site. This will be enough for simple sites that need to target all workflow builds. Workflow Setup Netlify allows for a config file ( netlify.toml ) at the

Set environment variable for build in Netlify

让人想犯罪 __ 提交于 2019-11-29 04:30:35
I'm trying to set an environment variable for an API key that I don't want in my code. My source javascript looks something like this : .get(`http://api-url-and-parameters&api-key=${process.env.API_KEY}`) I'm using webpack and the package dotenv-webpack https://www.npmjs.com/package/dotenv-webpack to set API_KEY in a gitignored .env file and it's all running fine on my local. I'd like to also be able to set that variable when deploying through Netlify, I've tried adding it through to GUI to the 'build environment variables', and also to set it directly in the build command, but without success

Changing Hugo version on Netlify build

一笑奈何 提交于 2019-11-28 05:04:50
问题 There is a new (0.32 at this time) version of Hugo that has just been released. It was asked in the community how to handle this situation to test out the new version on a Netlify build. What is the recommended course of action for Netlify users? 回答1: If you do not setup a variable HUGO_VERSION on Netlify it defaults to version 0.17 of HUGO . Simple Setup: To target your builds Netlify has a custom variables field in the online console for your site. This will be enough for simple sites that

Set environment variable for build in Netlify

蓝咒 提交于 2019-11-27 03:25:17
问题 I'm trying to set an environment variable for an API key that I don't want in my code. My source javascript looks something like this : .get(`http://api-url-and-parameters&api-key=${process.env.API_KEY}`) I'm using webpack and the package dotenv-webpack https://www.npmjs.com/package/dotenv-webpack to set API_KEY in a gitignored .env file and it's all running fine on my local. I'd like to also be able to set that variable when deploying through Netlify, I've tried adding it through to GUI to