netlify-cms

How to use Environmental or OS variables in self-created JavaScript files

浪尽此生 提交于 2021-02-05 12:21:10
问题 I created a helpers.js under <project_root>/static folder Inside this JS file, I have method which needs access to the environmental/OS variables. async function saveRegistration(pushSubscriptionObject) { let url = ""; try { url = `${process.env.GATSBY_FUNCTION_URL_BASE}${process.env.GATSBY_FUNCTION_UPDATE_SUBSCRIPTION}`; console.log("using netlify config: ", url); console.log("--------updateSub() url--------", url); } catch (ex) { console.log("saveReg() catch block:", JSON.stringify(ex));

Next.js: How to get static assets from within getStaticProps

ぃ、小莉子 提交于 2021-02-05 07:27:30
问题 I am using Netlify CMS. I want to import all the slides for a carousel into my component. I made a collection called slider and added a few slides. That created two markdown files (one for each slide) in public/content/slider/ . I would like to import them all into an iteratable object so I can build the carousel. Because I have a webpack loader set up for markdown files, I can import a single markdown file no problem, like this: import post from '../public/content/posts/[post name].md But

On Gatsby CMS how can i set the about page as a index page

£可爱£侵袭症+ 提交于 2021-01-29 09:53:44
问题 Hi I installed the gatsby cms starter with netlify, this project came with a started template called kaldi that have a basic post and pages, is easy to create fields and build the grapql data, but Im confuse the way that the route works, for example I can`t found the way to put the abot page as a index page this the index page that came ith the data info from the post fields import React from 'react' import PropTypes from 'prop-types' import { Link, graphql } from 'gatsby' import Layout from

How to use the container Hugo version with One Click Netlify CMS example

别等时光非礼了梦想. 提交于 2020-01-06 09:56:29
问题 In the Netlify CMS community chat, the question keeps coming up how to manage the Hugo version without a bin folder and executable. The one-click-hugo-cms example is a deploy to generate a Hugo static site and use Netlify CMS to be able to add posts for the site. The Issue : The site setup uses a bin folder to store the Hugo executable for simplicity, but the developer wants to use a different version of Hugo and keep it up to date without having to keep copying new executables to the Hugo

How to use the container Hugo version with One Click Netlify CMS example

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-06 09:54:31
问题 In the Netlify CMS community chat, the question keeps coming up how to manage the Hugo version without a bin folder and executable. The one-click-hugo-cms example is a deploy to generate a Hugo static site and use Netlify CMS to be able to add posts for the site. The Issue : The site setup uses a bin folder to store the Hugo executable for simplicity, but the developer wants to use a different version of Hugo and keep it up to date without having to keep copying new executables to the Hugo

Gatsby failing production build

浪尽此生 提交于 2019-12-23 05:26:29
问题 Recently, Gatsby started failing to build a production version of the site. Development version builds fine. It seems to be some Babel issue but I can't figure out what it is. I've upgraded everything, deleted the node_modules folder and yarn.lock but after building everything afresh again it fails the same way. I'm not particularly familiar with the inner workings Babel so I'm guessing this is something to do with the Babel settings shipped with Gatsby? ERROR #98123 WEBPACK Generating

Automatically add new posts to the Sidebar

倾然丶 夕夏残阳落幕 提交于 2019-12-12 19:06:56
问题 I'm using VuePress and NetlifyCMS as Content Management. I have 3 collections ( design , front-end and back-end ) which contains an indefinite number of pages. Those pages are created through the NetlifyCMS dashboard and are added to the defined folder. New design pages are added to the design folder. New front-end pages are added to the front-end folder. [...] This works fine but I'm facing an issue. Since my new pages are not defined in the sidebar config, they are not available from the

Using Netlify CMS with Hugo - creating posts with galleries

戏子无情 提交于 2019-12-05 03:30:40
问题 I'm new to both Hugo and Netlify, so it's possible I'm simply doing this wrong. I've successfully built and deployed a site with galleries, using Hugo, the Galleria plugin, and deploying to Netlify This has all worked. However, I want to try using the Netlify CMS, and am struggling to set it up to handle the gallery feature (it's doing fine for just writing a text post) I'm not sure if this is a limitation of Netlify CMS, or if I'm doing galleries in a way that isn't suited to static sites.