Questions tagged [ssg]

68 questions
0
votes
0 answers

NextJS refactoring API route from SSR to SSG

I have a SSR API that I want convert to SSG to generate it at build time /pages/api/dostuff/[cid].tsx export default async function handler(req, res) { const { cid } = req.query; let data; data = await doStuff(cid); …
Stormsson
  • 1,391
  • 2
  • 16
  • 29
0
votes
1 answer

Mock Service Worker with Gatsby.js

i'm using Mirage.js to fake api call's but mirage is causing some issues on our Gatsby project. i had the idea of using with Mock Service Worker(MSW) instead. i'm receiving an error when using setupWorker: [MSW] Failed to execute setupWorker in a…
0
votes
0 answers

How to generate js and html into the same folder using nuxtjs

Commonly, the generated result would looks like this: /dist -- /_nuxt ---- /static ------ ...(JS files) -- /page1 ---- index.html -- /page2 ---- index.html Depending on my task, I want to design a config.js for people who doesn't familiar with…
0
votes
1 answer

What is static site generation?

I know that static site generation idea, The question here is, if SSG gets fetched data at build time, in my next app I used an event handler to get some data according to the search keyword, and it works, How. This is my code: Below is the code for…
0
votes
1 answer

How to combine the SG page of next.js with firebase hosting and CSR routing for some pages

I want to publish my site on firebase hosting. I'm using Static Generate in Next.js to create a page. However, there are some pages that I want to do dynamic routing like a blog. The URL looks like this "blog/[slug]" If reloaded on a page other than…
kisetu
  • 157
  • 12
0
votes
1 answer

(ssg-wsg) Keep getting error with error code 403

i am in UAT Phase and try to call the UAT API but keep getting error with error code 403, what shd i do to be able to call the API, below pict is my code enter image description here
0
votes
1 answer

(ssg-wsg) Why is CorpPass ID required for Update/Delete course run with sessions API?

Does anyone know why is CorpPass Id a required field for "Update/Delete course run with sessions" API? Since this will be an NRIC, would it be a sensitive information to be used in the request body?
0
votes
1 answer

How to define which information in static pages will be hydrated on client with nuxt?

i am starting to learn more about the Jamstack, but i am still very confused in some aspects regarding dynamic contents in SSG Example: I have a blog like dev.to that is static, but i have users that can interact for example giving likes to a…
Kos-Mos
  • 415
  • 1
  • 5
  • 15
0
votes
1 answer

AWS Amplify ISR generating pages in background

I have a nextjs application that contains some pages that are using ISR and they update their data using some API calls when they are generated. This app is deployed on AWS Amplify. So when the deployment occurs it shows the pages generated and the…
0
votes
0 answers

getting middleware error as response in SFC Payment Gateway -> SFC Pay - Request Encryption API

I am getting middleware error as response on calling /skillsFutureCredits/claims/encryptRequests API API Url: https://uat-api.ssg-wsg.sg/skillsFutureCredits/claims/encryptRequests find SFC Pay - Request Encryption API here Request body: { …
0
votes
1 answer

Prerender header and footer components in NextJS

We have HEADER and FOOTER components inside _app.tsx and we are using SSR and SSG. But we want to prerender html for HEADER and FOOTER components also like the pages (for effective SEO). As we cant do use getServerSideProps and getStaticProps inside…
Dr tech
  • 11
  • 4
0
votes
1 answer

Error: getStaticPaths is required for dynamic SSG pages and is missing for '/blogs/[post]'

I try to npm run build . Build error occurred Error: getStaticPaths is required for dynamic SSG pages and is missing for '/blogs/[post]'. my code: function post (props){ console.log(props); return(
test
Raana Tashakori
  • 407
  • 1
  • 6
  • 18
0
votes
1 answer

Can we use these SSG WSG APIs within Wordpress/Learndash?

Can we use these SSG WSG APIs within Wordpress/Learndash? https://developer.ssg-wsg.sg/webapp/docs/product/4ZCqa7uABJeR6vtKUjsxyx/group/5QgnbY9GvH7KzcemkGY47V#
Dev SIT
  • 1
  • 1
0
votes
1 answer

How to store nuxtjs dynamically generated routes in vuex store

I'm trying to leverage nuxtjs SSG capabilities by creating a static web site where the pages content and navigation are fetched from an API. I already found my way around on how to dynamically generate the routes by defining a module where I use the…
Bruno Tavares
  • 450
  • 1
  • 4
  • 18
0
votes
1 answer

Proper .htaccess settings for Next.js SSG catch all routes

I've build a website, using Next.js and SSG - Static Site Generation. I'm serving the website on an Apache server and, therefore, because of this answer, I'm using the following .htaccess configuration: # Disable directory indexes and…
lvilasboas
  • 76
  • 1
  • 6