netlify

baseUrls, redirects and rewrites in blogdown

試著忘記壹切 提交于 2019-12-11 14:11:53
问题 Hello blogdown stackoverflow community! I have been recently migrating my personal GitHub/Jekyll blog (https://blogs.nopcode.org/brainstorm) over to Blogdown/Netlify, but I'm a bit confused by the _redirects and config.toml url routing business. I have read in detail the official blogdown and netlify documentations. As well as Yihui's recommendations on good permalink hygiene Unfortunately, no matter how many sensible changes I try (essentially on config.toml and _redirects ), I cannot

Netlify deploy with results of TypeError: Cannot read property 'data' of undefined

二次信任 提交于 2019-12-11 14:11:40
问题 I have completed my project using Wordpress as a headless CMS, this work locally; however when deploying to netlify I am getting cannot "TypeError: Cannot read property 'replace' of undefined" The Error is referencing my node file, which is included below. I have tried changing my config file, updating my packages, and have reviewed everything locally. Everything works fine locally, and my live server is up and running fine as well, I migrated my server prior to attempting to deploy. Netlify

Netlify NodeJS Function always returns 'Response to preflight request doesn't pass'

偶尔善良 提交于 2019-12-11 08:57:51
问题 I'm trying to create an API endpoint using Netlify Lambda Function . The code works perfectly in my local, but always returns Access to XMLHttpRequest at 'https://<my-netlify-project>.netlify.com/.netlify/functions/submit' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. I'm trying to handle OPTIONS and POST in my code, but it doesn

gatsby-node.js createPages is not sending data to component in pageContext

大憨熊 提交于 2019-12-11 06:03:33
问题 You can see I'm logging the data returned from my lambda function. The data is definitely coming back as expected. However, in the createPage(...), the allMessages in pageContext in the dashboard.js component is always null/undefined. Why?... dashboard.js const DashboardPage = ({ pageContext: { allMessages } }) => ( <Layout> <SEO title="Dashboard" keywords={[`gatsby`, `application`, `react`]} /> <h1>Dashboard</h1> <p>Welcome to your new Gatsby site.</p> {console.log('allMessages: ',

Drafts rendered by netlify when draft: true in yaml

让人想犯罪 __ 提交于 2019-12-11 01:47:00
问题 I am running at blogdown site from this github repo hosted by Netlify at https://timmastny.rbind.io/ In website2/content/blog/ I have two posts 2018-01-16-git-blogdown-project-workflow.Rmd and 2018-01-13-bayesian-meta-analysis-powerlifting.Rmd You can see that in the YAML of both posts, I have draft: true and in the second one I even have publishdate: '2018-01-20' which is in the future as of this post. However, with these changes pushed to github and Netlify deployed with a clean cache, on

“Error running command: Build script returned non-zero exit code” when deploying Gatsby JS site to Netlify

☆樱花仙子☆ 提交于 2019-12-10 19:12:29
问题 I recently came across Gatsby JS (https://github.com/gatsbyjs/gatsby) and decided to build my portfolio site on top of the generator. So I forked their starter site (gatsby-starter-default) and built my portfolio with it (https://github.com/ArchieHicklin/Archie) Locally (using ' gatsby develop ') it runs fine - but when I deploy to Netlify with ' gatsby build ' I get this error: 11:30:58 AM: Build started 11:30:59 AM: Fetching cached dependencies 11:30:59 AM: Expected build cache - but failed

Netlify fails to deploy site after public is added to .gitignore

旧街凉风 提交于 2019-12-10 12:08:20
问题 I'm trying to follow the suggestions in the Blogdown book. For a while, I was building my blogdown site locally and then letting Netlify deploy it. I am now reading that I can add my public/ folder to .gitignore , as Hugo should build it on a remote server: The public/ directory should be ignored if your website is to going to be automatically (re)built on a remote server such as Netlify. So, I tried that. I made sure GitHub isn't tracking public/ anymore. What I've done is this. First, I

How to handle Contentful content data in Gatsby

不羁岁月 提交于 2019-12-10 04:10:32
问题 I'm interested in using Gatsby to build a Netlify static site using content from Contentful Netlify has this nice gettting started Gatsby guide: ​​https://www.netlify.com/blog/2016/02/24/a-step-by-step-guide-gatsby-on-netlify But I'm a bit unsure of how to bring Contentful into the mix. Do I need to write scripts to convert my Contentful content into Gatsby 'markdown'? Any ideas, ideas, links appreciated! 回答1: Since this question was posted, an official Contentful plugin's been added to

Change blog theme (blogdown+netlify)

∥☆過路亽.° 提交于 2019-12-07 14:14:52
问题 I have followed tutorial by Yihui and created a website using blowdown , github and netlify . Now, I want to change theme of my website. The issue is that I have several posts that produces many plots. As a result when I create a new website locally and add my posts, git push fails. I suspect it is because I have too many files. I tried adding posts piece by piece as if I am writing a new post, which worked. But it will take too much time. I suspect others have the same problem. Is there a

Can Netlify redirect traffic from http to https without forcing SSL

北慕城南 提交于 2019-12-07 03:19:43
问题 Another question asked quite often by the Netlify community. "Can Netlify redirect traffic from http to https without forcing SSL (TLS)?" Once you have a certificate in place, you can check a box to force TLS. This will both set a redirect from http to https, and add Strict Transport Security headers to all requests. The user does not want to force SSL until everything is setup correctly and they know they will not be changing their setup. 回答1: November 2018 Update The accepted answer is no