Questions tagged [static-site-generation]

Static Site Generators (SSG) are frameworks that build websites from static content. For example, one can build an online blog from a list of text files.

178 questions
0
votes
2 answers

Can I completely disable next js ssr?

So I want to learn how to disable NextJS ssr and host it on unsupported ssr hosting. I'm searching the internet to see if SSR can be fully disabled in NextJS by using NextPages, not NextApp, but I still don't know the truth because of a lack of…
0
votes
2 answers

Firebase deploy --only hosting error with next.js latest

I've created a next.js project with this command: npx create-next-app@latest testdemo And select these options to create: After that, I've run it locally, it works fine, build is fine too And the build create .next folder and within that, it…
0
votes
1 answer

Gatsby: Head meta tags get duplicated when hydration occurs on my static website. Using gatsby head api on gatsby 5.x.x

I have a gatsby static site. I mostly use gatsby-node.js to create all the pages. I have recently upgraded from gatsby 4 to 5 to make use of the gatsby head api. This works well and all the meta tags described using Head component are built into the…
0
votes
2 answers

How to link to the same page with a different parameter in SolidJS using SSG

I am struggling to get my SolidJS app to link user pages together using Static Site Generation (SSG). /* App.jsx */ function User() { const params = useParams() return…
0
votes
1 answer

Static Astro site CORS error after deploying to Netlify

I've created a static website using Astro on a private GitHub repository. I was able to connect it to Netlify. Everything is fine and I also get builds deployed; But when I load the main page (index.html at, let's say, https://example.com/) I get…
Shayan
  • 21
  • 5
0
votes
0 answers

Built-in revalidation for parent pages in NextJS ISG

I was wondering if there is a way to revalidate entity page and all pages related to it within its hierarchy. For example: blog (page with a list of all blog posts) blog/[post-id] (page with a particular blog post) I'm updating a particular blog…
0
votes
0 answers

AWS-Amplify Next.js App does with SSG does not use ISR

I deployed an App to AWS-Amplify, when building and serving it locally, it leverages ISR functionality, but after deployment It does not work anymore. I looked into the dynamoDb for the records, and there is new data, also the revalidate option is…
0
votes
0 answers

Page works on initial load, but shows 404 error on refresh or when i paste link in new tab

so when you click on a post, it redirects you to the post page, it works on load, but shows 404 on refresh. this is the code of the postpage: import { useEffect, useState } from "react"; import { useRouter } from "next/router"; export default…
0
votes
1 answer

astrojs/image works locally but not on Vercel

None of my local images are working, except when using the background property. Here's the astro component --- import { Image } from '@astrojs/image/components'; import CTA from './common/CTA.astro'; export const prerender = true; const IMAGE_SIZE…
Marshall
  • 149
  • 4
  • 10
0
votes
0 answers

Next.js SSG avoid Strapi URL exposure

We are generating Next.js SSG site from Strapi content and extensively use media field types in Strapi content types. When using next/image component we get following html in our build: ...
0
votes
0 answers

Why Nuxt3 SSG projects have an entry.js file?

I created a very simple Nuxt3 project with only two pages and a layout. Pages only have an h1. I generate my project with npm run generate command and this is my output folder: Why I have .js files like entry.9f5afebe.js with a size of 137KB if i…
0
votes
0 answers

Why the static site rendring isn`t working in nextJS 13.4.7?

This is my code in nextJS, why nextjs don`t rerender the component Home twice. Cause at first render props in component Home is undefined 'use client' import Layout from '@/components/layout/Layout' import MeetupList from…
0
votes
1 answer

dynamic routing and metadata generation in nextjs app router

I'm building a blog site in nextjs with app router. I'm stuck with static site generation. I tried reading this official doc of nextjs but wasn't able to grasp it .... please help me out. here is my project structure. I have a file where I'm…
0
votes
0 answers

Can I change the "astro" prefix in the classes generated from scoped styles?

I am learning astro. When I build the static website, the scoped styles get auto generated classes that have a prefix "astro". I was thinking may be I could change the prefix or remove it using astro.config.mjs or any other way. But I could not the…
0
votes
0 answers

React - Build everything into a single html file that contains SSG html and hydration scripts

In my scenario I'm trying to upload my react app to a website via our CMS. However, I can only copy-paste a block of html into the cms and don't have access to upload any files. I know this is an uncommon scenario but unfortunately I have to work…